/* Carte Rare — website design system
   Black and white carry the identity; the work brings the colour.
   Rare Blue is an accent only (≤5%). One theme for the whole page: light or dark. */

/* ---------- Tokens ---------- */
:root {
  --black: #000000;
  --white: #ffffff;
  --blue: #0000ff;        /* Rare Blue — accent only */
  --gallery: #ecebe8;     /* Gallery Grey — image mounts (light) */
  --gallery-dark: #161616;/* image mounts (dark) */

  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;

  /* Invisible grid: 12 columns desktop, 4 mobile */
  --margin: clamp(20px, 3.125vw, 60px);
  --gutter: clamp(16px, 1.05vw, 20px);
  --cols: 4;

  --fs-tagline: clamp(4rem, 11.5vw, 13rem);
  --fs-serif-l: clamp(2.5rem, 5vw, 5.5rem);
  --fs-display: clamp(3rem, 7.4vw, 8.5rem);
  --fs-h1: clamp(2.5rem, 5.2vw, 5.75rem);
  --fs-h2: clamp(1.75rem, 3vw, 3.25rem);
  --fs-h3: clamp(1.375rem, 2vw, 2.25rem);
  --fs-lead: clamp(1.125rem, 1.4vw, 1.5rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-label: 0.75rem;
  --fs-ui: 0.9375rem;

  --radius: 4px;
  --section-y: clamp(88px, 10vw, 184px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --header-h: 76px;
}
@media (min-width: 900px) { :root { --cols: 12; } }

/* Theme — set on <html data-theme> before first paint */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: var(--white); --fg: var(--black);
  --muted: #5e5e5e; --line: rgba(0, 0, 0, .14); --line-strong: rgba(0, 0, 0, .9);
  --surface: var(--gallery); --focus: var(--blue);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--black); --fg: var(--white);
  --muted: #a3a3a3; --line: rgba(255, 255, 255, .18); --line-strong: rgba(255, 255, 255, .9);
  --surface: var(--gallery-dark); --focus: var(--white);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: var(--fs-body); line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; font-kerning: normal;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--blue); color: var(--white); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip-link { position: absolute; left: var(--margin); top: -100px; z-index: 100; background: var(--fg); color: var(--bg); padding: 12px 16px; font-size: var(--fs-small); border-radius: 999px; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Page-to-page crossfade; theme switch uses a circular reveal (see main.js) */
@view-transition { navigation: auto; }
html.theme-vt::view-transition-old(root), html.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-fade, html.theme-fade * { transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease) !important; }

/* ---------- Grid ---------- */
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); padding-inline: var(--margin); }
.c-full, .c-label, .c-main, .c-a, .c-b { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .c-label { grid-column: 1 / 5; }
  .c-main { grid-column: 5 / 13; }
  .c-a { grid-column: 5 / 9; }
  .c-b { grid-column: 9 / 13; }
}

/* ---------- Type ---------- */
.label { font-size: var(--fs-label); line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.muted { color: var(--muted); }
.display { font-size: var(--fs-display); line-height: .95; letter-spacing: -.04em; font-weight: 400; text-wrap: balance; }
.h1 { font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -.035em; font-weight: 400; text-wrap: balance; }
.h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.025em; font-weight: 400; text-wrap: balance; }
.h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -.02em; font-weight: 400; }
.lead { font-size: var(--fs-lead); line-height: 1.4; letter-spacing: -.01em; text-wrap: pretty; }
.body { font-size: var(--fs-body); line-height: 1.6; text-wrap: pretty; max-width: 38em; }
.serif-l { font-family: var(--serif); font-size: var(--fs-serif-l); line-height: 1; letter-spacing: -.015em; font-weight: 400; text-wrap: balance; }
.serif-l em, .tagline em { font-style: italic; }
.tagline { font-family: var(--serif); font-weight: 400; font-size: var(--fs-tagline); line-height: .86; letter-spacing: -.02em; }
/* Rare Blue highlight: blue type on light; on dark, a blue underline (blue type on black fails contrast) */
.em-accent { color: var(--blue); }
[data-theme="dark"] .em-accent { color: inherit; text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: .07em; text-underline-offset: .14em; }

