/* ============ Theme tokens: day (default) and night (set by the sky) ============ */
:root {
  --bg: #F4F1E8; --surface: #FFFDF7; --surface-2: #ECE8DA;
  --ink: #14231A; --text: #22322A; --muted: #52635A; --faint: #5C6C60;
  --accent: #2F6B3A; --btn: #2F5D3A; --btn-hover: #24492D; --btn-text: #F6F3EA;
  --line: rgba(27, 42, 32, .12); --accent-line: rgba(47, 93, 58, .30); --accent-soft: rgba(47, 93, 58, .10);
  --live: #2F6B3A; --alpha: #9A5F0E; --dev: #5C6C60;
  --header-bg: rgba(244, 241, 232, .88); --shadow: rgba(20, 35, 26, .22); --backdrop: rgba(20, 35, 26, .40);
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --header-h: 68px;
}
[data-theme="night"] {
  --bg: #0B1712; --surface: #132A1F; --surface-2: #0F2119;
  --ink: #F1EFE4; --text: #E6EBE3; --muted: #9FB2A4; --faint: #8A9E90;
  --accent: #A9D94C; --btn: #A9D94C; --btn-hover: #BDE66B; --btn-text: #10200F;
  --line: rgba(230, 235, 227, .12); --accent-line: rgba(169, 217, 76, .30); --accent-soft: rgba(169, 217, 76, .14);
  --live: #A9D94C; --alpha: #E8B04B; --dev: #8A9E90;
  --header-bg: rgba(11, 23, 18, .88); --shadow: rgba(0, 0, 0, .5); --backdrop: rgba(4, 10, 7, .6);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--header-h); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .6s ease, color .6s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.05; margin: 0; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px/1 var(--body); text-decoration: none; cursor: pointer; padding: 13px 18px; border-radius: 10px; border: 1px solid transparent; transition: background .2s, border-color .2s, color .2s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn); color: var(--btn-text); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-ghost { border-color: var(--accent-line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 10px 13px; font-size: 13px; }

.chip { font: 500 12px/1 var(--mono); letter-spacing: .04em; cursor: pointer; padding: 9px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); transition: all .2s; white-space: nowrap; }
.chip span { opacity: .7; margin-left: 4px; }
.chip:hover { border-color: var(--accent-line); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ============ Header ============ */
.site-header { position: sticky; top: 0; z-index: 40; height: var(--header-h); background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); transition: background .6s; }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .btn { color: var(--btn-text); padding: 10px 16px; }
/* Sky toggle: a tiny landscape. The sun sets behind the ridge, then the moon and stars come up */
.nav { margin-left: auto; }
.sky-btn { flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; cursor: pointer; overflow: hidden; }
.sky-btn svg { display: block; width: 100%; height: 100%; }
.sky-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sb-sky { fill: #E4EADB; transition: fill .9s ease; }
html[data-sky="dawn"] .sb-sky { fill: #F2DCD3; }
html[data-sky="golden"] .sb-sky { fill: #F2DBB0; }
html[data-theme="night"] .sb-sky, .sb-cut { fill: #16301F; }
.sb-sun { fill: #E8B04B; transition: transform .7s cubic-bezier(.2,.7,.3,1) .35s; }
html[data-sky="dawn"] .sb-sun, html[data-sky="golden"] .sb-sun { transform: translateY(7px); }
html[data-theme="night"] .sb-sun { transform: translateY(26px); transition: transform .65s cubic-bezier(.5,0,.75,.4); }
.sb-moon { fill: #F1EFE4; transform: translateY(32px); transition: transform .5s cubic-bezier(.5,0,.75,.4); }
html[data-theme="night"] .sb-moon { transform: none; transition: transform .7s cubic-bezier(.2,.7,.3,1) .45s; }
.sb-star { fill: #F1EFE4; opacity: 0; transition: opacity .25s; }
html[data-theme="night"] .sb-star { opacity: 1; transition: opacity .5s ease .95s; }
html[data-theme="night"] .sb-star.s2 { transition-delay: 1.08s; }
html[data-theme="night"] .sb-star.s3 { transition-delay: 1.2s; }
.menu-btn { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 1200px) {
  :root { --header-h: 60px; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .sky-btn { width: 44px; height: 44px; margin-left: auto; }
  .nav a { padding: 12px 0; font-size: 16px; }
  .nav .btn { margin-top: 8px; padding: 14px; }
  .menu-btn { display: inline-flex; }
  .brand img { height: 20px; }
}

/* ============ Hero: the ridgeline ============
   A photo of a ridge sits behind the headline and a hiker walks the trail drawn over it (HERO in the script).
   The scene is sized from the hero's HEIGHT and pinned bottom-right, so the mountain keeps its place beside the
   text at every width; --scene-h shrinks it on narrower screens and --mk keeps the markers a readable size. */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: clamp(620px, calc(100svh - var(--header-h)), 860px); padding: 64px 0 0; --scene-h: 115%; --mk: 1; --scrim: 244, 241, 232; }
.hero-grid { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.hero h1 { font-size: clamp(44px, 5.9vw, 86px); line-height: 1.0; margin-top: 18px; }
.hero h1 .l2 { color: var(--accent); white-space: nowrap; }
.do-mark { display: inline-block; height: .75em; width: auto; vertical-align: baseline; }
.hero-sub { color: var(--muted); font-size: 18px; margin: 0; max-width: 560px; }
@keyframes nudge { 50% { transform: translateY(4px); } }

.hero-scene { position: absolute; right: 0; bottom: 0; z-index: -2; height: var(--scene-h); aspect-ratio: 3 / 2; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%), linear-gradient(180deg, transparent 0, #000 22%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 10%), linear-gradient(180deg, transparent 0, #000 22%); mask-composite: intersect; }
.hero-scene-in { position: absolute; inset: 0; transform-origin: 50% 100%; transform: scale(1.03); transition: opacity .6s ease; }
.hero-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Sky: the same dawn and golden washes as the trail map, and a night made by darkening the photo */
.hero-shade { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
html[data-sky="dawn"] .hero-shade.warm { opacity: 1; background: linear-gradient(180deg, rgba(255,170,150,.40) 0%, rgba(255,210,185,.16) 55%, rgba(255,255,255,0) 100%); }
html[data-sky="golden"] .hero-shade.warm { opacity: 1; background: linear-gradient(180deg, rgba(255,158,64,.36) 0%, rgba(255,196,120,.18) 60%, rgba(110,60,15,.14) 100%); }
.hero-shade.dusk { background: #173425; mix-blend-mode: multiply; }
.hero-shade.dark { background: rgba(5, 12, 9, .16); }
[data-theme="night"] .hero-shade.dusk, [data-theme="night"] .hero-shade.dark { opacity: 1; }
/* The page colour fades out from the top-left so the headline always has a calm background */
.hero-scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-scrim::before, .hero-scrim::after { content: ""; position: absolute; inset: 0; transition: opacity .6s ease; background: radial-gradient(135% 95% at 0% 0%, rgb(var(--scrim)) 0%, rgba(var(--scrim), .92) 50%, rgba(var(--scrim), 0) 82%); }
.hero-scrim::after { --scrim: 11, 23, 18; opacity: 0; }
[data-theme="night"] .hero-scrim::before { opacity: 0; }
[data-theme="night"] .hero-scrim::after { opacity: 1; }

.hero-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ht-dots, .ht-walked { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ht-dots { stroke: rgba(255, 253, 247, .7); stroke-width: 6; stroke-dasharray: .5 17; }
.ht-walked { stroke: #FFFDF7; stroke-width: 6.5; stroke-dasharray: 0 99999; transition: stroke .6s; }
[data-theme="night"] .ht-dots { stroke: rgba(241, 239, 228, .5); }
[data-theme="night"] .ht-walked { stroke: #A9D94C; }
.ht-mk { transform: scale(var(--mk)); }
.hero-projects { position: absolute; right: 0; bottom: 0; height: var(--scene-h); aspect-ratio: 3 / 2; z-index: 1; pointer-events: none; }
.hero-projects-in { position: absolute; inset: 0; transform-origin: 50% 100%; transform: scale(1.03); }
.hero-waypoint { position: absolute; left: clamp(calc(100% - 100vw + 32px), var(--waypoint-x), calc(100% - 32px)); width: 44px; height: 44px; transform: translate(-50%, -50%); display: grid; place-items: center; color: #14231A; text-decoration: none; pointer-events: auto; }
.hero-waypoint-number { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #FFFDF7; border-radius: 50%; background: #24492D; color: #FFFDF7; font: 600 12px var(--mono); box-shadow: 0 2px 8px #14231A55; }
.hero-waypoint-window { position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); width: 116px; border: 2px solid #FFFDF7; border-radius: 7px; background: #FFFDF7; color: #14231A; box-shadow: 0 4px 16px #14231A44; }
/* Reveal each preview when the animated trail reaches its waypoint. */
.hero-waypoint-window { opacity: 0; visibility: hidden; pointer-events: none; translate: 0 8px; transition: opacity .3s ease, translate .3s ease; }
.hero-waypoint.on .hero-waypoint-window, .hero-waypoint:focus-visible .hero-waypoint-window { opacity: 1; visibility: visible; pointer-events: auto; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .hero-waypoint-window { transition: none; } }
.hero-waypoint-window::after { content: ''; position: absolute; left: 50%; top: 100%; height: 15px; border-left: 2px solid #FFFDF7; pointer-events: none; }
.hero-waypoint:first-child .hero-waypoint-window { left: 0; transform: none; }
.hero-waypoint:first-child .hero-waypoint-window::after { left: 20px; }
.hero-window-bar { display: flex; gap: 3px; padding: 4px 5px; background: #E8E6DF; border-radius: 4px 4px 0 0; }
.hero-window-bar i { width: 3px; height: 3px; border-radius: 50%; background: #8B948B; }
.hero-waypoint-window img { display: block; width: 100%; height: 80px; object-fit: cover; object-position: top; }
.hero-waypoint-name { display: block; padding: 6px; font: 600 14px/1.2 var(--body); text-align: center; }
.hero-waypoint:hover .hero-waypoint-window, .hero-waypoint:focus-visible .hero-waypoint-window { border-color: #E8B04B; box-shadow: 0 0 0 2px #E8B04B, 0 4px 16px #14231A44; }
.hero-waypoint.on .hero-waypoint-number { background: #E8B04B; color: #14231A; }
.hero-waypoint:hover .hero-waypoint-name, .hero-waypoint:focus-visible .hero-waypoint-name { background: #E8B04B; }
.hero-waypoint:hover .hero-waypoint-number, .hero-waypoint:focus-visible .hero-waypoint-number { outline: 3px solid #E8B04B; outline-offset: 3px; }
.hero-waypoint:focus-visible { outline: 3px solid #FFFDF7; outline-offset: 4px; border-radius: 50%; }
/* Keep space reserved while markers and legend entries reveal together. */
.hero-waypoint, .hero-summit, .hero-project-key li { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s ease; }
.hero-waypoint.on, .hero-summit.on, .hero-project-key li.on { opacity: 1; visibility: visible; pointer-events: auto; }
.hero-summit { position: absolute; width: 44px; height: 56px; transform: translate(-50%, -75%); border-radius: 8px; color: #14231A; text-decoration: none; }
.hero-summit::before { content: ''; position: absolute; inset: -24px -22px 0 0; }
.hero-summit span { position: absolute; bottom: calc(100% + 4px); right: 0; padding: 8px 10px; border-radius: 6px; background: #E8B04B; font: 600 14px/1.2 var(--body); white-space: nowrap; box-shadow: 0 3px 12px #14231A44; }
.hero-summit:hover span, .hero-summit:focus-visible span { background: #FFFDF7; }
.hero-summit:focus-visible { outline: 3px solid #FFFDF7; outline-offset: 4px; }
@media (max-width: 360px) { .hero-summit span { width: 74px; bottom: calc(100% + 18px); padding: 6px; white-space: normal; text-align: center; } }
.legend-flag svg { display: block; width: 18px; height: 22px; }
#contact-form { scroll-margin-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: reduce) { .hero-waypoint, .hero-summit, .hero-project-key li { transition: none; } }
.hero-project-key { padding-top: 28px; scroll-margin-top: calc(var(--header-h) + 24px); }
.hero-project-key h2 { margin: 0 0 8px; font: 600 24px/1.2 var(--display); color: var(--ink); }
.hero-project-key p { margin: 0 0 16px; color: var(--muted); font-size: 16px; }
.hero-project-key ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.hero-project-key a { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 10px 0; color: var(--text); text-decoration: none; font-size: 16px; border-radius: 4px; }
.hero-project-key a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.hero-project-key a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hero-project-key a span { flex-shrink: 0; font: 500 14px var(--mono); color: var(--accent); }
@media (max-width: 760px) { .hero-project-key ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; } }
@media (max-width: 360px) { .hero-project-key ol { grid-template-columns: 1fr; } }
@media (min-width: 761px) { .hero-waypoint { left: clamp(calc(100% - 100vw + 48px), var(--waypoint-x), calc(100% - 48px)); } }
.ht-flag { transform: scale(0); transition: transform .25s ease-in; }
.ht-flag.up { transform: scale(var(--mk)); transition: transform .5s cubic-bezier(.3, 1.8, .5, 1); }
.ht-flag line { stroke: #14231A; stroke-width: 5; stroke-linecap: round; }
.ht-flag path { fill: #E8B04B; transform-box: fill-box; transform-origin: 0 50%; animation: ht-wave 1.4s ease-in-out infinite; }
[data-theme="night"] .ht-flag line { stroke: #F1EFE4; }
.ht-halo { fill: #FFFDF7; opacity: .4; }
.ht-body { fill: #E8B04B; stroke: #14231A; stroke-width: 4.5; }
.ht-bob { animation: ht-bob .42s ease-in-out infinite alternate; }
.ht-rest .ht-bob { animation: none; }
.ht-birds { fill: none; stroke: #1F2B30; stroke-width: 3.6; stroke-linecap: round; animation: ht-birds 30s linear -4s infinite; transition: opacity .8s; }
.ht-birds path { transform-box: fill-box; transform-origin: 50% 100%; animation: ht-flap .7s ease-in-out infinite alternate; }
.ht-birds path:nth-child(2) { animation-delay: -.35s; }
[data-theme="night"] .ht-birds { visibility: hidden; }
@keyframes ht-wave { 0%, 100% { transform: none; } 50% { transform: skewY(-6deg) scaleX(.9); } }
@keyframes ht-bob { to { transform: translateY(-4px); } }
@keyframes ht-flap { to { transform: scaleY(.35); } }
@keyframes ht-birds { 0% { transform: translate(1250px, 800px); opacity: 0; } 12%, 85% { opacity: 1; } 100% { transform: translate(1640px, 640px); opacity: 0; } }

.hero-log { margin-top: auto; padding: 40px 0 20px; text-align: right; }
.hero-log > div { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 9px 14px; border-radius: 9px; background: rgba(20, 35, 26, .74); color: #F6F3EA; font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.hero-log i { width: 8px; height: 8px; border-radius: 50%; background: #E8B04B; }
.hero-log span:first-child { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 1100px) { .hero { --scene-h: 95%; --mk: 1.2; } }
@media (max-width: 900px) { .hero { --scene-h: 80%; --mk: 1.45; } .hero h1 .l2 { white-space: normal; } }

@media (max-width: 1200px) {
  .hero-waypoint-name { display: none; }
  .hero-waypoint-window { width: clamp(74px, 10vw, 104px); }
  .hero-waypoint-window img { height: auto; aspect-ratio: 8 / 5; }
  .hero-waypoint:nth-child(even) .hero-waypoint-window { bottom: 148px; }
  .hero-waypoint:nth-child(even) .hero-waypoint-window::after { height: 113px; }

}

/* ============ How it works: the site builds itself ============
   A rail of steps beside a browser frame that assembles a sample client site, one scene per
   step (PROCESS in the script). The rail plays through once while the frame is on screen;
   tapping a step or swiping the frame takes over. Nothing is pinned. The frame is decorative
   (aria-hidden): the step text carries the meaning. Browser chrome and the first three stages
   use the theme tokens. The sample site (.rg) keeps its own palette in day and night. */
.process { padding: clamp(20px, 4svh, 44px) 0; }
.process-head { display: grid; gap: 6px; margin-bottom: clamp(14px, 2.5svh, 24px); }
.process-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.process-cta { display: none; }
.process-head h2 { font-size: clamp(34px, 4.2vw, 50px); }
.process-grid { display: grid; grid-template: ". stage" 1fr "detail stage" auto "steps stage" auto ". stage" 1fr / minmax(0, 5fr) minmax(0, 6fr); gap: 0 clamp(24px, 4vw, 56px); }
/* pan-y: vertical scrolling stays native, horizontal drags become swipes */
.p-stage { grid-area: stage; align-self: center; position: relative; isolation: isolate; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.p-stage img { -webkit-user-drag: none; }

.p-steps { grid-area: steps; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; list-style: none; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.p-steps { margin-top: 14px; }
.p-tab { appearance: none; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 8px; align-content: center; align-items: baseline; width: 100%; min-height: 44px; margin: 0; padding: 4px 8px; border: 0; border-radius: 6px; background: none; text-align: left; color: var(--muted); cursor: pointer; }
.p-step.active .p-tab { background: var(--accent-soft); color: var(--ink); }
.p-num { font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--faint); }
.p-step.active .p-num, .p-step.done .p-num { color: var(--accent); }
.p-label { font: 600 15px/1.2 var(--display); }
.p-short { display: none; }
.p-tab:hover { color: var(--ink); }
/* Progress: done steps are filled; while playing, the active one fills over its --hold */
.p-track { grid-column: 1 / -1; position: relative; height: 3px; border-radius: 2px; overflow: hidden; background: var(--line); }
.p-track i { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.p-step.done .p-track i, .p-step.active .p-track i { transform: none; }
@keyframes p-fill { from { transform: scaleX(0); } to { transform: none; } }
.process.is-playing .p-step.active .p-track i { animation: p-fill var(--hold, 4.5s) linear both; }
/* The step text is a card above the rail: the step, its sentence, and the You do / You get line.
   While a step plays, its words light up and the line is ticked off in time with the stage. */
.p-detail { grid-area: detail; padding: 18px 22px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 36px -26px var(--shadow); }
.p-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.p-stepno { display: block; font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.p-detail-head h3 { margin-top: 2px; font-size: clamp(26px, 2.8vw, 34px); line-height: 1.08; }
/* The tallest step copy sets the height so playback cannot move the layout. */
.p-copy-stack { display: grid; }
.p-copy { grid-area: 1 / 1; visibility: hidden; }
.p-copy.active { visibility: visible; animation: p-copy-in .25s ease both; }
.p-copy p { margin: 0; font-size: 16px; line-height: 1.6; }

.p-copy .p-out { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 9px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 14.5px; color: var(--text); }
.p-copy { --lit: rgba(47, 93, 58, .18); }
[data-theme="night"] .p-copy { --lit: rgba(169, 217, 76, .22); }
/* Their plain style is the finished state. .run (set by runBeats) plays them in from the start, each at its --at. */
/* Highlights keep their own padding (no negative margins), so the spaces between words survive
   and a phrase that wraps gets rounded ends on each line. */
.p-lit { padding: .08em .14em; border-radius: .3em; background: var(--lit); color: var(--ink); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.p-out .p-lit { margin: 0; padding: 0; background: none; box-shadow: none; }
@keyframes p-lit { from { background: transparent; color: var(--text); } }
.p-copy.run .p-lit { animation: p-lit .45s ease var(--at, 0ms) both; }
.p-tick { position: relative; flex: none; width: 1.35em; height: 1.35em; margin-top: .05em; border-radius: 50%; background: var(--accent); }
.p-tick::after { content: ''; position: absolute; left: 33%; top: 15%; width: 28%; height: 52%; border: solid var(--btn-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes p-tick { from { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); } }
@keyframes p-tick-mark { from { opacity: 0; } }
.p-copy.run .p-tick { animation: p-tick .4s ease var(--at, 0ms) both; }
.p-copy.run .p-tick::after { animation: p-tick-mark .3s ease var(--at, 0ms) both; }
.p-out strong { color: var(--accent); font-weight: 600; }
@keyframes p-copy-in { from { opacity: 0; } to { opacity: 1; } }
.p-toggle { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 0 16px; border: 1px solid var(--accent-line); border-radius: 999px; background: transparent; color: var(--ink); font: 600 14px/1 var(--body); cursor: pointer; transition: border-color .2s; }
.p-toggle:hover { border-color: var(--accent); }
.p-toggle svg { width: 15px; height: 15px; }
.p-care { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; color: var(--muted); }
.p-care strong { font-weight: 600; color: var(--text); }

/* The stage: every step happens in one window on a forest-green panel. The window never changes
   size or moves; only its top bar (Messages, the call, the quote PDF, the browser) and its contents
   crossfade, so all six steps read as one place. Every scene is absolutely placed in the view. */
.p-stage { padding: 18px; border-radius: 16px; background: var(--stage-green); --stage-green: #2F5D3A; }
[data-theme="night"] .p-stage { --stage-green: #1D4630; }
.bf { position: relative; overflow: hidden; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px rgba(0, 0, 0, .14), 0 2px 4px rgba(0, 0, 0, .12), 0 24px 44px -18px rgba(0, 0, 0, .55); container-type: inline-size;
  /* Paper, graphite and ink keep their real colours in day and night, like the sample site */
  --sx-paper: #F3EBDE; --sx-graphite: #4A4F4B; --sx-pen: #2A5C36; --sx-text: #22322A; --sx-soft: #55635B;
  /* One light for everything that sits on the stage: the sketch page, the quote sheet, the browser window */
  --sx-shadow: 0 1px 3px -1px var(--shadow), 0 22px 40px -24px var(--shadow); }
.bf [data-scene] { opacity: 0; transition: opacity .3s ease; }
.bf [data-scene].on { opacity: 1; }
.sx-defs { position: absolute; }
/* The window's top bar: the traffic lights stay; what sits beside them depends on the step */
.bf-bar { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--surface), var(--surface-2)); color: var(--muted); }
.bf-bar-mid { position: relative; flex: 1; min-width: 0; align-self: stretch; }
.bf-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-right: 52px; font: 600 12.5px/1 var(--body); color: var(--ink); white-space: nowrap; }
/* Browser toolbar: back and forward, the address field, share and new tab */
.bf-chrome { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.bf-chrome svg { width: 15px; height: 15px; flex-shrink: 0; }
.bf-dots { display: flex; gap: 6px; flex-shrink: 0; }
.bf-dots i { width: 10px; height: 10px; border-radius: 50%; background: #EE6A5F; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .2); }
.bf-dots i:nth-child(2) { background: #F5BD4F; }
.bf-dots i:nth-child(3) { background: #62C454; }
.bf-nav, .bf-tools { display: flex; gap: 9px; flex-shrink: 0; }
.bf-nav svg + svg { opacity: .4; }
.bf-url { position: relative; flex: 1; min-width: 0; height: 26px; border-radius: 7px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); font: 500 12px/1 var(--body); color: var(--muted); transition: background-color .6s ease; }
.bf-label { position: absolute; inset: 0 24px; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; opacity: 0; transition: opacity .3s ease; }
.bf-label svg { width: 11px; height: 11px; }
.bf-label.on { opacity: 1; }
.bf-label.live { color: var(--accent); }
.bf-live { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.bf-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px var(--accent-soft); }
.bf-reload { position: absolute; right: 7px; top: 0; bottom: 0; display: grid; place-items: center; }
.bf-url { max-width: 420px; margin: 0 auto; height: 24px; }
.bf-label { inset: 0 22px; }
.bf-reload svg { width: 12px; height: 12px; }
/* The viewport. In step 02 the same rectangle is the sketch page, so it gets the page's edge and shadow there. */
.bf-view { position: relative; width: 100%; font-size: 13px; font-size: clamp(11.5px, 3.1cqw, 15px); aspect-ratio: 4 / 3; max-height: clamp(196px, calc(100svh - var(--header-h) - 292px), 420px); overflow: hidden; container-type: size; }

/* One layer per scene. Everything inside is sized in em from the stage's width.
   Each scene's plain styles are its finished state; .play (added by setStage) runs the intro. */
.st { position: absolute; inset: 0; font-size: 13px; font-size: clamp(11.5px, 3.1cqw, 15px); line-height: 1.4; }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes st-rise { from { opacity: 0; transform: translateY(.5em); } to { opacity: 1; transform: none; } }

/* 01 Inquiry: a message thread in the Messages window. The typing dots only exist during the intro. */
.st-thread, .st-quote { container-type: size; overflow: hidden; }
.st-thread { display: grid; place-items: center; padding: 6% 7%; }
.th { width: min(100%, 31em); display: grid; gap: .5em; }
.th-time { justify-self: center; margin-bottom: .7em; font: 500 .78em/1.4 var(--body); color: var(--muted); }
.th-tag { justify-self: start; margin-left: 3.9em; font: 500 .78em/1.4 var(--mono); letter-spacing: .05em; color: var(--muted); }
.th-status { justify-self: end; margin-right: 3.9em; font: 500 .78em/1.4 var(--body); color: var(--muted); }
.th-row { position: relative; display: flex; align-items: flex-end; gap: .6em; }
.th-out { justify-content: flex-end; margin-top: 1em; }
.th-b { max-width: 78%; margin: 0; padding: .8em 1em; border-radius: 1.2em; font-size: 1.08em; line-height: 1.4; box-shadow: 0 1px 3px -1px var(--shadow); }
.th-in .th-b { border-bottom-left-radius: .3em; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.th-out .th-b { border-bottom-right-radius: .3em; background: var(--btn); color: var(--btn-text); }
.th-av { position: relative; width: 2.5em; height: 2.5em; flex-shrink: 0; overflow: hidden; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.th-av b { font: 600 .8em/1 var(--mono); }
/* The contact-section photo, zoomed in on the face so it reads at avatar size */
.th-av img { position: absolute; left: -42%; top: -30%; width: 184%; max-width: none; height: auto; }
.th-typing { position: absolute; right: 3.1em; bottom: 0; display: flex; gap: .3em; padding: .85em 1em; border-radius: 1.2em 1.2em .3em 1.2em; background: var(--btn); opacity: 0; }
.th-typing i { width: .45em; height: .45em; border-radius: 50%; background: var(--btn-text); }
@keyframes th-typing { 0% { opacity: 0; } 14%, 86% { opacity: 1; } 100% { opacity: 0; } }
@keyframes th-dot { 0%, 60%, 100% { transform: none; opacity: .55; } 30% { transform: translateY(-.25em); opacity: 1; } }
.st-thread.play .th-time, .st-thread.play .th-tag { animation: st-rise .3s ease both; }
.st-thread.play .th-in { animation: st-rise .3s ease .7s both; }
.st-thread.play .th-typing { animation: th-typing 1s linear 1.5s both; }
.st-thread.play .th-typing i { animation: th-dot .6s ease-in-out infinite; }
.st-thread.play .th-typing i:nth-child(2) { animation-delay: .12s; }
.st-thread.play .th-typing i:nth-child(3) { animation-delay: .24s; }
.st-thread.play .th-out .th-b, .st-thread.play .th-out .th-av { animation: st-rise .3s ease 2.5s both; }
.st-thread.play .th-status { animation: st-fade .3s ease 3s both; }

/* 02 Discovery call: a slim call bar, and under it the site sketching itself */
.call-bar { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 9px; font: 500 12px/1 var(--mono); color: var(--muted); }
.call-who { display: flex; flex-shrink: 0; }
.call-who .th-av { width: 22px; height: 22px; box-shadow: 0 0 0 2px var(--surface); }
.call-who .th-av + .th-av { margin-left: -4px; }
.call-who .th-av b { font-size: 8.5px; }
.call-end { width: 30px; height: 20px; flex-shrink: 0; display: grid; place-items: center; border-radius: 999px; background: #C8402F; color: #fff; }
.call-end svg { width: 14px; height: 14px; }
.call-name { color: var(--ink); white-space: nowrap; }
.call-time { min-width: 3.1em; font-variant-numeric: tabular-nums; color: var(--ink); }
/* The sketch page: real paper, graphite strokes (roughened by the #sx-graphite filter) and pen notes */
.st-call { background: var(--sx-paper); color: var(--sx-graphite); }
.paper { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: var(--sx-paper); }
.paper-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sk { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; fill: none; stroke: currentColor; stroke-width: .095em; stroke-linecap: round; stroke-linejoin: round; }
.sk .b { stroke-width: .24em; }
@keyframes sk-draw { from { stroke-dashoffset: 1; opacity: 0; } 6% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
.st-call.play .sk path { stroke-dasharray: 1; animation: sk-draw var(--t, .2s) ease-out var(--d, 0s) both; }
.sk-notes { position: absolute; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: .35em; }
.sk-label { order: 3; margin-left: 1em; padding: 0 .25em; background: rgba(243, 235, 222, .92); box-shadow: 0 0 .35em .3em rgba(243, 235, 222, .92); color: var(--sx-pen); font: 400 1.2em/1.12 'Patrick Hand', var(--mono); transform: rotate(-2deg); }
.sk-label[data-near="nav"] { order: 1; align-self: flex-end; margin-left: 0; text-align: right; }
.sk-label[data-near="headline"] { order: 2; }
.st-call.play .sk-label { animation: st-fade .3s ease var(--d, 0s) both; }

/* 03 Written quote: the page open in a PDF viewer. The stamp lands last. */
.st-quote { display: grid; place-items: center; background: var(--surface-2); }
.doc { position: relative; height: 84%; aspect-ratio: 8.5 / 11; max-width: 80%; display: flex; flex-direction: column; gap: 1.15em; padding: 1.6em 1.5em; background: var(--sx-paper); border-radius: .15em; box-shadow: var(--sx-shadow); color: var(--sx-text); }
.doc-head, .doc-row { position: relative; z-index: 1; }
.doc-head { display: grid; gap: .15em; padding-bottom: .9em; border-bottom: 1px solid rgba(34, 50, 42, .18); }
.doc-head b { font: 700 1.35em/1.1 var(--display); letter-spacing: -.01em; color: var(--sx-text); }
.doc-head span { font-size: .85em; color: var(--sx-soft); }
.doc-row { display: grid; gap: .5em; }
.doc-row span { font: 500 .8em/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sx-soft); }
.doc-row i { height: .55em; width: 92%; border-radius: 99px; background: var(--sx-text); opacity: .16; }
.doc-row i + i { width: 58%; }
/* Rubber-stamp ink: the #sx-stamp filter breaks up the edges and leaves the ink patchy */
.doc-stamp { position: absolute; z-index: 1; right: 9%; bottom: 7%; padding: .45em .75em; border: .18em solid var(--sx-pen); border-radius: .35em; font: 700 .95em/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sx-pen); transform: rotate(-9deg); }
@keyframes doc-in { from { opacity: 0; transform: translateY(.9em); } to { opacity: 1; transform: none; } }
@keyframes doc-stamp { from { opacity: 0; transform: rotate(-9deg) scale(1.8); } to { opacity: 1; transform: rotate(-9deg) scale(1); } }
.st-quote.play .doc { animation: doc-in .35s ease both; }
.st-quote.play .doc-row { animation: st-fade .3s ease calc(.6s + var(--i, 0) * .8s) both; }
.st-quote.play .doc-stamp { animation: doc-stamp .26s cubic-bezier(.2, 1.5, .4, 1) 3s both; }

/* 04–06 The sample client site, inside the browser. Fixed palette: it looks the same in day and night. */
/* All type stays relative to the existing frame-width font size. */
.rg { --rg-cream: #F4F1E8; --rg-forest: #1F3A2B; --rg-orange: #B5521B; --rg-card: #FFFDF7; --rg-rule: rgba(31, 58, 43, .18); --rg-serif: Georgia, 'Times New Roman', serif; display: flex; flex-direction: column; background: var(--rg-cream); color: var(--rg-forest); font-family: Arial, Helvetica, sans-serif; }
.rg-nav { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: .8em; padding: .8em 1.4em; border-bottom: 1px solid var(--rg-rule); }
.rg-logo { display: flex; align-items: center; gap: .5em; font: 700 1.12em/1 var(--rg-serif); letter-spacing: -.025em; white-space: nowrap; }
.rg-logo svg { width: 1.65em; height: 1.9em; color: var(--rg-forest); flex-shrink: 0; }
.rg-links { display: flex; align-items: center; gap: 1.1em; font-size: .78em; font-weight: 600; }
.rg-book { border: 1px solid var(--rg-forest); border-radius: .25em; padding: .55em .9em; }
/* The hero never shrinks below its own content. The cards take what is left, and their
   photos are the flexible part: they get shorter before anything else has to give. */
.rg-hero { position: relative; isolation: isolate; flex: 1 0 auto; display: flex; align-items: center; padding: 1em 1.4em; }
.rg-copy { position: relative; z-index: 1; width: 55%; display: grid; gap: .6em; justify-items: start; }
.rg-eyebrow { font-size: .65em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.rg-h { max-width: 11em; font: 400 2.12em/1.04 var(--rg-serif); letter-spacing: -.035em; text-wrap: balance; }
.rg-copy p { max-width: 20em; margin: 0; font-size: .83em; line-height: 1.4; }
.rg-actions { display: flex; align-items: center; gap: 1em; margin-top: .2em; white-space: nowrap; }
.rg-btn { padding: .8em 1em; border-radius: .25em; background: var(--rg-orange); color: #fff; font-size: .8em; font-weight: 600; line-height: 1; }
.rg-text-link { font-size: .74em; font-weight: 600; text-decoration: underline; text-underline-offset: .25em; }
.rg-photo { position: absolute; z-index: 0; top: 1em; bottom: 1em; left: 59%; right: 1.4em; transition: opacity .3s ease; }
.rg-photo .ph { border-radius: .35em; }
.rg-backdrop { position: absolute; z-index: 0; inset: 0; opacity: 0; transition: opacity .3s ease; }
.rg-backdrop .ph { border-radius: 0; }
/* The wash never falls below 94% cream behind any copy: even a black image
   underneath keeps forest text above 9:1. Crossfading this pre-washed layer also
   protects contrast throughout the transition. Only the photo-only area fades clear. */
.rg-backdrop::after { content: ''; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(244, 241, 232, .98), rgba(244, 241, 232, .94) 59%, rgba(244, 241, 232, .15) 82%, transparent); }
.rg[data-state="launch"] .rg-photo { opacity: 0; }
.rg[data-state="launch"] .rg-backdrop { opacity: 1; }
.rg-cards { flex: 6 1 0; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: .85em; padding: 1em 1.4em 1.1em; }
.rg-card { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-radius: .4em; border: 1px solid transparent; transition: border-color .3s ease, background-color .3s ease; }
.rg-card:has(.rg-pin) { z-index: 2; }
.rg-card-in { flex: 1; min-height: 0; display: flex; flex-direction: column; opacity: 0; transition: opacity .3s ease; }
.rg-thumb { position: relative; flex: 1 1 0; min-height: 0; }
.rg-thumb .ph { border-radius: .35em .35em 0 0; }
.rg-card-txt { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .3em; padding: .65em .75em; }
/* All three cards share one photo row and one text row, so the photos are the same height
   and the titles line up even though only Trips has dates. */
@supports (grid-template-rows: subgrid) {
  .rg-cards { grid-template-rows: minmax(0, 1fr) auto; row-gap: 0; }
  .rg-card, .rg-card-in { grid-row: span 2; display: grid; grid-template-rows: subgrid; }
}
.rg-card-txt b { font: 700 1.08em/1.1 var(--rg-serif); }
.rg-detail { font-size: .78em; line-height: 1.3; }
.rg-dates { display: flex; gap: .45em; margin-top: .15em; opacity: 0; transform: translateY(.3em); transition: opacity .3s ease, transform .3s ease; }
.rg-dates span { padding: .25em .5em; border: 1px solid var(--rg-rule); border-radius: .25em; background: var(--rg-cream); font-size: .7em; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.rg[data-state="launch"] .rg-dates { opacity: 1; transform: none; }
.rg[data-state="review"] .rg-card, .rg[data-state="launch"] .rg-card { border-color: var(--rg-rule); background: var(--rg-card); }
.rg[data-state="review"] .rg-card-in, .rg[data-state="launch"] .rg-card-in { opacity: 1; }
/* The step-02 sketch, traced over the site. In Build the cards are still pencil; when the
   browser first arrives the nav and hero are pencil too for a moment, then fill in. */
.rg-sk { z-index: 2; color: var(--sx-graphite); }
.rg-sk g { transition: opacity .3s ease; }
.rg-sk .sk-nav, .rg-sk .sk-hero { opacity: 0; }
.rg[data-state="review"] .rg-sk .sk-cards, .rg[data-state="launch"] .rg-sk .sk-cards { opacity: 0; }
@keyframes rg-fill { 0%, 50% { opacity: 0; } 100% { opacity: 1; } }
@keyframes rg-unsketch { 0%, 50% { opacity: 1; } 100% { opacity: 0; } }
.rg.play[data-state="build"] .rg-nav, .rg.play[data-state="build"] .rg-copy, .rg.play[data-state="build"] .rg-photo { animation: rg-fill .6s ease both; }
.rg.play[data-state="build"] .rg-sk .sk-nav, .rg.play[data-state="build"] .rg-sk .sk-hero { animation: rg-unsketch .6s ease both; }
/* 05 Review: comments stay on the photos, clear of copy and actions. */
.rg-pin { position: absolute; z-index: 3; display: flex; align-items: center; gap: .4em; opacity: 0; transform: translateY(.4em); transition: opacity .3s ease, transform .3s ease; }
.rg[data-state="review"] .rg-pin { opacity: 1; transform: none; }
.rg-pin i { width: 1.9em; height: 1.9em; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--rg-orange); color: #fff; font: 700 .8em/1 Arial, Helvetica, sans-serif; box-shadow: 0 0 0 .18em #fff, 0 .4em .9em rgba(31, 58, 43, .35); }
.rg-pin span { padding: .5em .65em; border-radius: .4em; background: var(--rg-forest); color: #fff; font-size: .8em; font-weight: 500; line-height: 1.25; box-shadow: 0 .5em 1.2em -.4em rgba(31, 58, 43, .5); }
.rg-photo .rg-pin { left: .6em; right: .6em; bottom: .8em; align-items: flex-end; }
.rg-card .rg-pin { left: .6em; top: .65em; white-space: nowrap; }

/* 04–06: the generated site frames fill the browser's view. Moving between them (Build, Review,
   Launch) is a true dissolve: the incoming frame fades in on top while the outgoing one stays fully
   opaque underneath and only drops out once it is covered, so the site never looks half there. */
.rg-frame { position: absolute; z-index: 4; inset: 0; display: block; visibility: hidden; opacity: 0; transition: opacity .5s ease-in-out, visibility .5s; background: #F4F1E8; }
.rg-frame.on { z-index: 5; visibility: visible; opacity: 1; }
.bf:has(.rg-frame.on) .rg-frame:not(.on) { transition: opacity 0s .5s, visibility 0s .5s; }
.rg-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
@keyframes lbl-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbl-out { from { opacity: 1; } to { opacity: 0; } }
.bf[data-key="launch"] .bf-label.preview { opacity: 0; }
.bf.run[data-key="launch"] .bf-label.preview { animation: lbl-out .3s ease 1s both; }
.bf.run[data-key="launch"] .bf-label.live { animation: lbl-in .3s ease 1s both; }

/* Image slots: a CSS placeholder until the file is supplied (SAMPLE_SITE.images in index.html) */
.ph { position: absolute; inset: 0; overflow: hidden; border-radius: .8em; }
.ph::before, .ph::after { content: ''; position: absolute; inset: 0; }
.ph img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.ph-hero { background: radial-gradient(circle at 74% 26%, #FBF0CC 0 7%, rgba(251, 240, 204, 0) 8%), linear-gradient(180deg, #E6D9B8 0%, #F0E2C0 55%, #D6C59A 100%); }
.ph-hero::before { background: #7F9A83; clip-path: polygon(0 60%, 14% 48%, 27% 57%, 42% 38%, 58% 53%, 72% 43%, 88% 55%, 100% 46%, 100% 100%, 0 100%); }
.ph-hero::after { background: #2C4A38; clip-path: polygon(0 80%, 18% 66%, 33% 77%, 52% 62%, 70% 79%, 86% 68%, 100% 76%, 100% 100%, 0 100%); }
.ph-trips { background: linear-gradient(160deg, #557A5C 0%, #1F3A2B 100%); }
.ph-trips::before { background: #D8C79E; clip-path: polygon(34% 100%, 66% 100%, 57% 70%, 60% 48%, 55% 30%, 50% 30%, 52% 48%, 45% 70%); }
.ph-trips::after { inset: 0 0 62% 0; background: linear-gradient(180deg, #8FB08F, rgba(143, 176, 143, 0)); }
.ph-gear { background: repeating-linear-gradient(90deg, #CDB98F 0 19%, #B9A47A 19% 20%); }
.ph-gear::before { inset: 20% 52% 18% 14%; border-radius: 28% 28% 14% 14%; background: #2C4A38; }
.ph-gear::after { inset: 30% 16% 30% 58%; border-radius: 10%; background: var(--rg-orange); transform: rotate(-12deg); }
.ph-map { background: linear-gradient(115deg, transparent 46%, #FFFDF7 46% 52%, transparent 52%), linear-gradient(20deg, transparent 58%, #FFFDF7 58% 63%, transparent 63%), #DDE3CF; }
.ph-map::before { inset: 0 0 55% 62%; border-radius: 0 0 0 60%; background: #BFD0B4; }
.ph-map::after { z-index: 2; inset: 34% auto auto 44%; width: 12%; aspect-ratio: 1; border-radius: 50% 50% 50% 0; background: var(--rg-orange); transform: rotate(-45deg); box-shadow: 0 0 0 .15em #fff; }

/* Small frames (phones, narrow columns): tighter sample site so nothing is cut off */
@container (max-width: 460px) {
  .rg-nav { padding: .7em 1em; gap: .6em; }
  .rg-logo { font-size: 1em; gap: .4em; }
  .rg-links { gap: .7em; font-size: .72em; }
  .rg-book { padding: .5em .7em; }
  .rg-hero { padding: .8em 1em; }
  .rg-copy { width: 56%; gap: .5em; }
  .rg-h { font-size: 1.65em; }
  .rg-eyebrow { font-size: .62em; letter-spacing: .1em; }
  .rg-copy p { font-size: .8em; }
  .rg-photo { top: .8em; bottom: .8em; right: 1em; left: 60%; }
  .rg-actions { gap: .65em; }
  .rg-btn { font-size: .76em; padding: .8em .85em; }
  .rg-text-link { font-size: .7em; }
  .rg-cards { column-gap: .6em; padding: .8em 1em 1em; }
  .rg-card-txt { padding: .55em .5em; gap: .3em; }
  .rg-detail { font-size: .78em; }
  .rg-dates { gap: .3em; }
  .rg-dates span { padding: .25em .35em; }
  .rg-photo .rg-pin { left: .4em; right: .4em; bottom: .6em; gap: .3em; }
  .rg-pin span { font-size: .76em; }
  .rg-card .rg-pin { top: .5em; left: .5em; }
  .sk-label { font-size: 1.1em; }
  .bf-nav, .bf-tools { display: none; }
  .bf-chrome { gap: 10px; padding: 0 10px; }
}
/* Shorter stages: the site
   sheds its smallest parts in steps so the headline, button and cards always fit. Heights are
   in em of the stage's own type size; wider stages set larger type, so they step down sooner. The sketch follows,
   since it is traced from the site. */
@container (max-height: 27em) or ((min-width: 461px) and (max-height: 30em)) {
  .rg-eyebrow, .rg-detail { display: none; }
}
@container (max-height: 23.5em) or ((min-width: 461px) and (max-height: 27em)) {
  .rg-copy p { display: none; }
  .rg-hero { flex-grow: 0; }
}
@container (max-height: 20em) or ((min-width: 461px) and (max-height: 22.5em)) {
  .rg-thumb { display: none; }
  .rg-cards { grid-template-rows: 0 minmax(0, 1fr); }
  .rg-hero { padding-top: .5em; padding-bottom: .5em; }
  .rg-cards { padding-top: .5em; padding-bottom: .6em; }
  .rg-card .rg-pin { top: auto; bottom: .35em; left: .35em; }   /* over the slot the trip dates take at launch */
}
/* Between phone and desktop the column is narrow, so the stage is square instead of 4:3 */
@media (max-width: 1000px) { .bf-view { aspect-ratio: 1 / 1; } }
/* Reduced motion: every step shows its finished state at once. setStage never adds .play
   there; this also covers the crossfades and hides the call timer, which would tick. */
@media (prefers-reduced-motion: reduce) {
  .p-step, .p-step *, .p-copy, .p-copy *, .p-copy *::before, .p-copy *::after, .p-stage, .p-stage *, .p-stage *::before, .p-stage *::after { transition: none !important; animation: none !important; }
  .call-time { display: none; }
}

.status { display: inline-flex; align-items: center; gap: 7px; font: 500 12px/1.2 var(--mono); color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dev); flex-shrink: 0; }
.status.live::before { background: var(--live); box-shadow: 0 0 0 3px var(--accent-soft); }
.status.alpha::before { background: var(--alpha); }

.chips { display: flex; align-items: center; gap: 6px; }
.chips[hidden], .filters[hidden] { display: none; }
.chips-label { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-right: 6px; }
/* ============ Sections ============ */
.section { padding: 96px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(34px, 4.6vw, 56px); margin-top: 14px; }
.section-head p { color: var(--muted); max-width: 420px; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.card { grid-column: span 4; display: flex; flex-direction: column; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; padding: 0; color: inherit; transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .3s, background .6s; }
.card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 24px 50px -30px var(--shadow); }
.card.hidden { display: none; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-media > * { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media > * { transform: scale(1.03); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.card-meta .n { color: var(--accent); }
.card h3 { font-size: 24px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.open-cue { font: 500 12px/1 var(--mono); color: var(--accent); }
@media (max-width: 980px) { .card { grid-column: span 6; } }
@media (max-width: 640px) { .card { grid-column: span 12; } .section { padding: 72px 0; } }


.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-grid h2 { font-size: clamp(34px, 4.6vw, 56px); margin-top: 14px; }
.contact-grid > div > p { color: var(--muted); font-size: 18px; margin: 18px 0 0; max-width: 480px; }
/* Who you're writing to, beside the form */
.guide { display: flex; align-items: center; gap: 16px; margin-top: 24px; max-width: 480px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: background .6s; }
.guide img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.guide-tag { display: block; margin-bottom: 4px; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.guide strong { display: block; font: 600 20px/1.2 var(--display); letter-spacing: -.01em; color: var(--ink); }
.guide-role { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.contact-grid > div > p strong { font-weight: 600; color: var(--ink); }
#contact-form { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
label.field { font: 500 14px/1.4 var(--body); color: var(--muted); display: grid; gap: 6px; }
input, textarea, select { font: 400 16px/1.5 var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.select { position: relative; display: block; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
label.field .opt { font: 400 12px/1 var(--body); letter-spacing: 0; text-transform: none; color: var(--faint); margin-left: 4px; }
label.field .field-hint { font: 400 13px/1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { min-height: 0; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
#form-message { font-size: 14px; padding: 12px 14px; border-radius: 10px; }
#form-message.ok { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
#form-message.err { background: rgba(200, 70, 50, .10); color: #A63A28; border: 1px solid rgba(200,70,50,.3); }
[data-theme="night"] #form-message.err { color: #F2A596; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 28px; } }

footer { border-top: 1px solid var(--line); padding: 44px 0 28px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; }
footer .foot-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px 32px; }
.foot-brand { display: contents; }
.foot-brand a { display: block; line-height: 0; }
.foot-brand img { width: 88px; height: auto; }
.foot-brand .logo-night { display: none; }
footer .foot-brand p { max-width: 46ch; }
footer p { margin: 0; color: var(--faint); font: 400 12px/1.6 var(--mono); letter-spacing: .06em; }
.foot-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.foot-nav a, .foot-bottom a { color: var(--muted); font: 500 12px/1.6 var(--mono); letter-spacing: .06em; text-decoration: none; transition: color .15s; }
.foot-nav a:hover, .foot-bottom a:hover { color: var(--ink); }
footer .foot-bottom { align-items: center; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  footer .foot-top { grid-template-columns: auto minmax(0, 1fr); }
  footer .foot-brand p { max-width: none; }
  .foot-nav { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 8px 26px; text-align: left; }
}
@media (max-width: 520px) {
  footer .foot-top { grid-template-columns: 1fr; gap: 18px; }
  .foot-brand img { width: 80px; }
  .foot-brand a { justify-self: center; }
  .foot-nav { grid-column: auto; }
}

/* ============ Personal builds: Side trails signpost ============
   A meadow photo with a wooden signpost standing in it, one sign per build. The post is sized to the
   photo's eye level (its top just above the horizon, the signs straddling it), and the wood and rocks
   are toned toward the photo's soft overcast light so they read as part of the scene. */
.builds {
  --st-scrim: 244, 241, 232; --st-shade: 0; --st-photo: none;
  --wood-tint: rgba(230, 224, 206, .3); --post-tint: rgba(0, 0, 0, 0);
  --sign-ink: #13200C; --sign-sub: #13200C; --sign-carve: rgba(255, 240, 214, .5); --nail: #5A4A3A;
  --sign-shadow: rgba(40, 28, 12, .28);
  --wood-grade: saturate(.8) contrast(.93) brightness(.97); --rock-grade: saturate(.82) brightness(.95) contrast(.94);
  position: relative; overflow: hidden; border-top: 1px solid var(--line);
}
[data-theme="night"] .builds {
  --st-scrim: 11, 23, 18; --st-shade: .62; --st-photo: saturate(.6);
  --wood-tint: rgba(14, 10, 5, .56); --post-tint: rgba(6, 10, 8, .55);
  --sign-ink: #F7ECD4; --sign-sub: #EADCBD; --sign-carve: rgba(0, 0, 0, .6); --nail: #2A2117;
  --sign-shadow: rgba(0, 0, 0, .5);
  --wood-grade: saturate(.85); --rock-grade: brightness(.42) saturate(.7);
}
.section.builds { padding: 0; }
.st-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.st-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 30%; filter: var(--st-photo); }
.st-scene::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(6, 14, 22, var(--st-shade)); transition: background-color .6s; }
/* A cream (night: forest) fade behind the copy, gone before it reaches the post */
.st-scene::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(var(--st-scrim), .94) 0%, rgba(var(--st-scrim), .82) 26%, rgba(var(--st-scrim), .25) 46%, rgba(var(--st-scrim), 0) 58%); }
/* The same scene again, only its bottom strip of meadow, drawn over the rocks */
.st-fore { z-index: 3; -webkit-mask-image: linear-gradient(to top, #000 0, #000 18px, transparent 58px); mask-image: linear-gradient(to top, #000 0, #000 18px, transparent 58px); }
.st-moon { position: absolute; z-index: 3; right: 9%; top: 64px; width: 48px; height: 48px; border-radius: 50%; box-shadow: inset 9px -12px 0 0 #F1EFE4; opacity: 0; transition: opacity .6s; }   /* lit on the lower left, horns point up-right like the toggle moon */
[data-theme="night"] .st-moon { opacity: .92; }

.st-wrap { position: relative; min-height: 864px; padding-top: 104px; display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 30px; align-items: center; }
.st-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.st-copy h2 { font-size: clamp(56px, 6vw, 84px); line-height: .95; letter-spacing: -.035em; font-weight: 700; }
.st-copy h2 span { color: var(--accent); }
.st-copy p { margin: 0; max-width: 34ch; color: var(--muted); font-size: 19px; line-height: 1.6; }
.st-cta { font: 600 17px/1.2 var(--display); color: var(--accent); text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid var(--alpha); transition: color .2s; }
.st-cta:hover { color: var(--ink); }

.st-post { position: relative; width: 700px; max-width: 100%; height: 530px; padding-top: 30px; display: flex; flex-direction: column; justify-self: center; align-self: end; }
.st-pole { position: absolute; left: calc(50% - 15px); top: 0; bottom: 30px; width: 30px; border-radius: 10px 10px 3px 3px; background-color: #9C7A4F; background-image: linear-gradient(var(--post-tint), var(--post-tint)), url(/assets/sidetrails/post.webp); background-size: auto 100%; background-position: 26% 0; box-shadow: inset -7px 0 9px rgba(0, 0, 0, .4), inset 4px 0 6px rgba(255, 236, 200, .1); filter: var(--wood-grade); }
.st-rocks { position: absolute; z-index: 1; left: calc(50% - 100px); bottom: 6px; width: 200px; height: auto; max-width: none; filter: var(--rock-grade); }
.st-post::after { content: ""; position: absolute; z-index: 1; left: calc(50% - 124px); bottom: 0; width: 248px; height: 32px; border-radius: 50%; background: radial-gradient(closest-side, var(--sign-shadow), transparent); }

/* One sign. The board is the arrow-shaped plank; its two nails sit over the post. */
.sign {
  --a: 26px; --half: 13px;
  position: relative; z-index: 2; display: block; width: max-content; max-width: calc(50% + var(--half)); padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--sign-ink);
  transform: rotate(var(--r)); filter: drop-shadow(3px 4px 4px var(--sign-shadow));
  transition: transform .35s cubic-bezier(.3, .7, .3, 1.3), filter .25s;
}
.sign + .sign { margin-top: -20px; }
.sign-l { margin-left: auto; margin-right: calc(50% - var(--half)); transform-origin: right center; }
.sign-r { margin-right: auto; margin-left: calc(50% - var(--half)); transform-origin: left center; }
.sign:hover { transform: rotate(calc(var(--r) * -1.6)) translateY(-2px); filter: drop-shadow(5px 7px 8px var(--sign-shadow)); }
.sign:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 6px; }
.board {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 60px; box-sizing: border-box;
  background-color: #CFAE7E; background-image: linear-gradient(var(--wood-tint), var(--wood-tint)), url(/assets/sidetrails/plank.webp); background-size: 900px auto; background-position: var(--grain);
  box-shadow: inset 0 -4px 0 rgba(40, 24, 8, .38), inset 0 1px 0 rgba(255, 236, 200, .28), inset 0 0 12px rgba(50, 30, 10, .25);
}
.sign-l .board { padding: 10px calc(14px + var(--half)) 10px calc(var(--a) + 10px); clip-path: polygon(var(--a) 0, 100% 0, 100% 100%, var(--a) 100%, 0 50%); }
.sign-r .board { padding: 10px calc(var(--a) + 10px) 10px calc(14px + var(--half)); clip-path: polygon(0 0, calc(100% - var(--a)) 0, 100% 50%, calc(100% - var(--a)) 100%, 0 100%); }
.board::before, .board::after { content: ""; position: absolute; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--nail); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .25); }
.board::after { top: auto; bottom: 7px; }
.sign-l .board::before, .sign-l .board::after { right: calc(var(--half) - 3px); }
.sign-r .board::before, .sign-r .board::after { left: calc(var(--half) - 3px); }
.board svg { width: 28px; height: 28px; flex-shrink: 0; }
.sign-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sign-name { font: 700 18px/1.08 var(--display); letter-spacing: -.015em; text-shadow: 0 1px 0 var(--sign-carve); }
.sign-kind { font: 600 12.5px/1.25 var(--body); color: var(--sign-sub); text-shadow: 0 1px 0 var(--sign-carve); }
@media (prefers-reduced-motion: reduce) { .sign { transition: none; } .sign:hover { transform: rotate(var(--r)); } }

/* Stacked: copy above the post; the fade now comes down from the top */
@media (max-width: 1180px) {
  .st-wrap { grid-template-columns: 1fr; gap: 48px; min-height: 0; padding-top: 80px; }
  .st-scene::after { background: linear-gradient(180deg, rgba(var(--st-scrim), .95) 0%, rgba(var(--st-scrim), .85) 30%, rgba(var(--st-scrim), 0) 52%); }
  .st-photo { object-position: 62% 30%; }
}
/* Phones: the same post, thinner, with half-width signs that show the name only */
@media (max-width: 760px) {
  .st-wrap { padding-top: 64px; gap: 40px; }
  .st-copy { gap: 20px; }
  .st-copy p { font-size: 17px; }
  .st-post { width: 100%; height: 580px; padding-top: 34px; }
  .st-pole { left: calc(50% - 11px); width: 22px; bottom: 26px; border-radius: 7px 7px 3px 3px; }
  .st-rocks { width: 150px; left: calc(50% - 75px); }
  .st-post::after { width: 186px; left: calc(50% - 93px); height: 24px; }
  .sign { --a: 18px; --half: 9px; width: calc(50% + var(--half) - var(--trim)); max-width: none; }
  .sign + .sign { margin-top: -15px; }
  .board { min-height: 50px; gap: 8px; padding-top: 9px; padding-bottom: 9px; }
  .sign-l .board { padding-left: calc(var(--a) + 10px); }
  .sign-r .board { padding-right: calc(var(--a) + 10px); }
  .board::before, .board::after { width: 5px; height: 5px; }
  .board svg { width: 22px; height: 22px; }
  .sign-name { font-size: 14px; }
  .sign-kind { display: none; }
}

.sites { display: grid; gap: 10px; }
.site { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.site .site-tag { font: 500 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.site.past .site-tag { color: var(--faint); }
.site a { font: 600 17px/1.3 var(--display); color: var(--ink); text-decoration: none; }
.site a:hover { color: var(--accent); text-decoration: underline; }
.drawer-content .site p { font-size: 14px; }

/* ============ Project drawer ============ */
dialog.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(720px, 100%); max-width: 100%; padding: 0; border: 0; border-left: 1px solid var(--accent-line); background: var(--surface); color: var(--text); overflow: hidden; }
dialog.drawer[open] { animation: slide .35s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
dialog.drawer::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.drawer-scroll { overflow-y: auto; flex: 1; }
.drawer-media { aspect-ratio: 16 / 10; border-bottom: 1px solid var(--line); overflow: hidden; }
.drawer-media > * { width: 100%; height: 100%; object-fit: cover; }
.drawer-media.website-preview { aspect-ratio: 16 / 9; }
.website-link-note { margin: -14px 0 24px; color: var(--muted); font-size: 13px; }
.drawer-content { padding: 28px 28px 40px; }
.drawer-content h2 { font-size: clamp(32px, 5vw, 44px); margin: 10px 0 12px; }
.drawer-content .lede { font-size: 18px; color: var(--text); margin: 0 0 20px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 24px; }
.facts div { background: var(--surface); padding: 12px 14px; }
.facts dt { font: 500 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.testimonial { margin: 24px 0 0; }
.testimonial blockquote { margin: 10px 0 0; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.testimonial .tq-pull { margin: 0; font: 600 19px/1.4 var(--display); color: var(--ink); }
.testimonial details { margin-top: 10px; }
.testimonial summary { cursor: pointer; font: 600 14px/1.4 var(--body); color: var(--accent); }
.testimonial details p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--text); }
.testimonial figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.testimonial figcaption strong { display: block; color: var(--ink); }
.facts dd { margin: 4px 0 0; font-size: 14px; color: var(--ink); }
.gallery { display: flex; gap: 12px; overflow-x: auto; margin: 0 0 24px; padding: 4px 0 14px; scroll-snap-type: x mandatory; }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: start; }
.gallery img { height: 340px; width: auto; border-radius: 18px; border: 1px solid var(--line); }
.gallery figure.watch img { height: 180px; border-radius: 34px; margin-top: 80px; }
.gallery figcaption { font: 500 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 8px; }
.drawer-content h4 { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 26px 0 10px; }
.drawer-content p { color: var(--muted); margin: 0; }
.drawer-content ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.drawer-content li { position: relative; padding-left: 22px; color: var(--muted); }
.drawer-content li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border: 1.5px solid var(--accent); transform: rotate(45deg); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack span { font: 500 12px/1 var(--mono); padding: 7px 10px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.drawer-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.drawer-nav { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.drawer-nav button { flex: 1; text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); cursor: pointer; font: 600 14px/1.3 var(--body); }
.drawer-nav button:last-child { text-align: right; }
.drawer-nav small { display: block; font: 500 10px/1.4 var(--mono); letter-spacing: .12em; color: var(--faint); text-transform: uppercase; }
.drawer-nav button:hover:not(:disabled) { border-color: var(--accent); }
.drawer-nav button:disabled { opacity: .3; cursor: default; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } .drawer-content { padding: 22px 18px 32px; } .gallery img { height: 280px; } .gallery figure.watch img { margin-top: 60px; } }

/* ============ Test drive stage (inside the drawer) ============
   The live product runs in an iframe inside a browser or phone frame, scaled to fit. */
dialog.drawer.staging { width: min(1320px, 100%); }
.drawer.staging .drawer-scroll, .drawer.staging .drawer-nav { display: none; }
.stage { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.stage[hidden] { display: none; }
.stage-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px 20px 12px; background: var(--surface-2); }
.stage-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stage-tools .spacer { flex: 1; }
.stage-tools .icon-btn { width: 38px; height: 38px; }
.stage-tools .chips[hidden] { display: none; }
.stage-tools .icon-btn[hidden], .s-tips[hidden] { display: none; }
.stage-view { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.s-box { position: relative; }
.s-inner { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.s-device { width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.s-device.desktop { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 24px 60px -20px var(--shadow); }
.s-bar { flex: 0 0 44px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.s-bar i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.s-url { margin: 0 auto; transform: translateX(-30px); font: 500 14px/1 var(--mono); color: var(--muted); padding: 8px 18px; border-radius: 8px; background: var(--surface-2); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-screen { flex: 1; min-height: 0; background: #fff; }
.s-screen iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.s-device.phone { padding: 12px; border-radius: 56px; background: #0E1210; box-shadow: 0 30px 70px -24px var(--shadow), inset 0 0 0 2px #2A302C; }
.s-device.phone .s-bar, .s-device.native .s-bar { display: none; }
.s-device.phone .s-screen { border-radius: 44px; overflow: hidden; }
.s-device.native { border-radius: 12px; border: 1px solid var(--line); }
.s-loading { position: absolute; inset: 0; display: grid; place-items: center; font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); pointer-events: none; animation: pulse 1.4s ease-in-out infinite; }
.s-loading[hidden] { display: none; }
.s-loading a { pointer-events: auto; }
@keyframes pulse { 50% { opacity: .35; } }
.stage-note { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.s-poster { position: relative; overflow: hidden; }
.s-poster img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.s-poster-cta { position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%); display: grid; justify-items: center; gap: 12px; padding: 20px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 50px -20px var(--shadow); text-align: center; max-width: calc(100% - 32px); }
.s-poster-cta p { margin: 0; font-size: 16px; color: var(--muted); }
.s-poster-cta .btn { padding: 16px 28px; font-size: 17px; border-radius: 12px; white-space: nowrap; }
.stage-side { min-height: 0; overflow-y: auto; padding: 28px 24px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.stage-side h3 { font: 600 26px/1.15 var(--display); color: var(--ink); margin: 0; }
.stage-side p { margin: 0; color: var(--muted); font-size: 15px; }
.s-tips summary { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); cursor: pointer; margin: 10px 0; }
.s-tips ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: tip; }
.s-tips li { position: relative; padding: 12px 12px 12px 44px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-size: 14px; line-height: 1.45; counter-increment: tip; transition: border-color .3s, background-color .3s; }
.s-tips li::before { content: counter(tip); position: absolute; left: 12px; top: 11px; width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid var(--accent-line); display: grid; place-items: center; font: 600 11px/1 var(--mono); color: var(--accent); }
.s-tips li.done { border-color: var(--accent-line); background: var(--accent-soft); }
.s-tips li.done::before { content: "✓"; background: var(--btn); border-color: var(--btn); color: var(--btn-text); }
.s-cta { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.s-cta p { font-size: 14px; margin-bottom: 10px; }
.s-cta .btn { width: 100%; }
.drawer-media { position: relative; }
.drawer-media > .s-play { position: absolute; left: 16px; bottom: 16px; width: auto; height: auto; box-shadow: 0 10px 30px -8px var(--shadow); }
@media (max-width: 760px) {
  dialog.drawer.staging { height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .stage-main { padding: 8px 10px; gap: 8px; }
  .stage-tools .chips, .stage-note { display: none; }
  .stage-side { border-left: 0; border-top: 1px solid var(--line); padding: 0 16px calc(8px + env(safe-area-inset-bottom)); max-height: 42dvh; gap: 8px; }
  .stage-side > .eyebrow, .stage-side > h3, .stage-side > p, .s-cta { display: none; }
  /* Screenshot fallback: show the whole (landscape) screenshot with the Visit website button under it */
  .s-poster { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 16px; background: var(--surface-2); }
  .s-poster img { height: auto; border-radius: 10px; border: 1px solid var(--line); }
  .s-poster-cta { position: static; transform: none; max-width: none; padding: 18px 16px; }
  .s-poster-cta .btn { width: 100%; }
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .s-loading { animation: none; }
  .ht-bob, .ht-flag path, .ht-birds, .ht-birds path { animation: none; }
  .ht-birds { display: none; }
}

/* ============ Phone layout (≤760px) ============
   How it works: the rail across the top, the browser frame under it, then the active step's text.
   Everything below only applies on phones; desktop is unchanged. */
.d-cta { display: none; }
@keyframes sheet { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 760px) {
  /* Hero: "Start a project" leads, full-width buttons */
  .hero { min-height: 0; padding: 28px 0 0; --scene-h: min(56%, 70vw); --mk: 2; }
  .hero-grid { gap: 20px; align-items: stretch; padding-bottom: 296px; }
  .ht-label { display: none; }
  .hero-log { display: none; }
  .hero-log > div { font-size: 11px; padding: 7px 11px; }
  .hero h1 { font-size: 42px; line-height: 1.02; margin-top: 14px; }
  .hero-sub { font-size: 16px; }
  /* How it works: the rail, preview and detail follow their reading order. */
  .process { padding: 14px 0; }
  /* The preview fills the remaining height. Larger text can grow the section naturally. */
  .process > .wrap { display: grid; grid-template: "head" auto "detail" auto "stage" minmax(190px, 1fr) "steps" auto "care" auto / minmax(0, 1fr); gap: 8px; min-height: min(636px, calc(100svh - var(--header-h) - 28px)); }
  .process-head { grid-area: head; margin: 0; gap: 4px; }
  .process-head h2 { font-size: clamp(24px, 6.8vw, 34px); }
  .process-cta { display: inline-flex; min-height: 44px; padding-inline: 11px; font-size: 13px; }
  .process-grid { display: contents; }
  .p-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; padding: 3px; }
  .p-tab { grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 3px 2px; text-align: center; }
  .p-tab .p-num { display: none; }
  .p-label { font: 600 clamp(10px, 2.8vw, 13px)/1.15 var(--display); overflow-wrap: anywhere; }
  .p-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .p-short { display: block; }
  .p-stage { align-self: stretch; display: flex; }
  .bf { flex: 1; min-width: 0; display: flex; flex-direction: column; --sx-shadow: 0 1px 3px -1px var(--shadow), 0 10px 18px -14px var(--shadow); }
  .bf-bar { flex: 0 0 32px; height: 32px; }
  .p-stage { padding: 8px; border-radius: 14px; }
  .bf { border-radius: 8px; }
  .bf-bar { gap: 8px; padding: 0 9px; }
  .bf-chrome .bf-nav, .bf-chrome .bf-tools { display: none; }
  .bf-dots { gap: 5px; }
  .bf-dots i { width: 8px; height: 8px; }
  .bf-title { padding-right: 38px; font-size: 11.5px; }
  .bf-url { height: 20px; font-size: 11px; }
  .bf-label { inset: 0 6px; gap: 4px; }
  .bf-reload { display: none; }
  .call-bar { gap: 7px; font-size: 11px; }
  .st-thread { padding: 2% 3%; }
  .doc { height: 90%; }
  .bf-view { flex: 1; min-height: 0; aspect-ratio: auto; max-height: none; }
  .p-detail { padding: 10px 14px 12px; border-radius: 14px; box-shadow: none; }
  .p-detail-head { align-items: center; margin-bottom: 2px; }
  .p-stepno { font-size: 10.5px; }
  .p-detail-head h3 { margin-top: 0; font-size: 21px; }
  .p-copy p { font-size: 14px; line-height: 1.55; }
  .p-copy .p-out { gap: 8px; margin-top: 8px; padding: 7px 10px; border-radius: 10px; font-size: 13px; }
  .p-toggle { padding-inline: 12px; }
  .p-copy { font-size: 15px; }
  #p-care { grid-area: care; }
  .p-care { margin: 0; padding-top: 8px; font-size: 13px; }

  /* Work: compact list (client tiles on top, apps as rows) */
  .section { padding: 56px 0; }
  .section-head h2, .contact-grid h2 { font-size: 32px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { grid-column: span 2; flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; min-height: 68px; }
  .card:hover { transform: none; }
  .card-media { width: 44px; height: 44px; aspect-ratio: auto; flex-shrink: 0; border-radius: 10px; border: 0; }
  .card-body { padding: 0; gap: 3px; flex: 1; min-width: 0; }
  .card-body p, .card-meta, .open-cue { display: none; }
  .card h3 { font-size: 17px; line-height: 1.15; }
  .card-foot { padding-top: 0; }
  .card::after { content: ""; width: 8px; height: 8px; flex-shrink: 0; margin-right: 4px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); }

  /* Base camp */
  .guide img { width: 64px; height: 64px; }
  .contact-grid > div > p { font-size: 16px; }
  form { padding: 18px; gap: 14px; }
  label.field { font: 500 14px/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--text); }
  input, textarea, select { padding: 13px 14px; border-radius: 12px; }
  select { padding-right: 40px; }
  #submit-btn { height: 54px; font-size: 16px; border-radius: 12px; }

  /* Menu: full-height sheet */
  .nav { top: var(--header-h); height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; border-bottom: 0; counter-reset: navn; }
  .nav a:not(.btn) { counter-increment: navn; display: flex; align-items: center; gap: 16px; height: 72px; padding: 0; border-bottom: 1px solid var(--line); font: 600 30px/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
  .nav a:not(.btn)::before { content: counter(navn, decimal-leading-zero); width: 22px; font: 500 12px/1 var(--mono); letter-spacing: 0; color: var(--accent); }
  .nav .btn { margin-top: auto; height: 56px; flex-shrink: 0; font-size: 17px; border-radius: 14px; }
  body.menu-open { overflow: hidden; }

  /* Project drawer: bottom sheet */
  dialog.drawer { margin: auto 0 0; width: 100%; height: calc(100dvh - 40px); max-height: calc(100dvh - 40px); border-left: 0; border-radius: 22px 22px 0 0; }
  dialog.drawer[open] { animation: sheet .35s cubic-bezier(.2,.8,.2,1); }
  .drawer-bar { position: relative; padding: 18px 8px 6px 16px; border-bottom: 0; }
  .drawer-bar::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line); }
  .drawer-bar .icon-btn { border: 0; }
  .drawer-content h2 { font-size: 30px; }
  .drawer-content .lede { font-size: 16px; }
  .gallery img { height: 250px; }
  .facts { gap: 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .facts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; background: none; border-bottom: 1px solid var(--line); }
  .facts dt { font: 400 14px/1.3 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
  .facts dd { margin: 0; font-weight: 500; text-align: right; }
  .drawer-links a:first-child { display: none; }
  .drawer-nav { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .drawer-nav button { flex: 0 0 52px; height: 52px; padding: 0; display: grid; place-items: center; }
  .drawer-nav button small, .drawer-nav button span { display: none; }
  .drawer-nav button::before { content: "←"; font: 600 18px/1 var(--body); }
  .drawer-nav #d-next::before { content: "→"; }
  .d-cta { display: block; flex: 1; min-width: 0; height: 52px; line-height: 52px; padding: 0 12px; text-align: center; font-size: 15px; border-radius: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .d-cta[hidden] { display: none; }

}

/* Scale the decorative scene details when the preview is short. */
@container (max-height: 195px) {
  .th { gap: .25em; font-size: clamp(9px, 6cqh, 11.5px); }
  .th-time { margin-bottom: .2em; }
  .th-out { margin-top: .35em; }
  .th-b { max-width: 84%; padding: .55em .75em; }
  .doc { height: 92%; gap: .7em; padding: 1em 1.1em; font-size: clamp(7px, 5cqh, 11px); }
  .doc-head { padding-bottom: .6em; }
  .doc-row { gap: .3em; }
  .sk-notes { gap: 2px; }
  .sk-label { margin-left: 0; font-size: .92em; }
}

@container (max-height: 145px) {
  .sk-notes { translate: 0 -6px; }
  .sk-label { font-size: .8em; }
}

@media (max-width: 359px) and (max-height: 600px) {
  .process { padding-block: 8px; }
  .process > .wrap { width: calc(100% - 24px); gap: 6px; min-height: calc(100svh - var(--header-h) - 16px); }
  .p-steps { padding: 2px; }
  .p-detail { padding: 6px 10px 8px; }
  .p-copy .p-out { margin-top: 4px; }
}

/* Shared additions: agency entry, explicit project links and accessible forms. */
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 12px 18px; background: var(--surface); color: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.agency-entry { padding: 36px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.agency-entry .wrap { display: flex; align-items: center; gap: 40px; justify-content: space-between; }
.agency-entry h2 { font-size: clamp(25px, 3vw, 36px); margin: 8px 0; }
.agency-entry p { color: var(--muted); max-width: 650px; margin: 0; }
.agency-entry .btn { flex-shrink: 0; min-height: 48px; }
#form-message:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
#submit-btn:disabled { opacity: .65; cursor: wait; }
.preview-notice { margin: 0; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14px; text-align: center; }
.form-note { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .agency-entry .wrap { flex-direction: column; align-items: flex-start; gap: 20px; } .agency-entry .btn { width: 100%; } }
/* Preserve the wordmark silhouette with readable contrast on the night background. */
[data-theme="night"] .brand img,
[data-theme="night"] .foot-brand .logo-day { display: none; }
[data-theme="night"] .foot-brand .logo-night { display: block; }
.nav .btn:hover { color: var(--btn-text); }
