/* =========================================================================
   Galib — Portfolio Site  |  Shared design tokens + component library
   Build 1: static HTML/CSS/vanilla JS (mirrors the eventual Bricks build)
   See components.md for the running component log.
   ========================================================================= */

/* ---------------------------------------------------------------------------
   1. FONTS  — self-hosted .woff2, no CDN call  (assets/fonts/)
   Headings: General Sans   Body: Plus Jakarta Sans   Accent/stats: JetBrains Mono
   --------------------------------------------------------------------------- */
@font-face { font-family: "General Sans"; src: url("../fonts/GeneralSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/GeneralSans-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/GeneralSans-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/GeneralSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------------------------------------------------------------------------
   2. DESIGN TOKENS
   --------------------------------------------------------------------------- */
:root {
  /* -- Color (§3): 1 ink, 1 base, 1 primary (emerald), 1 secondary (coral) -- */
  --ink:            #12131A;   /* headings, body text */
  --ink-70:         #43454f;   /* muted text */
  --ink-45:         #75777f;   /* captions, meta */
  --base:           #F6FAF8;   /* page background (cool off-white, green undertone) */
  --surface:        #FFFFFF;   /* cards */
  --surface-alt:    #EAF1EF;   /* alt section bg / soft separation */
  --line:           #DDE7E3;   /* hairlines, faux borders */

  --primary:        #1F7A5C;   /* deep emerald — CTAs, links, active states */
  --primary-ink:    #165C45;   /* darker emerald for hover / text-on-light */
  --primary-tint:   #DEEDE6;   /* emerald wash for surfaces */
  --secondary:      #FF6B4A;   /* warm coral — highlights, badges, hovers */
  --secondary-ink:  #E14E2E;   /* darker coral for hover */
  --secondary-tint: #FFE7E0;   /* coral wash */

  --on-primary:     #F6FAF8;   /* text on emerald */
  --on-ink:         #F6FAF8;   /* text on ink */

  /* -- Focus ring -- */
  --focus:          #1F7A5C;

  /* -- Type -- */
  --font-head: "General Sans", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.20vw, 1.12rem);
  --step-1:  clamp(1.20rem, 1.12rem + 0.40vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.30rem + 0.75vw, 1.95rem);
  --step-3:  clamp(1.80rem, 1.55rem + 1.25vw, 2.60rem);
  --step-4:  clamp(2.05rem, 1.70rem + 1.75vw, 3.20rem);
  --step-5:  clamp(2.30rem, 1.85rem + 2.30vw, 4.10rem);

  /* -- Spacing -- */
  --space-2xs: 0.5rem;
  --space-xs:  0.875rem;
  --space-sm:  1.25rem;
  --space-md:  2rem;
  --space-lg:  3.25rem;
  --space-xl:  5rem;
  --space-2xl: 7.5rem;

  /* -- Layout -- */
  --container: 1200px;
  --container-narrow: 820px;
  --gutter: clamp(1.15rem, 5vw, 2.5rem);

  /* -- Clipped-corner signature (§3). Cut top-left + bottom-right. -- */
  --clip-sm: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  --clip-md: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  --clip-lg: polygon(32px 0, 100% 0, 100% calc(100% - 32px), calc(100% - 32px) 100%, 0 100%, 0 32px);

  /* -- Elevation -- */
  --shadow-sm: 0 1px 2px rgba(18,19,26,.06), 0 2px 8px rgba(18,19,26,.05);
  --shadow-md: 0 4px 12px rgba(18,19,26,.08), 0 12px 32px rgba(18,19,26,.08);
  --shadow-lg: 0 10px 30px rgba(18,19,26,.10), 0 30px 70px rgba(18,19,26,.12);

  /* -- Motion -- */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 220ms;
}

/* ---------------------------------------------------------------------------
   3. RESET / BASE
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100%;
}

/* Stop grid/flex children blowing out the page: their default min-width:auto
   refuses to shrink below intrinsic content (esp. images, <select>, long words). */
.hero__grid > *, .cta-band__inner > *, .grid > *, .carousel__slide,
.site-footer__grid > *, .logo-strip__item { min-width: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }

/* Inline icons: an <svg><use href="#i-*"> with a symbol viewBox and no explicit
   size fills its container. Give every inline icon a sane text-relative default;
   component rules below (.btn__icon, .trust-bar__item svg, …) override as needed. */
:where(p, span, a, button, li, figcaption, h1, h2, h3, h4, label, strong, em) svg {
  width: 1.15em; height: 1.15em; flex: none;
}
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--primary-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--secondary-ink); }
ul[class], ol[class] { list-style: none; padding: 0; }
:target { scroll-margin-top: 6rem; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--step-5); font-weight: 700; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); text-transform: uppercase; letter-spacing: .08em; }
p { text-wrap: pretty; }

