/* Route 19 — site styles
   Tokens first, then base, layout, components, pages. Light is the default;
   dark applies when the device prefers it (no saved choice) or when
   data-theme="dark" is set by the toggle. */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo-var.woff2") format("woff2"); font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("../fonts/overpass-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-var.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #F7F5F0; --ink: #16150F; --muted: #5A574E; --rule: #D9D5CA; --rule-strong: #C9C4B8;
  --surface: #EFECE5; --ph: #E9E6DE; --ph-border: #8C877B; --accent: #1E5A48; --on-accent: #F7F5F0;
  --inv: #16150F; --on-inv: #F7F5F0; --on-inv-muted: #B9B4A8; --inv-rule: #34332F;
  --foot-bg: #16150F; --foot-fg: #F7F5F0; --foot-muted: #B9B4A8; --foot-rule: #34332F; --focus: #1E5A48;
  --alert-ok: #1E5A48;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-mark: "Overpass", var(--font-display);

  --wrap: 1200px;
  --gutter: 20px;
  --section: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1B1A; --ink: #EDEBE5; --muted: #A9A59B; --rule: #34332F; --rule-strong: #4A4944;
    --surface: #242423; --ph: #2C2C2A; --ph-border: #6E6A60; --accent: #7FC3A8; --on-accent: #16150F;
    --inv: #EEECE6; --on-inv: #16150F; --on-inv-muted: #4E4B43; --inv-rule: #C9C4B8;
    --foot-bg: #111110; --foot-fg: #EDEBE5; --foot-muted: #A9A59B; --foot-rule: #2A2A28; --focus: #7FC3A8;
    --alert-ok: #1E5A48;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1B1B1A; --ink: #EDEBE5; --muted: #A9A59B; --rule: #34332F; --rule-strong: #4A4944;
  --surface: #242423; --ph: #2C2C2A; --ph-border: #6E6A60; --accent: #7FC3A8; --on-accent: #16150F;
  --inv: #EEECE6; --on-inv: #16150F; --on-inv-muted: #4E4B43; --inv-rule: #C9C4B8;
  --foot-bg: #111110; --foot-fg: #EDEBE5; --foot-muted: #A9A59B; --foot-rule: #2A2A28; --focus: #7FC3A8;
  --alert-ok: #1E5A48;
  color-scheme: dark;
}

