/* =====================================================================
   Naishadh Singapuri: portfolio and services, design system v6
   Light-first. Every colour, font, size and radius comes from theme
   tokens (--c-*, --font-*, --fs-*, --r*). The tokens are written by
   assets/css/theme.css, which the build and the editor generate from
   your Design and Fonts settings. The values below are only fallbacks
   (the "Report" theme) used if theme.css is missing.

   Tones: .tone-light (main background), .tone-alt (secondary
   background), .tone-dark / .on-dark (the deep band, used sparingly:
   impact numbers, contact call-to-action, footer).
   ===================================================================== */

:where(:root) {
  --c-bg: #f8f6f0; --c-bg2: #e8e5db; --c-surface: #fdfcf8; --c-ink: #26332e; --c-ink2: #3c4a44; --c-muted: #56625c;
  --c-line: #dcd9cf; --c-line2: #c4c1b6; --c-acc: #214e41; --c-acc-t: #214e41; --c-acc-ink: #ffffff; --c-deco: #b69a65; --c-deco-t: #796339;
  --c-band: #1c3f35; --c-band-ink: #f8f6f0; --c-band-muted: #c3cdc8; --c-band-acc: #d9c9a3; --c-tint: #214e41;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fw-head: 500; --fw-body: 400; --fw-strong: 650; --fs-head: 1; --fs-body: 1; --ls-head: -0.015em; --lh-head: 1; --lh-body: 1;
  --rb: 3px; --r-sm: 4px; --r: 6px; --r-lg: 8px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --tone-t: 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1240px;
  --header-h: 72px;
  --shadow: 0 30px 60px -38px color-mix(in srgb, var(--c-ink) 45%, transparent);
  --pending-bg: #fff3d9; --pending-ink: #6f4500; --pending-line: #d9a043;

  /* fluid type scale (phone 360px -> desktop 1440px) */
  --t-hero: calc(var(--fs-head) * clamp(2.375rem, 1.7rem + 3.2vw, 4.25rem));
  --t-xl: calc(var(--fs-head) * clamp(2.25rem, 1.62rem + 2.8vw, 3.9rem));
  --t-lg: calc(var(--fs-head) * clamp(1.875rem, 1.5rem + 1.8vw, 3rem));
  --t-md: calc(var(--fs-head) * clamp(1.5rem, 1.3rem + 0.9vw, 2rem));
  --t-sm: calc(var(--fs-head) * clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem));
  --t-num: calc(var(--fs-head) * clamp(2.6rem, 1.9rem + 3vw, 4.4rem));
  --t-lead: calc(var(--fs-body) * clamp(1.1875rem, 1.1rem + 0.45vw, 1.4375rem));
  --t-body: calc(var(--fs-body) * clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem));
  --t-ui: calc(var(--fs-body) * clamp(0.9375rem, 0.92rem + 0.1vw, 1rem));
  --t-label: calc(var(--fs-body) * clamp(0.875rem, 0.85rem + 0.12vw, 0.9375rem));
  --t-cap: calc(var(--fs-body) * clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem));
}