/* -- Global visible focus (§10.4) -- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------------------
   4. LAYOUT PRIMITIVES
   --------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(3.5rem, 9vw, var(--space-2xl)); }
.section--tight { padding-block: clamp(2.5rem, 6vw, var(--space-xl)); }
.section--alt { background: var(--surface-alt); }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--on-ink); }

.stack > * + * { margin-top: var(--flow, 1.1em); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head :is(h1, h2, h3) + * { margin-top: 1rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: .55em;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary-ink);
  margin-bottom: .9rem;
}
.eyebrow::before {
  content: ""; width: 1.6rem; height: 2px; background: var(--secondary); display: inline-block;
}
.section--ink .eyebrow,
.cta-band .eyebrow { color: var(--secondary); }
.lede { font-size: var(--step-1); color: var(--ink-70); line-height: 1.55; }
.section--ink .lede { color: rgba(246,250,248,.72); }

.grid { display: grid; gap: clamp(1rem, 3vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   5. CLIP UTILITIES (§3 signature shape)
   --------------------------------------------------------------------------- */
.u-clip-sm { clip-path: var(--clip-sm); }
.u-clip-md { clip-path: var(--clip-md); }
.u-clip-lg { clip-path: var(--clip-lg); }

/* Faux border that follows the clip: outer = border colour, inner sits on top.
   Usage: <div class="clip-frame"><div class="clip-frame__in"> … </div></div> */
.clip-frame { background: var(--line); padding: 1.5px; clip-path: var(--clip-md); }
.clip-frame__in { background: var(--surface); clip-path: var(--clip-md); height: 100%; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100%; z-index: 999;
  background: var(--ink); color: var(--on-ink); padding: .7rem 1.1rem;
  clip-path: var(--clip-sm);
}
.skip-link:focus { top: 1rem; color: var(--on-ink); }

/* ---------------------------------------------------------------------------
   6. BUTTONS  (.btn + variants)  — clip-sm, extra inner padding near cuts
   --------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--primary);
  --btn-fg: var(--on-primary);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  padding: 1.05em 1.7em 1.05em 1.8em;   /* extra left pad near the top-left cut */
  min-height: 44px;                      /* tap target (§10.4) */
  color: var(--btn-fg);
  background: var(--btn-bg);
  clip-path: var(--clip-sm);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn .btn__icon { width: 1.1em; height: 1.1em; flex: none; }

