/* Aingen website — layout follows the Figma "Web / Section 1" frames (page1 Home, page2 History, page3 Contact).
   Figma artboard is 1728px wide with 100px side margins; sizes below scale down from that. */

/* ───────── Tokens ───────── */
:root {
  --navy: #01162c;          /* buttons */
  --navy-pill: #03121f;     /* active nav pill */
  --footer: #001a2e;
  --ink: #000;
  --ink-90: rgba(0, 0, 0, 0.9);
  --ink-40: rgba(0, 0, 0, 0.4);
  --muted: #6c6c6c;
  --surface: #fff;
  --band: #f4f4f4;          /* business area / history background */
  --band-light: #f9f9f9;    /* location background */
  --rule: #c0c0c0;
  --map: #e3e3e3;
  --card-warm: #f3efe7;
  --link: #0f5dcb;
  --logo-grey: #888;

  --font-sans: "Poppins", "Pretendard", system-ui, sans-serif;
  --font-serif: "Libre Baskerville", "Pretendard", Georgia, serif;
  --font-flex: "Google Sans Flex", "Google Sans", "Pretendard", system-ui, sans-serif;

  --gutter: clamp(20px, 5.8vw, 100px);
  --content: 1528px;
  --radius: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="ko"] body { word-break: keep-all; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-size: 14px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.wrap { width: 100%; max-width: calc(var(--content) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--navy); color: #fff; text-decoration: none; white-space: nowrap;
  border-radius: var(--radius); font-family: var(--font-sans); font-weight: 400;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.15));
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: #0b2a4f; }
.btn:active { transform: scale(0.98); }
.btn--lg { min-width: 224px; height: 60px; padding: 0 32px; font-size: 16px; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15)); }
.btn img { width: 24px; height: 24px; }

/* ───────── Header ───────── */
/* Sticky: stays on screen while scrolling. Full-bleed so its scrolled background spans the
   viewport; the side padding keeps the contents on the page grid. The extra 13px bottom padding
   is cancelled by the negative margin (no layout shift), and top:-13px trims the top padding
   once stuck so the bar reads 13 / 32 / 13. */