/* Registered so the colours can fade smoothly when the page tone changes */
@property --page { syntax: "<color>"; inherits: true; initial-value: #f8f6f0; }
@property --fg { syntax: "<color>"; inherits: true; initial-value: #26332e; }
@property --fg-2 { syntax: "<color>"; inherits: true; initial-value: #3c4a44; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #56625c; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #dcd9cf; }
@property --line-2 { syntax: "<color>"; inherits: true; initial-value: #c4c1b6; }
@property --surface { syntax: "<color>"; inherits: true; initial-value: #fdfcf8; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #214e41; }
@property --mark { syntax: "<color>"; inherits: true; initial-value: #b69a65; }
@property --soft { syntax: "<color>"; inherits: true; initial-value: #e9ede9; }
@property --btn-bg { syntax: "<color>"; inherits: true; initial-value: #214e41; }
@property --btn-fg { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --field-bg { syntax: "<color>"; inherits: true; initial-value: #fdfcf8; }
@property --grid { syntax: "<color>"; inherits: true; initial-value: rgba(38, 51, 46, 0.05); }
@property --wm-ink { syntax: "<color>"; inherits: true; initial-value: #214e41; }

/* ---------- Tones ---------- */
:root, .tone-light, .tone-alt,
.tone-morph body[data-tone="light"] main .tone-dark, .tone-morph body[data-tone="alt"] main .tone-dark {
  --page: var(--c-bg); --fg: var(--c-ink); --fg-2: var(--c-ink2); --muted: var(--c-muted);
  --line: var(--c-line); --line-2: var(--c-line2); --surface: var(--c-surface);
  --accent: var(--c-acc-t); --accent-line: var(--c-deco); --mark: var(--c-deco);
  --soft: color-mix(in srgb, var(--c-acc) 9%, var(--c-bg));
  --btn-bg: var(--c-acc); --btn-fg: var(--c-acc-ink); --btn-hover-bg: var(--c-ink); --btn-hover-fg: var(--c-bg);
  --focus: var(--c-acc); --field-bg: var(--c-surface); --grid: color-mix(in srgb, var(--c-ink) 6%, transparent); --bad: #a3262b;
  --wm-ink: var(--c-acc); --wm-k: 1;
}
.tone-alt, .tone-morph body[data-tone="alt"] main .tone-light { --page: var(--c-bg2); --surface: color-mix(in srgb, var(--c-surface) 70%, var(--c-bg2)); --line: color-mix(in srgb, var(--c-ink) 15%, var(--c-bg2)); }
.tone-morph body[data-tone="light"] main .tone-alt { --page: var(--c-bg); --surface: var(--c-surface); --line: var(--c-line); }
.tone-dark, .on-dark, .tone-morph body[data-tone="dark"] main .tone-light, .tone-morph body[data-tone="dark"] main .tone-alt {
  --page: var(--c-band); --fg: var(--c-band-ink); --fg-2: color-mix(in srgb, var(--c-band-ink) 88%, var(--c-band)); --muted: var(--c-band-muted);
  --line: color-mix(in srgb, var(--c-band-ink) 15%, var(--c-band)); --line-2: color-mix(in srgb, var(--c-band-ink) 30%, var(--c-band));
  --surface: color-mix(in srgb, var(--c-band-ink) 7%, var(--c-band));
  --accent: var(--c-band-acc); --accent-line: var(--c-band-acc); --mark: var(--c-band-acc);
  --soft: color-mix(in srgb, var(--c-band-acc) 16%, var(--c-band));
  --btn-bg: var(--c-band-ink); --btn-fg: var(--c-band); --btn-hover-bg: var(--c-band-acc); --btn-hover-fg: var(--c-band);
  --focus: var(--c-band-acc); --field-bg: color-mix(in srgb, var(--c-band-ink) 5%, var(--c-band)); --grid: color-mix(in srgb, var(--c-band-ink) 6%, transparent); --bad: #ffb4a8;
  --wm-ink: var(--c-band-ink); --wm-k: 0.7;
}
.tone-light { background-color: var(--c-bg); color: var(--fg); }
.tone-alt { background-color: var(--c-bg2); color: var(--fg); }
.tone-dark, .on-dark { background-color: var(--c-band); color: var(--fg); }

/* Tone morph: sections go transparent and the page background fades instead */
.tone-morph body { background-color: var(--page-bg, var(--c-bg)); transition: background-color var(--tone-t); }
.tone-morph main .tone-light, .tone-morph main .tone-dark, .tone-morph main .tone-alt {
  background-color: transparent;
  transition: --page var(--tone-t), --fg var(--tone-t), --fg-2 var(--tone-t), --muted var(--tone-t), --line var(--tone-t), --line-2 var(--tone-t), --surface var(--tone-t), --accent var(--tone-t), --mark var(--tone-t), --soft var(--tone-t), --btn-bg var(--tone-t), --btn-fg var(--tone-t), --field-bg var(--tone-t), --grid var(--tone-t), --wm-ink var(--tone-t);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--c-bg); }
html:not(.js-motion) { scroll-behavior: smooth; }
body { margin: 0; background: var(--c-bg); color: var(--fg); font-family: var(--font-body); font-weight: var(--fw-body); font-size: var(--t-body); line-height: calc(1.62 * var(--lh-body)); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
p, figure { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: var(--fw-head); letter-spacing: var(--ls-head); line-height: calc(1.1 * var(--lh-head)); font-variant-numeric: lining-nums; color: var(--fg); }
b, strong { font-weight: var(--fw-strong); }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--c-deco); color: var(--c-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { 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 { position: fixed; top: 12px; left: 12px; z-index: 200; padding: 10px 16px; border-radius: var(--rb); background: var(--c-acc); color: var(--c-acc-ink); font-weight: var(--fw-strong); transform: translateY(-200%); }
.skip:focus { transform: none; }
.container { position: relative; width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.blueprint { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 44px 44px; }
.icon { width: 1em; height: 1em; flex-shrink: 0; display: inline-grid; }
.icon svg { width: 100%; height: 100%; }

/* ---------- Type ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-body); font-size: var(--t-label); font-weight: var(--fw-strong); letter-spacing: 0.005em; line-height: 1.3; color: var(--accent); }
.eyebrow::before { content: ""; width: 22px; height: 2px; flex-shrink: 0; background: var(--mark); }
.t-hero { font-size: var(--t-hero); line-height: calc(1.04 * var(--lh-head)); }
.t-xl { font-size: var(--t-xl); line-height: calc(1.06 * var(--lh-head)); }
.t-lg { font-size: var(--t-lg); line-height: calc(1.1 * var(--lh-head)); }
.t-md { font-size: var(--t-md); line-height: calc(1.18 * var(--lh-head)); }
.t-sm { font-size: var(--t-sm); line-height: calc(1.24 * var(--lh-head)); }
.lead { font-size: var(--t-lead); line-height: calc(1.5 * var(--lh-body)); color: var(--fg-2); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }
.measure { max-width: 66ch; }
.split-line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.split-inner { display: inline-block; will-change: transform; }

/* ---------- Buttons & links ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: var(--rb); border: 1.5px solid transparent; font-family: var(--font-body); font-weight: var(--fw-strong); font-size: var(--t-ui); line-height: 1.1; letter-spacing: 0.005em; text-align: center; transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease); will-change: transform; }
.btn .icon { font-size: 1.05rem; transition: transform 0.45s var(--ease); }
.btn:hover .icon-move { transform: translateX(4px); }
.btn:hover .icon-up { transform: translate(3px, -3px); }
.btn:hover .icon-down { transform: translateY(3px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.btn-primary:hover { background: var(--btn-hover-bg); color: var(--btn-hover-fg); border-color: var(--btn-hover-bg); }
.btn-outline { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--fg); }
.btn-outline:hover { border-color: var(--accent); background: var(--soft); }
.btn-ghost { color: var(--fg); padding-inline: 4px; min-height: 44px; border: 0; }
.btn-ghost::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 10px; height: 1.5px; background: var(--mark); transform-origin: left; transition: transform 0.45s var(--ease); }
.btn-ghost:hover::after { transform: scaleX(0.6); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: var(--t-label); }
.link-u { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.link-u::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; background: var(--mark); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.link-u:hover::after, .link-u[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.link-a { color: var(--accent); font-weight: var(--fw-strong); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: text-decoration-color 0.3s; }
.link-a:hover { text-decoration-color: var(--accent); }
.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--rb); border: 1px solid var(--line); background: var(--surface); font-size: var(--t-cap); color: var(--fg-2); }
.chip-accent { border-color: transparent; background: var(--soft); color: var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* "To confirm" placeholders (shown only while showPlaceholders is on) */
.pending { display: inline-flex; align-items: flex-start; gap: 6px; padding: 2px 9px; border-radius: 6px; border: 1px dashed var(--pending-line); background: var(--pending-bg); color: var(--pending-ink); font-family: var(--font-body); font-style: normal; font-size: 0.8rem; font-weight: 500; line-height: 1.45; letter-spacing: 0; text-transform: none; }
.hide-pending .pending, .hide-pending .pending-item { display: none !important; }

/* ---------- Photographs ----------
   Light, warm-neutral photographs, tinted slightly toward the accent colour. */
.ph { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--c-bg2); aspect-ratio: var(--ar, 4 / 3); isolation: isolate; }
.ph-in { position: absolute; inset: -8% 0; will-change: transform; }
.ph-img, .ph-in > img { width: 100%; height: 100%; object-fit: cover; }
.ph::after, .tinted::after { content: ""; position: absolute; inset: 0; background: var(--c-tint); mix-blend-mode: multiply; opacity: 0.16; pointer-events: none; }
.ph figcaption { position: absolute; left: 14px; bottom: 12px; z-index: 1; font-size: var(--t-cap); color: var(--c-ink); }
.ph-band { --ar: 16 / 10; margin-bottom: clamp(3rem, 6vw, 5rem); }
@media (min-width: 900px) { .ph-band { --ar: 21 / 7.4; } }
.fig-cap { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: var(--t-cap); color: var(--muted); }

/* Project frame: light photograph with the project drawing on top */
.pframe { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--c-bg2); isolation: isolate; }
.pframe-photo { position: absolute; inset: -6% 0; will-change: transform; }
.pframe-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s var(--ease); }
.pframe-shade { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(color-mix(in srgb, var(--c-ink) 6%, transparent) 1px, transparent 1px) 0 0 / 40px 40px,
  linear-gradient(90deg, color-mix(in srgb, var(--c-ink) 6%, transparent) 1px, transparent 1px) 0 0 / 40px 40px,
  radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--c-bg) 86%, transparent), color-mix(in srgb, var(--c-bg) 66%, transparent) 62%, color-mix(in srgb, var(--c-bg) 46%, transparent)); }
.pvis { position: absolute; inset: 0; width: 100%; height: 100%; padding: clamp(14px, 5%, 44px); overflow: visible; }
.pvis .ink { stroke: var(--c-ink); fill: none; }
.pvis .ink-fill { fill: var(--c-ink); }
.pvis .acc { stroke: var(--c-acc); fill: none; }
.pvis .acc-fill { fill: var(--c-acc); }
.pvis .surf { fill: color-mix(in srgb, var(--c-surface) 88%, transparent); }
.pvis text { font-family: var(--font-body); font-weight: 650; fill: color-mix(in srgb, var(--c-ink) 75%, transparent); font-size: 11px; letter-spacing: 0.16em; }

/* ---------- Header ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120; background: var(--c-acc); transform-origin: left; transform: scaleX(0); }
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; color: var(--c-ink); transition: background-color 0.45s var(--ease), transform 0.55s var(--ease), box-shadow 0.45s; }
.site-header.scrolled { background: color-mix(in srgb, var(--c-bg) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--c-line); }
.site-header.hidden-up { transform: translateY(-100%); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border-radius: var(--rb); display: grid; place-items: center; background: var(--c-acc); color: var(--c-acc-ink); font-family: var(--font-display); font-weight: var(--fw-head); font-size: 1rem; letter-spacing: 0.02em; transition: transform 0.6s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-6deg); }
/* The milestone logo. Colours follow the theme: accent for the line, gold for the finish point. */
.logo { display: block; flex-shrink: 0; color: var(--c-acc); overflow: visible; }
.logo .lg-l { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linejoin: round; }
.logo .lg-d { fill: currentColor; }
.logo .lg-e { fill: var(--c-deco); transform-box: fill-box; transform-origin: center; transition: transform 0.5s var(--ease); }
.on-dark .logo, .tone-dark .logo { color: var(--c-band-ink); }
.on-dark .logo .lg-e, .tone-dark .logo .lg-e { fill: var(--c-band-acc); }
.brand-logo { width: 34px; height: 34px; }
.brand:hover .brand-logo .lg-e { transform: scale(1.25); }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; }
.foot-brand .logo { width: 18px; height: 18px; }
.brand-name { display: none; font-family: var(--font-display); font-weight: var(--fw-head); font-size: calc(var(--fs-head) * 1.2rem); letter-spacing: var(--ls-head); }
@media (min-width: 640px) { .brand-name { display: inline; } }
.nav { display: none; align-items: center; gap: 26px; font-size: var(--t-ui); font-weight: 500; }
.nav a { color: var(--c-ink2); transition: color 0.3s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--c-ink); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--rb); display: grid; place-items: center; color: var(--c-ink); transition: background-color 0.3s; }
.icon-btn:hover { background: color-mix(in srgb, var(--c-ink) 7%, transparent); }
.icon-btn .icon { font-size: 1.25rem; }
.header-cta { display: none; }
@media (min-width: 1040px) { .nav { display: flex; } .header-cta { display: inline-flex; } .menu-btn { display: none; } }

.mobile-menu { position: fixed; inset: 0; z-index: 90; background: var(--c-bg); color: var(--c-ink); padding: calc(var(--header-h) + 20px) var(--gutter) 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; overflow-y: auto; visibility: hidden; clip-path: inset(0 0 100% 0); transition: clip-path 0.6s var(--ease), visibility 0.6s; }
.mobile-menu.open { visibility: visible; clip-path: inset(0 0 0% 0); }
.mobile-menu ul a { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; font-family: var(--font-display); font-weight: var(--fw-head); font-size: calc(var(--fs-head) * clamp(1.9rem, 8vw, 2.6rem)); line-height: 1.15; border-bottom: 1px solid var(--c-line); }
.mobile-menu li { transform: translateY(20px); opacity: 0; transition: transform 0.6s var(--ease), opacity 0.6s var(--ease); }
.mobile-menu.open li { transform: none; opacity: 1; }
.mobile-menu.open li:nth-child(2) { transition-delay: 0.05s; } .mobile-menu.open li:nth-child(3) { transition-delay: 0.1s; }
.mobile-menu.open li:nth-child(4) { transition-delay: 0.15s; } .mobile-menu.open li:nth-child(5) { transition-delay: 0.2s; } .mobile-menu.open li:nth-child(6) { transition-delay: 0.25s; } .mobile-menu.open li:nth-child(n+7) { transition-delay: 0.3s; }
.mobile-menu .btn { width: 100%; }
.mobile-menu p { color: var(--c-muted); font-size: var(--t-label); }
.menu-open { overflow: hidden; }

/* ---------- Sections ---------- */
main { position: relative; overflow-x: clip; }
.section { position: relative; padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section-tight { position: relative; padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .t-lg { max-width: 24ch; }
.section-head .lead { max-width: 40rem; }
@media (min-width: 960px) {
  .section-head.split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 4rem; align-items: end; }
  .section-head.split .eyebrow { grid-column: 1 / -1; }
}
html:not(.tone-morph) .rule-top { border-top: 1px solid var(--line); }
.head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(2rem, 4vw, 3rem); }

/* ---------- Hero (light, two columns) ---------- */
.hero { position: relative; padding-top: calc(var(--header-h) + clamp(2rem, 6vh, 4.5rem)); padding-bottom: clamp(3.5rem, 8vh, 6rem); overflow: hidden; }
.hero .blueprint { position: absolute; inset: 0; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: clamp(2.2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; color: var(--muted); font-size: var(--t-label); font-weight: 500; margin-bottom: 1.4rem; }
.hero-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-acc); box-shadow: 0 0 0 4px var(--soft); }
.hero-meta .icon { color: var(--accent); }
.hero h1 { display: grid; gap: 0.5rem; }
.hero-name { display: block; font-size: var(--t-sm); color: var(--accent); letter-spacing: 0; }
.hero-headline { display: block; font-size: var(--t-hero); line-height: calc(1.05 * var(--lh-head)); max-width: 17ch; }
.hero-headline .ln { display: block; }
.hero-intro { margin-top: 1.6rem; max-width: 36rem; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 2rem; }
.hero-figure { position: relative; margin: 0; }
.hero-figure .ph { --ar: 4 / 4.6; }
@media (max-width: 979px) { .hero-figure .ph { --ar: 4 / 3; } }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.hero-lines .ln { stroke: var(--c-ink); stroke-opacity: 0.5; stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.hero-lines .ln-accent { stroke: var(--c-acc); stroke-opacity: 1; stroke-width: 2; }
.hero-lines .dim { font-family: var(--font-body); font-size: 11px; font-weight: 650; fill: var(--c-ink); letter-spacing: 0.16em; }
.hero-figure figcaption { margin-top: 10px; font-size: var(--t-cap); color: var(--muted); }

/* ---------- About: statement, portrait, career arc ---------- */
.about-grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: 5rem; align-items: start; } }
.statement { margin-top: 22px; font-family: var(--font-display); font-weight: var(--fw-head); font-size: calc(var(--fs-head) * clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem)); line-height: calc(1.25 * var(--lh-head)); letter-spacing: var(--ls-head); max-width: 36ch; }
.portrait { position: relative; aspect-ratio: 4 / 5; width: 100%; max-width: 330px; border-radius: var(--r-lg); overflow: hidden; background: var(--c-bg2); isolation: isolate; }
.portrait .ph-in { inset: -8% 0; }
.portrait-fallback { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; text-align: center; background: color-mix(in srgb, var(--c-bg) 55%, transparent); }
.portrait-fallback .mono .logo { width: 52px; height: 52px; }
.portrait-fallback .mono { width: 100px; height: 100px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--c-acc); color: var(--c-acc); background: var(--c-surface); font-family: var(--font-display); font-weight: var(--fw-head); font-size: 2.4rem; }
.portrait-photo { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.arc { position: relative; margin-top: clamp(3.5rem, 7vw, 6rem); display: grid; gap: 28px; }
@media (min-width: 900px) { .arc { grid-template-columns: repeat(4, 1fr); gap: 26px; } }
.arc-line { position: absolute; background: var(--line-2); }
.arc-line i { position: absolute; inset: 0; background: var(--c-acc); transform-origin: left top; }
@media (min-width: 900px) { .arc-line { left: 0; right: 0; top: 10px; height: 1.5px; } }
@media (max-width: 899px) { .arc-line { left: 10px; top: 0; bottom: 0; width: 1.5px; } }
.arc-step { position: relative; padding-left: 36px; }
@media (min-width: 900px) { .arc-step { padding-left: 0; padding-top: 40px; } }
.arc-step .node { position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--page); border: 1.5px solid var(--c-acc); display: grid; place-items: center; }
.arc-step .node::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mark); }
.arc-step .n { font-size: var(--t-cap); color: var(--accent); font-weight: var(--fw-strong); }
.arc-step h3 { font-size: var(--t-sm); margin-top: 4px; }
.arc-step p { font-size: var(--t-label); color: var(--muted); margin-top: 6px; }