.btn--primary  { --btn-bg: var(--primary);   --btn-fg: var(--on-primary); }
.btn--primary:hover  { --btn-bg: var(--primary-ink); box-shadow: var(--shadow-md); }
.btn--coral    { --btn-bg: var(--secondary); --btn-fg: #2A0E06; }
.btn--coral:hover    { --btn-bg: var(--secondary-ink); --btn-fg: var(--on-primary); box-shadow: var(--shadow-md); }
.btn--ink      { --btn-bg: var(--ink);       --btn-fg: var(--on-ink); }
.btn--ink:hover      { --btn-bg: #23252f; box-shadow: var(--shadow-md); }

/* Outline: wrapper carries the faux border (see .clip-frame idea). */
.btn--outline {
  background: var(--line); padding: 1.5px; clip-path: var(--clip-sm);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.btn--outline > span {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-weight: 600; line-height: 1;
  padding: calc(1.05em - 1.5px) 1.7em; min-height: 41px;
  background: var(--base); color: var(--ink);
  clip-path: var(--clip-sm);
}
.btn--outline:hover { background: var(--primary); transform: translateY(-2px); }
.btn--outline:hover > span { color: var(--primary-ink); }
.section--ink .btn--outline { background: rgba(246,250,248,.28); }
.section--ink .btn--outline > span { background: var(--ink); color: var(--on-ink); }

.btn--ghost {
  padding: .8em .4em; background: none; color: var(--primary-ink); clip-path: none;
  font-weight: 600;
}
.btn--ghost:hover { color: var(--secondary-ink); transform: none; gap: .9em; }
.section--ink .btn--ghost { color: var(--secondary); }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }

/* ---------------------------------------------------------------------------
   7. BADGE / PILL / TAG
   --------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4em .5em;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.4;
  padding: .5em .85em .5em .95em;
  background: var(--primary-tint);
  color: var(--primary-ink);
  clip-path: var(--clip-sm);
}
.badge--coral { background: var(--secondary-tint); color: var(--secondary-ink); }
.badge--ink   { background: var(--ink); color: var(--on-ink); }
.badge__dot { width: .5em; height: .5em; background: currentColor; border-radius: 50%; flex: none; }

/* Tag (niche cloud) — links, clip-sm */
.tag {
  display: inline-flex; align-items: center;
  font-size: var(--step--1); font-weight: 600;
  padding: .6em 1em .6em 1.1em;
  background: var(--surface);
  color: var(--ink-70);
  clip-path: var(--clip-sm);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none;
  transition: color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tag:hover { color: var(--primary-ink); box-shadow: inset 0 0 0 1px var(--primary); transform: translateY(-2px); }

/* ---------------------------------------------------------------------------
   8. HEADER / NAV
   --------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--base) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--line); background: color-mix(in srgb, var(--base) 96%, transparent); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; }

.brand { display: inline-flex; align-items: baseline; gap: .35rem; font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.brand__dot { color: var(--secondary); }
.brand:hover { color: var(--ink); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav__list { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 1.9rem); }
.nav__link {
  font-size: var(--step--1); font-weight: 600; color: var(--ink-70);
  text-decoration: none; padding: .4rem 0; position: relative;
}
.nav__link::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--secondary); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease); }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav__toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); }
.nav__toggle svg { width: 24px; height: 24px; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 940px) {
  .nav__toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--base); border-bottom: 1px solid var(--line);
    padding: var(--gutter);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    max-height: calc(100dvh - 72px); overflow-y: auto;
  }
  .nav[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: var(--step-0); }
  .nav__link::after { display: none; }
  .nav .btn { margin-top: 1rem; }
}

/* ---------------------------------------------------------------------------
   9. HERO  (statement style — full-width message; proof band follows, §11)
   --------------------------------------------------------------------------- */
.hero { padding-block: clamp(2.75rem, 8vw, 6rem) clamp(1.75rem, 4vw, 2.75rem); }
.hero__inner { max-width: 58rem; }
.hero .badge { margin-bottom: 1.7rem; }

.hero__title {
  font-size: clamp(2.15rem, 1.2rem + 4.5vw, 5rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: initial;   /* desktop: honour the manual <br> breaks */
}
.hero__title .hl { color: var(--primary-ink); position: relative; white-space: nowrap; }
.hero__title .hl::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0.02em;
  height: 0.16em;
  background: var(--secondary);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
@media (max-width: 620px) {
  .hero__title .hb { display: none; }       /* mobile: drop the forced breaks, keep the spaces, wrap naturally */
  .hero__title { text-wrap: balance; }
}

.hero__sub { font-size: var(--step-1); color: var(--ink-70); max-width: 46ch; margin-top: 1.6rem; }
.hero__cta { margin-top: 2.25rem; }

.hero__stats {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .6rem 1.7rem;
  margin-top: 2.75rem; padding-top: 1.7rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-70);
}
.hero__stats li { display: inline-flex; align-items: baseline; gap: .4rem; white-space: nowrap; }
.hero__stats .n { font-weight: 700; color: var(--ink); font-size: 1.05em; }
@media (max-width: 460px) { .hero__stats { gap: .55rem 1.1rem; } }

/* ---------------------------------------------------------------------------
   10. BROWSER / DEVICE FRAME (§3 imagery — clip-lg on outer frame)
   --------------------------------------------------------------------------- */
.browser-frame { background: var(--ink); padding: .55rem; clip-path: var(--clip-lg); }
.browser-frame__bar { display: flex; align-items: center; gap: .4rem; padding: .35rem .5rem .55rem; }
.browser-frame__bar i { width: .6rem; height: .6rem; border-radius: 50%; background: rgba(246,250,248,.32); display: block; }
.browser-frame__view { clip-path: var(--clip-md); background: var(--surface-alt); overflow: hidden; }
.browser-frame__view img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ---------------------------------------------------------------------------
   11. PROOF BAND  (full-bleed marquee of recent client sites)
       .marquee.is-ready (added by JS after cloning .marquee__group) animates;
       without JS / with reduced motion it's a plain scrollable row.
   --------------------------------------------------------------------------- */
.proof-band { padding-block: clamp(1.25rem, 3vw, 2rem) clamp(2.75rem, 7vw, 4.5rem); overflow: hidden; }
.proof-band .strip-label { text-align: left; margin-bottom: 1.4rem; }

.marquee { position: relative; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; inset-block: 0; width: clamp(1.5rem, 8vw, 7rem);
  z-index: 2; pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg, var(--base), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--base), transparent); }

.marquee__track { display: flex; width: max-content; }
.marquee__group {
  display: flex; flex: none;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  padding-right: clamp(1rem, 2.5vw, 1.75rem);   /* == gap, so the A→B seam matches for a seamless -50% loop */
}
.marquee.is-ready .marquee__track { animation: marquee-scroll var(--marquee-dur, 70s) linear infinite; }
.marquee.is-ready:hover .marquee__track,
.marquee.is-ready:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee-scroll { to { transform: translateX(-50%); } }

.marquee:not(.is-ready) { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.marquee:not(.is-ready)::-webkit-scrollbar { display: none; }

.marquee__item {
  flex: 0 0 clamp(18rem, 30vw, 26rem);
  text-decoration: none; color: inherit; scroll-snap-align: start;
}
.marquee__item .browser-frame { box-shadow: var(--shadow-md); transition: transform var(--dur) var(--ease); }
.marquee__item:hover .browser-frame { transform: translateY(-4px); }
.marquee__item .browser-frame__view { aspect-ratio: 16 / 10; }
.marquee__cap { display: block; margin-top: .85rem; font-size: var(--step--1); color: var(--ink-45); }
.marquee__cap b { color: var(--ink); font-weight: 700; margin-right: .45rem; }

@media (prefers-reduced-motion: reduce) {
  .marquee.is-ready .marquee__track { animation: none; }
  .marquee.is-ready { overflow-x: auto; }
}

/* ---------------------------------------------------------------------------
   12. CARDS
   --------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  clip-path: var(--clip-md);
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.6rem, 3vw, 2.15rem);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
/* Equal heights in multi-column rows come from the grid's default
   align-items:stretch (no height:100% needed). A stretched flex-column card
   then lets .service-card__more sit at the bottom via margin-top:auto. In a
   1-col grid there's nothing to stretch to, so no gap opens. */
.card--link { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: inherit; }

/* Service card */
.service-card__icon {
  width: 3rem; height: 3rem; display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary-ink);
  clip-path: var(--clip-sm); margin-bottom: 1.1rem;
}
.service-card__icon svg { width: 1.5rem; height: 1.5rem; }
.service-card:hover .service-card__icon { background: var(--primary); color: var(--on-primary); }
.service-card h3 { font-size: var(--step-0); margin-bottom: .4rem; }
.service-card p { font-size: var(--step--1); color: var(--ink-70); }
.service-card__more { margin-top: auto; padding-top: 1rem; font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600; color: var(--primary-ink); display: inline-flex; align-items: center; gap: .45rem; }
.service-card:hover .service-card__more { gap: .8rem; color: var(--secondary-ink); }

/* Portfolio card */
.work-card { padding: 0; overflow: hidden; background: var(--surface); text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.work-card:hover { color: inherit; transform: translateY(-4px); box-shadow: var(--shadow-md); }
.work-card h3 { transition: color var(--dur) var(--ease); }
.work-card:hover h3 { color: var(--primary-ink); }
.work-card__frame { background: var(--ink); padding: .4rem; }
.work-card__view { overflow: hidden; clip-path: var(--clip-sm); aspect-ratio: 16 / 10; }
.work-card__view img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 600ms var(--ease); }
.work-card:hover .work-card__view img { transform: scale(1.04); }
.work-card__body { padding: 1.25rem 1.4rem 1.5rem; }
.work-card__meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.work-card__meta span { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-45); }
.work-card__meta span + span::before { content: "·"; margin-right: .4rem; color: var(--line); }
.work-card h3 { font-size: var(--step-0); }
.work-card p { font-size: var(--step--1); color: var(--ink-70); margin-top: .35rem; }

