/* ===========================================================================
   base.css — design tokens, reset, typography, layout, core components
   Apple-style near-monochrome system. Loaded first.
   =========================================================================== */

/* ------------------------------- 1. TOKENS ------------------------------- */
:root {
  /* ===== Trio brand palette ===== */
  --bg-white: #ffffff;          /* clean white — cards / alternating sections */
  --bg-gray:  #EFE8D8;          /* Warm Sand / Ivory — main light surface */
  --bg-black: #0A3C6F;          /* Deep Tech Blue — dramatic "dark" sections */
  --bg-deep2: #072c52;          /* deeper navy for gradients */

  /* Text */
  --text:   #363636;            /* Charcoal */
  --text-2: #5b6473;            /* muted slate — secondary text */

  /* Accent — Deep Tech Blue (primary) + Sand Gold (sparing highlight) */
  --accent:       #0A3C6F;
  --accent-hover: #0e4f8f;
  --accent-gray:  #0A3C6F;      /* dark enough on #F4F6FB; no lightening needed */
  --gold:         #AD8E62;      /* decorative accents / shapes / on-dark fills */
  --gold-hover:   #c0a074;
  --gold-deep:    #8a6d3e;      /* gold TEXT on light surfaces (AA-readable) */
  --gold-soft:    rgba(173, 142, 98, 0.16);

  /* Hairlines */
  --line: #E2D8C2;              /* warm sand border */

  /* On Deep-Blue sections */
  --text-on-black:   #ffffff;
  --text-2-on-black: #aebdd6;
  --line-on-black:   rgba(255, 255, 255, 0.16);
  --tile-on-black:   #0d3055;

  /* Type — Montserrat headings, Inter body */
  --font:      "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Montserrat", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);

  /* Layout */
  --maxw-text: 820px;
  --maxw-wide: 1080px;
  --nav-h: 48px;
  --section-pad: clamp(80px, 12vw, 160px);
}