/* ---------- Metrics (deep band) ---------- */
.metrics { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.4rem, 3vw, 3rem); }
@media (min-width: 900px) { .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.metric { padding: 1.3rem 0 clamp(1.8rem, 3.5vw, 2.8rem); border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 12px; }
.metric b { font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-num); line-height: 0.95; letter-spacing: var(--ls-head); color: var(--accent); font-variant-numeric: lining-nums; }
.metric span { font-size: var(--t-label); color: var(--fg-2); max-width: 17rem; }

/* ---------- Project storytelling ---------- */
.story { display: grid; gap: 3rem; }
.story-media { display: none; }
.story-item { display: flex; flex-direction: column; align-items: flex-start; }
.story-item + .story-item { margin-top: 4rem; }
.story-vis-mobile { width: 100%; aspect-ratio: 5 / 4; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 1.4rem; }
.story-num { display: flex; align-items: baseline; gap: 12px; font-size: var(--t-label); font-weight: var(--fw-strong); color: var(--accent); }
.story-num b { font-family: var(--font-display); font-weight: var(--fw-head); font-size: 1.4rem; line-height: 1; font-variant-numeric: lining-nums; }
.story-item h3 { font-size: var(--t-lg); margin-top: 10px; max-width: 20ch; }
.story-item .org { margin-top: 10px; color: var(--muted); font-size: var(--t-label); }
.story-item .summary { margin-top: 1rem; color: var(--fg-2); max-width: 36rem; }
.story-item .role { margin-top: 0.9rem; font-size: var(--t-ui); }
.kpis { display: flex; flex-wrap: wrap; gap: 12px 34px; margin-top: 1.5rem; }
.kpi { position: relative; padding-left: 16px; max-width: 13rem; }
.kpi::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--mark); }
.kpi b { display: block; font-family: var(--font-display); font-size: calc(var(--fs-head) * 2.1rem); font-weight: var(--fw-head); color: var(--fg); line-height: 1; font-variant-numeric: lining-nums; }
.kpi span { display: block; margin-top: 4px; font-size: var(--t-cap); line-height: 1.4; color: var(--muted); }
.story-item .btn { margin-top: 1.8rem; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.2rem; }
@media (min-width: 1024px) {
  .story { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 5rem; align-items: start; }
  .js .story-media { display: flex; align-items: center; position: sticky; top: calc(var(--header-h) + 2vh); height: calc(100vh - var(--header-h) - 4vh); height: calc(100svh - var(--header-h) - 4vh); }
  .story-frame { display: block; position: relative; width: 100%; height: 100%; max-height: 740px; min-height: 420px; border-radius: var(--r-lg); overflow: hidden; background: var(--c-bg2); box-shadow: var(--shadow); }
  .story-vis { position: absolute; inset: 0; z-index: 1; clip-path: inset(100% 0 0 0); transition: clip-path 1.1s var(--ease-io); }
  .story-frame[data-dir="up"] .story-vis { clip-path: inset(0 0 100% 0); }
  .story-vis.was { clip-path: inset(0 0 0 0) !important; transition: none; }
  .story-vis.no-t { transition: none; }
  .story-vis.active { z-index: 2; clip-path: inset(0 0 0 0) !important; }
  .story-vis .pframe-photo img { transform: scale(1.16); }
  .story-vis.active .pframe-photo img { transform: none; }
  .story-counter { position: absolute; left: 18px; bottom: 16px; display: flex; align-items: baseline; gap: 8px; z-index: 3; padding: 6px 14px; border-radius: var(--rb); background: var(--c-surface); border: 1px solid var(--c-line); color: var(--c-ink); }
  .story-counter b { font-family: var(--font-display); font-size: 1.35rem; font-weight: var(--fw-head); line-height: 1.1; min-width: 2ch; color: var(--c-acc); font-variant-numeric: lining-nums; }
  .story-counter span { color: var(--c-muted); font-size: var(--t-cap); }
  .story-dots { position: absolute; right: 22px; bottom: 26px; display: flex; gap: 8px; z-index: 3; }
  .story-dots i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--c-ink) 25%, transparent); transition: background-color 0.4s, transform 0.4s var(--ease); }
  .story-dots i.on { background: var(--c-acc); transform: scale(1.35); }
  .story-list { padding-block: 6vh 12vh; }
  .story-item { min-height: 78vh; justify-content: center; transition: opacity 0.6s var(--ease); }
  .js .story-item { opacity: 0.28; }
  .js .story-item.active { opacity: 1; }
  .story-item + .story-item { margin-top: 0; }
  .js .story-vis-mobile { display: none; }
  html:not(.js) .story-item { min-height: 0; margin-top: 5rem; }
  html:not(.js) .story-vis-mobile { max-width: 34rem; }
}