@media (min-width: 640px) { :root { --gutter: 40px; --section: 88px; } }
@media (min-width: 1100px) { :root { --gutter: 60px; --section: 112px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 1.125rem; line-height: 1.55; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: 4px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; font-stretch: 110%; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
[id] { scroll-margin-top: 24px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--inv); color: var(--on-inv); font-family: var(--font-display); font-weight: 600; }
.skip-link:focus { top: 12px; }

.eyebrow { font-family: var(--font-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.status-label { font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.lead { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem); line-height: 1.5; }
.h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1.06; }
.text-link { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 4px; background: var(--inv); color: var(--on-inv); font-family: var(--font-display); font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s; }
.btn:hover { background: var(--accent); color: var(--on-accent); }
.btn-large { min-height: 56px; padding: 0 28px; font-size: 1.125rem; }
.btn-on-band { background: var(--on-inv); color: var(--inv); }
.btn:disabled { opacity: .6; cursor: progress; }

.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun, [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html:not(.js) .theme-toggle, html:not(.js) .menu-btn { display: none; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 64px; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-mark); font-weight: 800; font-size: 1.375rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand .shield { width: 28px; height: 28px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 4px; background: transparent; color: var(--ink); font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600; cursor: pointer; transition: background-color .15s; }
.menu-btn:hover { background: var(--surface); }
.menu-btn svg { fill: currentColor; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; width: 100%; font-family: var(--font-display); font-size: 1rem; font-weight: 500; }
.js .site-nav:not([data-open]) { display: none; }
.js .site-nav[data-open] { flex-direction: column; align-items: stretch; padding: 8px 0 12px; }
.nav-link { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 22px; color: var(--ink); text-decoration: none; transition: background-color .15s; }
.nav-link:hover { background: var(--surface); color: var(--ink); }
.nav-link[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.site-nav .btn { margin-left: 12px; }
.js .site-nav[data-open] .btn { margin: 8px 0 0; }

@media (min-width: 900px) {
  .site-header-inner { min-height: 88px; flex-wrap: nowrap; }
  .brand { font-size: 1.5rem; }
  .brand .shield { width: 30px; height: 30px; }
  .header-actions { order: 3; }
  .menu-btn { display: none !important; }
  .site-nav, .js .site-nav:not([data-open]) { display: flex; width: auto; margin-left: auto; flex-wrap: nowrap; }
}

/* Sections */
.section { padding: var(--section) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-surface { background: var(--surface); border-top: 0 !important; }
.section-surface + .section { border-top: 0; }
.grid-12 { display: grid; gap: 24px; }
@media (min-width: 900px) { .grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); } }

/* Hero */
.hero { padding: clamp(48px, 8vw, 112px) 0 clamp(56px, 8vw, 120px); }
.hero-grid { display: grid; gap: 48px; align-items: end; }
.hero h1 { margin-top: 20px; font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem); line-height: 1.03; letter-spacing: -0.025em; }
.hero .lead { margin-top: 28px; max-width: 42rem; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.live-work { font-family: var(--font-display); }
.live-work .eyebrow { padding-bottom: 12px; }
.live-work ul { list-style: none; margin: 0; padding: 0; }
.live-work a { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.live-work li:first-child a { border-top-color: var(--ink); }
.live-work li:last-child a { border-bottom: 1px solid var(--rule); }
.live-work strong { font-size: 1.25rem; font-weight: 700; }
.live-work span { font-size: 0.875rem; color: var(--muted); }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
  .hero-main { grid-column: span 8; }
  .live-work { grid-column: 10 / span 3; }
}
@media (max-width: 639px) { .hero-actions .btn { width: 100%; } .hero-actions .text-link { margin: 0 auto; } }

/* Section heads */
.section-head { display: grid; gap: 16px 24px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head .eyebrow { margin-bottom: -4px; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .section-head > div { grid-column: span 7; display: grid; gap: 16px; }
  .section-head > p { grid-column: 8 / span 5; }
}

/* Screenshots */
.shot { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 6px; border: 1px solid var(--rule); object-fit: cover; object-position: top left; background: var(--ph); }
.shot-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; border: 1px dashed var(--ph-border); text-align: center; font-family: var(--font-display); color: var(--muted); }
.shot-kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.shot-label { font-size: 1rem; font-weight: 600; color: var(--ink); }
.shot-note { font-size: 0.875rem; }
.shot-portrait { aspect-ratio: 4 / 5; }
.shot-picture { display: block; }
.shot-picture-phone { width: 100%; max-width: 300px; margin: 0 auto; }
.shot-phone { aspect-ratio: 1170 / 2532; }
.shot-caption { margin-top: 10px; font-family: var(--font-display); font-size: 0.875rem; color: var(--muted); }

/* Work */
.work-feature { display: grid; gap: 28px; align-items: center; }
.work-text { display: grid; gap: 14px; align-content: start; }
.work-text h3 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); }
.work-summary { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); line-height: 1.3; font-weight: 600; }
.work-pair { display: grid; gap: 56px; margin-top: clamp(56px, 6vw, 72px); padding-top: clamp(56px, 6vw, 72px); border-top: 1px solid var(--rule); }
.work-pair .shot { margin-bottom: 12px; }
@media (min-width: 900px) {
  .work-feature { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
  .work-feature > .shot, .work-feature > .shot-picture { grid-column: span 7; }
  .work-feature .work-text { grid-column: 9 / span 4; }
  .work-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
}

/* Working together */
.offer-list { list-style: none; margin: 0; padding: 0; counter-reset: offer; }
.offer-list li { display: grid; grid-template-columns: 56px 1fr; gap: 10px 16px; padding: 28px 0; border-top: 1px solid var(--rule-strong); counter-increment: offer; }
.offer-list li:first-child { border-top-color: var(--ink); }
.offer-list li:last-child { border-bottom: 1px solid var(--rule-strong); }
.offer-list li::before { content: counter(offer, decimal-leading-zero); font-family: var(--font-display); font-weight: 700; color: var(--muted); }
.offer-list h3 { font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); font-weight: 700; font-stretch: 100%; letter-spacing: 0; }
.offer-list p { grid-column: 2; }
@media (min-width: 900px) {
  .together > .eyebrow-block { grid-column: span 4; }
  .together > .offer-list { grid-column: 6 / span 7; }
}
@media (max-width: 639px) { .offer-list li { grid-template-columns: 1fr; } .offer-list p { grid-column: 1; } }

