/* =========================================================
   HeyAikar portfolio
   Brand constants (CLAUDE.md): Deep #132744 · Royal #2B50E2 · Cream #F5F1E7 · Yellow #E3A03C
   Shape rule: scrubbed sections 80px (JS) / panels 2.5rem / cards 1.25rem / buttons .5rem / chips pill
   ========================================================= */

/* Astro Space: drop the font files into assets/fonts/ and add an @font-face here.
   The --font-tech stack already lists it first, so nothing else needs to change. */

:root {
  --deep: #132744;
  --royal: #2B50E2;
  --cream: #F5F1E7;
  --yellow: #E3A03C;

  --cream-2: #EBE4D4;          /* panels, nav border */
  --cream-3: #DCD2BD;          /* hairlines on cream */
  --deep-2: #0F2038;           /* pressed/darker deep */
  --ink: var(--deep);
  --ink-70: rgb(19 39 68 / .72);
  --ink-50: rgb(19 39 68 / .5);
  --on-dark: var(--cream);
  --on-dark-70: rgb(245 241 231 / .74);
  --on-dark-15: rgb(245 241 231 / .15);

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-tech: "Astro Space", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-panel: 2.5rem;
  --r-card: 1.25rem;
  --r-btn: .5rem;

  --gutter: clamp(1rem, 4vw, 3rem);
  --container: 76rem;
  --section-y: clamp(5rem, 11vw, 9rem);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-std: cubic-bezier(.4, 0, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);

  --shadow: 0 1.5rem 3.5rem -1.5rem rgb(19 39 68 / .38);
  --shadow-sm: 0 .5rem 1.25rem -.5rem rgb(19 39 68 / .3);

  color-scheme: light;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }

::selection { background: var(--yellow); color: var(--deep); }
html { scrollbar-color: var(--ink-50) var(--cream-2); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--cream-2); }
::-webkit-scrollbar-thumb { background: var(--ink-50); border-radius: 99px; border: 3px solid var(--cream-2); }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 3px; border-radius: 4px; }
.story :focus-visible, .work :focus-visible, .contact :focus-visible, .faq__q-pane :focus-visible { outline-color: var(--yellow); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--deep); color: var(--cream); padding: .75rem 1rem; border-radius: var(--r-btn); text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 6.2vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display--md { font-size: clamp(2.25rem, 4.6vw, 4.25rem); line-height: 1.06; }
.display em { font-style: italic; color: var(--yellow); padding-bottom: .06em; }
.lead { font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.5; color: var(--ink-70); max-width: 38rem; text-wrap: pretty; }
.tag {
  font-family: var(--font-tech);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-70);
}

.section-head { display: grid; justify-items: center; text-align: center; gap: 1.25rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.section-head .lead { margin-inline: auto; }
.section-head--left { justify-items: start; text-align: left; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border-radius: var(--r-btn);
  padding: .95rem 1.35rem;
  border: 2px solid var(--deep);
  transition: transform .2s var(--ease-out), background-color .25s, color .25s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--yellow); color: var(--deep); }
