/* ========================================================================
   CONSIL — Design System
   ======================================================================== */

:root {
  /* Colors — pulled from logo */
  --navy-950: #0E1130;
  --navy-900: #14173A;
  --navy-800: #1B1F4B;        /* primary brand */
  --navy-700: #262C66;
  --navy-600: #3A4288;
  --navy-300: #9CA1C7;
  --navy-200: #C8CCE2;
  --navy-100: #E4E6F1;

  --cyan-500: #4FB3C9;        /* accent */
  --cyan-400: #6FC4D7;
  --cyan-300: #9BD7E3;

  --cream-50:  #FAF7F0;
  --cream-100: #F5F1E8;       /* main bg */
  --cream-200: #ECE6D5;
  --cream-300: #DCD3BB;

  --ink-900: #0B0E24;
  --ink-700: #2A2F4F;
  --ink-500: #585D7C;
  --ink-400: #7A7F9E;

  --line: rgba(27, 31, 75, 0.12);
  --line-strong: rgba(27, 31, 75, 0.22);

  /* Type */
  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Spacing scale (8pt) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 160px;

  --container: 1360px;
  --gutter: clamp(20px, 4vw, 56px);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-xl: 28px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  background: var(--cream-100);
  color: var(--ink-900);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: clip;
}
html { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--navy-800); color: var(--cream-100); }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-700);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  display: inline-block;
}
.eyebrow.no-line::before { display: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--navy-900);
  text-wrap: balance;
}
.display {
  font-size: clamp(56px, 9.5vw, 168px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.h1 { font-size: clamp(40px, 5.5vw, 88px); letter-spacing: -0.035em; line-height: 0.98; }
.h2 { font-size: clamp(32px, 4vw, 64px); letter-spacing: -0.03em; line-height: 1.02; }
.h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.02em; line-height: 1.15; font-weight: 500; }

p { margin: 0; text-wrap: pretty; }
.lead {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--ink-700);
  letter-spacing: -0.012em;
  max-width: 62ch;
}
.body-lg { font-size: 18px; line-height: 1.6; color: var(--ink-700); }
.muted { color: var(--ink-500); }
.mono { font-family: var(--font-mono); }

.serif-italic { font-style: italic; font-family: "Instrument Serif", "Cormorant Garamond", Georgia, serif; font-weight: 400; }

/* ---------- layout ---------- */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section { padding: clamp(72px, 10vw, 144px) 0; position: relative; }
.divider { height: 1px; background: var(--line); margin: 0 var(--gutter); }

/* ---------- navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 241, 232, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(245, 241, 232, 0.88);
}
.nav .brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.02em;
  color: var(--navy-900);
}
.nav .brand img { height: 28px; width: auto; }
.nav .brand .tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-700);
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-size: 14px;
  letter-spacing: -0.005em;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy-900);
  position: relative;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { background: rgba(27,31,75,.06); }
.nav-links a.active { color: var(--navy-800); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1px; background: var(--navy-800);
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.lang a {
  padding: 8px 12px;
  color: var(--ink-500);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang a.on { background: var(--navy-800); color: var(--cream-100); }
.lang a:not(.on):hover { background: rgba(27,31,75,.06); color: var(--navy-900); }
.menu-btn { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 14px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; color: var(--navy-900); align-items: center; gap: 8px; }
.menu-btn .bars { display: inline-flex; flex-direction: column; gap: 3px; }
.menu-btn .bars i { display: block; width: 14px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.menu-btn[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

/* mobile drawer */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--cream-100);
  z-index: 110;
  display: flex; flex-direction: column;
  padding: 92px var(--gutter) 32px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  overflow-y: auto;
}
.mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
/* When menu is open, lift the nav above the drawer and make it solid so
   only the hamburger / brand are visible on top of a clean background. */
body.menu-open .nav { z-index: 120; background: var(--cream-100); border-bottom-color: var(--line); }
body.menu-open .nav .brand .tag,
body.menu-open .nav-right .btn:not(.menu-btn),
body.menu-open .nav-right .lang { display: none; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu ul a {
  display: block;
  font-size: clamp(28px, 8vw, 40px);
  letter-spacing: -0.025em;
  font-weight: 500;
  color: var(--navy-900);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu ul a.active { color: var(--cyan-500); }
.mobile-menu .mm-foot { margin-top: auto; padding-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.mobile-menu .mm-foot .lang { align-self: flex-start; }
body.menu-open { overflow: hidden; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn .arrow {
  width: 18px; height: 18px;
  transition: transform .3s var(--ease);
}
.btn:hover .arrow { transform: translate(3px, -3px); }
.btn-primary { background: var(--navy-800); color: var(--cream-100); }
.btn-primary:hover { background: var(--navy-900); }
.btn-ghost { background: transparent; color: var(--navy-900); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(27,31,75,.06); }
.btn-cyan { background: var(--cyan-500); color: var(--navy-900); }
.btn-cyan:hover { background: var(--cyan-400); }

/* ---------- chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--navy-900);
  background: rgba(255,255,255,.4);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-500); }

/* ---------- reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- footer ---------- */
.footer {
  background: var(--navy-900);
  color: var(--cream-100);
  padding: clamp(64px, 8vw, 112px) 0 32px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 400px at 90% 0%, rgba(79,179,201,.18), transparent 60%),
    radial-gradient(600px 300px at 0% 100%, rgba(79,179,201,.10), transparent 60%);
  pointer-events: none;
}
.footer .wrap { position: relative; }
.footer .big {
  font-size: clamp(48px, 9vw, 156px);
  letter-spacing: -0.045em;
  line-height: 0.9;
  font-weight: 500;
  color: var(--cream-50);
  margin-bottom: 64px;
}
.footer .big em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: var(--cyan-300); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-300);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--cream-100); font-size: 15px; opacity: .85; }
.footer ul a:hover { opacity: 1; color: var(--cyan-300); }
.footer .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(245,241,232,.55);
  letter-spacing: 0.02em;
}
.footer .brand-mark { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.footer .brand-mark img { height: 32px; filter: brightness(0) invert(1); }
.footer .brand-mark .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan-300); }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer .meta { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 900px) {
  .nav { padding: 14px var(--gutter); }
  .nav-links { display: none; }
  .nav .brand .tag { display: none; }
  .nav-right .btn { display: none; }
  .nav-right .lang { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 480px) {
  :root { --gutter: 18px; }
  .nav .brand img { height: 24px; }
  .display { font-size: clamp(40px, 12vw, 72px) !important; }
  .h1 { font-size: clamp(32px, 9vw, 56px) !important; }
  .h2 { font-size: clamp(28px, 7.5vw, 44px) !important; }
}
/* Prevent any element from forcing horizontal scroll */
.wrap > * { max-width: 100%; }

/* responsive grid helper */
@media (max-width: 760px) {
  .grid-resp { grid-template-columns: 1fr !important; gap: 24px !important; }
}

/* utility */
.center { text-align: center; }
.flex { display: flex; }
.between { justify-content: space-between; }
.aic { align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 24px; }
.gap-6 { gap: 32px; }