/* ---------- Projects grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 2.6rem; }
.filter, .tab { min-height: 42px; padding: 0 16px; border-radius: var(--rb); border: 1px solid var(--line-2); font-size: var(--t-label); font-weight: 500; color: var(--fg-2); transition: all 0.3s var(--ease); }
.filter:hover, .tab:hover { border-color: var(--accent); color: var(--fg); }
.filter[aria-pressed="true"], .tab[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.pgrid { display: grid; gap: 40px; }
@media (min-width: 820px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } .pgrid > li:nth-child(even) { margin-top: 90px; } }
.pcard { position: relative; display: block; }
.pcard-media { aspect-ratio: 5 / 4; border-radius: var(--r-lg); overflow: hidden; background: var(--c-bg2); }
.pcard:hover .pframe-photo img { transform: scale(1.06); }
.pcard-body { padding: 20px 2px 0; }
.pcard h3 { font-size: var(--t-md); margin-top: 8px; transition: color 0.3s; }
.pcard:hover h3 { color: var(--accent); }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--t-cap); color: var(--muted); font-weight: 500; }
.pcard .meta .accent { color: var(--accent); font-weight: var(--fw-strong); }
.pcard p { margin-top: 10px; color: var(--fg-2); }
.pcard .outcome { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--mark); font-size: var(--t-label); color: var(--fg); }
.pcard .go { margin-top: 14px; display: inline-flex; gap: 8px; align-items: center; font-weight: var(--fw-strong); font-size: var(--t-label); color: var(--accent); }
.pcard .go .icon { transition: transform 0.45s var(--ease); }
.pcard:hover .go .icon { transform: translate(3px, -3px); }
.pcard a.cover { position: absolute; inset: 0; z-index: 1; border-radius: var(--r-lg); }
li[hidden] { display: none !important; }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: clamp(2.4rem, 5vw, 3.6rem); padding-left: 44px; }
@media (min-width: 900px) { .timeline { padding-left: 0; } }
.tl-track { position: absolute; left: 10px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line-2); }
@media (min-width: 900px) { .tl-track { left: calc(25% + 10px); } }
.tl-fill { position: absolute; inset: 0; background: var(--c-acc); transform-origin: top; }
.tl-item { position: relative; display: grid; gap: 12px; }
@media (min-width: 900px) { .tl-item { grid-template-columns: 25% 1fr; gap: 0; } .tl-body { padding-left: 60px; } }
.tl-node { position: absolute; left: -44px; top: 6px; width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--page); transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease); }
@media (min-width: 900px) { .tl-node { left: 25%; } }
.tl-node::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--line-2); transition: background-color 0.5s; }
.tl-item.on .tl-node { border-color: var(--c-acc); box-shadow: 0 0 0 5px var(--soft); }
.tl-item.on .tl-node::after { background: var(--c-acc); }
.tl-when b { display: block; font-family: var(--font-display); font-size: var(--t-sm); font-weight: var(--fw-head); line-height: 1.2; font-variant-numeric: lining-nums; }
.tl-when span { font-size: var(--t-cap); color: var(--muted); }
.tl-body h3 { font-size: var(--t-md); }
.tl-body .org { margin-top: 8px; color: var(--accent); font-weight: var(--fw-strong); font-size: var(--t-label); }
.tl-body .about { margin-top: 10px; color: var(--fg-2); max-width: 46rem; }
.ticks { margin-top: 14px; display: grid; gap: 10px; max-width: 48rem; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 13px; height: 2px; background: var(--mark); }
.acc-btn { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--rb); border: 1px solid var(--line-2); font-size: var(--t-label); font-weight: 600; transition: border-color 0.3s, background-color 0.3s; }
.acc-btn:hover { border-color: var(--accent); background: var(--soft); }
.acc-btn .icon { transition: transform 0.45s var(--ease); }
.acc-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.acc-panel[hidden] { display: none; }

/* ---------- Skills ---------- */
.skills { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 1024px) { .skills { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4.5rem; } }
.network { position: relative; aspect-ratio: 1; max-width: 500px; width: 100%; margin-inline: auto; }
.network svg { width: 100%; height: 100%; overflow: visible; }
.network .edge { stroke: var(--line-2); stroke-width: 1.2; fill: none; transition: stroke 0.5s; }
.network .edge.hot { stroke: var(--c-acc); stroke-width: 2; }
.network .hub circle { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; transition: fill 0.5s, stroke 0.5s; }
.network .hub.hot circle { fill: var(--c-acc); stroke: var(--c-acc); }
.network .hub text { font-family: var(--font-body); font-size: 12.5px; font-weight: 700; fill: var(--fg); text-anchor: middle; transition: fill 0.5s; }
.network .hub.hot text { fill: var(--c-acc-ink); }
.network .core circle { fill: var(--fg); }
.network .core .logo { color: var(--page); }
.network .core .logo .lg-d { fill: var(--page); }
.network .core .logo .lg-e { fill: var(--mark); }
.network .core text { fill: var(--page); font-family: var(--font-display); font-weight: var(--fw-head); font-size: 26px; text-anchor: middle; }
.network .orbit { stroke: var(--mark); stroke-opacity: 0.6; stroke-dasharray: 2 7; fill: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabpanel { margin-top: 28px; min-height: 220px; }
.tabpanel h3 { font-size: var(--t-md); color: var(--accent); }
.tabpanel ul { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tabpanel li { padding: 9px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: var(--t-label); }
.tools { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.tools h4 { font-family: var(--font-body); font-size: var(--t-label); color: var(--accent); font-weight: var(--fw-strong); letter-spacing: 0; }

/* ---------- Education ---------- */
.edu { display: grid; gap: 22px; }
@media (min-width: 960px) { .edu { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr) minmax(0, 1fr); } }
.edu > .ph { --ar: 16 / 10; }
@media (min-width: 960px) { .edu > .ph { aspect-ratio: auto; min-height: 400px; } }
.edu-card { position: relative; overflow: hidden; padding: clamp(1.5rem, 3vw, 2.2rem); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end; }
.edu-year::before { content: attr(data-year-text); }
.edu-year { position: absolute; right: 0.06em; top: -0.12em; font-family: var(--font-display); font-weight: var(--fw-head); font-size: clamp(6rem, 12vw, 9.5rem); color: var(--soft); line-height: 1; pointer-events: none; font-variant-numeric: lining-nums; letter-spacing: -0.03em; }
.edu-card .icon-wrap { position: relative; width: 50px; height: 50px; border-radius: var(--r-sm); display: grid; place-items: center; border: 1.5px solid var(--c-acc); color: var(--accent); font-size: 1.3rem; margin-bottom: auto; }
.edu-card .period { position: relative; margin-top: 2.4rem; color: var(--accent); font-weight: var(--fw-strong); font-size: var(--t-cap); }
.edu-card h3 { position: relative; font-size: var(--t-md); margin-top: 8px; }
.edu-card .school { position: relative; margin-top: 8px; color: var(--muted); font-size: var(--t-label); }
.edu-card .hl { position: relative; margin-top: 16px; padding-left: 14px; border-left: 2px solid var(--mark); color: var(--fg-2); font-size: var(--t-label); }
.certs { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.certs strong { font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-sm); margin-right: 8px; }

/* ---------- Interests ---------- */
.interests { display: grid; gap: 28px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .interests { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .interests { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.interest .ph { --ar: 3 / 4; border-radius: var(--r); }
.interest h3 { font-size: var(--t-sm); margin-top: 14px; }
.interest p { margin-top: 6px; font-size: var(--t-label); line-height: 1.55; color: var(--muted); }

/* ---------- Resume band ---------- */
.cta-band { overflow: hidden; }
.marquee { white-space: nowrap; font-family: var(--font-display); font-weight: var(--fw-head); font-size: calc(var(--fs-head) * clamp(3.2rem, 9vw, 8rem)); letter-spacing: var(--ls-head); line-height: 1.05; color: var(--fg); }
.marquee span { display: inline-block; padding-right: 0.4em; }
.marquee .o { color: var(--accent); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: clamp(1.8rem, 4vw, 2.8rem); }

/* ---------- Contact and inquiry form ---------- */
.contact { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .contact { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4.5rem; align-items: start; } }
.contact-list { margin-top: 2rem; display: grid; gap: 12px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list .icon-wrap { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--accent); flex-shrink: 0; }
.quote-note { margin-top: 2rem; padding: 1.2rem 1.3rem; border-left: 3px solid var(--mark); background: var(--soft); color: var(--fg-2); font-size: var(--t-label); }
.form { position: relative; padding: clamp(1.3rem, 3.5vw, 2.4rem); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form legend { padding: 0; font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-sm); margin-bottom: 4px; }
.form .fs + .fs { margin-top: 1.8rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.form-row { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 7px; align-content: start; }
.form .fs > .field { margin-top: 16px; }
.field label, .field .label { font-size: var(--t-label); font-weight: var(--fw-strong); }
.field label small, .field .hint { font-weight: 400; color: var(--muted); font-size: var(--t-cap); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--field-bg); color: var(--fg); font: inherit; font-size: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-acc) 22%, transparent); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.choice { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.choice label { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: var(--rb); border: 1px solid var(--line-2); font-size: var(--t-label); font-weight: 500; cursor: pointer; transition: border-color 0.3s, background-color 0.3s; }
.choice input { accent-color: var(--c-acc); width: 18px; height: 18px; margin: 0; }
.choice label:has(input:checked) { border-color: var(--c-acc); background: var(--soft); }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 1.4rem; font-size: var(--t-label); }
.consent input { accent-color: var(--c-acc); width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }
.js .svc-only[hidden] { display: none; }
.err { font-size: var(--t-cap); color: var(--bad); }
.err[hidden] { display: none; }
.form-foot { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-status { margin-top: 14px; font-size: var(--t-label); }
.form-status .warn { color: var(--accent); }
.form-status .bad { color: var(--bad); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { padding: clamp(1.6rem, 4vw, 2.6rem); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.success[hidden] { display: none; }
.success .badge { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--c-acc); color: var(--c-acc-ink); font-size: 1.4rem; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer (deep band) ---------- */
.site-footer { position: relative; z-index: 2; padding-top: clamp(3.5rem, 8vw, 6rem); overflow: hidden; isolation: isolate; }
.footer-top { display: grid; gap: 2.2rem; }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.3fr 1fr; align-items: end; } }
.footer-top h2 { font-size: var(--t-lg); max-width: 18ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 26px; color: var(--fg-2); font-weight: 500; }
.footer-links a:hover { color: var(--fg); }
.footer-name { margin-top: clamp(2.6rem, 6vw, 4.5rem); padding-bottom: 0.08em; font-family: var(--font-display); font-weight: var(--fw-head); font-size: calc(var(--fs-head) * min(10vw, 8.6rem)); letter-spacing: var(--ls-head); line-height: 0.95; color: color-mix(in srgb, var(--c-band-acc) 55%, var(--c-band)); white-space: nowrap; user-select: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 20px; margin-top: 20px; border-top: 1px solid var(--line-2); font-size: var(--t-cap); color: var(--fg-2); }

/* ---------- Inner page heads (light) ---------- */
.page-head { position: relative; padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 5.5rem)); padding-bottom: clamp(2.6rem, 5vw, 4rem); overflow: hidden; }
.page-head .blueprint { position: absolute; inset: 0; -webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%); mask-image: linear-gradient(to bottom, #000, transparent 90%); pointer-events: none; }
.page-head h1 { margin-top: 16px; max-width: 26ch; }
.page-head .lead { margin-top: 20px; max-width: 44rem; }
.page-head .hero-ctas { margin-top: 1.8rem; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.back:hover { color: var(--accent); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: var(--t-cap); color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 10px; border-top: 1.5px solid var(--line-2); border-right: 1.5px solid var(--line-2); transform: rotate(45deg); }
.crumbs a { color: var(--fg-2); }
.crumbs a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--fg); }
.page-split { display: grid; gap: 2.4rem; align-items: end; }
@media (min-width: 980px) { .page-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 4rem; } }
.page-split .ph { --ar: 4 / 3; }

/* About page */
.about-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.4rem, 3vw, 3rem); }
@media (min-width: 900px) { .about-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.about-stats li { padding: 1.2rem 0 1.6rem; border-top: 1px solid var(--line-2); }
.about-stats b { display: block; font-family: var(--font-display); font-size: var(--t-num); font-weight: var(--fw-head); line-height: 0.95; color: var(--accent); font-variant-numeric: lining-nums; }
.about-stats span { display: block; margin-top: 8px; font-size: var(--t-label); color: var(--muted); }
.chapters { display: grid; gap: clamp(3.5rem, 8vw, 6.5rem); }
.chap { display: grid; gap: 1.4rem; }
@media (min-width: 900px) { .chap { grid-template-columns: 12rem 1fr; gap: 4rem; } .chap-label { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; } }
.chap-label b { display: block; font-family: var(--font-display); font-weight: var(--fw-head); font-size: calc(var(--fs-head) * 3.6rem); line-height: 0.9; color: var(--accent); font-variant-numeric: lining-nums; }
.chap-label span { display: block; margin-top: 10px; font-size: var(--t-label); color: var(--muted); font-weight: var(--fw-strong); }
.chap h2 { font-size: var(--t-lg); max-width: 26ch; }
.chap p { margin-top: 1rem; color: var(--fg-2); max-width: 44rem; }
.chap .ph { --ar: 16 / 8; margin-top: 2rem; max-width: 52rem; }

/* Case study */
.cs-meta { margin-top: 2.4rem; display: grid; border-top: 1px solid var(--line-2); }
@media (min-width: 760px) { .cs-meta { grid-template-columns: 1fr 1fr 1.2fr; column-gap: 2.5rem; } }
.cs-meta div { padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .cs-meta div { border-bottom: 0; } }
.cs-meta dt { font-size: var(--t-cap); color: var(--accent); font-weight: var(--fw-strong); }
.cs-meta dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-sm); line-height: 1.25; }
.cs-cover { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; margin-top: clamp(2.2rem, 5vw, 3.5rem); border: 1px solid var(--line); background: var(--c-bg2); }
@media (min-width: 760px) { .cs-cover { aspect-ratio: 16 / 7.6; } }
.cover-note { margin-top: 10px; font-size: var(--t-cap); color: var(--muted); }
.cs-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.4rem, 3vw, 3rem); max-width: var(--max); margin-inline: auto; padding: clamp(2.2rem, 5vw, 3.5rem) var(--gutter) 0; }
@media (min-width: 900px) { .cs-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cs-kpis div { padding: 1.1rem 0 1.5rem; border-top: 2px solid var(--mark); }
.cs-kpis b { display: block; font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-num); color: var(--fg); line-height: 0.95; font-variant-numeric: lining-nums; }
.cs-kpis span { display: block; margin-top: 8px; font-size: var(--t-label); color: var(--muted); max-width: 14rem; }
.cs-layout { display: grid; gap: 3rem; }
@media (min-width: 1100px) { .cs-layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 5rem; } }
.toc { display: none; }
@media (min-width: 1100px) { .toc { display: block; position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
.toc ol { border-left: 1px solid var(--line); }
.toc a { display: flex; gap: 10px; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: var(--t-label); color: var(--muted); transition: color 0.3s, border-color 0.3s; }
.toc a span { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.toc a:hover, .toc a.on { color: var(--fg); border-left-color: var(--c-acc); }
.toc a.on span { color: var(--accent); }
.cs-block { padding-block: clamp(2.4rem, 5vw, 3.4rem); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.cs-block:first-child { border-top: 0; padding-top: 0; }
.cs-block .n { font-size: var(--t-cap); color: var(--accent); font-weight: var(--fw-strong); }
.cs-block h2 { font-size: var(--t-md); margin-top: 6px; }
.cs-block .body { margin-top: 1.2rem; color: var(--fg-2); max-width: 46rem; }
.steps { position: relative; display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); } }
.steps-line { display: none; }
@media (min-width: 760px) { .steps-line { display: block; position: absolute; left: 22px; right: 22px; top: 21px; height: 2px; background: var(--line-2); } .steps-line i { position: absolute; inset: 0; background: var(--c-acc); transform-origin: left; } }
.step { position: relative; padding: 0 4px; }
.step .num { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-fg); font-family: var(--font-body); font-weight: var(--fw-strong); font-size: 1.05rem; font-variant-numeric: lining-nums; }
.step h3 { font-size: var(--t-sm); margin-top: 14px; }
.step p { margin-top: 6px; font-size: var(--t-label); color: var(--muted); }
.mini-tl { display: grid; gap: 16px; padding-left: 28px; border-left: 1.5px solid var(--line-2); }
.mini-tl li { position: relative; }
.mini-tl li::before { content: ""; position: absolute; left: -35px; top: 8px; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--c-acc); background: var(--page); }
.mini-tl b { display: block; font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-sm); line-height: 1.3; font-variant-numeric: lining-nums; }
.outcomes { display: grid; gap: 16px; }
@media (min-width: 760px) { .outcomes { grid-template-columns: 1fr 1fr; } }
.outcomes > div { padding: 24px; border-radius: var(--r); border: 1px solid var(--line); }
.outcomes .proj { background: var(--soft); border-color: transparent; }
.outcomes .mine { background: var(--surface); }
.outcomes h3 { font-size: var(--t-sm); }
.outcomes small { display: block; margin-top: 4px; font-size: var(--t-cap); color: var(--muted); }
.outcomes .ticks { margin-top: 14px; }
.next-proj { display: block; margin-top: clamp(3rem, 6vw, 4.5rem); padding: clamp(1.8rem, 5vw, 3rem); border-radius: var(--r-lg); position: relative; overflow: hidden; }
.next-proj small { font-size: var(--t-cap); color: var(--accent); font-weight: var(--fw-strong); }
.next-proj strong { display: block; margin-top: 10px; font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-lg); line-height: 1.1; max-width: 26ch; padding-right: 3rem; transition: transform 0.7s var(--ease); }
.next-proj .icon { position: absolute; right: clamp(1.4rem, 4vw, 2.6rem); top: 50%; font-size: 1.8rem; transform: translateY(-50%); transition: transform 0.7s var(--ease); color: var(--accent); }
.next-proj:hover strong { transform: translateX(8px); }
.next-proj:hover .icon { transform: translate(8px, -50%); }