.btn--primary:hover { background: #ECB256; }
.btn--lg { font-size: 1rem; padding: 1.1rem 1.6rem; }
.btn .char { display: inline-block; will-change: transform; }

/* ---------- Pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-tech); font-size: .8125rem; font-weight: 600;
  padding: .45rem .85rem; border-radius: 99px;
}
.pill--light { background: var(--cream); color: var(--deep); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center;
  font-family: var(--font-tech); font-size: .8125rem; font-weight: 500;
  padding: .4rem .75rem; border-radius: 99px;
  background: var(--cream-2); color: var(--deep);
}
.chips--dark .chip { background: var(--on-dark-15); color: var(--cream); }

/* ---------- Reveal (JS adds .is-in; content visible without JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(1.5rem); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal-clip] { clip-path: inset(12% 6% 12% 6% round var(--r-card)); opacity: .001; transition: clip-path 1.1s var(--ease-out), opacity .5s; }
.js [data-reveal-clip].is-in { clip-path: inset(0 0 0 0 round var(--r-card)); opacity: 1; }

/* =========================================================
   NAV
   ========================================================= */
.nav { position: fixed; inset: 1rem 0 auto; z-index: 50; padding-inline: var(--gutter); pointer-events: none; transition: transform .5s var(--ease-std); }
.nav.is-hidden { transform: translateY(calc(-100% - 1.5rem)); }
.nav__bar {
  pointer-events: auto;
  max-width: 66rem; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  background: var(--cream);
  border: 2px solid var(--cream-2);
  border-radius: 10px;
  padding: .5rem .5rem .5rem 1.25rem;
  min-height: 3.75rem;
}
/* Logo lockup (redrawn from the HeyAikar brand logo; accent uses brand Yellow) */
.logo { --logo-accent: var(--yellow); display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--deep); }
.logo__mark { flex: none; width: 2.15rem; height: 1.6rem; }
.logo__word { font-family: var(--font-tech); font-weight: 600; font-size: 1.3rem; letter-spacing: -.025em; line-height: 1; }
.logo__word span { color: var(--yellow); }
.logo--stack .logo__mark { width: 3.6rem; height: 2.67rem; }
.logo--stack .logo__word { font-size: 1.75rem; }
.logo__text { display: grid; gap: .45rem; }
.logo__tag { font-family: var(--font-tech); font-size: .625rem; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; }
.nav__menu { display: flex; align-items: center; gap: .25rem; }
.nav__links { display: flex; align-items: center; gap: .25rem; }
/* Desktop: logo left, links centred, CTA right */
@media (min-width: 992px) {
  .nav__bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav__menu { display: contents; }
  .nav__brand { justify-self: start; }
  .nav__links { justify-self: center; }
  .nav__cta { justify-self: end; margin-left: 0; }
}
.nav__link {
  font-family: var(--font-tech); font-size: .9375rem; font-weight: 500;
  text-decoration: none; padding: .6rem .8rem; border-radius: var(--r-btn);
  transition: background-color .2s;
}
.nav__link:hover { background: var(--cream-2); }
.nav__cta { margin-left: .5rem; }
.nav__toggle { display: none; width: 2.75rem; height: 2.75rem; border-radius: var(--r-btn); position: relative; }
.nav__toggle span { position: absolute; left: .7rem; right: .7rem; height: 2px; background: var(--deep); border-radius: 2px; transition: transform .35s var(--ease-std), opacity .2s, width .3s; }
.nav__toggle span:nth-child(1) { top: calc(50% - 7px); }
.nav__toggle span:nth-child(2) { top: calc(50% - 1px); }
.nav__toggle span:nth-child(3) { top: calc(50% + 5px); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(135deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(45deg); }

@media (max-width: 991px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% - 2px);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border: 2px solid var(--cream-2); border-top: 0;
    border-radius: 0 0 10px 10px; padding: .5rem;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .4s var(--ease-std), visibility 0s .4s;
  }
  .nav.is-open .nav__menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .4s var(--ease-std); }
  .nav.is-open .nav__bar { border-radius: 10px 10px 0 0; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { padding: .9rem .75rem; font-size: 1.0625rem; }
  .nav__cta { margin: .5rem 0 0; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-top: clamp(7.5rem, 13vw, 10rem); overflow: clip; }
.hero__copy { display: grid; justify-items: center; text-align: center; gap: 1.5rem; position: relative; z-index: 2; }
.hero__title { max-width: 20ch; font-size: clamp(2.75rem, 5.8vw, 5.5rem); }
.hero__sub { max-width: 34rem; }
.hero__actions { margin-top: .25rem; display: grid; justify-items: center; gap: .85rem; }
.hero__micro { font-size: .9375rem; line-height: 1.45; color: var(--ink-70); max-width: 30rem; text-wrap: pretty; }

/* Negative top margin pulls the curves + card up under the copy.
   -18.97vw cancels the card's position inside the flow (56.9% of width/3), so the card top
   lands a constant ~4.2rem (about half an inch lower than before) below the CTA at every desktop width. */
.hero__flow { position: relative; width: 100%; max-width: 120rem; margin: clamp(-24rem, calc(-18.97vw + 12.5rem), 0rem) auto 0; aspect-ratio: 1440 / 480; }
.hero__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero__curve-in { fill: none; stroke: none; }
.hero__curve-out { fill: none; stroke: var(--deep); stroke-width: 34; stroke-linecap: round; }
.hero__text-in { font-family: var(--font-tech); font-size: 19px; font-weight: 600; fill: var(--deep); opacity: .3; }
.hero__text-out { font-family: var(--font-tech); font-size: 17px; font-weight: 600; fill: var(--cream); dominant-baseline: central; }

.console {
  position: absolute; left: 50%; top: 56.9%; /* = y 273 of the 480-unit viewBox, where both curves meet the card */
  width: clamp(15rem, 25vw, 22rem);
  transform: translate(-50%, -50%);
  background: var(--deep); color: var(--cream);
  border-radius: var(--r-card);
  padding: .9rem .9rem 1rem;
  box-shadow: var(--shadow);
  z-index: 1;
}
.console__head { display: flex; justify-content: space-between; align-items: center; padding: .1rem .3rem .8rem; font-family: var(--font-tech); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.console__name { font-weight: 600; }
.console__state { color: var(--yellow); font-weight: 600; }
.console__stack { position: relative; height: 12.25rem; }
.toast {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: .75rem;
  background: var(--cream); color: var(--deep);
  border-radius: .875rem; padding: .7rem .8rem;
  box-shadow: 0 .5rem 1rem -.5rem rgb(0 0 0 / .45);
  opacity: 0; transform: translateY(1.5rem) scale(.96);
  transition: transform .6s var(--ease-back), opacity .35s ease;
}
.toast strong { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.25; }
.toast small { display: block; font-size: .8125rem; color: var(--ink-70); }
.toast__icon { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .6rem; background: var(--royal); color: var(--cream); }
.toast__icon svg { width: 1.2rem; height: 1.2rem; }
.no-js .toast, .reduce .toast { position: relative; opacity: 1; transform: none; margin-top: .5rem; }
.no-js .console__stack, .reduce .console__stack { height: auto; }

/* Tablet + phone: JS crops the viewBox to "170 -120 1100 793" (centred on the card) so the curves stay legible */
@media (max-width: 991px) {
  /* -35.76vw cancels the card's position in the cropped flow, keeping the card just under the CTA */
  .hero__flow { aspect-ratio: 1100 / 793; margin-top: calc(-35.76vw + 12.5rem); }
  .console { top: 49.6%; width: min(46vw, 20rem); }
  .hero__text-in { font-size: 24px; }
  .hero__text-out { font-size: 22px; }
  .hero__curve-out { stroke-width: 40; }
}
@media (max-width: 767px) {
  .hero__flow { margin-top: calc(-35.76vw + 10rem); }
  .hero__text-in { font-size: 40px; }
  .hero__text-out { font-size: 34px; }
  .hero__curve-out { stroke-width: 64; }
  .console { width: min(66vw, 17rem); padding: .7rem .7rem .8rem; }
  .console__stack { height: 8.1rem; overflow: hidden; }
  .toast { padding: .55rem .65rem; }
  .toast__icon { width: 1.9rem; height: 1.9rem; }
}

/* =========================================================
   STORY (pinned on desktop)
   ========================================================= */
.story { position: relative; padding-top: clamp(4rem, 8vw, 7rem); }
.story__panel {
  position: relative;
  background: var(--deep); color: var(--on-dark);
  border-radius: 80px;
  overflow: clip;
  isolation: isolate;
}
.story__intro { display: grid; justify-items: center; text-align: center; gap: 1.25rem; padding-inline: var(--gutter); }
.story__intro .display em { color: var(--yellow); }
.story__intro .lead { color: var(--on-dark-70); max-width: 40rem; }

.story__label { display: grid; gap: .15rem; }
.story__label-kicker { font-family: var(--font-tech); font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-70); }
.story__label-title { font-family: var(--font-display); font-size: clamp(1.5rem, 2.2vw, 2.1rem); line-height: 1.1; }
.story__note { margin-top: .85rem; max-width: 34ch; font-size: .9375rem; line-height: 1.5; color: var(--on-dark-70); text-wrap: pretty; }
.story__system-copy .story__note { color: var(--cream); }

.story__manual, .story__system-copy { min-width: 0; }
.ticker { min-width: 0; overflow: hidden; white-space: nowrap; font-family: var(--font-tech); font-weight: 500; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker > span { display: inline-block; will-change: transform; }
.ticker--slow { font-size: 1rem; color: var(--on-dark-70); }
.ticker--fast { font-size: 1.125rem; color: var(--cream); }

.story__manual {
  background: rgb(245 241 231 / .07);
  border: 1px solid var(--on-dark-15);
  border-radius: var(--r-card);
  padding: 1.5rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  overflow: hidden;
}
/* Gradient keeps the copy readable over the photo behind it */
.story__system-copy { position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; background: linear-gradient(100deg, rgb(19 39 68 / .82) 0%, rgb(19 39 68 / .58) 45%, rgb(19 39 68 / .32) 78%, rgb(19 39 68 / .2) 100%); }
.story__system-copy .pill { align-self: flex-start; }

.story__photo { position: absolute; inset: 0; z-index: 0; }
.story__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .9s var(--ease-std), transform 1.6s var(--ease-out); }
.story__bg.is-base, .story__bg.is-active { opacity: 1; transform: none; }
.story__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(19 39 68 / .94) 0%, rgb(19 39 68 / .78) 38%, rgb(19 39 68 / .3) 72%, rgb(19 39 68 / .12) 100%); }
.story.is-pinned-mode .story__scrim { opacity: var(--scrim, .3); }

