/* ZODDIAK Foundation – Global Base Styles
   - Design tokens, fonts, resets
   - Base layout primitives and typography
   - Utilities, theme helpers, accessibility/CMS tweaks
*/

/* ---------------------------------------------
   Design Tokens (CSS Variables)
--------------------------------------------- */
:root {
  /* colors */
  --bg-dark: #161616;
  --bg-deep: #111214;
  --text-prim: #F2F2F2;
  --text-sec: #BEBEBE;
  --text-muted: #FFFFFF80;
  --gold-500: #CDA24A;
  --gold-400: #E1C572;
  --divider: rgba(255,255,255,.08);

  /* thematic colors */
  --theme-history: #D45163;     /* history, culture, spirituality */
  --theme-business: #6C7B9F;    /* business, investments, charity */
  --theme-science: #9F5A53;     /* science, education, enlightenment */
  --theme-sport: #698678;       /* sport, health, ecology */

  /* sizing */
  --container: 1400px;
  --gutter: 24px;
  --nav-h: 72px;
  --nav-h-scrolled: 64px;
  --nav-gap: 28px;

  /* hero */
  --hero-h: 720px;
  --seal-size: 280px;
  --tagline-fs: 22px;
  --cta-fs: 14px;

  /* typography */
  --font-primary: "Rock Star Narrow", "Arial Narrow", Impact, system-ui, sans-serif;
  --font-secondary: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-display: var(--font-primary);
  --font-body: var(--font-secondary);

  /* motion */
  --dur-fast: 120ms;
  --dur: 320ms;
  --ease: cubic-bezier(.2,0,0,1);
}

/* ---------------------------------------------
   Local Font Declarations
--------------------------------------------- */
@font-face {
  font-family: 'Rock Star Narrow';
  src: url("/static/fonts/RockStarNarrow-Regular.554a1bad27b4.eot");
  src: url("/static/fonts/RockStarNarrow-Regular.554a1bad27b4.eot?#iefix") format('embedded-opentype'),
       url("/static/fonts/RockStarNarrow-Regular.2c41817c1e0e.woff2") format('woff2'),
       url("/static/fonts/RockStarNarrow-Regular.a6945e99e728.woff") format('woff'),
       url("/static/fonts/RockStarNarrow-Regular.fc736597deba.ttf") format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url("/static/fonts/SourceSerif4Roman-Regular.90153ef0913a.eot");
  src: url("/static/fonts/SourceSerif4Roman-Regular.90153ef0913a.eot?#iefix") format('embedded-opentype'),
       url("/static/fonts/SourceSerif4Roman-Regular.6775c8928ea3.woff2") format('woff2'),
       url("/static/fonts/SourceSerif4Roman-Regular.43db4969197c.woff") format('woff'),
       url("/static/fonts/SourceSerif4Roman-Regular.885d51a70cbd.ttf") format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------
   Reset / Base
--------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: var(--bg-dark);
  color: var(--text-prim);
  font: 400 16px/1.6 var(--font-primary);
}

@media (max-width: 950px) {
  html, body {
    font: 400 14px/1.6 var(--font-primary);
  }
}

/* ---------------------------------------------
   Base Layout Blocks
--------------------------------------------- */
.section {
  padding: 96px 0;
  background-color: var(--bg-dark);
}