/* ------------------------------- 2. RESET -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ol, ul { margin: 0; padding: 0; list-style: none; }

section, .anchor { scroll-margin-top: calc(var(--nav-h) + 8px); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.section--black :focus-visible { outline-color: #c9a86a; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 1000;
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ------------------------------- 3. LAYOUT ------------------------------- */
.section {
  position: relative;
  padding: var(--section-pad) 22px;
}
/* Faint geometric brand texture so light sections never read as blank white. */
.section--white {
  background-color: var(--bg-white);
  background-image: radial-gradient(rgba(122, 98, 60, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.section--gray {
  background-color: var(--bg-gray);
  background-image: radial-gradient(rgba(122, 98, 60, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}
/* "Dark" sections = Deep Tech Blue, with a subtle navy gradient for depth. */
.section--black {
  background: linear-gradient(180deg, var(--bg-black), var(--bg-deep2));
  color: var(--text-on-black);
}

.container       { max-width: var(--maxw-wide); margin-inline: auto; }
.container--text { max-width: var(--maxw-text); margin-inline: auto; }
.center          { text-align: center; }

.mt-s  { margin-top: 14px; }
.mt-m  { margin-top: 24px; }
.mt-l  { margin-top: 40px; }
.mt-xl { margin-top: clamp(48px, 7vw, 80px); }

/* ----------------------------- 4. TYPOGRAPHY ----------------------------- */
.eyebrow {
  font-family: var(--font-head);
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow--gray { color: var(--text-2); }
.section--black .eyebrow { color: #c9a86a; } /* Sand Gold on Deep Tech Blue */

.display {
  font-family: var(--font-head);
  font-size: clamp(46px, 6.6vw, 92px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.06;
}
.headline {
  font-family: var(--font-head);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.subhead {
  font-family: var(--font-head);
  font-size: clamp(21px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.18;
  color: var(--text);
}
.lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.52;
  color: var(--text-2);
}
.section--black .lead { color: var(--text-2-on-black); }

.quiet { font-size: 15px; color: var(--text-2); line-height: 1.5; }
.section--black .quiet { color: var(--text-2-on-black); }

/* --------------------------- 5. BUTTONS / LINKS -------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 12px 24px;
  border: none;
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(10, 60, 111, 0.32); }
.btn:active { transform: translateY(0); }

.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}
.section--black .link { color: #8fb6e0; }
.link .chev { transition: transform 0.25s var(--ease); font-weight: 400; }
.link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.link:hover .chev { transform: translateX(3px); }

.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 32px;
}

/* ------------------------------ 6. STICKY NAV ---------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: rgba(0, 0, 0, 0.1); }

.nav-inner {
  max-width: 1024px;
  margin-inline: auto;
  height: 100%;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}
.wordmark img { width: 34px; height: 34px; object-fit: cover; object-position: center; }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-size: 12px;
  color: var(--text);
  opacity: 0.86;
  transition: opacity 0.2s var(--ease);
}
.nav-links a:hover { opacity: 1; }

.nav-cta {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.nav-cta:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transform: translateX(-50%);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span { top: 50%; margin-top: -0.75px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: translateX(-50%) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 880;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 12px 22px 28px;
  display: none;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { display: flex; animation: menuIn 0.3s var(--ease); }
.mobile-menu a {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a.mobile-cta { color: var(--accent); border-bottom: none; }

/* -------------------------------- 7. HERO -------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(90px, 14vh, 170px) 22px clamp(70px, 10vh, 120px);
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; }
.hero .display { max-width: 16ch; }
.hero .lead { max-width: 640px; margin-inline: auto; }

.solution-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 760px;
  margin-inline: auto;
}
.solution-row a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.solution-row a:hover { border-color: #b0b0b6; background: #fff; transform: translateY(-1px); }
.solution-row .sr-num { color: var(--accent); font-variant-numeric: tabular-nums; }

.scroll-cue {
  position: relative;
  z-index: 2;
  margin-top: clamp(40px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.scroll-cue svg { width: 18px; height: 18px; }

/* ---------------------------- 8. BIG-NUMBER STATS ------------------------ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(40px, 6vw, 72px);
  text-align: center;
}
.stat-figure {
  font-family: var(--font-head);
  font-size: clamp(56px, 9vw, 104px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 18px;
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--text-2);
  line-height: 1.45;
  max-width: 30ch;
  margin-inline: auto;
}
.stat-source { margin-top: 12px; font-size: 12px; color: var(--text-2); }

/* --------------------------- 9. SOLUTION SECTIONS ------------------------ */
.solution-head { text-align: center; max-width: var(--maxw-text); margin-inline: auto; position: relative; z-index: 2; }

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(12px, 1.4vw, 18px);
  margin-top: clamp(40px, 6vw, 72px);
}
.tile {
  border-radius: clamp(18px, 2vw, 28px);
  padding: clamp(24px, 3vw, 40px);
  background: var(--bg-gray);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section--white .tile { background: var(--bg-gray); }
.section--gray  .tile { background: var(--bg-white); }

.tile-icon { color: var(--text); opacity: 0.9; }
.tile-icon svg { width: 30px; height: 30px; }
.tile-title { font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.tile-detail { font-size: 16px; color: var(--text-2); line-height: 1.45; }

.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-6 { grid-column: span 6; }

.tile--stat { justify-content: space-between; gap: 18px; }
.tile--stat .tile-figure {
  font-family: var(--font-head);
  font-size: clamp(52px, 6.5vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.tile--stat .tile-statlabel { font-size: 16px; color: var(--text-2); line-height: 1.4; }
.tile--stat .tile-source { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.secondary-stat { margin-top: 22px; text-align: center; font-size: 15px; color: var(--text-2); }
.secondary-stat strong { color: var(--text); font-weight: 600; }

/* Apple "Compare" table */
.compare-wrap { margin-top: clamp(48px, 6vw, 80px); max-width: 920px; margin-inline: auto; overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.compare caption {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-bottom: 22px;
}
.compare th, .compare td {
  padding: clamp(14px, 1.6vw, 20px) clamp(10px, 1.6vw, 22px);
  text-align: center;
  border-bottom: 1px solid var(--line);
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.35;
}
.compare thead th {
  font-size: clamp(13px, 1.3vw, 16px);
  font-weight: 600;
  letter-spacing: -0.01em;
  vertical-align: bottom;
}
.compare .c-dim { text-align: left; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.compare .c-old { color: var(--text-2); }
.compare .c-new { color: var(--text); font-weight: 500; }
.win-label {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-deep);  /* deep gold — premium highlight, AA-readable on light */
  text-transform: uppercase;
}

/* Bottom line */
.bottomline { margin-top: clamp(56px, 7vw, 96px); text-align: center; max-width: 920px; margin-inline: auto; }
.bottomline-quote {
  font-family: var(--font-head);
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--text);
}
.bottomline-figure {
  margin-top: 36px;
  font-family: var(--font-head);
  font-size: clamp(64px, 11vw, 132px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.bottomline-figure .unit { font-size: 0.42em; font-weight: 600; color: var(--text-2); letter-spacing: -0.02em; }

.who { margin-top: 40px; text-align: center; font-size: 15px; color: var(--text-2); }
.who strong { color: var(--text); font-weight: 600; }

/* ------------------------------ 10. APPROACH ----------------------------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 20px);
  margin-top: clamp(48px, 6vw, 80px);
  position: relative;
  z-index: 2;
}
.principle {
  background: var(--tile-on-black);
  border: 1px solid var(--line-on-black);
  border-radius: clamp(18px, 2vw, 28px);
  padding: clamp(28px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.principle .tile-icon { color: var(--text-on-black); }
.principle .tile-title { color: var(--text-on-black); }
.principle .tile-detail { color: var(--text-2-on-black); }

/* ------------------------------ 11. CONTACT ------------------------------ */
.contact-lines { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; margin-top: 44px; }
.contact-item { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.contact-item .ci-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }
.contact-item .ci-value { font-size: 17px; font-weight: 500; color: var(--text); }

/* ------------------------------ 12. FOOTER ------------------------------- */
.footer {
  background: var(--bg-gray);
  color: var(--text-2);
  padding: 48px 22px 40px;
  font-size: 12px;
  line-height: 1.4;
  border-top: 1px solid var(--line);
}
.footer-inner { max-width: var(--maxw-wide); margin-inline: auto; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.footer-col h4 { font-size: 12px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--text-2); padding: 5px 0; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer-bottom .wordmark { font-size: 16px; color: var(--text); align-items: flex-start; }
.footer-bottom .wordmark img { width: 28px; height: 28px; }
.footer-tagline { display: block; font-family: var(--font); font-size: 11px; font-weight: 400; letter-spacing: 0.03em; text-transform: none; color: var(--gold-deep); margin-top: 1px; }

/* Brand lockup / logo-video slot at the top of the hero */
.brand-intro { display: flex; justify-content: center; margin-bottom: clamp(26px, 4vw, 48px); }
.brand-video { width: clamp(200px, 26vw, 320px); height: auto; display: block; }
.brand-lockup { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.brand-mark { width: clamp(52px, 6.5vw, 72px); height: auto; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.01em; line-height: 1; color: var(--text); }
.brand-tag { font-family: var(--font); font-size: clamp(12px, 1.3vw, 15px); letter-spacing: 0.08em; color: var(--gold-deep); }
.footer-note { color: var(--text-2); }

/* ----------------------------- 13. RESPONSIVE ---------------------------- */
@media (max-width: 980px) {
  .col-2, .col-3 { grid-column: span 3; }
  .stat-grid { gap: clamp(36px, 6vw, 56px); }
}

/* Tablet (735–980px): bento is 2-up; with 7 tiles the last one would orphan in
   a half-empty row — stretch it full width so the trailing row stays balanced. */
@media (min-width: 735px) and (max-width: 980px) {
  .bento > .tile:last-child:nth-child(odd) { grid-column: span 6; }
}

@media (max-width: 820px) {
  .nav-links, .nav > .nav-inner > .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 734px) {
  :root { --section-pad: clamp(64px, 16vw, 96px); }
  .bento { grid-template-columns: 1fr; }
  .col-2, .col-3, .col-6 { grid-column: span 1; }
  .stat-grid { grid-template-columns: 1fr; gap: 56px; }
  .principles { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .compare th, .compare td { padding: 13px 8px; }
  .compare .c-dim { white-space: normal; }
}

@media (max-width: 420px) {
  .footer-cols { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .compare th, .compare td { font-size: 13px; padding: 12px 6px; }
}