/* ---------- Buttons — pill with arrow chip ---------- */
.btn {
  --b-bg: transparent; --b-fg: var(--fg); --b-bd: var(--line-strong); --c-bg: var(--fg); --c-fg: var(--bg);
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 6px 0 20px; border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  font-size: var(--fs-ui); letter-spacing: -.005em; font-weight: 400; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-solid { --b-bg: var(--fg); --b-fg: var(--bg); --b-bd: var(--fg); --c-bg: var(--bg); --c-fg: var(--fg); }
.btn-solid:hover { --b-bg: transparent; --b-fg: var(--fg); --c-bg: var(--fg); --c-fg: var(--bg); }
.btn-line:hover { --b-bg: var(--fg); --b-fg: var(--bg); --c-bg: var(--bg); --c-fg: var(--fg); }
.btn-sm { min-height: 38px; padding-left: 16px; gap: 10px; }
.chip { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-bg); color: var(--c-fg); flex: none; overflow: hidden; transition: background-color .3s var(--ease), color .3s var(--ease); }
.btn-sm .chip { width: 26px; height: 26px; }
.chip svg { width: 12px; height: 12px; transition: transform .45s var(--ease); }
.btn:hover .chip svg, a:hover > .chip svg { transform: rotate(-45deg); }
.btn:not(:has(.chip)) { padding-right: 20px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Theme toggle */
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); flex: none; transition: border-color .3s var(--ease); }
.theme-toggle:hover { border-color: var(--fg); }
.tt-icon { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); transition: transform .6s var(--ease); }
[data-theme="dark"] .tt-icon { transform: rotate(180deg); }
.theme-toggle-text { display: inline-flex; align-items: center; gap: 12px; font-size: var(--fs-ui); min-height: 44px; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); color: var(--fg); transition: background-color .4s var(--ease), transform .45s var(--ease); }
.site-header.is-solid { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .grid { height: 100%; align-items: center; }
.brand-link { grid-column: 1 / 3; display: inline-flex; width: max-content; }
.brand-link svg { height: 22px; width: auto; }
.nav { display: none; }
.header-end { grid-column: 3 / 5; justify-self: end; display: flex; align-items: center; gap: 8px; }
.header-end .btn { display: none; }
@media (min-width: 900px) {
  .brand-link { grid-column: 1 / 4; } .brand-link svg { height: 24px; }
  .nav { display: flex; grid-column: 5 / 9; gap: clamp(20px, 2.2vw, 36px); align-items: center; }
  .nav a { font-size: var(--fs-ui); position: relative; padding-block: 6px; }
  .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
  .nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
  .header-end { grid-column: 9 / 13; }
  .header-end .btn { display: inline-flex; }
}
.menu-toggle { font-size: var(--fs-ui); min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; }
@media (min-width: 900px) { .menu-toggle { display: none; } }

/* Mobile menu */
.menu { position: fixed; inset: 0; z-index: 60; background: var(--bg); color: var(--fg); display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--header-h) + 24px) var(--margin) var(--margin); visibility: hidden; opacity: 0; transition: opacity .35s var(--ease), visibility 0s linear .35s; }
.menu.is-open { visibility: visible; opacity: 1; transition: opacity .35s var(--ease); }
.menu-close { position: absolute; top: 19px; right: var(--margin); font-size: var(--fs-ui); min-height: 38px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; }
.menu nav li { border-top: 1px solid var(--line); }
.menu nav a { display: block; padding-block: 14px; font-size: clamp(2.5rem, 11vw, 4rem); line-height: 1.05; letter-spacing: -.035em; }
.menu .menu-foot { display: grid; gap: 20px; justify-items: start; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.hero-field { position: absolute; inset: 0; z-index: -1; }
.hero-field__canvas { width: 100%; height: 100%; }
/* Text sits above the field but lets the field take hover and clicks; links and buttons stay live */
.hero .grid, .hero .grid *, .hero-foot, .hero-foot * { pointer-events: none; }
/* Links and buttons stay fully interactive (higher specificity than the rule above) */
.hero .grid a, .hero .grid button, .hero .grid a *, .hero .grid button * { pointer-events: auto; }
.hero .grid a .chip, .hero .grid a .chip * { pointer-events: none; }
.hero a, .hero button, .hero.is-pointing a, .hero.is-pointing button { cursor: pointer; }
.rare-point { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; z-index: 1; pointer-events: none !important; will-change: transform; }
.rare-point:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.rare-point__hint { position: absolute; left: 44px; top: 50%; transform: translate(-6px, -50%); opacity: 0; font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--blue); white-space: nowrap; transition: opacity .4s var(--ease), transform .4s var(--ease); }
[data-theme="dark"] .rare-point__hint { color: var(--fg); }
.hero.is-pointing .rare-point.show-hint .rare-point__hint, .rare-point:focus-visible .rare-point__hint { opacity: 1; transform: translate(0, -50%); }
.hero.is-pointing { cursor: none; }
.hero.no-field .hero-field { display: none; }
.hero-top { padding-top: calc(var(--header-h) + clamp(20px, 5vh, 64px)); }
.hero-main { margin-top: auto; row-gap: clamp(28px, 4vh, 44px); padding-bottom: clamp(28px, 4vh, 48px); }
.hero .tagline { grid-column: 1 / -1; }
.hero-lead { grid-column: 1 / -1; display: grid; gap: 24px; }
@media (min-width: 900px) { .hero-lead { grid-column: 5 / 10; } }
.hero-foot { border-top: 1px solid var(--line); margin-inline: var(--margin); padding-block: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); }
.hero-foot .label { font-weight: 400; }