.header {
  position: sticky; top: -13px; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 26px max(var(--gutter), calc((100% - var(--content)) / 2)) 13px;
  margin-bottom: -13px;
  transition: background-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.header.is-stuck {
  background: rgba(255, 255, 255, 0.6); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  -webkit-backdrop-filter: saturate(160%) blur(8px); backdrop-filter: saturate(160%) blur(8px);
}
.header__logo { justify-self: start; display: flex; }
.header__logo img { width: 124px; height: 30px; object-fit: contain; }

/* Figma (3rd pass): plain text links, ~51px apart; current page in SemiBold */
.main-nav { display: flex; align-items: center; gap: 51px; height: 32px; }
.main-nav a {
  display: flex; align-items: center; min-height: 44px; margin: -6px 0; /* 44px tap area without growing the 32px header row */
  font: 400 13px/20px var(--font-sans); color: #5e5e5e; text-decoration: none; white-space: nowrap;
  transition: color var(--dur);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="page"] { font-weight: 600; color: #424242; }

.header__actions { justify-self: end; display: flex; align-items: center; gap: 14px; }
.lang { display: flex; align-items: center; }
.lang__btn {
  min-width: 30px; height: 32px; padding: 0 4px; border: 0; cursor: pointer; background: transparent;
  font: 500 12px/1 var(--font-sans); letter-spacing: 0.04em; color: #a3a3a3;
  transition: color var(--dur);
}
.lang__btn[aria-pressed="true"], .lang__btn:hover { color: var(--ink); }

/* Mobile menu button (shown at ≤900px, where the nav becomes a dropdown) */
.menu-toggle {
  display: none; place-items: center; width: 44px; height: 44px; margin: -6px -10px -6px 0;
  border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.menu-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-toggle__close { display: none; }
.is-menu-open .menu-toggle__bars { display: none; }
.is-menu-open .menu-toggle__close { display: inline; }

/* ───────── Shared section bits ───────── */
.section-label {
  font: 400 20px/1.2 var(--font-sans); text-transform: uppercase; color: #4f5256;
}
.kicker { font: 400 16px/24px var(--font-sans); text-transform: uppercase; color: #5e5e5e; }
.serif-body { font-family: var(--font-serif); font-size: 16px; line-height: 28px; color: var(--ink-90); }
.display {
  font-family: var(--font-sans); font-weight: 500; color: var(--ink);
  font-size: clamp(40px, 4.4vw, 76px); line-height: 1.33; letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ───────── Home: hero (page1) ───────── */
.hero {
  position: relative; isolation: isolate;
  min-height: clamp(560px, 66.7vw, 1126px); display: flex; align-items: flex-end; padding-bottom: clamp(64px, 6.5vw, 112px);
}
.hero > .wrap { position: relative; z-index: 1; }
/* 3D graph fills the empty top-right; fades in once WebGL is ready */
.hero__scene {
  position: absolute; z-index: 0; top: 64px; right: 0;
  width: 60%; height: 84%; /* top-right, reaching down beside the headline */
  opacity: 0; transition: opacity 1200ms var(--ease);
}
.hero__scene.is-ready { opacity: 1; }
.hero__scene canvas { width: 100%; height: 100%; display: block; }

/* ───────── Dark heroes (home + history): header sits on top of the animated background ───────── */
.dark-hero { --header-h: 58px; }
/* Home hero fills exactly one viewport (vh = the large viewport on mobile, so the next section
   never peeks out); js/hero-snap.js pins it and snaps to the next section past a scroll threshold */
.home .hero {
  min-height: 100vh;
  margin-top: calc(var(--header-h) * -1 - 13px); padding-top: var(--header-h); /* -13px: see .page-hero */
  background: #01040e; /* matches the 3D scene's own background */
  color: #fff;
}
/* soften the canvas edges so the scene melts into the hero background */
.home .hero__scene {
  top: calc(var(--header-h) + 6px);
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
/* dotted wave: screen-blended so it adds light over both the background and the graph */
.hero__wave {
  position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 48%;
  pointer-events: none; mix-blend-mode: screen;
  opacity: 0; transition: opacity 1600ms var(--ease);
  -webkit-mask-image: linear-gradient(to top, #000 45%, transparent 100%);
          mask-image: linear-gradient(to top, #000 45%, transparent 100%);
}
.hero__wave.is-ready { opacity: 1; }
.hero__wave canvas { width: 100%; height: 100%; display: block; }
.home .hero__eyebrow { color: #fff; }
.home .hero__title { color: #fff; }
.home .hero > .wrap { text-shadow: 0 2px 18px rgba(1, 4, 14, 0.9), 0 0 4px rgba(1, 4, 14, 0.6); } /* stays crisp where the graph runs behind it */
.home .hero__lead { color: rgba(255, 255, 255, 0.9); }
.home .hero .btn { background: #fff; color: #000; filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.15)); text-shadow: none; }
.home .hero .btn:hover { background: #dbe6ff; }
/* "pull" feedback while the snap threshold builds up (set by js/hero-snap.js) */
.home .hero > .wrap { transform: translateY(calc(var(--pull, 0) * -1px)); transition: transform 380ms var(--ease); }

.dark-hero .main-nav a { color: #c9c9c9; }
.dark-hero .main-nav a:hover, .dark-hero .main-nav a[aria-current="page"] { color: #fff; }
.dark-hero .lang__btn { color: rgba(255, 255, 255, 0.45); }
.dark-hero .lang__btn[aria-pressed="true"], .dark-hero .lang__btn:hover { color: #fff; }
.dark-hero .header .btn { background: #fff; color: #000; }
.dark-hero .header .btn:hover { background: #dbe6ff; }
.dark-hero .header.is-stuck .main-nav a { color: #ececec; } /* keep the links legible over light sections */
.dark-hero .header.is-stuck { background: rgba(1, 10, 22, 0.68); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08); }
.dark-hero .menu-toggle { color: #fff; }
.dark-hero :focus-visible { outline-color: #8fb3ff; }
.hero__eyebrow { font-size: 16px; line-height: 24px; }
.hero__title {
  margin-top: 24px; max-width: 1048px;
  font: 500 clamp(36px, 3.7vw, 64px)/1.31 var(--font-sans);
  text-wrap: balance;
}
.hero__lead { margin-top: 32px; max-width: 530px; }
.hero .btn { margin-top: 38px; }

/* ───────── Home: business area ───────── */
.band { background: var(--band); }
.business { padding-top: 66px; padding-bottom: clamp(120px, 15.3vw, 264px); }
.band--warm { background: var(--card-warm); }
.business__list { margin-top: clamp(80px, 10vw, 174px); } /* 168px below the 30px Figma label box; ours is 24px tall */
/* Figma: title and copy are vertically centred on each other, 110px of space above and below
   each row (measured from the taller copy block) */
.business__row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 527px); column-gap: 40px; align-items: center;
  padding: 110px clamp(0px, 8.2vw, 142px) 110px 0; border-bottom: 1px solid var(--rule);
}
.business__row:first-child { padding-top: 0; }
.business__row h3 { font: 600 clamp(28px, 2.26vw, 39px)/44px var(--font-sans); }
.business__row p { font: 400 16px/28px var(--font-serif); color: #000; }

/* ───────── History (page2) ───────── */
.page-intro { padding: clamp(120px, 13.6vw, 236px) 0 clamp(96px, 8.8vw, 152px); text-align: center; }
/* Figma: label at y=288 on both History and Contact; title 40px below it (History) */
.page-intro .display { margin-top: 40px; }
.page-intro__lead { margin: 43px auto 0; max-width: 530px; line-height: 28px; }
.page-intro__lead--flex { font-family: var(--font-flex); font-size: 16px; line-height: 28px; color: var(--ink-90); }
.page-intro__lead--wide { max-width: 728px; }
.page-intro .btn { margin-top: 52px; }
/* History intro: dark hero with the same animated background as home */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(var(--header-h) * -1 - 13px); /* -13px: the sticky header's extra bottom padding (negative margins collapse, they don't add) */
  padding: calc(var(--header-h) + clamp(110px, 13.3vw, 230px)) 0 clamp(96px, 8.8vw, 152px);
  background: #01040e; color: #fff;
}
.page-hero > .wrap { position: relative; z-index: 1; text-shadow: 0 2px 18px rgba(1, 4, 14, 0.9), 0 0 4px rgba(1, 4, 14, 0.6); }
.page-hero .hero__scene {
  top: calc(var(--header-h) - 10px); right: -9%; width: 40%; height: 92%; /* kept clear of the centred text */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.page-hero .hero__wave { height: 55%; }
/* History: mountain photo under navy overlays (Figma layers 104–106) so the white text stays readable */
.page-hero--photo {
  background:
    radial-gradient(60% 55% at 50% 45%, rgba(1, 6, 20, 0.55), transparent 75%),
    linear-gradient(180deg, rgba(1, 6, 20, 0.7) 0%, rgba(1, 10, 30, 0.42) 35%, rgba(1, 10, 30, 0.5) 70%, rgba(1, 6, 20, 0.78) 100%),
    url("../assets/history-hero.jpg") center 42% / cover no-repeat,
    #01040e;
}
.page-hero .kicker { color: #a5adb4; }
.page-hero .display { color: #fff; }
.page-hero .page-intro__lead { font-family: var(--font-serif); color: rgba(255, 255, 255, 0.9); }
.page-hero .btn { background: var(--card-warm); color: #000; text-shadow: none; }
.page-hero .btn:hover { background: #fff; }
.page-intro--contact { padding: clamp(110px, 13.3vw, 230px) 0 clamp(96px, 10.4vw, 180px); } /* label at y=288, same as History */
.page-intro--contact .display { margin-top: 48px; }
.page-intro--contact .page-intro__lead { margin-top: 30px; }
.page-intro--contact .btn { margin-top: 64px; }


/* Reference company logos: 4 fixed columns (Figma slot widths) so both rows line up */
.client-band { padding: 68px 0 80px; background: #fff; border-bottom: 1px solid #d9d9d9; }
.client-band__label { text-align: center; font: 400 16px/24px var(--font-sans); text-transform: uppercase; color: #6d6e71; margin-bottom: 52px; }
/* Each logo sits in a fixed slot (Figma widths) followed by a 102px gap, so one copy of the list is
   exactly half the track: translating -50% lands the second copy where the first began. */
.client-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.client-marquee__track {
  display: flex; width: max-content; margin: 0; padding: 0; list-style: none;
  animation: client-marquee 28s linear infinite; will-change: transform;
}
.client-marquee:hover .client-marquee__track { animation-play-state: paused; }
.client-marquee__track li { flex: none; width: var(--slot); height: 88px; margin-right: 102px; display: flex; align-items: center; justify-content: center; }
.client-marquee__track img { display: block; max-width: 100%; height: auto; object-fit: contain; }
@keyframes client-marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .client-marquee { overflow-x: auto; }
  .client-marquee__track { animation: none; }
}

.history { padding-top: 60px; padding-bottom: clamp(120px, 12vw, 200px); }
.history__table { margin: 168px auto 0; max-width: 1328px; }
.history__head, .history__year {
  display: grid; grid-template-columns: 270px 539px minmax(0, 1fr);
}
.history__head {
  font: 400 20px/28px var(--font-sans); padding-bottom: 26px; border-bottom: 1px solid var(--rule);
}
.history__year { padding: 31px 0 52px; border-bottom: 1px solid var(--rule); }
.history__year:last-child { border-bottom: 0; }
.history__year > h3 { font: 400 32px/28px var(--font-sans); }
/* entries reuse the header's Clients / Project columns so everything lines up at any width */
.history__entries { grid-column: 2 / 4; display: grid; grid-template-columns: subgrid; row-gap: 42px; }
.history__entry { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; }
.history__client { font: 400 28px/24px var(--font-sans); }
.history__client--wrap { line-height: 38px; max-width: 357px; margin-top: -7px; }
.history__projects { font: 400 16px/24px var(--font-sans); display: grid; row-gap: 7px; }
/* Figma measures on cap-trimmed text: 48px from each rule to the text, 46px between rows.
   Where text-box trimming is supported, trim to the caps and use those numbers directly;
   first lines are centred on the client name, as in Figma. */
@supports (text-box: trim-both cap alphabetic) {
  .history__year > h3, .history__client, .history__projects > span { text-box: trim-both cap alphabetic; }
  .history__year { padding: 48px 0; }
  .history__year > h3 { margin-top: -1px; }
  .history__entries { row-gap: 46px; }
  .history__client--wrap { margin-top: 0; }
  .history__projects { row-gap: 20px; padding-top: 4px; }
}

/* ───────── Contact (page3) ───────── */
.location-band { background: var(--band-light); padding: 72px 0 clamp(96px, 11.5vw, 198px); }
.location { margin-top: 68px; display: grid; grid-template-columns: minmax(0, 941fr) minmax(0, 564fr); gap: 22px; }
.location__map {
  border-radius: var(--radius); overflow: hidden; background: var(--map); min-height: 560px;
  display: grid; place-items: center; color: var(--ink-40); font: 500 20px/1 var(--font-sans);
}
.location__map iframe { width: 100%; height: 100%; min-height: 560px; border: 0; display: block; }
.location__card { border-radius: var(--radius); background: var(--card-warm); padding: 50px 30px 40px 46px; }
.location__card h3 { font: 700 25px/1.25 var(--font-serif); color: var(--ink-90); }
.location__city { margin-top: 10px; font: 400 13px/1.25 var(--font-serif); }
.location__rule { height: 1px; background: var(--rule); margin: 32px -16px 32px; }
.location__list { display: grid; row-gap: 54px; }
.location__item dt { display: flex; align-items: center; gap: 8px; font: 500 16px/24px var(--font-sans); color: var(--ink-90); }
.location__item dt img { width: 24px; height: 24px; }
.location__item dd { margin-top: 16px; padding-left: 32px; font: 400 13px/20px var(--font-sans); color: var(--ink-90); max-width: 410px; }
.location__item dd a { text-decoration: none; }
.location__item dd a:hover { text-decoration: underline; }
.location__direction {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 26px;
  font: 400 16px/20px var(--font-sans); color: var(--link); text-decoration: none;
}
.location__direction:hover { text-decoration: underline; }
.location__direction img { width: 20px; height: 20px; }

/* ───────── API pricing (no Figma yet — follows the History / Contact patterns) ───────── */
.pricing { padding: 72px 0 120px; }
.pricing--payg { padding-bottom: clamp(96px, 11.5vw, 198px); }
.pricing__note { margin-top: 16px; font: 400 16px/24px var(--font-sans); color: #4f5256; }

/* ───────── API page (Figma "API" frame 399:664, 1728px artboard) ───────── */
/* Intro: label at 288, title 370, lead 506, buttons 592, section ends 924 */
.page-intro--api { padding-bottom: clamp(120px, 15.7vw, 272px); }
.page-intro--api .display { margin-top: 58px; line-height: 104px; }
.page-intro--api .page-intro__lead { margin-top: 32px; }
.intro-actions { margin-top: 58px; display: flex; justify-content: center; gap: 12px; }
.intro-actions .btn { min-width: 172px; margin-top: 0; }
.btn--outline { background: transparent; color: var(--navy); border: 1px solid var(--navy); filter: none; box-shadow: none; }
.btn--outline:hover { background: #eef1f6; }

/* Services description: band 924–2160 */
.svc-band { padding: 72px 0 64px; }
.svc-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.svc-card {
  display: flex; flex-direction: column; min-height: 576px;
  padding: 32px 40px 48px; border-radius: 24px; background: #fffdfc;
}
.svc-card h3, .svc-wide h3 { font: 600 clamp(26px, 1.8vw, 31px)/1.5 var(--font-sans); color: #000; }
.svc-card__desc { margin-top: 16px; margin-bottom: 10px; max-width: 404px; font: 400 16px/24px var(--font-sans); color: #4f5256; }
/* illustration panel (Figma 456:1141–1237): bottom-aligned across the three cards, scales with the card */
.svc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.svc-card__art { display: block; width: 100%; max-width: 414px; height: auto; margin-top: auto; }
.svc-card__art text { font: 400 10px var(--font-sans); }
.svc-card__label { margin-top: 20px; font: 400 20px/30px var(--font-sans); text-transform: uppercase; color: #4f5256; }
.svc-card__list { margin-top: 12px; padding-left: 24px; list-style: disc; font: 500 16px/28px var(--font-sans); color: rgba(0, 0, 0, 0.9); }
/* dotted flow arrows (Figma vectors 453:1028–1034): 2px dots on a 4px pitch with a 10px head.
   The dots slide toward the head by one pitch per cycle, which reads as continuous flow. */
.svc-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; height: 84px; }
.flow-arrow { --c: #575757; display: flex; align-items: center; justify-content: center; }
.flow-arrow::before, .flow-arrow::after { content: ""; flex: none; }
.flow-arrow--up { flex-direction: column; }
.flow-arrow--up::before { width: 11.5px; height: 10px; background: var(--c); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.flow-arrow--up::after {
  flex: 1; width: 2px; margin-top: -1px;
  background: repeating-linear-gradient(to bottom, var(--c) 0 2px, transparent 2px 4px);
  animation: flow-up 0.35s linear infinite;
}
.flow-arrow--right { --c: #4d412c; }
.flow-arrow--right::before {
  flex: 1; height: 2px;
  background: repeating-linear-gradient(to right, var(--c) 0 2px, transparent 2px 4px);
  animation: flow-right 0.35s linear infinite;
}
.flow-arrow--right::after { width: 10px; height: 11.5px; background: var(--c); clip-path: polygon(0 0, 100% 50%, 0 100%); }
@keyframes flow-up { from { background-position: 0 4px; } to { background-position: 0 0; } }
@keyframes flow-right { from { background-position: 0 0; } to { background-position: 4px 0; } }
@media (prefers-reduced-motion: reduce) { .flow-arrow::before, .flow-arrow::after { animation: none; } }
.svc-wide { margin-top: 0; padding: 42px clamp(24px, 3.5vw, 60px) 65px; border-radius: 24px; background: #d8e1e3; box-shadow: 0 4px 28px rgba(0, 0, 0, 0.08); text-align: center; }
.svc-wide__boxes {
  margin-top: 42px; display: grid; justify-content: center; text-align: left;
  grid-template-columns: minmax(0, 368px) clamp(20px, 6vw, 104px) minmax(0, 368px) clamp(20px, 6vw, 104px) minmax(0, 368px);
}
.svc-box {
  padding: 24px 24px 24px 54px; border-radius: 16px; background: var(--card-warm); list-style: disc;
  font: 500 20px/32px var(--font-sans); color: rgba(0, 0, 0, 0.9);
}

/* Subscription plans: band 2160–4032 */
.plans-band { background: #ededed; padding: 72px 0 56px; }
.plans-band__heading { margin-top: 78px; font: 600 clamp(30px, 2.26vw, 39px)/1.5 var(--font-sans); color: #000; }
.plans-band__lead { margin-top: 8px; max-width: 698px; font: 400 16px/24px var(--font-sans); color: #4f5256; }
.plans-band__note { margin-top: 40px; font: 400 16px/24px var(--font-sans); color: #4f5256; }

.plans { margin-top: 72px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 71px; align-items: stretch; /* equal-height cards: bottoms line up */ }
.plan {
  display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 24px; background: #f6f6f6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.plan__top {
  display: flex; flex-direction: column; gap: 32px; padding: 28px;
  border-radius: 16px; background: var(--surface); filter: drop-shadow(0 6px 9.5px rgba(0, 0, 0, 0.08));
}
.plan__head { display: flex; flex-direction: column; gap: 16px; }
.plan__name { font: 600 clamp(26px, 1.8vw, 31px)/1.5 var(--font-sans); color: #000; }
.plan__label { display: block; font: 400 12px/24px var(--font-sans); text-transform: uppercase; color: #7e8288; }
.plan__audience { font: 400 16px/24px var(--font-sans); color: #4f5256; }
.plan__audience .plan__label { margin-bottom: 2px; }
.plan__pricing { display: flex; flex-direction: column; gap: 24px; }
.plan__price { display: flex; flex-direction: column; }
.plan__amount { font: 700 clamp(30px, 2.26vw, 39px)/40px var(--font-serif); color: #000; font-variant-numeric: tabular-nums; }
.plan__per { font: 400 11px/24px var(--font-sans); color: #4f5256; text-decoration: underline dotted; text-underline-offset: 3px; }
.plan__phases { display: grid; row-gap: 4px; }
.plan__phases div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 12px; border-radius: 6px; background: #ececec; }
.plan__phases dt { font: 400 11px/24px var(--font-sans); color: #4f5256; }
.plan__phases dd { font: 500 12px/24px var(--font-sans); color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan__cta {
  display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 28px;
  border-radius: 8px; background: var(--navy); color: #fff; text-decoration: none; font: 400 16px/1 var(--font-sans);
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.15));
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.plan__cta img { width: 24px; height: 24px; transition: transform var(--dur) var(--ease); }
.plan__cta:hover { background: #0b2a4f; }
.plan__cta:hover img { transform: translateX(3px); }
.plan__cta:active { transform: scale(0.98); }
.plan__cta--outline { background: transparent; color: var(--navy); border: 1px solid var(--navy); filter: none; box-shadow: none; }
.plan__cta--outline:hover { background: #eef1f6; }

.plan__details { padding: 28px; }
.plan__group + .plan__group { margin-top: 32px; padding-top: 32px; border-top: 1px solid #d9d9d9; }
.plan__group-title { display: flex; align-items: center; gap: 8px; font: 500 20px/30px var(--font-sans); color: #4f5256; }
.plan__icon {
  flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}
.plan__icon img { width: 18px; height: 18px; object-fit: contain; }
.plan__icon--yellow { background: #fff3bc; }
.plan__icon--lime { background: #e1eb9d; }
.plan__icon--mint { background: #c3f1d1; }
.plan__list { margin-top: 20px; display: grid; row-gap: 16px; max-width: 222px; } /* Figma value column */
.plan__list dd { display: flex; align-items: flex-start; gap: 8px; font: 400 16px/24px var(--font-sans); color: #4f5256; white-space: pre-line; }
.plan__people { flex: none; width: 24px; height: 24px; }
.plan__list .plan__v--calls { white-space: nowrap; } /* Figma keeps the API-calls line on one row */

.payg-wrap { margin-top: 48px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.payg { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.payg th, .payg td { text-align: left; padding: 20px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.payg thead th { font: 600 20px/28px var(--font-sans); padding-top: 0; border-bottom-color: #000; }
.payg tbody th { font: 400 15px/22px var(--font-sans); color: #4f5256; width: 28%; }
.payg td { font: 400 15px/22px var(--font-sans); white-space: pre-line; }
.payg__price td { font: 600 20px/26px var(--font-sans); }
.pricing--payg .location__direction { margin-top: 28px; }

/* ───────── Footer ───────── */
/* Figma: brand block on the left gutter, Explore + Location/Contact on the right gutter,
   watermark pinned to the bottom-right corner at every width */
.footer {
  position: relative; overflow: hidden; background: var(--footer); color: #fff;
  min-height: 564px; padding: 132px var(--gutter) 120px;
}
.footer__inner {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 48px;
}
.footer__cols { display: grid; grid-template-columns: 246px 229px; flex: none; }
.footer__brand img { width: 191px; height: 46px; object-fit: contain; object-position: left; }
.footer__legal { margin-top: 40px; font: 400 14px/24px var(--font-sans); color: rgba(255, 255, 255, 0.4); }
.footer__col h2 { font: 500 16px/24px var(--font-sans); color: #fff; }
.footer__col ul { margin-top: 20px; display: grid; row-gap: 12px; }
.footer__col a, .footer__col p { font: 500 16px/24px var(--font-sans); color: rgba(255, 255, 255, 0.5); text-decoration: none; }
.footer__col a:hover { color: #fff; }
.footer__col p { margin-top: 20px; }
.footer__col h2 + p { margin-top: 20px; }
.footer__col h2.footer__sub { margin-top: 92px; }
.footer__tel { white-space: pre; }
.footer__watermark {
  position: absolute; right: 0; bottom: 0; width: min(1188px, 69%); opacity: 0.08;
  pointer-events: none;
}

/* ───────── Responsive ───────── */
@media (max-width: 1200px) {
  .svc-wide__boxes { grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr) 36px minmax(0, 1fr); }
  .svc-box { padding: 20px 20px 20px 40px; font-size: 16px; line-height: 28px; }
  .plans { gap: 24px; }
  .history__head, .history__year { grid-template-columns: 160px minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 24px; }
  .history__client { font-size: 24px; line-height: 30px; }
  .history__client--wrap { margin-top: 0; line-height: 30px; }
}
@media (max-width: 1024px) {
  /* three boxes get too narrow for their lines: stack them */
  .svc-wide__boxes { grid-template-columns: minmax(0, 520px); gap: 16px; }
  .svc-wide__boxes .flow-arrow { display: none; } /* boxes stack: no side-by-side flow */
}
@media (max-width: 900px) {
  /* stack: graph above the text instead of beside it */
  .hero { min-height: 0; flex-direction: column; align-items: stretch; padding-top: 0; }
  .hero__scene { position: relative; width: 100%; height: 72vw; max-height: 460px; top: auto; right: auto; }
  .dark-hero { --header-h: 58px; } /* nav lives in the dropdown, so the header stays one row */
  .page-hero .hero__scene { top: auto; right: auto; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.45; }
  .page-hero .hero__scene.is-ready { opacity: 0.45; }
  .home .hero__scene { top: auto; }
  /* one screen tall: the graph takes whatever height the copy leaves */
  .home .hero__scene { flex: 1 1 0; height: auto; min-height: 180px; max-height: none; }
  .header { grid-template-columns: auto 1fr; }
  .menu-toggle { display: grid; }
  .main-nav {
    position: absolute; top: calc(100% - 5px); right: var(--gutter); z-index: 20; /* 8px below the bar (header has 13px bottom padding) */
    min-width: 200px; height: auto; padding: 8px; flex-direction: column; align-items: stretch; gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 12px; background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 0s linear 160ms;
  }
  .is-menu-open .main-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .main-nav a { margin: 0; min-height: 48px; padding: 0 16px; border-radius: 8px; font-size: 15px; }
  .main-nav a:hover { background: #f3f3f3; }
  .dark-hero .main-nav { background: #0b1f35; border-color: rgba(255, 255, 255, 0.12); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }
  .dark-hero .main-nav a:hover { background: rgba(255, 255, 255, 0.08); }
  .business__row { grid-template-columns: 1fr; row-gap: 14px; min-height: 0; padding: 40px 0; }
  .business__row:first-child { padding-top: 0; min-height: 0; }
  .location { grid-template-columns: 1fr; }
  .plans { grid-template-columns: minmax(0, 560px); justify-content: center; row-gap: 32px; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-flow { display: none; }
  .svc-wide { margin-top: 24px; }
  .svc-card { min-height: 0; padding-bottom: 40px; }
  .svc-card__art { margin-top: 14px; }
  .svc-card__label { margin-top: 24px; }
  .svc-wide { padding: 36px 24px 40px; }
  .intro-actions { flex-wrap: wrap; }
  .page-intro--api .display { line-height: 1.15; } /* the 104px desktop line-height gaps badly once the title wraps */
  .location__map, .location__map iframe { min-height: 360px; }
  .footer__inner { flex-direction: column; gap: 56px; }
  .footer__watermark { width: 90%; }
  .history__head { display: none; }
  .history__year { grid-template-columns: 1fr; row-gap: 24px; padding: 28px 0 36px; }
  .history__table { margin-top: 64px; }
  .history__entries { grid-column: 1; grid-template-columns: 1fr; row-gap: 22px; }
  .history__entry { grid-template-columns: 1fr; row-gap: 6px; }
  .history__client { font-size: 22px; line-height: 28px; }
}
@media (max-width: 560px) {
  .header { padding-top: 18px; }
  .dark-hero { --header-h: 50px; }
  .header__logo img { width: 104px; }
  .header__actions { gap: 8px; }
  .footer { padding: 72px 20px 160px; }
  .business__row { padding: 32px 0; }
  .footer__cols { grid-template-columns: 1fr; row-gap: 48px; }
  .footer__col h2.footer__sub { margin-top: 48px; }
  .location__card { padding: 32px 24px; }
  .client-band { padding: 48px 0 56px; }
  .client-band__label { margin-bottom: 32px; }
}

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