/* Resume page */
.resume-grid { display: grid; gap: 22px; }
@media (min-width: 1000px) { .resume-grid { grid-template-columns: 1.4fr 1fr; } }
.panel { padding: clamp(1.3rem, 3.5vw, 2.4rem); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.panel h2 { font-family: var(--font-body); font-size: var(--t-label); letter-spacing: 0; color: var(--accent); font-weight: var(--fw-strong); }
.rlist li { padding-block: 16px; border-bottom: 1px solid var(--line); }
.rlist li:last-child { border-bottom: 0; }
.rlist .top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.rlist b { font-family: var(--font-display); font-size: var(--t-sm); font-weight: var(--fw-head); line-height: 1.25; }
.rlist .when { color: var(--accent); font-weight: var(--fw-strong); font-size: var(--t-cap); }

/* ---------- Services ---------- */
.svc-cats { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.svc-cat { position: relative; display: flex; flex-direction: column; gap: 12px; padding: clamp(1.4rem, 2.6vw, 2rem); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.4s var(--ease), transform 0.5s var(--ease); }
.svc-cat:hover { border-color: color-mix(in srgb, var(--c-acc) 50%, var(--line)); }
.svc-cat .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.svc-cat .no { font-size: var(--t-cap); font-weight: var(--fw-strong); color: var(--accent); font-variant-numeric: tabular-nums; }
.svc-cat .ico { width: 46px; height: 46px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--soft); color: var(--accent); font-size: 1.3rem; }
.svc-cat h3 { font-size: var(--t-sm); margin-top: 6px; }
.svc-cat p { color: var(--fg-2); font-size: var(--t-ui); }
.svc-cat ul { display: grid; gap: 6px; margin-top: 4px; font-size: var(--t-label); color: var(--fg-2); }
.svc-cat ul li { position: relative; padding-left: 18px; }
.svc-cat ul li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--mark); }
.svc-cat .more { margin-top: auto; padding-top: 10px; font-weight: var(--fw-strong); font-size: var(--t-label); color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.svc-cat .more .icon { transition: transform 0.45s var(--ease); }
.svc-cat:hover .more .icon { transform: translateX(4px); }
.svc-cat a.cover { position: absolute; inset: 0; z-index: 1; border-radius: var(--r-lg); }
.svc-cat.soon { background: transparent; border-style: dashed; }
.svc-cat.soon .more { color: var(--muted); }
.svc-feat { display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 860px) { .svc-feat { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.svc-feat li { position: relative; display: grid; gap: 6px; padding: 1.3rem 2.4rem 1.3rem 0; border-bottom: 1px solid var(--line); }
.svc-feat h3 { font-size: var(--t-sm); transition: color 0.3s; }
.svc-feat p { font-size: var(--t-label); color: var(--fg-2); }
.svc-feat .cat { font-size: var(--t-cap); color: var(--muted); }
.svc-feat .icon { position: absolute; right: 2px; top: 1.6rem; color: var(--accent); transition: transform 0.45s var(--ease); }
.svc-feat li:hover h3 { color: var(--accent); }
.svc-feat li:hover .icon { transform: translate(3px, -3px); }
.svc-feat a.cover { position: absolute; inset: 0; }
.why { display: grid; gap: 2.6rem; }
@media (min-width: 980px) { .why { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; } }
.why .creds { display: grid; gap: 0; border-top: 1px solid var(--line); }
.why .creds li { display: grid; grid-template-columns: minmax(5.5rem, auto) 1fr; gap: 16px; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.why .creds b { font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-md); color: var(--accent); line-height: 1; font-variant-numeric: lining-nums; }
.why .creds span { color: var(--fg-2); font-size: var(--t-label); }
.why .cases { margin-top: 1.6rem; display: grid; gap: 8px; }
.engage { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media (min-width: 900px) { .engage { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.engage article { display: flex; flex-direction: column; gap: 12px; padding: clamp(1.4rem, 2.6vw, 2rem); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.engage .ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--c-acc); color: var(--accent); font-size: 1.2rem; }
.engage h3 { font-size: var(--t-sm); }
.engage dl { margin: 0; display: grid; gap: 10px; font-size: var(--t-label); }
.engage dt { font-weight: var(--fw-strong); color: var(--fg); }
.engage dd { margin: 2px 0 0; color: var(--fg-2); }
.engage .btn { margin-top: auto; align-self: flex-start; }
.process { position: relative; display: grid; gap: 0; counter-reset: p; }
@media (min-width: 900px) { .process { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; } }
.process-line { position: absolute; background: var(--line-2); }
.process-line i { position: absolute; inset: 0; background: var(--c-acc); transform-origin: left top; }
@media (min-width: 900px) { .process-line { left: 22px; right: calc(20% - 4px); top: 21px; height: 2px; } }
@media (max-width: 899px) { .process-line { left: 21px; top: 22px; bottom: 22px; width: 2px; } }
.process li { position: relative; padding: 0 0 1.8rem 64px; }
@media (min-width: 900px) { .process li { padding: 64px 0 0; } }
.process .num { position: absolute; left: 0; top: 0; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--page); border: 2px solid var(--c-acc); color: var(--accent); font-weight: var(--fw-strong); font-variant-numeric: tabular-nums; transition: background-color 0.5s, color 0.5s; }
.process li.on .num { background: var(--c-acc); color: var(--c-acc-ink); }
.process h3 { font-size: var(--t-sm); }
.process p { margin-top: 6px; font-size: var(--t-label); color: var(--fg-2); max-width: 28ch; }
.method { position: relative; }
.method svg { width: 100%; height: auto; overflow: visible; }
.method .m-path { fill: none; stroke: var(--line-2); stroke-width: 2; }
.method .m-draw { fill: none; stroke: var(--c-acc); stroke-width: 2.5; stroke-linecap: round; }
.method .m-node { fill: var(--page); stroke: var(--c-acc); stroke-width: 2.5; }
.method .m-dot { fill: var(--mark); }
.method .m-flow { fill: var(--c-acc); }
.method ol { display: grid; gap: 14px; margin-top: 1.4rem; }
@media (min-width: 760px) { .method ol { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin-top: 0.6rem; } }
.method li h3 { font-size: var(--t-sm); }
.method li p { margin-top: 4px; font-size: var(--t-label); color: var(--fg-2); }
@media (max-width: 759px) { .method svg { display: none; } .method li { padding-left: 18px; border-left: 2px solid var(--mark); } }
.faq { max-width: 52rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 60px; padding: 14px 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-sm); line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--accent); font-size: 1.2rem; transition: transform 0.4s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .a { padding: 0 2.6rem 1.4rem 0; color: var(--fg-2); max-width: 46rem; }
.cta-dark { position: relative; overflow: hidden; }
.cta-dark .inner { display: grid; gap: 1.6rem; }
@media (min-width: 980px) { .cta-dark .inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: 4rem; } }
.cta-dark h2 { font-size: var(--t-lg); max-width: 18ch; }
.cta-dark p { color: var(--fg-2); max-width: 46ch; }
.cta-dark .blueprint { position: absolute; inset: 0; opacity: 0.8; -webkit-mask-image: radial-gradient(ellipse 70% 90% at 85% 30%, #000, transparent 75%); mask-image: radial-gradient(ellipse 70% 90% at 85% 30%, #000, transparent 75%); }
.svc-layout { display: grid; gap: 3rem; }
@media (min-width: 1060px) { .svc-layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: 4.5rem; } }
.svc-aside { display: grid; gap: 18px; align-content: start; }
@media (min-width: 1060px) { .svc-aside { position: sticky; top: calc(var(--header-h) + 28px); } }
.svc-aside .panel h2 { font-family: var(--font-display); font-size: var(--t-sm); color: var(--fg); font-weight: var(--fw-head); }
.svc-aside .panel p { margin-top: 8px; font-size: var(--t-label); color: var(--fg-2); }
.svc-aside .panel .btn { width: 100%; margin-top: 16px; }
.svc-aside ul { display: grid; gap: 8px; margin-top: 10px; font-size: var(--t-label); }
.svc-sec { padding-block: clamp(2rem, 4vw, 2.8rem); border-top: 1px solid var(--line); }
.svc-sec:first-child { border-top: 0; padding-top: 0; }
.svc-sec h2 { font-size: var(--t-md); }
.svc-sec > p, .svc-sec .body { margin-top: 1rem; color: var(--fg-2); max-width: 46rem; }
.svc-sec .ticks { margin-top: 1rem; }
.cols2 { display: grid; gap: 1rem 3rem; }
@media (min-width: 760px) { .cols2 { grid-template-columns: 1fr 1fr; } }
.note-box { margin-top: 1rem; padding: 1rem 1.2rem; border-radius: var(--r); border: 1px dashed var(--line-2); color: var(--muted); font-size: var(--t-label); max-width: 46rem; }
.svc-list { display: grid; gap: clamp(1rem, 2vw, 1.4rem); }
@media (min-width: 860px) { .svc-list { grid-template-columns: 1fr 1fr; } }
.svc-item { position: relative; display: flex; flex-direction: column; gap: 10px; padding: clamp(1.3rem, 2.6vw, 1.8rem); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.svc-item h3 { font-size: var(--t-sm); }
.svc-item p { color: var(--fg-2); font-size: var(--t-ui); }
.svc-item ul { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.svc-item .more { margin-top: auto; padding-top: 8px; font-weight: var(--fw-strong); font-size: var(--t-label); color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.svc-item a.cover { position: absolute; inset: 0; z-index: 1; border-radius: var(--r-lg); }

/* ---------- Cursor bubble (desktop) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; padding: 10px 16px; border-radius: var(--rb); background: var(--c-acc); color: var(--c-acc-ink); font-weight: 700; font-size: 0.82rem; opacity: 0; transform: translate(-50%, -50%) scale(0.6); transition: opacity 0.3s var(--ease); display: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor.show { opacity: 1; }

/* ---------- Motion start states (only when JS + motion are on) ---------- */
.js-motion [data-hero], .js-motion [data-hero-words], .js-motion [data-split], .js-motion [data-reveal] { opacity: 0; }
.js-motion [data-ph] { clip-path: inset(0 0 100% 0); }
.js-motion .pvis { opacity: 0; }
.js-motion.no-reveals [data-reveal], .js-motion.no-reveals [data-split] { opacity: 1; }
.js-motion.no-reveals [data-ph] { clip-path: none; }
.js-motion.no-hero-motion [data-hero], .js-motion.no-hero-motion [data-hero-words] { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .story-item { opacity: 1 !important; }
}

/* ---------- Scroll sequence: from drawing to delivered ----------
   Default (no JavaScript, or reduced motion): the finished building and every step.
   With motion: the block pins and the drawing follows the scroll position. */
.seq { position: relative; padding-block: clamp(4rem, 9vh, 7rem); overflow: hidden; overflow: clip; }
.seq-grid { display: grid; gap: 2rem; }
.seq-stage { order: -1; }
.seq-svg { display: block; width: 100%; height: auto; max-height: 64vh; overflow: visible; }
.seq-steps { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 2rem; }
.seq-num { font-size: var(--t-cap); font-weight: var(--fw-strong); letter-spacing: 0.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.seq-step .t-lg { margin: 0.4rem 0 0.7rem; }
.seq-step .lead { margin: 0; max-width: 30rem; }
.seq-bar, .seq-hint { display: none; }
.sq-pl, .sq-col, .sq-floor, .sq-ground { fill: none; stroke: var(--c-acc); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.sq-pl { stroke-width: 0.02; opacity: 0.7; }
.sq-pl-main { stroke-width: 0.034; opacity: 1; }
.sq-pl-grid { stroke-width: 0.011; opacity: 0.45; }
.sq-pl-dim { stroke-width: 0.013; opacity: 0.6; stroke: var(--c-deco); }
.sq-col, .sq-floor { stroke-width: 1.4; opacity: 0.75; }
.sq-back { opacity: 0.3; }
.sq-ground { stroke-width: 1.2; opacity: 0.45; stroke: var(--c-ink); }
.sq-plan { opacity: 0.22; }
.sq-wire { opacity: 0.28; }
.sq-wall { stroke: color-mix(in srgb, var(--c-ink) 35%, transparent); stroke-width: 0.7; stroke-linejoin: round; }
.sq-wall-l { fill: color-mix(in srgb, var(--c-ink) 5%, var(--c-surface)); }
.sq-wall-r { fill: color-mix(in srgb, var(--c-ink) 13%, var(--c-surface)); }
.sq-win { fill: var(--c-deco); fill-opacity: 0.85; }
.sq-roof { fill: color-mix(in srgb, var(--c-ink) 9%, var(--c-bg2)); stroke: color-mix(in srgb, var(--c-ink) 40%, transparent); stroke-width: 0.8; stroke-linejoin: round; }
.sq-solar { fill: color-mix(in srgb, var(--c-acc) 80%, var(--c-ink)); stroke: var(--c-surface); stroke-width: 0.7; }
.sq-plant { fill: var(--c-acc); opacity: 0.55; }
.sq-star { fill: var(--c-deco); opacity: 0.6; }
.seq stop { stop-color: var(--c-deco); }
@media (min-width: 900px) {
  .seq-grid { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); align-items: center; gap: 2.5rem; }
  .seq-stage { order: 0; }
}
.js-motion .seq { padding-block: 0; height: 400vh; }
.js-motion .seq-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: var(--header-h); overflow: hidden; }
.js-motion .seq-grid { width: 100%; }
.js-motion .seq-steps { gap: 0; margin-top: 1rem; }
.js-motion .seq-step { grid-area: 1 / 1; }
.js-motion .seq-bar { display: block; height: 2px; max-width: 22rem; margin-top: 2rem; background: var(--line); }
.js-motion .seq-bar i { display: block; height: 100%; background: var(--c-acc); transform: scaleX(0); transform-origin: left center; }
.js-motion .seq-hint { display: inline-flex; align-items: center; gap: 8px; margin: 1rem 0 0; font-size: var(--t-cap); color: var(--muted); }
.js-motion .seq-hint svg { width: 15px; height: 15px; }
.js-motion .seq-svg { max-height: 76vh; max-height: 76svh; }
@media (max-width: 899px) {
  .js-motion .seq-grid { gap: 0.8rem; }
  .js-motion .seq-svg { max-height: 42svh; }
  .js-motion .seq-step .t-lg { font-size: calc(var(--fs-head) * clamp(1.7rem, 7vw, 2.3rem)); }
  .js-motion .seq-step .lead { font-size: 1rem; line-height: 1.55; }
  .js-motion .seq-bar { margin-top: 1.1rem; }
  .js-motion .seq-hint { display: none; }
}
@media (max-width: 899px) and (max-height: 720px) { .js-motion .seq-svg { max-height: 34svh; } }

/* ---------- Sections added in the editor ---------- */
.cb .eyebrow + .t-lg { margin-top: 16px; }
.cb-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.cb-head .lead { margin-top: 16px; }
.cb-text-grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.cb-copy { max-width: 44rem; }
.cb-copy > p.pretty { margin-top: 1rem; color: var(--fg-2); }
.cb-copy > .t-lg + p.pretty { margin-top: 1.5rem; }
.cb-copy .hero-ctas { margin-top: 1.8rem; }
.cb-text-grid .ph { max-height: 660px; }
@media (min-width: 900px) {
  .cb-text-grid.has-photo { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .cb-text-grid.photo-left { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .cb-text-grid.photo-left .ph { order: -1; }
}
.cb-grid { display: grid; gap: clamp(1rem, 2.5vw, 1.8rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.cb-card { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.cb-card .ph { border-radius: 0; }
.cb-card-body { display: grid; gap: 10px; align-content: start; padding: clamp(1.2rem, 2.5vw, 1.8rem); }
.cb-card h3 { font-size: var(--t-sm); }
.cb-card p { color: var(--fg-2); }
.cb-card-link { justify-self: start; margin-top: 6px; font-weight: var(--fw-strong); }
.cb-list { display: grid; max-width: 62rem; border-top: 1px solid var(--line); }
.cb-list li { display: grid; gap: 6px 2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .cb-list li { grid-template-columns: 12rem minmax(0, 1fr); } }
.cb-when { font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-sm); line-height: 1.2; color: var(--accent); font-variant-numeric: lining-nums; }
.cb-list h3 { font-size: var(--t-sm); }
.cb-list p { margin-top: 6px; max-width: 42rem; color: var(--fg-2); }
.cb-quote { max-width: 58rem; margin: 20px 0 0; }
.cb-quote blockquote { margin: 0; }
.cb-quote blockquote p { font-family: var(--font-display); font-weight: var(--fw-head); font-size: var(--t-lg); line-height: 1.2; letter-spacing: var(--ls-head); text-wrap: balance; }
.cb-quote blockquote p::before { content: "\201C"; color: var(--accent); }
.cb-quote blockquote p::after { content: "\201D"; color: var(--accent); }
.cb-quote figcaption { display: grid; gap: 2px; margin-top: 1.4rem; }
.cb-quote figcaption span { font-size: var(--t-label); color: var(--muted); }
.cb-wide { margin: 0; }
.cb-wide .ph-band { margin-bottom: 0; }
.cb-wide figcaption { margin-top: 12px; font-size: var(--t-label); }
@media (min-width: 760px) { .method li { text-align: center; padding-inline: 6px; } .method li p { margin-inline: auto; max-width: 22ch; } }
.facts { margin: 0; display: grid; border-top: 1px solid var(--line); }
.facts > div { display: grid; gap: 4px; padding: 1rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .facts > div { grid-template-columns: 11rem 1fr; gap: 16px; } }
.facts dt { font-size: var(--t-label); font-weight: var(--fw-strong); color: var(--accent); }
.facts dd { margin: 0; color: var(--fg-2); }

/* ---------- Watermark ----------
   The milestone mark, very faint, behind a section's content. Switched on per page,
   per section, and for the header and footer in EDIT-MY-WEBSITE.html > Logo and watermark.
   Strength (--wm-o) and largest size (--wm-max) come from theme.css. */
.has-wm { --wm-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='1.1'%3E%3Cpath d='M9 36.2V11.8M11.12 11.12L36.88 36.88M39 36.2V9'/%3E%3Ccircle cx='9' cy='39' r='2.8'/%3E%3Ccircle cx='9' cy='9' r='2.8'/%3E%3Ccircle cx='39' cy='39' r='2.8'/%3E%3C/g%3E%3Ccircle cx='39' cy='9' r='3.4'/%3E%3C/svg%3E"); isolation: isolate; }
main .has-wm, .site-footer.has-wm { position: relative; }
.has-wm::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-color: var(--wm-ink); opacity: calc(var(--wm-o, 0.1) * var(--wm-k, 1));
  -webkit-mask-image: var(--wm-img); mask-image: var(--wm-img);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: auto min(92%, var(--wm-max, 540px)); mask-size: auto min(92%, var(--wm-max, 540px));
  -webkit-mask-position: right -6vw center; mask-position: right -6vw center;
}
.wm-l::after { -webkit-mask-position: left -6vw center; mask-position: left -6vw center; }
.has-wm.section::after { -webkit-mask-size: auto min(80%, var(--wm-max, 540px)); mask-size: auto min(80%, var(--wm-max, 540px)); }
.hero.has-wm::after, .page-head.has-wm::after { -webkit-mask-position: right -3vw bottom -2rem; mask-position: right -3vw bottom -2rem; }
.hero.has-wm.wm-l::after, .page-head.has-wm.wm-l::after { -webkit-mask-position: left -3vw bottom -2rem; mask-position: left -3vw bottom -2rem; }
/* header: a faint row of small marks, like watermarked paper */
.site-header.wm-h { --wm-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-40 0 128 48'%3E%3Cg fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M9 35.6V12.4M11.4 11.4L36.6 36.6M39 35.6V9'/%3E%3Ccircle cx='9' cy='39' r='3.4'/%3E%3Ccircle cx='9' cy='9' r='3.4'/%3E%3Ccircle cx='39' cy='39' r='3.4'/%3E%3C/g%3E%3Ccircle cx='39' cy='9' r='4'/%3E%3C/svg%3E"); }
.site-header.wm-h::after { opacity: calc(var(--wm-o, 0.1) * 0.7); -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; -webkit-mask-size: auto 34px; mask-size: auto 34px; -webkit-mask-position: 0 50%; mask-position: 0 50%; }
.site-footer.wm-f::after { -webkit-mask-size: auto min(78%, var(--wm-max, 540px)); mask-size: auto min(78%, var(--wm-max, 540px)); -webkit-mask-position: right -4vw bottom -3rem; mask-position: right -4vw bottom -3rem; }
@media (max-width: 640px) {
  .has-wm::after, .has-wm.section::after { opacity: calc(var(--wm-o, 0.1) * var(--wm-k, 1) * 0.8); -webkit-mask-size: auto min(70%, 320px); mask-size: auto min(70%, 320px); -webkit-mask-position: right -14vw center; mask-position: right -14vw center; }
  .wm-l::after { -webkit-mask-position: left -14vw center; mask-position: left -14vw center; }
  .site-header.wm-h::after { -webkit-mask-size: auto 28px; mask-size: auto 28px; -webkit-mask-position: 0 50%; mask-position: 0 50%; }
}
@media print { .has-wm::after { display: none; } }
@media (forced-colors: active) { .has-wm::after { display: none; } }

/* A new paragraph started with Enter inside one text box */
.p-gap { display: block; height: 0.85em; }