/* ---------- Sections — separated by hairlines, not bands of colour ---------- */
.section { padding-bottom: var(--section-y); }
.section::before { content: ""; display: block; height: 1px; background: var(--line); margin: 0 var(--margin) clamp(40px, 5.5vw, 96px); }
.section.no-rule::before { display: none; }
.section.no-rule { padding-top: var(--section-y); }
.section-head { row-gap: 20px; margin-bottom: clamp(40px, 6vw, 104px); align-items: end; }
.section-head .h2 { grid-column: 1 / -1; }
.section-head .head-cta { grid-column: 1 / -1; }
@media (min-width: 900px) { .section-head .h2 { grid-column: 1 / 9; } .section-head .head-cta { grid-column: 9 / 13; justify-self: end; } }
.rule { border-top: 1px solid var(--line); }

/* ---------- Work — rows: text left, media right ---------- */
.work-row { row-gap: 24px; padding-block: clamp(28px, 3.6vw, 56px); border-top: 1px solid var(--line); }
.work-row:first-child { border-top: 0; padding-top: 0; }
.wr-text { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 20px; }
.wr-media { grid-column: 1 / -1; display: block; }
@media (min-width: 900px) {
  .wr-text { grid-column: 1 / 5; justify-content: space-between; padding-right: 12px; }
  .wr-media { grid-column: 5 / 13; }
}
.wr-title { font-weight: 400; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -.03em; }
.wr-title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.work-row:hover .wr-title a { background-size: 100% 1px; }
.wr-meta { display: grid; gap: 14px; }
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.media > * { transition: transform 1.2s var(--ease); }
.wr-media:hover .media > * { transform: scale(1.02); }
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--muted); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex: none; }

/* Placeholder media (clearly labelled) */
.ph { position: relative; width: 100%; background: var(--surface); color: var(--fg); border-radius: var(--radius); display: flex; align-items: flex-end; padding: clamp(14px, 1.6vw, 22px); font-size: var(--fs-label); letter-spacing: .08em; text-transform: uppercase; font-weight: 500; overflow: hidden; }
.ph::before { content: ""; position: absolute; inset: 0; opacity: .14; background: linear-gradient(to top right, transparent calc(50% - .5px), currentColor 50%, transparent calc(50% + .5px)), linear-gradient(to top left, transparent calc(50% - .5px), currentColor 50%, transparent calc(50% + .5px)); }
.ph span { position: relative; max-width: 32em; opacity: .75; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 12px; width: max-content; max-width: 100%; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex: none; }
@media (max-width: 599px) { .badge { border-radius: 14px; align-items: flex-start; } .badge::before { margin-top: 7px; } }

/* ---------- Expertise — pillars ---------- */
.pillars > li { border-top: 1px solid var(--line); }
.pillars > li:last-child { border-bottom: 1px solid var(--line); }
.pillar { padding-inline: 0; padding-block: clamp(28px, 3.4vw, 52px); row-gap: 14px; align-items: baseline; }
.pillar .num { grid-column: 1 / -1; color: var(--muted); }
.pillar .t { grid-column: 1 / -1; }
.pillar .d { grid-column: 1 / -1; }
@media (min-width: 900px) { .pillar .num { grid-column: 1 / 5; } .pillar .t { grid-column: 5 / 9; } .pillar .d { grid-column: 9 / 13; } }
.pillar .t { transition: transform .5s var(--ease); }
.pillars > li:hover .t { transform: translateX(8px); }