/* Stat box (§3 clip-md) */
.stat-box { background: var(--surface); clip-path: var(--clip-md); padding: 1.5rem 1.6rem; box-shadow: var(--shadow-sm); }
.stat-box .num { font-family: var(--font-mono); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; color: var(--ink); line-height: 1; }
.stat-box .num .u { color: var(--secondary); }
.stat-box .lbl { font-size: var(--step--1); color: var(--ink-70); margin-top: .5rem; }
.section--ink .stat-box { background: #1b1d27; }
.section--ink .stat-box .num { color: #fff; }
.section--ink .stat-box .lbl { color: rgba(246,250,248,.62); }

/* Process step */
.step { position: relative; background: var(--surface); clip-path: var(--clip-md); padding: 1.75rem 1.6rem; box-shadow: var(--shadow-sm); height: 100%; }
.step__n { font-family: var(--font-mono); font-size: .8rem; font-weight: 700; color: var(--primary-ink); background: var(--primary-tint); width: 2.1rem; height: 2.1rem; display: grid; place-items: center; clip-path: var(--clip-sm); margin-bottom: 1rem; }
.step h3 { font-size: var(--step-0); margin-bottom: .35rem; }
.step p { font-size: var(--step--1); color: var(--ink-70); }

/* Testimonial */
.quote-card { background: var(--surface); clip-path: var(--clip-md); padding: 1.9rem 1.8rem; box-shadow: var(--shadow-sm); height: 100%; display: flex; flex-direction: column; gap: 1.1rem; }
.quote-card__stars { color: var(--secondary); letter-spacing: .12em; font-size: .95rem; }
.quote-card blockquote { font-size: var(--step-0); color: var(--ink); line-height: 1.55; }
.quote-card__who { margin-top: auto; display: flex; align-items: center; gap: .8rem; }
.quote-card__avatar { flex: none; width: 2.4rem; height: 2.4rem; background: var(--primary-tint); color: var(--primary-ink); display: grid; place-items: center; clip-path: var(--clip-sm); font-family: var(--font-head); font-weight: 700; font-size: .95rem; }
.quote-card__name { font-weight: 700; font-size: var(--step--1); }
.quote-card__role { font-size: .78rem; color: var(--ink-45); }

/* Speed-proof image card (framed PageSpeed screenshots, §4.7) */
.proof-card { background: var(--surface); clip-path: var(--clip-md); padding: .75rem; box-shadow: var(--shadow-md); height: 100%; display: flex; flex-direction: column; }
.proof-card img { clip-path: var(--clip-sm); width: 100%; display: block; background: var(--surface-alt); }
.proof-card figcaption { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-45); padding: .85rem .5rem .3rem; margin-top: auto; }
.proof-card figcaption b { display: block; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; margin-bottom: .15rem; }
.section--ink .proof-card { box-shadow: 0 0 0 1px rgba(246,250,248,.10), var(--shadow-lg); }

.speed-stats { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.proof-note { margin-top: 1.5rem; text-align: center; font-family: var(--font-mono); font-size: var(--step--1); color: rgba(246,250,248,.5); }

/* Blog card */
.post-card { background: var(--surface); clip-path: var(--clip-md); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: inherit; }
.post-card__cat { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--primary-ink); }
.post-card__body { padding: 1.5rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.post-card h3 { font-size: var(--step-0); }
.post-card time { font-size: .78rem; color: var(--ink-45); margin-top: auto; }

/* ---------------------------------------------------------------------------
   13. LOGO / BUILDER STRIP
   --------------------------------------------------------------------------- */
.strip-label {
  text-align: center; margin-bottom: 1.5rem;
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-45);
}
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(1.25rem, 5vw, 3.5rem); }
.logo-strip__item { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink-45); display: inline-flex; align-items: center; gap: .5rem; }
.logo-strip__item svg { width: 1.4rem; height: 1.4rem; color: var(--ink-70); }