/* Chapters */
.chapters__tabs { position: relative; display: grid; gap: .25rem; padding-left: 1.5rem; }
.chapters__tabs::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--on-dark-15); border-radius: 2px; }
.chapters__indicator { position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--yellow); border-radius: 2px; transition: transform .5s var(--ease-std), height .5s var(--ease-std); }
.chapter-tab { display: grid; gap: .5rem; text-align: left; padding: .9rem 0; color: var(--on-dark-70); transition: color .3s; }
.chapter-tab__title { font-family: var(--font-display); font-size: clamp(1.75rem, 2.6vw, 2.5rem); line-height: 1.08; }
.chapter-tab__text { font-size: 1rem; line-height: 1.5; max-width: 26rem; display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s var(--ease-std), opacity .4s; overflow: hidden; }
.chapter-tab.is-active { color: var(--cream); }
.chapter-tab.is-active .chapter-tab__text { grid-template-rows: 1fr; opacity: 1; }
.chapter-tab:hover { color: var(--cream); }

/* Demo panel */
/* All demo screens share one grid cell, so the panel is as tall as the tallest screen */
.demo { position: relative; width: min(100%, 27rem); display: grid; align-items: start; }
.demo__screen {
  grid-area: 1 / 1; position: relative;
  background: var(--cream); color: var(--deep);
  border-radius: var(--r-card); padding: 1.25rem;
  box-shadow: var(--shadow);
  display: grid; gap: .9rem; align-content: start;
  opacity: 0; visibility: hidden; transform: translateY(.75rem);
  transition: opacity .4s ease, transform .5s var(--ease-out), visibility 0s .4s;
}
.demo__screen.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .4s ease, transform .5s var(--ease-out); }
.demo__meta { display: flex; align-items: center; gap: .5rem; font-family: var(--font-tech); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-70); }
.demo__meta svg { width: 1rem; height: 1rem; }
.bubble { padding: .8rem 1rem; border-radius: 1rem; font-size: .9875rem; line-height: 1.45; max-width: 88%; }
.bubble--in { background: var(--cream-2); border-bottom-left-radius: .3rem; }
.bubble--out { background: var(--royal); color: var(--cream); justify-self: end; border-bottom-right-radius: .3rem; }
.bubble--out .w { display: inline-block; opacity: 0; transform: translateY(.45em); transition: opacity .32s ease, transform .45s var(--ease-back); }
.bubble--out.is-typing .w.is-on, .bubble--out.is-done .w { opacity: 1; transform: none; }
.bubble--out:not(.is-typing):not(.is-done) { visibility: hidden; }

@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.pill--polish {
  justify-self: center; position: relative;
  background: var(--cream); color: var(--deep);
  opacity: 0; transform: scale(.6);
  transition: transform .35s var(--ease-back), opacity .2s ease;
}
.pill--polish::before {
  content: ""; position: absolute; inset: 0; padding: 2px; border-radius: inherit;
  background: conic-gradient(from var(--ang), transparent 0deg, var(--royal) 90deg, var(--yellow) 190deg, var(--royal) 290deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: spin-border 2s linear infinite;
}
.pill--polish.is-on { opacity: 1; transform: none; }
@keyframes spin-border { to { --ang: 360deg; } }

.demo__status, .cal__confirm { display: flex; align-items: center; gap: .5rem; font-size: .9375rem; font-weight: 500; opacity: 0; transform: translateY(.4rem); transition: opacity .4s, transform .5s var(--ease-out); }
.demo__status svg, .cal__confirm svg { width: 1.1rem; height: 1.1rem; color: var(--royal); flex: none; }
.demo__status.is-on, .cal__confirm.is-on { opacity: 1; transform: none; }

.sequence { display: grid; gap: .6rem; }
.sequence li {
  display: grid; grid-template-columns: 4rem 1fr; gap: .75rem; align-items: baseline;
  padding: .75rem .9rem; border-radius: .75rem; background: var(--cream-2);
  font-size: .9375rem;
  opacity: 0; transform: translateX(-.75rem); transition: opacity .35s, transform .5s var(--ease-out);
}
.sequence li.is-on { opacity: 1; transform: none; }
.sequence li.is-win { background: var(--deep); color: var(--cream); }
.sequence__when { font-family: var(--font-tech); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }

.cal { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.cal__day { display: grid; justify-items: center; gap: .1rem; padding: .7rem 0; border-radius: .75rem; background: var(--cream-2); font-family: var(--font-tech); transition: background-color .35s, color .35s, transform .45s var(--ease-back); }
.cal__day span { font-size: .75rem; opacity: .7; }
.cal__day b { font-size: 1.25rem; font-weight: 600; }
.cal__day.is-picked.is-on { background: var(--royal); color: var(--cream); transform: translateY(-.25rem); }
.demo [data-demo-chip] { opacity: 0; transform: scale(.85); transition: opacity .3s, transform .4s var(--ease-back); }
.demo [data-demo-chip].is-on { opacity: 1; transform: none; }

/* Story layout: desktop pinned */
@media (min-width: 992px) {
  .story.is-pinned-mode .story__panel { height: 100vh; height: 100dvh; }
  .story.is-pinned-mode .story__intro { position: absolute; left: 0; right: 0; top: 12vh; z-index: 3; }
  .story.is-pinned-mode .story__stage {
    position: absolute; z-index: 2;
    left: 50%; bottom: 7vh; transform: translateX(-50%);
    width: min(74rem, calc(100% - 2 * var(--gutter)));
    height: 40vh;
    display: grid; grid-template-columns: var(--split, 38%) 1fr; gap: 1rem;
  }
  .story.is-pinned-mode .story__manual { min-width: 0; }
  .story.is-pinned-mode .story__photo { clip-path: var(--clip, inset(50% 50% 50% 50% round 20px)); }
  .story.is-pinned-mode .story__chapters {
    position: absolute; inset: 0; z-index: 4;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); align-items: center; gap: 4rem;
    padding: 6rem max(var(--gutter), calc((100% - 74rem) / 2));
    opacity: 0; visibility: hidden;
  }
  .story.is-pinned-mode .story__chapters.is-live { visibility: visible; }
}

/* Story layout: stacked (mobile, tablet, reduced motion) */
.story:not(.is-pinned-mode) .story__panel { padding: 5rem var(--gutter) var(--gutter); display: grid; gap: 2.5rem; }
.story:not(.is-pinned-mode) .story__stage { display: grid; gap: 1rem; }
.story:not(.is-pinned-mode) .story__system-copy { border-radius: var(--r-card); overflow: hidden; min-height: 16rem; background: url("../img/stage-office.jpg") center / cover; }
.story:not(.is-pinned-mode) .story__system-copy::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(19 39 68 / .82) 0%, rgb(19 39 68 / .5) 45%, rgb(19 39 68 / .8) 100%); }
/* Photo and chapters share one grid cell: photo behind, chapters on top */
.story:not(.is-pinned-mode) .story__photo { position: relative; inset: auto; grid-area: 3 / 1; border-radius: var(--r-card); overflow: hidden; }
.story:not(.is-pinned-mode) .story__chapters { position: relative; z-index: 1; grid-area: 3 / 1; min-width: 0; display: grid; gap: 1.5rem; padding: 1.25rem; align-content: end; min-height: 26rem; }
.story:not(.is-pinned-mode) .story__scrim { background: linear-gradient(0deg, rgb(19 39 68 / .92) 20%, rgb(19 39 68 / .35)); }
.story:not(.is-pinned-mode) .demo { width: 100%; }
@media (max-width: 991px) {
  .story__panel { border-radius: 2.5rem; }
  .chapter-tab { padding: .6rem 0; }
}

