/* ==========================================================================
   LTS — Base + Layout + Components
   ========================================================================== */

@import url('tokens.css');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  font-weight: 700;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--space-4); max-width: 68ch; }
p.lead { font-size: var(--fs-md); color: var(--text-secondary); }
a { color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { padding-left: 1.2em; }
button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 768px) { .container { padding-inline: var(--space-8); } }

.section { padding-block: var(--space-12); }
.section--tight { padding-block: var(--space-10); }
.section--alt { background: var(--bg-alt); }
.section--inverse { background: var(--bg-inverse); color: var(--text-inverse); }
.section--inverse h1, .section--inverse h2, .section--inverse h3 { color: var(--text-inverse); }
.section--inverse p { color: var(--text-inverse-secondary); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: var(--space-4);
}
.section--inverse .eyebrow { color: var(--green-400); }
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.section-head { max-width: 640px; margin-bottom: var(--space-8); }
.section-head.center { margin-inline: auto; text-align: center; }

/* --- Buttons --- */
.btn {
  --btn-fg: var(--white);
  --btn-bg: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.85em 1.5em;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  min-height: 44px;
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green-500); color: var(--navy-950); }
.btn-primary:hover { background: var(--green-400); box-shadow: var(--shadow-glow); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent-strong); color: var(--accent-strong); }
.section--inverse .btn-outline { color: var(--text-inverse); border-color: var(--border-inverse); }
.section--inverse .btn-outline:hover { border-color: var(--green-400); color: var(--green-400); }
.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 96px;
}
.nav-logo {
  display: flex;
  align-items: center;
  height: 64px;
  flex-shrink: 0;
}
.nav-logo img { height: 100%; width: auto; flex-shrink: 0; }
.nav-logo .logo-light { display: none; }
@media (prefers-color-scheme: dark) {
  .nav-logo .logo-dark { display: none; }
  .nav-logo .logo-light { display: block; }
}
:root[data-theme='dark'] .nav-logo .logo-dark { display: none; }
:root[data-theme='dark'] .nav-logo .logo-light { display: block; }
:root[data-theme='light'] .nav-logo .logo-dark { display: block; }
:root[data-theme='light'] .nav-logo .logo-light { display: none; }

.hero-brand {
  display: block;
  width: max-content;
  background: var(--white);
  padding: 20px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-6);
  max-width: 100%;
}
.hero-brand img { height: 100px; width: auto; display: block; max-width: 100%; }
@media (min-width: 640px) { .hero-brand img { height: 130px; } }
@media (min-width: 1024px) { .hero-brand img { height: 160px; } }
.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-6);
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  position: relative;
  padding: var(--space-2) 0;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--primary); }
.nav-links a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: var(--space-4); }
.lang-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}
.lang-toggle a {
  padding: 0.3em 0.75em;
  border-radius: var(--radius-full);
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-decoration: none;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.lang-toggle a.active { background: var(--primary); color: var(--white); }
.nav-toggle {
  display: inline-flex;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }
@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}
@media (max-width: 767px) {
  .nav-actions .lang-toggle,
  .nav-actions .btn-primary {
    display: none;
  }
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: 96px 0 0 0;
  background: var(--bg);
  z-index: 99;
  overflow-y: auto;
  padding: var(--space-6) var(--space-5);
}
.nav-mobile.is-open { display: block; }
.nav-mobile ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.nav-mobile a {
  display: block;
  padding: var(--space-4);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border-radius: var(--radius-md);
}
.nav-mobile a:hover, .nav-mobile a[aria-current='page'] { background: var(--bg-alt); color: var(--accent-strong); }
.nav-mobile .lang-toggle { margin-top: var(--space-6); align-self: flex-start; }

/* --- Hero --- */
.hero {
  position: relative;
  padding-block: var(--space-16) var(--space-12);
  background: radial-gradient(ellipse 120% 100% at 15% 0%, var(--navy-700) 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  color: var(--text-inverse);
  overflow: hidden;
}
.hero h1 { color: var(--white); max-width: 16ch; }
.hero p.lead { color: var(--text-inverse-secondary); font-size: var(--fs-lg); max-width: 46ch; }
.hero-grid { position: relative; z-index: 2; display: grid; gap: var(--space-8); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-6); }
.hero-net {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.55;
  pointer-events: none;
}
@media (min-width: 1024px) {
  .hero { padding-block: var(--space-16) var(--space-16); }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}

.page-hero {
  padding-block: var(--space-10) var(--space-8);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: var(--fs-3xl); max-width: 22ch; }
.breadcrumb {
  display: flex;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.breadcrumb a { text-decoration: none; color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent-strong); }

/* --- Grid utilities --- */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--navy-100);
  color: var(--navy-800);
  margin-bottom: var(--space-5);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: var(--space-3); }
.card-link {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-weight: 700; font-size: var(--fs-sm); color: var(--accent-strong);
  text-decoration: none;
}
.card-link svg { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease-out); }
.card-link:hover svg { transform: translateX(3px); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }
.tag {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- Footer --- */
.site-footer {
  background: var(--navy-950);
  color: var(--text-inverse-secondary);
  padding-block: var(--space-10) var(--space-6);
}
.footer-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-xl);
  color: var(--white);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.footer-word span { color: var(--green-500); }
.footer-tagline { font-size: var(--fs-xs); letter-spacing: 0.08em; color: var(--gray-300); margin-top: var(--space-2); text-transform: uppercase; }
.footer-col h4 { color: var(--white); font-size: var(--fs-sm); margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { text-decoration: none; color: var(--text-inverse-secondary); font-size: var(--fs-sm); transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--green-400); }
.footer-bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-inverse);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  font-size: var(--fs-2xs);
  color: var(--gray-500);
}

/* --- Reveal-on-scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Illustrations (fixed white card: SVG contents use light-mode-only colors) --- */
.region-map {
  background: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.region-map svg { width: 100%; height: auto; display: block; }

.board-illustration {
  background: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.board-illustration svg { width: 100%; height: auto; display: block; }

/* --- Methodology flow --- */
.flow {
  display: grid;
  gap: var(--space-6);
  counter-reset: step;
}
@media (min-width: 1024px) {
  .flow { grid-template-columns: repeat(6, 1fr); gap: var(--space-4); position: relative; }
  .flow::before {
    content: '';
    position: absolute;
    top: 26px; left: 8%; right: 8%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 14px);
  }
}
.flow-step { position: relative; z-index: 1; }
.flow-num {
  counter-increment: step;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--surface-inverse);
  color: var(--white);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: var(--space-4);
  border: 4px solid var(--bg);
}
.flow-num::before { content: counter(step); }

/* --- Contact form --- */
.form-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.two-col { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field .required { color: var(--accent-strong); }
.field input, .field select, .field textarea {
  font: inherit;
  padding: 0.85em 1em;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent-strong);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.field textarea { min-height: 120px; resize: vertical; }
.field-hint { font-size: var(--fs-xs); color: var(--text-secondary); }
.form-status {
  display: none;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--green-100);
  color: var(--green-600);
  font-weight: 600;
  margin-top: var(--space-5);
}
.form-status.is-visible { display: block; }
.form-status.is-error { background: #FDECEA; color: #B42318; }

/* --- Utility --- */
.u-mt-0 { margin-top: 0; }
.u-center { text-align: center; }
.u-max-narrow { max-width: 620px; margin-inline: auto; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