/* Founder card (closing) */
.closing .display { grid-column: 1 / -1; }
@media (min-width: 900px) { .closing .display { grid-column: 1 / 10; } }
.closing-row { margin-top: clamp(40px, 5vw, 80px); row-gap: 28px; align-items: end; }
.founder { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; }
.founder .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); flex: none; display: grid; place-items: center; font-size: var(--fs-small); overflow: hidden; }
.founder .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.closing-row .ctas { grid-column: 1 / -1; }
@media (min-width: 900px) { .founder { grid-column: 1 / 5; } .closing-row .ctas { grid-column: 5 / 13; } }

.quote { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 0 var(--margin); }
.site-footer::before { content: ""; display: block; height: 1px; background: var(--line); margin: 0 var(--margin) clamp(48px, 6vw, 96px); }
.site-footer .grid { row-gap: 40px; }
.footer-brand { display: grid; gap: 20px; align-content: start; }
.footer-brand svg { height: 26px; width: auto; }
.footer-brand .serif-l { font-size: clamp(2rem, 3vw, 2.75rem); }
.footer-col h2 { margin-bottom: 14px; color: var(--muted); }
.footer-col li a { display: inline-block; padding-block: 3px; }
.footer-col li a:hover { color: var(--muted); }
.site-footer .c-label { grid-column: 1 / -1; }
.footer-cols { grid-column: 1 / -1; display: grid; gap: 32px var(--gutter); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .site-footer .c-label { grid-column: 1 / 5; } .footer-cols { grid-column: 5 / 13; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer-base { margin-top: clamp(56px, 7vw, 120px); padding-top: 18px; border-top: 1px solid var(--line); margin-inline: var(--margin); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: var(--fs-small); }
.footer-base a:hover { color: var(--fg); }

/* ---------- Case study ---------- */
.page-head { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 144px)); row-gap: 24px; padding-bottom: clamp(40px, 5vw, 80px); }
.cs-title { grid-column: 1 / -1; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px var(--gutter); }
@media (min-width: 900px) { .meta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.meta-grid dt { margin-bottom: 6px; }
.meta-grid dd { margin: 0; }
.cs-lead-media { margin-top: clamp(48px, 6vw, 96px); }
.cs-lead-media .c-full { grid-column: 1 / -1; }
.cs-sections > * { padding-block: clamp(28px, 3.6vw, 56px); border-top: 1px solid var(--line); row-gap: 16px; }
.blocks { display: grid; gap: var(--gutter); grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.blocks .full, .blocks .inset { grid-column: 1 / -1; }
@media (min-width: 900px) { .blocks .inset { grid-column: 3 / 11; } }
.pair, .triptych { grid-column: 1 / -1; display: grid; gap: var(--gutter); grid-template-columns: 1fr; }
@media (min-width: 700px) { .pair { grid-template-columns: 1fr 1fr; } .triptych { grid-template-columns: repeat(3, 1fr); } }
.timeline > li { padding-block: clamp(28px, 3.6vw, 56px); border-top: 1px solid var(--line); row-gap: 16px; }
.timeline .tl-when, .timeline .tl-text, .timeline .tl-media { grid-column: 1 / -1; }
@media (min-width: 900px) { .timeline .tl-when { grid-column: 1 / 5; } .timeline .tl-text { grid-column: 5 / 9; } .timeline .tl-media { grid-column: 9 / 13; } }
.outcomes { display: grid; gap: var(--gutter); grid-template-columns: 1fr; }
@media (min-width: 700px) { .outcomes { grid-template-columns: repeat(2, 1fr); } }
.outcome .v { font-size: var(--fs-display); line-height: .9; letter-spacing: -.045em; }
.next-project { display: grid; row-gap: 16px; padding-bottom: var(--section-y); }
.next-project .display { transition: transform .5s var(--ease); }
.next-project:hover .display { transform: translateX(10px); }

/* ---------- Contact ---------- */
.paths { row-gap: clamp(48px, 6vw, 96px); }
.path-a, .path-b { grid-column: 1 / -1; }
@media (min-width: 1100px) { .path-a { grid-column: 1 / 6; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } .path-b { grid-column: 7 / 13; } }
.booking { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); min-height: 340px; display: grid; place-items: center; padding: 24px; text-align: center; }
.booking[data-loaded="true"] { display: block; padding: 0; border: 0; min-height: 640px; }
.form { display: grid; gap: 28px; }
.field { display: grid; gap: 10px; }
.field-row { display: grid; gap: 28px; }
@media (min-width: 700px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label, .field legend { font-size: var(--fs-small); color: var(--muted); }
.field .hint { font-size: var(--fs-small); color: var(--muted); }
.input, .select, .textarea { width: 100%; font: inherit; font-size: 1.0625rem; color: var(--fg); background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; padding: 10px 0 12px; appearance: none; -webkit-appearance: none; }
.select option { color: #000; }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 28px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-bottom: 2px solid var(--focus); padding-bottom: 11px; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-bottom-color: #d00000; }
.error { color: #d00000; font-size: var(--fs-small); }
[data-theme="dark"] .error { color: #ff6b6b; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--fs-small); cursor: pointer; transition: background-color .2s, color .2s; user-select: none; }
.check input:checked + span { background: var(--fg); color: var(--bg); }
.check input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-small); line-height: 1.5; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--fg); flex: none; }
.consent a { text-decoration: underline; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: var(--fs-small); min-height: 1.5em; }
.form-done { border-top: 1px solid var(--line); padding-top: 28px; }

/* ---------- Reveal motion ---------- */
.reveal-line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; }
.reveal-line > span { display: inline-block; }
.js .reveal-line > span { transform: translateY(108%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 100ms + 150ms); }
.js .is-in .reveal-line > span, .js .reveal-line.is-in > span { transform: none; }
.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .media-reveal { clip-path: inset(6% 0 0 0 round var(--radius)); transition: clip-path 1.3s var(--ease); }
.js .media-reveal.is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js .hero-field { opacity: 0; transition: opacity 1.6s var(--ease); }
.js .hero.field-ready .hero-field { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; transition-delay: 0ms !important; }
  .js .reveal-line > span, .js [data-reveal], .js .media-reveal { transform: none !important; opacity: 1 !important; clip-path: none !important; }
  .js .hero-field { opacity: 1; }
  @view-transition { navigation: none; }
}