/* =========================================================
   METHOD
   ========================================================= */
.underlined { position: relative; display: inline-block; }
.underline { position: absolute; left: 0; right: 0; bottom: -.12em; width: 100%; height: .28em; overflow: visible; }
.underline path { fill: none; stroke: var(--royal); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.method__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.method__card {
  position: sticky; top: 14vh;
  height: 72vh; min-height: 30rem; max-height: 44rem;
  border-radius: var(--r-card); overflow: hidden;
  background: var(--deep); color: var(--cream);
}
.method__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.method__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(19 39 68 / .92) 0%, rgb(19 39 68 / .55) 45%, rgb(19 39 68 / .85) 100%); }
.method__curve { position: absolute; left: 0; right: 0; top: 1.5rem; width: 100%; height: auto; overflow: visible; }
.method__curve path { fill: none; stroke: var(--on-dark-15); stroke-width: 1.5; }
.method__curve text { font-family: var(--font-tech); font-size: 30px; font-weight: 600; letter-spacing: .02em; fill: var(--on-dark-70); dominant-baseline: central; }
.method__curve tspan.is-active { fill: var(--yellow); }
.method__visuals { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.5rem; }
.method__visuals .step__visual { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transform: translateY(1rem); transition: opacity .45s ease, transform .6s var(--ease-out); }
.method__visuals .step__visual.is-active { opacity: 1; transform: none; }

.method__steps { display: grid; padding-block: 8vh 20vh; }
.step { min-height: 46vh; display: grid; align-content: center; gap: 1rem; opacity: .28; transition: opacity .5s var(--ease-std); }
.step.is-active { opacity: 1; }
.step__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.25rem, 4vw, 3.5rem); line-height: 1.05; }
.step__text { max-width: 30rem; color: var(--ink-70); font-size: 1.125rem; }
.js .method__steps .step__visual { display: none; }