/* ---------------------------------------------------------------------------
   14. CTA BAND (§4.11)
   --------------------------------------------------------------------------- */
.cta-band { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; right: -8%; top: -40%; width: 40rem; height: 40rem;
  background: radial-gradient(circle, rgba(31,122,92,.35), transparent 62%);
  pointer-events: none;
}
.cta-band__inner { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 820px) { .cta-band__inner { grid-template-columns: 1fr; } }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(246,250,248,.72); margin-top: .8rem; }

/* ---------------------------------------------------------------------------
   14b. FORM FIELDS  (§8 — markup mirrors the eventual Gravity Forms build)
   --------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: var(--step--1); font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .8em 1em .8em 1.1em;   /* extra left pad near the clip cut */
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: var(--clip-sm);
  transition: box-shadow var(--dur) var(--ease);
  font-size: var(--step--1);
}
.field textarea { resize: vertical; min-height: 3.2em; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--primary);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.field input:user-invalid, .field textarea:user-invalid {
  box-shadow: inset 0 0 0 2px var(--secondary-ink);
}
.quote-form { box-shadow: var(--shadow-lg); }

/* ---------------------------------------------------------------------------
   15. FOOTER
   --------------------------------------------------------------------------- */
.site-footer { background: #0d0e14; color: rgba(246,250,248,.7); padding-block: clamp(3rem, 7vw, 4.5rem) 2rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; }
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: rgba(246,250,248,.5); font-size: .72rem; margin-bottom: 1rem; }
.site-footer a { color: rgba(246,250,248,.7); text-decoration: none; font-size: var(--step--1); }
.site-footer a:hover { color: #fff; }
.site-footer__links { display: flex; flex-direction: column; gap: .65rem; }
.site-footer__brand .brand { color: #fff; }
.site-footer__brand p { font-size: var(--step--1); margin-top: .8rem; max-width: 32ch; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(246,250,248,.12); font-size: .78rem; }
.site-footer__social { display: flex; gap: .6rem; }
.site-footer__social a { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; background: rgba(246,250,248,.08); clip-path: var(--clip-sm); }
.site-footer__social a:hover { background: var(--primary); }
.site-footer__social svg { width: 1.05rem; height: 1.05rem; }

/* ---------------------------------------------------------------------------
   15b. CAROUSEL (testimonials) — scroll-snap, JS enhances with dots/arrows
   --------------------------------------------------------------------------- */
.carousel { position: relative; }
.carousel__track {
  display: flex; align-items: stretch; gap: clamp(1rem, 3vw, 1.75rem);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: .5rem;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { scroll-snap-align: start; flex: 0 0 clamp(17rem, 32vw, 24rem); display: flex; }
.carousel__slide > * { width: 100%; }
/* Slide == quote-card here; an explicit height:100% (from .quote-card, for grid
   use) blocks the flex align-items:stretch that equalises the row. Let it stretch. */
.carousel__slide.quote-card { height: auto; }
.carousel__nav { display: flex; gap: .6rem; margin-top: 1.5rem; align-items: center; }
.carousel__btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  clip-path: var(--clip-sm); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.carousel__btn:hover { background: var(--primary); color: var(--on-primary); }
.carousel__btn:disabled { opacity: .35; cursor: not-allowed; }
.carousel__btn svg { width: 1.1rem; height: 1.1rem; }
.carousel__dots { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.carousel__dot { width: .5rem; height: .5rem; background: var(--line); border-radius: 2px; transition: background-color var(--dur) var(--ease), width var(--dur) var(--ease); }
.carousel__dot[aria-current="true"] { background: var(--primary); width: 1.4rem; }
.section--ink .carousel__btn { background: #1b1d27; color: #fff; box-shadow: inset 0 0 0 1px rgba(246,250,248,.18); }
.section--ink .carousel__dot { background: rgba(246,250,248,.24); }
.section--ink .carousel__dot[aria-current="true"] { background: var(--secondary); }

/* ---------------------------------------------------------------------------
   15c. SERVICE-PAGE COMPONENTS  (§5 template — breadcrumb, prose, checklist,
        callout, faq, pricing). Shared across all 10 service pages.
   --------------------------------------------------------------------------- */
/* Breadcrumb — sits just under the sticky header, above the hero content */
.breadcrumb { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); font-family: var(--font-mono); font-size: var(--step--1); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; }
.breadcrumb li { color: var(--ink-45); }
.breadcrumb a { color: var(--ink-45); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-ink); }
.breadcrumb li + li::before { content: "/"; margin-right: .55rem; color: var(--line); }
.breadcrumb [aria-current="page"] { color: var(--ink-70); }

/* Service hero */
.svc-hero { padding-block: clamp(1.25rem, 3vw, 2rem) clamp(2.75rem, 7vw, 4.5rem); }
.svc-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (max-width: 900px) { .svc-hero__grid { grid-template-columns: 1fr; } }
.svc-hero h1 { margin-top: .55rem; }
.svc-hero .lede { margin-top: 1.1rem; }
.svc-hero .btn-row { margin-top: 1.75rem; }
.svc-hero__media .browser-frame { box-shadow: var(--shadow-lg); }

/* Prose block (rich text, "What's included") */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose .eyebrow { margin-bottom: .4rem; }
.prose h2 { font-size: var(--step-2); }
.prose h3 { font-size: var(--step-0); margin-top: 1.9em; }
.prose p { color: var(--ink-70); }
.prose strong { color: var(--ink); font-weight: 700; }

/* Checklist */
.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.75rem; list-style: none; padding: 0; }
@media (max-width: 620px) { .checklist { grid-template-columns: 1fr; } }
.check-item { display: flex; gap: .8rem; align-items: flex-start; font-size: var(--step--1); color: var(--ink-70); }
.check-item svg { width: 1.55rem; height: 1.55rem; flex: none; padding: .3rem; color: var(--primary-ink); background: var(--primary-tint); clip-path: var(--clip-sm); }

/* Callout (icon + heading + text/list; drop into a grid--2) */
.callout { background: var(--surface); clip-path: var(--clip-md); padding: clamp(1.5rem, 3vw, 2rem); box-shadow: var(--shadow-sm); height: 100%; }
.callout__icon { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary-ink); clip-path: var(--clip-sm); margin-bottom: 1rem; }
.callout__icon svg { width: 1.35rem; height: 1.35rem; }
.callout h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.callout p { font-size: var(--step--1); color: var(--ink-70); }
.callout ul { margin-top: .85rem; display: flex; flex-direction: column; gap: .5rem; list-style: none; padding: 0; }
.callout ul li { position: relative; padding-left: 1.4rem; font-size: var(--step--1); color: var(--ink-70); }
.callout ul li::before { content: ""; position: absolute; left: 0; top: .52em; width: .5rem; height: .5rem; background: var(--secondary); clip-path: var(--clip-sm); }
.callout__note { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .8rem; line-height: 1.5; color: var(--ink-45); }

/* Stacked proof screenshots (e.g. desktop + mobile pair) */
.proof-stack { display: flex; flex-direction: column; gap: clamp(1rem, 3vw, 1.5rem); }

/* Promo band — Maintenance & Hosting "free website" offers (plan §13).
   Emerald background so it reads as a distinct deal beat; white offer cards. */
.offer-band { background: var(--primary); color: var(--on-primary); padding-block: clamp(3rem, 8vw, var(--space-2xl)); }
/* Coral text on emerald fails contrast — render the eyebrow as a solid coral chip. */
.offer-band .eyebrow {
  color: #fff;
  background: var(--secondary-ink);
  padding: .45em .85em;
  clip-path: var(--clip-sm);
}
.offer-band .eyebrow::before { background: #fff; }
.offer-band h2 { color: #fff; }
.offer-band .lede { color: rgba(246,250,248,.82); }
.offer-card {
  background: var(--surface); clip-path: var(--clip-md);
  padding: clamp(1.6rem, 3.5vw, 2.25rem);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: .7rem; height: 100%;
}
.offer-card h3 { font-size: var(--step-1); }
.offer-card__price { font-family: var(--font-mono); font-size: clamp(1.7rem, 4vw, 2.2rem); font-weight: 700; color: var(--ink); line-height: 1; }
.offer-card__price span { font-size: var(--step--1); font-weight: 500; color: var(--ink-45); }
.offer-card p:not(.offer-card__price) { font-size: var(--step--1); color: var(--ink-70); }
.offer-card .btn { margin-top: auto; align-self: flex-start; }

/* FAQ — native <details>/<summary> */
.faq { max-width: 60rem; display: flex; flex-direction: column; gap: .75rem; }
.faq__item { background: var(--surface); clip-path: var(--clip-md); box-shadow: var(--shadow-sm); }
.faq__item summary {
  list-style: none; cursor: pointer;
  padding: 1.15rem 1.4rem;
  font-family: var(--font-head); font-weight: 600; font-size: var(--step-0);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; width: .95rem; height: .95rem; flex: none; margin-top: -.3rem;
  border-right: 2px solid var(--primary-ink); border-bottom: 2px solid var(--primary-ink);
  transform: rotate(45deg); transition: transform var(--dur) var(--ease);
}
.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: .2rem; }
.faq__item .faq__body { padding: 0 1.4rem 1.3rem; font-size: var(--step--1); color: var(--ink-70); max-width: 64ch; }
.faq__item .faq__body > * + * { margin-top: .8em; }

/* Pricing framing */
.pricing { background: var(--surface); clip-path: var(--clip-lg); box-shadow: var(--shadow-sm); padding: clamp(1.75rem, 4vw, 2.75rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }
.pricing__rate .amount { display: block; font-family: var(--font-mono); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700; color: var(--ink); line-height: 1.1; }
.pricing__rate .unit { color: var(--ink-45); font-size: var(--step--1); font-weight: 500; }
.pricing__factors h3 { font-size: var(--step-0); margin-bottom: .65rem; }
.pricing__factors ul { display: flex; flex-direction: column; gap: .55rem; list-style: none; padding: 0; }
.pricing__factors li { position: relative; padding-left: 1.4rem; font-size: var(--step--1); color: var(--ink-70); }
.pricing__factors li::before { content: ""; position: absolute; left: 0; top: .5em; width: .5rem; height: .5rem; background: var(--primary); clip-path: var(--clip-sm); }

/* ---------------------------------------------------------------------------
   15d. PORTFOLIO FILTER BAR  (builder + industry; JS in main.js §7)
        No-JS: hidden, every card shows.
   --------------------------------------------------------------------------- */
/* A framed control panel, so it reads as filters and not decorative text. */
.filter-bar {
  display: flex; flex-direction: column; gap: .75rem;
  margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem);
  padding: clamp(1rem, 2.5vw, 1.35rem) clamp(1.1rem, 3vw, 1.55rem);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  clip-path: var(--clip-md);
}
.no-js .filter-bar { display: none; }
.filter-bar__title {
  display: flex; align-items: center; gap: .5rem; margin: 0 0 .1rem;
  font-family: var(--font-mono); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: .12em; font-weight: 600;
  color: var(--ink-70);
}
.filter-bar__title svg { width: 1.05rem; height: 1.05rem; flex: none; color: var(--primary-ink); }
.filter-group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-group + .filter-group { padding-top: .8rem; border-top: 1px solid var(--line); }
.filter-group__label {
  min-width: 5rem;
  font-family: var(--font-mono); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-45);
}
.filter-btn {
  font: inherit; font-size: var(--step--1); line-height: 1; font-weight: 500;
  padding: .5rem .9rem; min-height: 40px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-70);
  box-shadow: var(--shadow-sm);
  clip-path: var(--clip-sm); cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary-ink); }