/* Approach */
.steps { display: grid; gap: 32px; }
.steps > div { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 4px solid var(--ink); }
.steps h3 { font-size: 1.375rem; font-weight: 700; font-stretch: 100%; letter-spacing: 0; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }

/* About */
.about { display: grid; gap: 40px; }
.about-text { display: grid; gap: 22px; align-content: start; }
.about-text p:not(.eyebrow) { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem); }
@media (min-width: 900px) {
  .about { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
  .about .shot { grid-column: span 4; }
  .about-text { grid-column: 6 / span 6; }
}
@media (max-width: 899px) { .about .shot-portrait { max-width: 360px; } }

/* Contact band */
.band { background: var(--inv); color: var(--on-inv); --focus: var(--on-inv); }
.band a { color: var(--on-inv); }
.band a:hover { color: var(--on-inv); text-decoration-thickness: 3px; }
.band .eyebrow { color: var(--on-inv-muted); }
.band a.btn-on-band { color: var(--inv); }
.band .btn-on-band:hover, .band a.btn-on-band:hover { background: var(--accent); color: var(--on-accent); }
.contact { display: grid; gap: 40px; }
.contact-intro { display: grid; gap: 24px; align-content: start; }
.contact-intro h2 { font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem); line-height: 1.04; }
@media (min-width: 900px) {
  .contact { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
  .contact-intro { grid-column: span 5; }
  .contact-form { grid-column: 7 / span 6; }
}

/* Form */
.contact-form { display: grid; gap: 20px; font-family: var(--font-display); }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9375rem; font-weight: 600; }
.field-help { font-size: 0.875rem; line-height: 1.45; color: var(--on-inv-muted); }
.field input, .field textarea { width: 100%; padding: 0 14px; min-height: 52px; border: 1px solid var(--on-inv-muted); border-radius: 4px; background: transparent; color: var(--on-inv); font: inherit; font-size: 1.0625rem; }
.field textarea { padding: 12px 14px; min-height: 170px; resize: vertical; line-height: 1.5; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }
.field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { justify-self: start; }
@media (max-width: 639px) { .contact-form .btn { justify-self: stretch; } }
.form-status:empty { display: none; }
.form-status { font-size: 0.9375rem; }
.contact-email { padding-top: 16px; border-top: 1px solid var(--inv-rule); font-size: 1rem; }
.contact-email a { font-weight: 600; }
.contact-privacy { font-size: 0.8125rem; line-height: 1.5; color: var(--on-inv-muted); }
.form-alert { display: none; margin: 0; padding: 14px 16px; border-left: 4px solid #B3261E; border-radius: 2px; background: var(--on-inv); color: var(--inv); font-size: 1rem; line-height: 1.45; }
.form-alert a { color: inherit !important; font-weight: 700; }
.form-alert:target, .form-alert[data-visible] { display: block; }
.form-alert-ok { border-left-color: var(--alert-ok); }

/* Footer */
.site-footer { background: var(--foot-bg); color: var(--foot-muted); --focus: var(--foot-fg); font-family: var(--font-display); font-size: 0.9375rem; }
.site-footer-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 32px; padding-bottom: 32px; border-top: 1px solid var(--foot-rule); }
.site-footer a { color: var(--foot-fg); }
.footer-name { color: var(--foot-fg); font-weight: 600; }