.mini { background: var(--cream); color: var(--deep); border-radius: 1rem; padding: 1rem; box-shadow: var(--shadow-sm); font-size: .9375rem; }
.mini--chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip--q { background: var(--cream-2); }
.mini--flow { display: flex; align-items: center; gap: .4rem; font-family: var(--font-tech); font-weight: 600; font-size: .875rem; }
.mini--flow span { padding: .55rem .7rem; border-radius: .6rem; background: var(--cream-2); white-space: nowrap; }
.mini--flow span:last-child { background: var(--royal); color: var(--cream); }
.mini--flow i { flex: 1; height: 2px; min-width: .75rem; background: var(--cream-3); }
.mini--pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.mini--pipeline div { display: grid; gap: .35rem; align-content: start; padding: .5rem; border-radius: .6rem; background: var(--cream-2); }
.mini--pipeline b { font-family: var(--font-tech); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.mini--pipeline span { font-size: .8125rem; background: var(--cream); border-radius: .4rem; padding: .35rem .45rem; }
.mini--workflow { display: grid; gap: .35rem; }
.mini--workflow li { display: grid; grid-template-columns: 4.5rem 1fr; align-items: center; padding: .5rem .65rem; border-radius: .6rem; background: var(--cream-2); }
.mini--workflow li:first-child { background: var(--deep); color: var(--cream); }
.mini--workflow small { font-family: var(--font-tech); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.mini--checks { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.mini--checks li { display: flex; align-items: center; gap: .4rem; padding: .55rem .6rem; border-radius: .6rem; background: var(--cream-2); font-weight: 500; }
.mini--checks svg { width: 1rem; height: 1rem; color: var(--royal); flex: none; }
.mini--doc { display: grid; gap: .45rem; }
.mini--doc b { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; }
.mini--doc span { padding-bottom: .4rem; border-bottom: 1px solid var(--cream-3); }
.mini--doc span:last-of-type { border-bottom: 0; padding-bottom: 0; }
.mini--doc em { font-style: italic; font-size: .875rem; color: var(--ink-70); }

@media (max-width: 991px) {
  .method__grid { grid-template-columns: 1fr; }
  .method__card { display: none; }
  .method__steps { padding-block: 0; gap: 3rem; }
  .step { min-height: 0; opacity: 1; }
  .js .method__steps .step__visual { display: block; }
}

/* =========================================================
   SERVICES (bento)
   ========================================================= */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(15rem, auto); gap: 1rem; }
.svc {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 19rem; border-radius: var(--r-card); overflow: hidden;
  text-decoration: none; color: var(--cream); background: var(--deep);
  isolation: isolate;
}
.svc__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease-out); }
.svc::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(19 39 68 / .92) 0%, rgb(19 39 68 / .55) 45%, rgb(19 39 68 / .05) 100%); }
.svc__body { padding: 1.5rem; display: grid; gap: .5rem; max-width: 34rem; }
.svc__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.2vw, 2.125rem); line-height: 1.1; }
.svc__body p { color: var(--on-dark-70); font-size: 1rem; }
.svc__arrow { position: absolute; top: 1.25rem; right: 1.25rem; width: 2.75rem; height: 2.75rem; padding: .7rem; border-radius: 50%; background: var(--cream); color: var(--deep); transition: transform .4s var(--ease-out); }
.svc:hover .svc__img { transform: scale(1.05); }
.svc:hover .svc__arrow { transform: translate(6px, -6px); }
.svc--1 { grid-column: 1 / span 7; grid-row: span 2; }
.svc--2 { grid-column: 8 / span 5; }
.svc--3 { grid-column: 8 / span 5; }
.svc--4 { grid-column: 1 / span 5; }
.svc--5 { grid-column: 6 / span 7; }
.svc--6 { grid-column: 1 / -1; min-height: 20rem; display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
.svc--accent .svc__title { color: var(--yellow); }
.svc--split { background: var(--deep); }
.svc--split::before { display: none; }
.svc--split .svc__body p { color: rgb(245 241 231 / .85); }
.svc--split .svc__img { position: relative; inset: auto; z-index: 0; height: 100%; min-height: 20rem; border-radius: 0; }
.svc--split .svc__body { align-self: end; padding: 2rem; }
@media (max-width: 991px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .svc--1, .svc--2, .svc--3, .svc--4, .svc--5 { grid-column: auto; grid-row: auto; }
  .svc--1 { grid-column: 1 / -1; }
  .svc--6 { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .bento { grid-template-columns: 1fr; }
  .svc--6 { grid-template-columns: 1fr; }
  .svc--6 .svc__img { order: -1; min-height: 12rem; }
}

/* =========================================================
   WORK (Blossom Carousel + orbit)
   ========================================================= */
.work__panel { background: var(--deep); color: var(--cream); border-radius: 80px; padding-block: var(--section-y); overflow: clip; }
.work .display em { color: var(--yellow); }
.work .lead { color: var(--on-dark-70); }

/* Flex row (instead of Blossom's default inline-block) so every card shares the tallest height */
.orbit {
  --card-w: clamp(16.5rem, 30vw, 26rem);
  --orbit-gap: clamp(1rem, 2.5vw, 2.25rem);
  display: flex; align-items: stretch;
  padding-inline: calc(50% - var(--card-w) / 2);
  padding-block: 1.5rem 2.5rem;
  scroll-snap-type: x mandatory;
}
.orbit__slide { display: flex; flex: 0 0 var(--card-w); margin-inline-end: var(--orbit-gap); scroll-snap-align: center; }
.orbit__slide:last-child { margin-inline-end: 0; }
.work-card {
  flex: 1; display: flex; flex-direction: column;
  background: var(--cream); color: var(--deep);
  border-radius: var(--r-card); overflow: hidden;
  box-shadow: 0 2rem 3rem -1.5rem rgb(0 0 0 / .55);
  transform-origin: center center;
  will-change: transform;
  user-select: none;
}
.work-card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; pointer-events: none; }
.work-card__body { flex: 1; padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .7rem; }
.work-card__kind { font-family: var(--font-tech); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--royal); }
.work-card__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.1vw, 2rem); line-height: 1.12; text-wrap: balance; }
.work-card__body > p:not(.work-card__kind) { color: var(--ink-70); font-size: 1rem; }
.work-card .chips { margin-top: auto; padding-top: .35rem; }
.work-card .chips--dark .chip { background: var(--cream-2); color: var(--deep); }

.orbit__controls { display: flex; align-items: center; justify-content: center; gap: 1.25rem; }
.orbit__btn button, .orbit__btn { color: var(--cream); }
.orbit__btn button {
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  border: 2px solid rgb(245 241 231 / .4); background: transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.orbit__btn button:hover { background: rgb(245 241 231 / .12); border-color: var(--cream); }
.orbit__btn svg { width: 1.25rem; height: 1.25rem; }
.orbit__dots { --blossom-dot-color: var(--cream); --blossom-dot-size: .5rem; }

@media (max-width: 991px) { .work__panel { border-radius: 2.5rem; } }

/* =========================================================
   FUNNELS (fan)
   ========================================================= */
/* Resting layout is a clean 3-up row; JS only animates the cards out of a stack into it */
.fan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); align-items: start; max-width: 72rem; margin-inline: auto; padding-block: 1rem 2rem; }
.frame {
  position: relative; min-width: 0;
  background: var(--cream); border-radius: var(--r-card); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--cream-3);
  transform-origin: 50% 100%;
}
.frame:nth-child(2) { z-index: 2; }
.frame__bar { display: flex; gap: .35rem; padding: .7rem .9rem; background: var(--cream-2); }
.frame__bar i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--cream-3); }
.frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.frame figcaption { font-family: var(--font-tech); font-weight: 600; font-size: .9375rem; padding: .8rem 1rem; }
@media (max-width: 767px) {
  .fan { grid-template-columns: repeat(3, 82%); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1.25rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .frame { scroll-snap-align: start; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about__media { border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 5; }
.about__media img { width: 100%; height: 115%; object-fit: cover; }
.about__copy { display: grid; gap: 1.25rem; }
.about__role { font-family: var(--font-tech); font-weight: 600; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--royal); }
.about__bio { font-size: 1.1875rem; max-width: 36rem; }
.about__quote { font-family: var(--font-display); font-style: italic; font-size: clamp(1.3rem, 1.95vw, 1.65rem); line-height: 1.2; padding-block: .5rem; }
.fit { padding: 1.5rem; border-radius: var(--r-card); background: var(--cream-2); }
.fit__title { font-weight: 600; margin-bottom: 1rem; }
.fit__list { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.5rem; }
.fit__list li { display: flex; gap: .55rem; align-items: flex-start; font-size: .9875rem; }
.fit__list svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--royal); margin-top: .15rem; }
@media (max-width: 991px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { aspect-ratio: 16 / 11; }
}
@media (max-width: 559px) { .fit__list { grid-template-columns: 1fr; } }

/* =========================================================
   FAQ (accordion: heading left, question cards right)
   ========================================================= */
.faq__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
/* One unified component: a soft panel that holds both columns; cards sit on it like the tools pills sit on the page */
.faq__panel {
  background: var(--cream-2);
  border: 1px solid var(--cream-3);
  border-radius: var(--r-panel);
  padding: clamp(1.75rem, 4.5vw, 3.75rem);
  box-shadow: 0 1px 2px rgb(19 39 68 / .04), 0 24px 48px -32px rgb(19 39 68 / .28);
}
.faq__intro { display: grid; gap: 1rem; align-content: start; padding-top: .35rem; }
.faq__label { color: var(--royal); }
.faq__sub { max-width: 26rem; }
.faq__list { display: grid; gap: .75rem; }