.filter-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.filter-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: none; }
.portfolio-count { font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-45); margin-bottom: 1.15rem; }
.portfolio-empty { padding: 2.5rem 0; color: var(--ink-70); }
.work-card[hidden] { display: none; }

/* ---------------------------------------------------------------------------
   15e. CASE STUDY  (portfolio/[slug]/) — reuses svc-hero, prose, stat-box,
        proof-card/proof-stack, checklist, work-card. New bits: meta strip +
        a capped full-page screenshot.
   --------------------------------------------------------------------------- */
.cs-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1.1rem 1.5rem;
  margin-top: clamp(1.5rem, 4vw, 2rem);
  padding-top: clamp(1.25rem, 3vw, 1.6rem);
  border-top: 1px solid var(--line);
}
.cs-meta > div { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.cs-meta dt { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-45); }
.cs-meta dd { margin: 0; font-size: var(--step--1); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.cs-meta dd a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }
.cs-gallery { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.cs-gallery figcaption { margin-top: .7rem; font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-45); }
/* full-page screenshot shown at its true height, no crop (overrides the
   height:100%/object-fit:cover on .browser-frame__view img at §10) */
.cs-gallery .browser-frame__view img { display: block; width: 100%; height: auto; object-fit: fill; }

/* ---------------------------------------------------------------------------
   16. REVEAL-ON-SCROLL  (progressive; no-JS shows everything)
   --------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------------
   17. REDUCED MOTION (§10.4)
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .work-card:hover .work-card__view img { transform: none; }
}

/* ---------------------------------------------------------------------------
   18. SMALL-SCREEN CLIP SCALE-DOWN (§10.4 — diagonal must not eat tap targets)
   --------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --clip-sm: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    --clip-md: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    --clip-lg: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  }
}

/* ---------------------------------------------------------------------------
   19. AVAILABILITY TOPBAR  (site-wide, sits above .site-header — byte-identical
       markup on every page; see the block right after .skip-link)
   --------------------------------------------------------------------------- */