/* Case study */
.cs-head { padding: clamp(24px, 4vw, 56px) 0 clamp(32px, 4vw, 64px); }
.breadcrumb { display: flex; gap: 8px; min-height: 44px; align-items: center; font-family: var(--font-display); font-size: 0.9375rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.cs-head .status-label { margin-top: clamp(16px, 4vw, 48px); }
.cs-head h1 { margin-top: 18px; max-width: 65rem; font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4.25rem); line-height: 1.04; letter-spacing: -0.025em; }
.cs-head .lead { margin-top: 24px; max-width: 47.5rem; }
.facts { margin: 40px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; padding-top: 20px; border-top: 1px solid var(--ink); font-family: var(--font-display); }
.facts div { display: grid; gap: 6px; align-content: start; }
.facts dt { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 1.0625rem; font-weight: 600; }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cs-body { padding: clamp(56px, 8vw, 112px) 0 0; display: grid; gap: clamp(40px, 6vw, 88px); }
.cs-section { display: grid; gap: 20px 24px; }
.cs-section > h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); line-height: 1.15; font-stretch: 108%; letter-spacing: -0.01em; }
.cs-section > p { font-size: clamp(1.125rem, 1.08rem + 0.2vw, 1.25rem); line-height: 1.6; }
.cs-section.ruled { padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--rule); }
@media (min-width: 900px) {
  .cs-section { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cs-section > h2 { grid-column: 1 / span 4; }
  .cs-section > p { grid-column: 6 / span 7; }
}
.figure-pair { display: grid; gap: 24px; }
.figure-pair figure { margin: 0; display: grid; gap: 12px; }
.figure-pair figcaption { font-family: var(--font-display); font-size: 0.9375rem; color: var(--muted); }
@media (min-width: 900px) { .figure-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cs-cta { margin-top: clamp(56px, 8vw, 112px); padding: clamp(40px, 5vw, 72px) clamp(20px, 5vw, 80px); display: grid; gap: 24px; align-items: end; }
.cs-cta h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); line-height: 1.06; }
.cs-cta-text { display: grid; gap: 16px; }
.cs-cta-actions { display: grid; gap: 14px; justify-items: start; font-family: var(--font-display); font-size: 0.9375rem; color: var(--on-inv-muted); }
@media (min-width: 900px) {
  .cs-cta { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cs-cta-text { grid-column: span 7; }
  .cs-cta-actions { grid-column: 9 / span 4; }
}
@media (max-width: 899px) { .cs-cta { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); } }
.more-work { padding: clamp(48px, 6vw, 88px) 0 clamp(56px, 6vw, 96px); }
.more-work-list { display: grid; gap: 8px 24px; margin-top: 24px; font-family: var(--font-display); }
.more-work-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-top: 2px solid var(--ink); text-decoration: none; }
.more-work-list strong { display: block; font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.875rem); font-weight: 800; font-stretch: 108%; }
.more-work-list .more-label { display: block; margin-top: 4px; font-size: 0.9375rem; color: var(--muted); }
.more-work-list .arrow { font-size: 1.5rem; color: inherit; }
@media (min-width: 900px) { .more-work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.product-link { font-family: var(--font-display); font-size: 1.0625rem; }

/* 404 */
.not-found { padding: clamp(64px, 10vw, 140px) 0; display: grid; gap: 20px; }
.not-found h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 4rem); }
.eyebrow-block .h2 { margin-top: 16px; }
.section.band { border-top: 0; }
.cs-hero-shot { margin: 0; }
.figure-pair-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.figure-pair-phones figcaption { max-width: 300px; margin: 0 auto; width: 100%; }
.about-text .about-links { font-family: var(--font-display); font-size: 1rem; color: var(--muted); }
.nowrap { white-space: nowrap; }
.turnstile-slot:empty { display: none; }