.env-banner { position: fixed; left: var(--margin); bottom: var(--margin); z-index: 70; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 999px; font-size: 12px; }
.small { font-size: var(--fs-small); }

/* ---------- Hero tuning panel (preview/staging, or ?tune) ---------- */
.tuner { position: fixed; right: 16px; bottom: 16px; z-index: 80; width: 300px; max-height: calc(100svh - 32px); display: flex; flex-direction: column; background: color-mix(in srgb, var(--bg) 94%, transparent); color: var(--fg); border: 1px solid var(--line-strong); border-radius: 10px; font-size: 12px; line-height: 1.3; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 40px rgba(0,0,0,.18); }
.tuner.is-closed { width: auto; }
.tuner button { border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 10px; font-size: 12px; }
.tuner button:hover { background: var(--fg); color: var(--bg); }
.tuner button.is-primary { background: var(--fg); color: var(--bg); }
.tuner__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.tuner__head strong { font-weight: 500; }
.tuner__meta { color: var(--muted); margin-right: auto; }
.tuner__actions, .tuner__foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; }
.tuner__foot { padding-top: 10px; border-top: 1px solid var(--line); }
.tuner__body { overflow: auto; padding: 0 12px; border-top: 1px solid var(--line); overscroll-behavior: contain; }
.tuner fieldset { padding: 10px 0 4px; margin: 0; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.tuner fieldset:last-child { border-bottom: 0; }
.tuner legend { display: block; width: 100%; padding: 0; margin-bottom: 6px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.tuner label { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; margin-bottom: 8px; cursor: default; }
.tuner label.is-changed .tuner__label::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); margin-left: 6px; vertical-align: middle; }
.tuner__val { font-variant-numeric: tabular-nums; color: var(--muted); }
.tuner input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--fg); height: 18px; margin: 0; }
.tuner__note { padding: 0 12px 10px; color: var(--muted); }
.tuner__json { margin: 0 12px 12px; height: 120px; font: 11px/1.4 ui-monospace, Menlo, monospace; background: transparent; color: var(--fg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px; resize: vertical; }
@media (max-width: 600px) { .tuner { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 55svh; } }
.tuner__seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 6px; }
.tuner__seg.two { grid-template-columns: repeat(2, 1fr); }
.tuner .tuner__seg button { border-radius: 6px; padding: 6px 4px; }
.tuner .tuner__seg button.is-on { background: var(--fg); color: var(--bg); }
.tuner .tuner__toggle { display: flex; gap: 8px; align-items: center; grid-template-columns: none; }
.tuner .tuner__toggle input { accent-color: var(--fg); }
.tuner__inline { margin-bottom: 8px; }
.tuner__seed { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.tuner__seed input { width: 100%; font: inherit; color: var(--fg); background: transparent; border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 8px; }
.tuner kbd { font: inherit; opacity: .55; margin-left: 2px; }

/* Founder portrait: black and white by default, colour on hover / focus / tap */
.portrait-duo { position: relative; display: block; outline-offset: 4px; }
.portrait-duo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait-colour { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
.portrait-duo:hover .portrait-colour, .portrait-duo:focus-visible .portrait-colour, .portrait-duo.is-colour .portrait-colour { opacity: 1; }
@media (hover: hover) { .portrait-duo { cursor: default; } }

/* ---------- Private online proposal (/p/<slug>/) ---------- */
.pp-header .grid { align-items: center; }
.pp-for { display: none; }
@media (min-width: 900px) { .pp-for { display: block; justify-self: center; } }
.pp-draft-bar { position: sticky; top: 0; z-index: 60; margin: 0; padding: 10px var(--margin); background: var(--fg); color: var(--bg); font-size: var(--fs-label); letter-spacing: .04em; }
.pp-open { padding-top: clamp(120px, 16vw, 220px); }
.pp-open-text { row-gap: 24px; margin-bottom: clamp(48px, 7vw, 112px); }
.pp-hero { margin: 0; padding-inline: var(--margin); }
.pp-hero img, .pp-rooms img { display: block; width: 100%; height: auto; }
.pp-hero img { aspect-ratio: 3 / 2; object-fit: cover; max-height: 86vh; }
.pp-sec .grid { row-gap: clamp(24px, 3vw, 40px); }
.pp-num { display: flex; align-items: center; gap: 10px; align-self: start; }
.pp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fg); flex: none; }
.pp-sec:target .pp-dot, .pp-begin .pp-dot { background: var(--blue); }
.pp-note p + p { margin-top: 1em; }
.pp-sign { margin-top: 2em; color: var(--muted); }
.pp-quotes { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 28px; }
.pp-quotes li { padding-top: 28px; border-top: 1px solid var(--line); }
.pp-refs { margin-top: 56px; }
.pp-refs dl { margin: 16px 0 0; display: grid; gap: 14px; }
.pp-refs div { display: grid; gap: 4px; }
@media (min-width: 700px) { .pp-refs div { grid-template-columns: 200px 1fr; } }
.pp-refs dt { font-weight: 500; } .pp-refs dd { margin: 0; color: var(--muted); }
.pp-rooms { display: grid; gap: var(--gutter); margin-top: clamp(24px, 4vw, 64px); }
.pp-rooms figure { margin: 0; }
.pp-rooms img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 700px) { .pp-rooms { grid-template-columns: repeat(3, 1fr); } }
.pp-principles .pillar { padding-inline: 0; }
.pp-landing { margin-top: clamp(40px, 6vw, 96px); }
.pp-list { list-style: none; padding: 0; margin: 40px 0 0; }
.pp-list li { display: grid; grid-template-columns: 48px 1fr; gap: 4px 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.pp-list li > :last-child { grid-column: 2; }
@media (min-width: 900px) { .pp-list li { grid-template-columns: 48px minmax(180px, 2fr) 3fr; } .pp-list li > :last-child { grid-column: auto; } }
.pp-list strong { font-weight: 500; }
.pp-phases { display: grid; gap: var(--gutter); row-gap: 48px; }
@media (min-width: 700px) { .pp-phases { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .pp-phases { grid-template-columns: repeat(4, 1fr); } }
.pp-phase { padding-top: 20px; border-top: 1px solid var(--line-strong); display: grid; gap: 10px; align-content: start; }
.pp-outcome { font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; }
.pp-phase ul, .pp-needs ul, .pp-pay { list-style: none; padding: 0; margin: 8px 0 0; }
.pp-phase li, .pp-needs li, .pp-pay li { padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.pp-gantt { list-style: none; padding: 0; margin: 40px 0 16px; }
.pp-gantt li { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.pp-g-track { position: relative; height: 6px; background: var(--line); border-radius: 3px; }
.pp-g-bar { position: absolute; top: 0; bottom: 0; left: calc(var(--from) / var(--weeks) * 100%); width: calc((var(--to) - var(--from)) / var(--weeks) * 100%); background: var(--fg); border-radius: 3px; transform-origin: left; }
.js .pp-gantt:not(.is-in) .pp-g-bar { transform: scaleX(0); }
.pp-gantt.is-in .pp-g-bar { transition: transform 1.1s var(--ease); }
.pp-gantt.is-in li:nth-child(2) .pp-g-bar { transition-delay: .12s; } .pp-gantt.is-in li:nth-child(3) .pp-g-bar { transition-delay: .24s; } .pp-gantt.is-in li:nth-child(4) .pp-g-bar { transition-delay: .36s; }
.pp-small { font-size: .9rem; line-height: 1.5; margin-top: 16px; }
.pp-needs { margin-top: 48px; }
@media (min-width: 700px) { .pp-needs ul { columns: 2; column-gap: var(--gutter); } .pp-needs li { break-inside: avoid; } }
.pp-studio { background: var(--surface); padding-top: 1px; }
.pp-belief { margin: 40px 0 0; }
.pp-founder { margin-top: 48px; display: flex; gap: 16px; align-items: center; }
.pp-price { margin: 40px 0 0; padding: 28px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.pp-fee { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.025em; margin: 8px 0 16px; }
.pp-fee s { font-size: .5em; margin-left: .4em; text-decoration-thickness: 1px; }
.pp-begin .grid { row-gap: 32px; }
.pp-steps { list-style: none; padding: 0; margin: 32px 0 40px; counter-reset: s; }
.pp-steps li { display: grid; grid-template-columns: 48px 1fr; padding: 16px 0; border-top: 1px solid var(--line); font-size: var(--fs-lead); line-height: 1.35; }
.pp-expired { display: none; }
.pp.is-expired .pp-expired { display: block; }
.pp.is-expired .pp-live, .pp.is-expired .pp-steps { display: none; }
.pp-draft-note { color: var(--muted); font-size: .9rem; }
.pp-footer .footer-base { display: grid; gap: 12px; padding-top: 48px; }
@media print { .site-header, .theme-toggle, .pp-draft-bar { display: none !important; } .pp-sec { break-inside: avoid; } }
.pp-for { white-space: nowrap; }
.pp-draft-bar { position: static; margin-top: 72px; }
.pp-belief { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.12; }
.pp-sec .h2 + .lead { margin-top: 20px; }
.pp-quotes .serif-l { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.08; }

/* Founder: LinkedIn links and first-person quote */
.founder-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .2em; transition: text-decoration-color .3s var(--ease); }
.founder-link:hover, .founder-link:focus-visible { text-decoration-color: currentColor; }
.text-link { color: inherit; text-decoration: underline; text-underline-offset: .25em; text-decoration-color: var(--line); }
.text-link:hover, .text-link:focus-visible { text-decoration-color: currentColor; }
.founder-quote { margin: 36px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.founder-quote blockquote { margin: 0; }
.founder-quote .serif-l { font-size: clamp(1.5rem, 2.4vw, 2.2rem); line-height: 1.15; text-wrap: pretty; }
.founder-quote figcaption { margin-top: 18px; display: flex; align-items: center; gap: 10px; }
.founder-quote figcaption::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

/* How it works */
.process { list-style: none; margin: 0; padding-block: 0; row-gap: 40px; }
.process-step { grid-column: 1 / -1; display: grid; gap: 12px; align-content: start; padding-top: 24px; border-top: 1px solid var(--line); }
.process-step > .label { display: flex; align-items: center; gap: 10px; }
.process-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.process-step:first-child .process-dot { background: var(--blue); }
@media (min-width: 700px) { .process-step { grid-column: span 2; } }
@media (min-width: 900px) { .process { grid-template-columns: repeat(5, minmax(0, 1fr)); } .process-step { grid-column: auto; } }

/* Founder experience */
.founder-exp { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.founder-exp .sep { color: var(--muted); }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); }
.faq-item { border-top: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.faq-icon { position: relative; width: 14px; height: 14px; flex: none; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; transition: transform .35s var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-item p { padding: 0 0 28px; max-width: 42em; }
.faq-item summary .h3 { transition: transform .4s var(--ease); }
@media (hover: hover) { .faq-item summary:hover .h3 { transform: translateX(6px); } }