.faq__item {
  background: #FFFDF8;
  border: 1px solid var(--cream-3);
  border-radius: var(--r-card);
  box-shadow: 0 1px 2px rgb(19 39 68 / .05), 0 10px 24px -18px rgb(19 39 68 / .25);
  transition: border-color .3s var(--ease-std), box-shadow .3s var(--ease-std);
}
.faq__item:hover { border-color: var(--ink-50); }
.faq__item.is-open { border-color: var(--yellow); box-shadow: 0 1px 2px rgb(19 39 68 / .05), 0 16px 32px -20px rgb(19 39 68 / .35); }
.faq__h { font: inherit; }

.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.4rem; min-height: 3.75rem;
  text-align: left; font-size: 1.0625rem; font-weight: 500; line-height: 1.4; color: var(--deep);
  border-radius: var(--r-card);
}

/* + when closed, - when open: the vertical bar folds away */
.faq__icon { position: relative; flex: none; width: 1.75rem; height: 1.75rem; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: .875rem; height: 1.75px; margin: -.875px 0 0 -.4375rem;
  background: currentColor; border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .25s;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item.is-open .faq__icon::after { transform: rotate(0deg); opacity: 0; }

/* Smooth open and close. Without JavaScript every answer stays visible */
.faq__a { display: grid; grid-template-rows: 1fr; }
.faq__a-inner { overflow: hidden; min-height: 0; }
.faq__a-inner p { padding: 0 1.4rem 1.3rem; max-width: 62ch; font-size: 1rem; line-height: 1.6; color: var(--ink-70); }
.js .faq__a { transition: grid-template-rows .45s var(--ease-out), visibility 0s linear .45s; }
.js .faq__item:not(.is-open) .faq__a { grid-template-rows: 0fr; visibility: hidden; }
.js .faq__item.is-open .faq__a { transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  .js .faq__a, .faq__icon::before, .faq__icon::after, .faq__item { transition: none; }
}

@media (max-width: 991px) {
  .faq__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .faq__sub { max-width: 34rem; }
}
@media (max-width: 767px) {
  .faq__panel { border-radius: 1.75rem; padding: 1.25rem .75rem .75rem; }
  .faq__intro { padding: .75rem .6rem 0; }
  .faq__q { padding: 1.05rem 1.1rem; font-size: 1rem; }
  .faq__a-inner p { padding: 0 1.1rem 1.15rem; }
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact { padding-top: var(--section-y); }
.contact__panel {
  position: relative; overflow: clip; isolation: isolate;
  border-radius: 80px; min-height: min(92vh, 52rem);
  display: grid; place-items: center; text-align: center;
  color: var(--cream); background: var(--deep);
  padding: 7rem var(--gutter) 4rem;
}
.contact__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; filter: blur(6px) saturate(1.05); transform: scale(1.06); }
.contact__shade { position: absolute; inset: 0; z-index: -2; background: radial-gradient(90% 70% at 50% 45%, rgb(19 39 68 / .55), rgb(19 39 68 / .85)); }
.contact__svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.contact__dots { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.contact__dot { position: absolute; left: 0; top: 0; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--yellow); opacity: .8; }
.contact__copy { display: grid; justify-items: center; gap: 1.75rem; max-width: 60rem; }
.contact__copy .display { font-size: clamp(2.25rem, 4.8vw, 4.75rem); max-width: 18ch; }
.contact__sub { max-width: 42rem; font-size: clamp(1rem, 1.25vw, 1.1875rem); line-height: 1.6; color: var(--on-dark-70); text-wrap: pretty; }
.contact__copy .display em { color: var(--yellow); }
.contact__actions { display: grid; justify-items: center; gap: .9rem; }
.contact__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.btn--ghost { background: transparent; color: var(--cream); border-color: rgb(245 241 231 / .6); }
.btn--ghost:hover { background: rgb(245 241 231 / .12); border-color: var(--cream); }
.btn__icon { width: 1.2rem; height: 1.2rem; flex: none; }
@media (max-width: 479px) {
  .contact__buttons { flex-direction: column; align-items: stretch; width: 100%; max-width: 20rem; }
}
.contact__note { font-family: var(--font-tech); font-size: .875rem; font-weight: 500; color: var(--on-dark-70); }
@media (max-width: 991px) { .contact__panel { border-radius: 2.5rem; } }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { padding-top: clamp(4rem, 8vw, 6rem); overflow: clip; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer__line { max-width: 24rem; color: var(--ink-70); }
.footer__head { font-family: var(--font-tech); font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-50); margin-bottom: .75rem; }
.footer__col { display: grid; gap: .35rem; align-content: start; }
.footer__link { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; font-weight: 500; padding-block: .2rem; }
.footer__link svg { width: 1rem; height: 1rem; opacity: 0; transform: translateX(-10px); transition: opacity .3s, transform .3s var(--ease-out); }
.footer__link:hover svg, .footer__link:focus-visible svg { opacity: 1; transform: none; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--cream-3); font-size: .875rem; color: var(--ink-70); }
.footer__about { display: grid; gap: 1.25rem; align-content: start; }
.footer__wordmark {
  --logo-accent: var(--yellow);
  display: flex; align-items: center; justify-content: center; gap: .18em;
  font-family: var(--font-tech); font-weight: 600;
  font-size: 15vw; line-height: 1; letter-spacing: -.05em;
  white-space: nowrap;
  margin: 2rem 0 0; padding-bottom: .06em; color: var(--deep);
  user-select: none;
}
.footer__wordmark .logo__mark { width: .98em; height: .73em; }
.footer__wordmark em { font-style: normal; color: var(--yellow); }
@media (max-width: 991px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__about { grid-column: 1 / -1; } }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js [data-reveal], .js [data-reveal-clip] { opacity: 1; transform: none; clip-path: none; }
}

/* =========================================================
   CASE STUDY DIALOG (opened from the Systems in action cards)
   ========================================================= */
.tag--on-dark { color: var(--on-dark-70); }

/* The card is a button now: strip the UA chrome, keep the card look */
.work-card { width: 100%; text-align: left; font: inherit; border: 0; cursor: pointer; }
.work-card__body > .work-card__kind,
.work-card__body > .work-card__title,
.work-card__body > .work-card__text { display: block; }
.work-card__text { color: var(--ink-70); font-size: 1rem; }
.work-card__more {
  margin-top: .9rem;
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-tech); font-weight: 600; font-size: .875rem;
  color: var(--royal);
}
.work-card__more svg { width: 1.05rem; height: 1.05rem; transition: transform .25s var(--ease-out); }
.work-card:hover .work-card__more svg, .work-card:focus-visible .work-card__more svg { transform: translateX(4px); }
.work-card .chips { margin-top: auto; }