.section.bg-deep {
  background-color: var(--bg-deep);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-primary);
  font-weight: 400;
  font-style: normal;
  font-size: 36px;
  line-height: 100%;
  letter-spacing: 0.16em;
  color: var(--gold-500);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-subtitle {
  font-family: var(--font-secondary);
  font-size: 14px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 575px) {
  .section {
    padding-top: 60px;
    padding-bottom: 0;
  }

  .container {
    padding: 0 16px;
  }

  .section-title {
    font-size: 20px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .section {
    padding: 72px 0;
  }

  .container {
    padding: 0 16px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    padding: 0 24px;
  }
}

/* ---------------------------------------------
   Base Typography Helpers
--------------------------------------------- */
.body-text {
  font-family: var(--font-secondary);
  font-weight: 400;
  font-style: normal;
  font-size: 400 14px/1.6 var(--font-primary);
  line-height: 1.6;
  letter-spacing: 0.16em;
  color: var(--text-sec);
  
}

.small-text {
  font-family: var(--font-secondary);
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

/* ---------------------------------------------
   Utility Classes
--------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }

/* Thematic Color Classes */
.text-history { color: var(--theme-history); }
.text-business { color: var(--theme-business); }
.text-science { color: var(--theme-science); }
.text-sport { color: var(--theme-sport); }

.bg-history { background-color: var(--theme-history); }
.bg-business { background-color: var(--theme-business); }
.bg-science { background-color: var(--theme-science); }
.bg-sport { background-color: var(--theme-sport); }

.bg-history-10 { background-color: rgba(212, 81, 99, 0.1); }
.bg-business-10 { background-color: rgba(108, 123, 159, 0.1); }
.bg-science-10 { background-color: rgba(159, 90, 83, 0.1); }
.bg-sport-10 { background-color: rgba(105, 134, 120, 0.1); }

.bg-history-20 { background-color: rgba(212, 81, 99, 0.2); }
.bg-business-20 { background-color: rgba(108, 123, 159, 0.2); }
.bg-science-20 { background-color: rgba(159, 90, 83, 0.2); }
.bg-sport-20 { background-color: rgba(105, 134, 120, 0.2); }

.border-history { border-color: var(--theme-history); }
.border-business { border-color: var(--theme-business); }
.border-science { border-color: var(--theme-science); }
.border-sport { border-color: var(--theme-sport); }

/* Font Utility Classes */
.font-primary { font-family: var(--font-primary); }
.font-secondary { font-family: var(--font-secondary); }
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* ---------------------------------------------
   Accessibility / Motion / CMS Toolbar
--------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* django CMS toolbar adjustments: keep at top and offset content & fixed nav */
html.cms-toolbar .cms-toolbar {
  top: 0 !important;
  bottom: auto !important;
}

/* Default toolbar height */
html.cms-toolbar body { padding-top: 46px !important; padding-bottom: 0 !important; }

/* Position navbar below CMS toolbar to reveal logo and language switcher */
html.cms-toolbar .nav {
  top: 46px !important;
}

html.cms-toolbar-expanded .nav {
  top: 46px !important;
}

/* Ensure mobile nav overlay respects the CMS toolbar */
html.cms-toolbar .nav__overlay {
  top: 46px !important;
}

html.cms-toolbar-expanded .nav__overlay {
  top: 46px !important;
}

html.cms-ready.cms-toolbar .nav__overlay {
  top: 46px !important;
}

html.cms-ready.cms-toolbar-expanded .nav__overlay {
  top: 46px !important;
}

/* Skip to content */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--gold-500);
  color: #000;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1001;
}

.skip-to-content:focus {
  top: 6px;
}

/* ---------------------------------------------
   Focus Areas Grid (Shared across all pages)
--------------------------------------------- */
/* Show/hide appropriate grids based on screen size */
@media (max-width: 767px) {
  .focus-areas-grid-desktop {
    display: none !important;
  }
  .focus-areas-grid-mobile {
    display: grid !important;
  }
}

@media (min-width: 768px) {
  .focus-areas-grid-desktop {
    display: grid !important;
  }
  .focus-areas-grid-mobile {
    display: none !important;
  }
}

/* Desktop/Tablet Grid: 4 columns x 3 rows */
.focus-areas-grid-desktop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-auto-flow: column;
  gap: 64px 48px;
  margin-top: 64px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 32px;
}

/* Mobile Grid: 3 columns x 4 rows */
.focus-areas-grid-mobile {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 32px 16px;
  margin-top: 48px;
  padding: 0 16px;
}

.focus-area-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all var(--dur) var(--ease);
  padding: 16px 0px;
  width: 100%;
}

.focus-area-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all var(--dur) var(--ease);
}

.focus-area-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all var(--dur) var(--ease);
}

.focus-area-item h4 {
  font-family: "Rock Star Narrow";
  font-weight: 400;
  font-style: Regular;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
  transition: all var(--dur) var(--ease);
  text-align: center;
  width: 100%;
}

.focus-area-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.focus-area-link:hover {
  text-decoration: none;
}

.focus-area-item:hover {
  transform: translateY(-4px);
}

.focus-area-item:hover .focus-area-icon {
  transform: scale(1.05);
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
  .focus-areas-grid-desktop {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-auto-flow: row;
    gap: 20px 30px;
    margin-top: 48px;
    padding: 0 0px;
  }

  .focus-area-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
  }

  .focus-area-item h4 {
    font-size: 12px;
  }
}

/* Desktop adjustments */
@media (min-width: 992px) {
  .focus-areas-grid-desktop {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-auto-flow: row;
  }
}

/* Mobile Focus Areas Override - Force 3x4 grid inside bg-deep section */
@media screen and (max-width: 767px) {
  .section.bg-deep .container .focus-areas-grid-mobile {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(4, 1fr) !important;
    grid-auto-flow: row !important;
    gap: 32px 16px !important;
    margin-top: 48px !important;
    padding: 0 16px !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(2) { grid-column: 2; grid-row: 1; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(3) { grid-column: 3; grid-row: 1; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(4) { grid-column: 1; grid-row: 2; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(5) { grid-column: 2; grid-row: 2; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(6) { grid-column: 3; grid-row: 2; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(7) { grid-column: 1; grid-row: 3; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(8) { grid-column: 2; grid-row: 3; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(9) { grid-column: 3; grid-row: 3; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(10) { grid-column: 1; grid-row: 4; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(11) { grid-column: 2; grid-row: 4; }
  .section.bg-deep .container .focus-areas-grid-mobile > :nth-child(12) { grid-column: 3; grid-row: 4; }
}

@media (max-width: 575px) {
  .focus-area-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
  }

  .focus-area-item h4 {
    font-size: 10px;
    letter-spacing: 0.12em;
  }
}