.topbar {
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  line-height: 1.4;
}
.topbar__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .35rem 1.5rem;
  padding-block: .5rem;
  text-align: center;
}
.topbar__item { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; letter-spacing: .02em; }
.topbar__item b { font-weight: 700; }
.topbar__item--soon b { color: #FFD9A8; }
.topbar__dot {
  width: .5rem; height: .5rem; flex: none; border-radius: 50%;
  background: #8FF0CE;
}
.topbar__item--soon .topbar__dot { background: #FFD9A8; }
@media (prefers-reduced-motion: no-preference) {
  .topbar__dot { animation: topbar-pulse 2.6s var(--ease) infinite; }
}
@keyframes topbar-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(143,240,206,.55); }
  70%  { box-shadow: 0 0 0 .5rem rgba(143,240,206,0); }
  100% { box-shadow: 0 0 0 0 rgba(143,240,206,0); }
}
.topbar__cta {
  color: #fff; font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; gap: .35rem;
}
.topbar__cta svg { width: 1em; height: 1em; flex: none; }
.topbar__cta:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 520px) {
  .topbar__inner { gap: .3rem 1rem; }
  .topbar__cta { display: none; }
}

/* ---------------------------------------------------------------------------
   20. HERO BUILD-STANDARD ROW  (a second .hero__stats-style line — Lighthouse
       targets, not client scores. Same visual language as the track record.)
   --------------------------------------------------------------------------- */
.hero__stats--std {
  margin-top: .95rem;
  padding-top: 0;
  border-top: 0;
  color: var(--ink-45);
  gap: .5rem 1.3rem;
}
.hero__stats--std .n { color: var(--primary-ink); }
.hero__stats--std li a {
  font-weight: 600;
  display: inline-flex; align-items: center; gap: .3rem;
}
.hero__stats--std li a svg { width: .8em; height: .8em; flex: none; }