.case {
  width: min(64rem, calc(100vw - 2rem));
  max-height: min(88vh, 56rem);
  padding: 0;
  border: 0;
  border-radius: var(--r-panel);
  background: var(--cream);
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 2.5rem 5rem -1rem rgb(19 39 68 / .5);
}
.case::backdrop { background: rgb(15 32 56 / .72); backdrop-filter: blur(3px); }
.case[open] { animation: case-in .45s var(--ease-out); }
@keyframes case-in { from { opacity: 0; transform: translateY(1.5rem) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .case[open] { animation: none; } }

.case__shell { position: relative; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.case__close {
  position: sticky; top: 1rem; left: calc(100% - 3.75rem); z-index: 3;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border-radius: 99px; background: var(--cream); color: var(--deep);
  border: 2px solid var(--cream-2);
  transition: background-color .2s, transform .2s var(--ease-out);
}
.case__close:hover { background: var(--cream-2); transform: rotate(90deg); }
.case__close svg { width: 1.25rem; height: 1.25rem; }

/* ---- Gallery ---- */
.gallery { margin-top: -2.75rem; background: var(--deep); }
.gallery__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; scroll-behavior: smooth;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track img {
  flex: 0 0 100%; width: 100%;
  aspect-ratio: 16 / 9; max-height: 46vh;
  /* contain, not cover: these are workflow screenshots and must be readable whole */
  object-fit: contain; background: var(--deep-2);
  scroll-snap-align: center;
}
.gallery__controls { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .85rem; }
.gallery__btn {
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  border-radius: 99px; border: 1.5px solid var(--on-dark-15); color: var(--cream);
  transition: background-color .2s, border-color .2s;
}
.gallery__btn:hover { background: rgb(245 241 231 / .12); border-color: var(--cream); }
.gallery__btn svg { width: 1rem; height: 1rem; }
.gallery__dots { display: flex; gap: .45rem; }
.gallery__dots button {
  width: .5rem; height: .5rem; border-radius: 99px;
  background: rgb(245 241 231 / .32); transition: background-color .25s, transform .25s;
}
.gallery__dots button[aria-current="true"] { background: var(--cream); transform: scale(1.25); }

/* ---- Panel content ---- */
.case__body { padding: clamp(1.5rem, 4vw, 3rem); }
.case__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.08;
  letter-spacing: -.02em; text-wrap: balance;
  margin-top: .5rem;
}
.case__intro { margin-top: 1rem; font-size: clamp(1.0625rem, 1.2vw, 1.1875rem); line-height: 1.55; color: var(--ink-70); max-width: 60ch; text-wrap: pretty; }
.case__sec { margin-top: clamp(1.75rem, 3vw, 2.5rem); padding-top: clamp(1.25rem, 2.5vw, 1.75rem); border-top: 1px solid var(--cream-3); }
.case__sec h3 {
  font-family: var(--font-tech); font-size: .8125rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--royal);
  margin-bottom: .85rem;
}
.case__sec p { color: var(--ink-70); max-width: 68ch; text-wrap: pretty; }
.case__sec p + .case__list, .case__list + p { margin-top: 1rem; }

.case__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; }
.case__list li { position: relative; padding-left: 1.4rem; color: var(--ink); font-size: 1rem; }
.case__list li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: .45rem; height: .45rem; border-radius: 99px; background: var(--yellow);
}
.case__list--tight { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.case__flow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.case__flow li {
  font-family: var(--font-tech); font-size: .875rem; font-weight: 500;
  padding: .45rem .8rem; border-radius: .55rem;
  background: var(--cream-2); color: var(--deep);
}
.case__flow li + li::before {
  content: "\2192"; margin-right: .8rem; margin-left: -.5rem;
  color: var(--ink-50);
}
.case__flow + p { margin-top: 1rem; }

.case__stack .chip { background: var(--deep); color: var(--cream); }
.case__sec--why p { color: var(--ink); font-size: clamp(1.0625rem, 1.2vw, 1.125rem); }

@media (max-width: 767px) {
  .case { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .case__list, .case__list--tight { grid-template-columns: 1fr; }
}

/* =========================================================
   STORY QUOTE INTERLUDE (between the full-bleed photo and the chapters)
   ========================================================= */
.story__quote { margin: 0; }
.story__quote-inner {
  position: relative;
  display: grid; justify-items: center; text-align: center;
  gap: 1.1rem;
  max-width: 54rem; margin-inline: auto;
}
.story__quote-mark {
  position: absolute; left: 50%; top: -0.42em;
  transform: translateX(-50%);
  font-family: var(--font-display); font-size: clamp(7rem, 13vw, 11rem); line-height: 1;
  color: var(--cream); opacity: .08;
  pointer-events: none; user-select: none;
}
.story__quote-text { position: relative; margin: 0; }
.story__quote-text p {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.25rem, 4.6vw, 4.25rem); line-height: 1.08; letter-spacing: -.02em;
  color: var(--cream); text-wrap: balance;
}
.story__quote-text em { font-style: italic; color: var(--yellow); }
.qw { display: inline-block; }
.story__quote-cite {
  font-family: var(--font-tech); font-size: .8125rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--yellow);
}
.story__quote-rule {
  display: block; width: min(26rem, 72%); height: 1px;
  margin-block: .9rem .3rem;
  background: var(--on-dark-15);
  transform-origin: center;
}
.story__quote-note {
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.55;
  color: var(--on-dark-70); text-wrap: pretty;
}
.story__quote-tag {
  font-family: var(--font-tech); font-size: .75rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgb(245 241 231 / .52);
}

@media (min-width: 992px) {
  .story.is-pinned-mode .story__quote {
    position: absolute; inset: 0; z-index: 3;
    display: grid; place-items: center;
    padding-inline: var(--gutter);
    opacity: 0; visibility: hidden; pointer-events: none;
    background: radial-gradient(80% 75% at 50% 50%, rgb(19 39 68 / .88) 0%, rgb(19 39 68 / .72) 60%, rgb(19 39 68 / .58) 100%);
  }
  .story.is-pinned-mode .story__quote.is-live { visibility: visible; }
  .story.is-pinned-mode .qw { will-change: transform, opacity; }
}

/* Stacked (tablet, phone, reduced motion): the quote is its own block between the cards and the chapters */
.story:not(.is-pinned-mode) .story__quote { grid-area: 3 / 1; padding-block: clamp(2.5rem, 8vw, 4.5rem); }
.story:not(.is-pinned-mode) .story__photo,
.story:not(.is-pinned-mode) .story__chapters { grid-area: 4 / 1; }

/* =========================================================
   TESTIMONIALS (reuses the fan layout and its scroll animation)
   ========================================================= */
.testimonials .fan { align-items: stretch; }
.quote-card {
  display: flex; flex-direction: column; gap: 1rem;
  height: 100%;
  padding: clamp(1.5rem, 2.4vw, 2rem);
}
.quote-card__mark {
  display: block; height: 2.25rem;
  font-family: var(--font-display); font-size: 4.75rem; line-height: .75;
  color: var(--yellow);
}
.quote-card__text { margin: 0; flex: 1; }
.quote-card__text p { font-size: 1.0625rem; line-height: 1.6; color: var(--ink); text-wrap: pretty; }
.quote-card .quote-card__who {
  display: grid; gap: .3rem;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--cream-3);
  font: inherit;
}
.quote-card__name { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; color: var(--deep); }
.quote-card__role {
  font-family: var(--font-tech); font-size: .75rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-70);
}

/* About bio is now several short paragraphs */
.about__bio { text-wrap: pretty; }
.about__bio p + p { margin-top: .9rem; }

/* About: the poster is shown whole, with no crop and no parallax */
.about__media { aspect-ratio: auto; }
.about__media img { height: auto; }
@media (max-width: 991px) { .about__media { aspect-ratio: auto; max-width: 30rem; margin-inline: auto; } }

/* About: Let's Connect, under the photo */
.about__side { display: grid; gap: 1.75rem; justify-items: center; min-width: 0; }
.about__side .about__media { width: 100%; }
.connect { display: grid; justify-items: center; gap: .9rem; }
.connect__title {
  font-family: var(--font-tech); font-size: .8125rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-70);
}
.connect__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; }
.connect__link {
  width: 2.9rem; height: 2.9rem; display: grid; place-items: center;
  border-radius: 99px; border: 1.5px solid var(--cream-3);
  background: var(--cream); color: var(--deep);
  transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ease-out);
}
.connect__link svg { width: 1.2rem; height: 1.2rem; }
.connect__link:hover, .connect__link:focus-visible {
  background: var(--deep); border-color: var(--deep); color: var(--yellow);
  transform: translateY(-3px);
}
@media (max-width: 991px) { .about__side .about__media { max-width: 30rem; } }

/* About: rotating multilingual greeting. JS sets .greet's width to the active word so the comma glides */
.greet {
  display: inline-grid;
  transition: width .7s var(--ease-out);
}
.greet__word {
  grid-area: 1 / 1; justify-self: start; white-space: nowrap;
  font-family: "Playfair Display", "Noto Serif JP", "Noto Serif KR", "Noto Naskh Arabic", Georgia, serif;
  opacity: 0; transform: translateY(.45em); filter: blur(8px);
  transition: opacity .6s var(--ease-out), transform .75s var(--ease-out), filter .6s var(--ease-out);
  pointer-events: none;
}
.greet__word.is-on { opacity: 1; transform: none; filter: blur(0); }
.greet__word.is-out { opacity: 0; transform: translateY(-.45em); filter: blur(8px); }
.reduce .greet, .reduce .greet__word { transition: none; }

/* About heading: sized so the longest greeting still fits one line; comma stays glued to the greeting */
.about__hello { font-size: clamp(2rem, 4.2vw, 3.75rem); }
.about__hello-lead { white-space: nowrap; }

/* =========================================================
   TOOLS MARQUEE (between the hero and the story)
   ========================================================= */
.tools {
  --tool-gap: .75rem;
  display: grid; gap: var(--tool-gap);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}
.tools__row {
  overflow: hidden;
  /* soft fade at both edges so pills drift in and out instead of being cut */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.tools__track {
  display: flex; width: max-content;
  animation: tools-scroll 60s linear infinite;
  will-change: transform;
}
.tools__row--right .tools__track { animation-direction: reverse; animation-duration: 64s; }
/* Four identical sets; the track slides exactly one set (25%). Each set carries its own trailing gap, so the next set starts exactly where the previous one did, and four copies still fill screens ~2500px wide */
.tools__set { display: flex; gap: var(--tool-gap); padding-inline-end: var(--tool-gap); padding-block: .35rem; }
@keyframes tools-scroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-25%, 0, 0); } }

.tool {
  display: inline-flex; align-items: center; gap: .6rem;
  height: 3rem; padding: 0 1.15rem 0 .8rem;
  border-radius: 99px;
  background: #FFFDF8;
  border: 1px solid var(--cream-3);
  box-shadow: 0 1px 2px rgb(19 39 68 / .05), 0 6px 16px -10px rgb(19 39 68 / .18);
  white-space: nowrap;
}
.tool__logo { flex: none; width: 1.25rem; height: 1.25rem; display: block; object-fit: contain; }
.tool__name { font-family: var(--font-tech); font-size: .9375rem; font-weight: 500; color: var(--deep); line-height: 1; }

/* Hovering a row lets people read a name without chasing it */
@media (hover: hover) { .tools__row:hover .tools__track { animation-play-state: paused; } }

@media (max-width: 767px) {
  .tools { --tool-gap: .6rem; }
  .tool { height: 2.6rem; padding: 0 .95rem 0 .7rem; gap: .5rem; }
  .tool__logo { width: 1.1rem; height: 1.1rem; }
  .tool__name { font-size: .875rem; }
  .tools__track { animation-duration: 48s; }
  .tools__row--right .tools__track { animation-duration: 52s; }
}

/* Reduced motion: no scrolling; show one set of each row, wrapped and centred */
@media (prefers-reduced-motion: reduce) {
  .tools__row { -webkit-mask-image: none; mask-image: none; padding-inline: var(--gutter); }
  .tools__track { animation: none; width: auto; justify-content: center; }
  .tools__set { flex-wrap: wrap; justify-content: center; padding-inline-end: 0; }
  .tools__set[aria-hidden="true"] { display: none; }
}

/* =========================================================
   SHALOM brand assets (supplied logo files, shown as provided)
   ========================================================= */
.logo__img { display: block; width: auto; height: 2.75rem; }       /* nav: fits the existing bar height */
.logo--image picture { display: block; }
.logo__img--footer { height: 4.25rem; }
.footer__wordmark-img { display: block; width: auto; height: 1em; max-width: 100%; object-fit: contain; } /* 1em = the old wordmark's 15vw line, so footer spacing is unchanged */
@media (max-width: 359px) { .logo__img { height: 2.5rem; } }        /* very narrow phones switch to the symbol only */
