/* Freelance homepage (from Mockups/freelance/homepage-v3.html).
   v3: Direction A with more character (editorial type, serif accents, sharper corners)
   and a set of calm, professional scroll effects. Most effects are desktop-only (>= 900px; phones get the process steps and swipeable service cards)
   and switch off for prefers-reduced-motion; content is always readable without JS. */
:root {
  --ink: #17241e; --body: #3b4a43; --muted: #68766f; --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --paper: #f6f4ee; --accent: #2f6b4f; --accent-light: #9fd1b4; --on-dark: #bfccc5; --error: #b42318;
  --gutter: clamp(20px, 5vw, 72px); --ease: cubic-bezier(.2,.8,.2,1);
  --sans: 'Plus Jakarta Sans', system-ui, sans-serif; --serif: 'Lora', Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; } /* in-page links land below the sticky nav */
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; font-stretch: 100%; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.h2 { margin: 0; font-size: clamp(36px, 5vw, 72px); font-weight: 600; font-stretch: 104%; letter-spacing: -0.03em; line-height: .98; }
.h2 .serif { color: var(--accent); font-size: 1.08em; }
.lede { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.6; color: var(--body); max-width: 52ch; }
/* Even line breaks: no single word left alone on a heading's last line */
.h2, .how-h, .svc-card h3, .contact-h, .about-text, .sent h3 { text-wrap: balance; overflow-wrap: break-word; }
p { text-wrap: pretty; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 6px; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--ink); transition: background .25s, color .25s; }
@media (hover: hover) { .btn:hover { background: var(--ink); color: #fff; } }
.btn--solid { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (hover: hover) { .btn--solid:hover { background: var(--ink); border-color: var(--ink); } }
.arr { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: translate .3s var(--ease); }
@media (hover: hover) { .btn:hover .arr { translate: 3px 0; } }
section { padding: clamp(80px, 10vw, 150px) 0; }
.ph { display: grid; place-items: center; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 6%, var(--paper)) 0 12px, color-mix(in srgb, var(--ink) 9%, var(--paper)) 12px 24px); color: var(--muted); font: 12px ui-monospace, monospace; text-align: center; }

.progress { position: fixed; inset: 0 0 auto; height: 3px; background: var(--accent); transform-origin: 0 50%; scale: 0 1; z-index: 50; }

/* Nav */
nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { font-weight: 800; letter-spacing: -0.025em; text-transform: none; font-size: 20px; line-height: 1; white-space: nowrap; }
.brand .s { color: var(--accent); margin-left: .25em; }
/* DS mark, a thin line, then the wordmark */
.brand { display: inline-flex; align-items: center; }
.brand-mark { height: 30px; width: auto; flex: none; }
.brand-word { align-self: stretch; display: flex; align-items: center; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); }
.links { display: flex; gap: 32px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 1099px) { .links { gap: 18px; } } /* room for "Start a conversation" on small laptops */
.links a { position: relative; }
.links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor; scale: 0 1; transform-origin: 0 50%; transition: scale .35s var(--ease); }
.links a.on::after { scale: 1 1; }
@media (hover: hover) { .links a:hover::after { scale: 1 1; } }
nav .btn { padding: 11px 18px; font-size: 12px; white-space: nowrap; flex: none; }

/* Hero: masked line reveal on load, hand-drawn underline, gentle parallax on scroll */
.hero { padding-top: clamp(56px, 9vw, 130px); padding-bottom: clamp(48px, 6vw, 80px); }
.hero h1 { margin: 0; font-size: clamp(46px, 7.6vw, 124px); font-weight: 600; font-stretch: 106%; letter-spacing: -0.035em; line-height: .94; }
.line { display: block; overflow: hidden; padding-bottom: .24em; margin-bottom: -.18em; } /* room for descenders (y) and the underline */
.line > span { display: inline-block; }
.js .line > span { translate: 0 105%; transition: translate 1.1s var(--ease); }
.js .hero.in .line > span { translate: 0 0; }
.hero .line:nth-child(2) > span { transition-delay: .1s; }
.hero .line:nth-child(3) > span { transition-delay: .2s; }
.accent-word { position: relative; color: var(--accent); white-space: nowrap; }
/* Hero hover (mouse only): JS wraps each letter; letters near the cursor lift and turn green (--l goes 0 to 1) */
.hero .w, .hero .ch { display: inline-block; }
.hero .ch { color: color-mix(in srgb, var(--accent) calc(var(--l, 0) * 100%), currentColor); }
.hero-foot { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.js .fade { opacity: 0; translate: 0 24px; transition: opacity .9s, translate 1s var(--ease); }
.js .in .fade, .js .fade.in { opacity: 1; translate: 0 0; }
.js .hero .fade { transition-delay: .5s; }

/* Services band: slow serif marquee */
.band { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: #fff; }
.band div { white-space: nowrap; width: max-content; font-family: var(--serif); font-style: italic; font-size: clamp(30px, 4vw, 56px); line-height: 1; will-change: transform; }
.band .dot { display: inline-block; width: .16em; height: .16em; margin: 0 .7em; border-radius: 50%; background: var(--accent); vertical-align: middle; }

/* Services: two cards with small drawings (from the v5 "Fun" exploration, made flat and clean), the upkeep note under them */
.svc-grid { --pop: cubic-bezier(.34,1.56,.64,1); --hair: 1.5px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 24px); margin-top: clamp(40px, 5vw, 72px); }
.svc-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 18px; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .3s, translate .35s var(--ease); }
/* Lift only for a mouse hover or keyboard focus, so a tap on a phone doesn't leave the card stuck up */
.svc-card:has(:focus-visible) { border-color: color-mix(in srgb, var(--ink) 32%, transparent); translate: 0 -4px; }
@media (hover: hover) { .svc-card:hover { border-color: color-mix(in srgb, var(--ink) 32%, transparent); translate: 0 -4px; } }
.svc-card--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.svc-card--accent:has(:focus-visible) { border-color: var(--accent); }
@media (hover: hover) { .svc-card--accent:hover { border-color: var(--accent); } }
.svc-card h3 { margin: 8px 0 0; font-size: clamp(30px, 3.4vw, 48px); font-weight: 850; font-stretch: 115%; letter-spacing: -0.035em; line-height: 1; }
.svc-card p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--body); max-width: 44ch; }
.svc-card--accent p { color: #fff; }
.svc-btn { justify-self: start; align-self: end; display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 8px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: .01em; transition: background .25s, color .25s; }
@media (hover: hover) { .svc-btn:hover { background: var(--ink); color: #fff; } }
@media (hover: hover) { .svc-btn:hover .arr { translate: 3px 0; } }
.svc-btn--ink { background: var(--ink); color: #fff; }
@media (hover: hover) { .svc-btn--ink:hover { background: var(--accent); } }
.svc-btn:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }

/* Drawings: a small Mac-style browser window and app window, all on one 1px line weight */
.ill { height: 220px; padding: 24px 24px 0; border-radius: 12px; overflow: hidden; background: var(--paper); color: var(--ink); }
.svc-card--accent .ill { background: var(--accent-light); }
.svc-card:not(.svc-card--accent) .ill { border: 1px solid var(--line); }
.win { height: calc(100% + 1px); display: flex; flex-direction: column; background: #fff; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-bottom: 0; border-radius: 10px 10px 0 0; overflow: hidden; }
.win-bar { position: relative; flex: none; display: flex; align-items: center; justify-content: center; height: 30px; padding: 0 10px; background: color-mix(in srgb, var(--ink) 5%, var(--paper)); border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.lights { position: absolute; left: 11px; display: flex; gap: 6px; }
.lights i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.url { display: inline-flex; align-items: center; gap: 5px; width: 52%; justify-content: center; height: 18px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 7%, transparent); font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.url svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.title { font-size: 11px; font-weight: 600; color: var(--body); }

/* Browser page */
.site { flex: 1; padding: 0 16px; }
.site-nav { display: flex; align-items: center; justify-content: space-between; height: 30px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.site-nav b { width: 46px; height: 7px; border-radius: 2px; background: var(--ink); }
.site-nav span { display: flex; gap: 8px; }
.site-nav i { width: 20px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 20%, transparent); }
.site-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; padding-top: 16px; }
.site-copy { display: flex; flex-direction: column; gap: 6px; }
.site-copy b { height: 9px; border-radius: 2px; background: var(--ink); width: 92%; }
.site-copy b + b { width: 64%; margin-bottom: 4px; }
.site-copy i { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 16%, transparent); width: 86%; }
.site-copy i + i { width: 70%; }
.site-copy u { margin-top: 6px; width: 52px; height: 16px; border-radius: 4px; background: var(--accent); transition: width .4s var(--pop); }
.site-pic { height: 92px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--accent-light) 45%, #fff); }
.site-pic svg { width: 100%; height: 100%; display: block; fill: var(--accent-light); transition: translate .5s var(--pop); }
.site-pic circle { fill: var(--accent); }
/* Drawing reactions: mouse hover or keyboard focus only (no effects on touch screens) */
.svc-card:has(:focus-visible) .site-copy u { width: 66px; }
.svc-card:has(:focus-visible) .site-pic svg { translate: 0 -3px; }
@media (hover: hover) {
  .svc-card:hover .site-copy u { width: 66px; }
  .svc-card:hover .site-pic svg { translate: 0 -3px; }
}

/* App window: sidebar + a short list of jobs */
.app { flex: 1; display: grid; grid-template-columns: 54px 1fr; }
.app-side { display: flex; flex-direction: column; gap: 8px; padding: 12px 10px; background: color-mix(in srgb, var(--ink) 3%, var(--paper)); border-right: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.app-side i { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
.app-side i.on { background: var(--accent); }
.app-side i:nth-child(3) { width: 75%; }
.app-main { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.app-head { display: flex; align-items: center; justify-content: space-between; height: 18px; margin-bottom: 2px; }
.app-head b { width: 64px; height: 7px; border-radius: 2px; background: var(--ink); }
.app-head u { width: 34px; height: 14px; border-radius: 4px; background: var(--accent); }
.row { display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px; border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); border-radius: 6px; }
.row i { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 20%, transparent); }
.row em { margin-left: auto; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); font-size: 8.5px; font-style: normal; font-weight: 600; color: var(--muted); transition: background .3s, color .3s; }
.tick { flex: none; display: grid; place-items: center; width: 11px; height: 11px; border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius: 3px; transition: background .3s, border-color .3s; }
.tick svg { width: 9px; height: 9px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 10; stroke-dashoffset: 10; transition: stroke-dashoffset .35s var(--ease) .1s; }
.row.done .tick, .svc-card:has(:focus-visible) .row.flip .tick { background: var(--accent); border-color: var(--accent); }
.row.done .tick svg, .svc-card:has(:focus-visible) .row.flip .tick svg { stroke-dashoffset: 0; }
.row.done em, .svc-card:has(:focus-visible) .row.flip em { background: color-mix(in srgb, var(--accent-light) 40%, #fff); color: var(--accent); }
@media (hover: hover) {
  .svc-card:hover .row.flip .tick { background: var(--accent); border-color: var(--accent); }
  .svc-card:hover .row.flip .tick svg { stroke-dashoffset: 0; }
  .svc-card:hover .row.flip em { background: color-mix(in srgb, var(--accent-light) 40%, #fff); color: var(--accent); }
}
.svc-note { margin: clamp(32px, 4vw, 48px) 0 0; max-width: 60ch; color: var(--muted); font-size: 15px; line-height: 1.6; }
/* Dots under the swipeable cards (phones only) */
.svc-dots { display: none; }
@media (prefers-reduced-motion: reduce) { .svc-card, .svc-btn, .site-copy u, .site-pic svg, .tick, .tick svg, .row em { transition: none; } .svc-card:hover, .svc-card:has(:focus-visible) { translate: none; } }

/* How I work: dark section. On desktop it pins while you scroll and steps through
   Listen, Plan, Build, Launch; the active word lights up and its details show on the right.
   Mobile, reduced motion and no-JS get a plain stacked list. */
#services { border-top: 1px solid var(--line); }
.how { background: var(--ink); color: #fff; }
.how + #work { border-top: 1px solid color-mix(in srgb, #fff 10%, transparent); }
.how-h { margin: 0 0 clamp(24px, 3vw, 40px); font-size: clamp(28px, min(3.2vw, 5.5vh), 44px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: #fff; }
.step { display: grid; gap: 16px; padding: 28px 0; border-top: 1px solid color-mix(in srgb, #fff 14%, transparent); }
.step h3 { margin: 0; padding: .04em 0; font-size: clamp(44px, min(5.6vw, 10vh), 88px); font-weight: 800; letter-spacing: -0.03em; line-height: .95; text-transform: uppercase; color: var(--paper); }
.step-body { max-width: 46ch; }
.step p { margin: 0; }
.step .k { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--accent-light); }
.step .do { font-size: clamp(19px, 1.6vw, 24px); font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; color: #fff; }
.step .you { margin-top: 20px; font-size: 17px; line-height: 1.6; color: var(--on-dark); }
.how-bar { display: none; }
/* Phone version of the desktop effect (JS adds .pin-m on phones taller than 560px, motion on):
   the section pins, the four words stack, the current one lights up and grows, its details fade in
   underneath, and a progress bar fills along the bottom. Short/landscape screens and reduced motion get the plain list. */
.how.pin-m { padding: 0; }
.pin-m .how-track { height: 320vh; height: 320svh; }
.pin-m .how-stage { position: sticky; top: 60px; height: calc(100vh - 60px); height: calc(100svh - 60px); display: flex; flex-direction: column; justify-content: center; }
.pin-m .how-h { margin-bottom: clamp(12px, 2.5svh, 24px); }
.pin-m .how-steps { display: grid; grid-template-columns: minmax(0, 1fr); }
.pin-m .step { display: contents; }
.pin-m .step h3 { grid-column: 1; justify-self: start; font-size: clamp(30px, min(12vw, 7svh), 52px); color: color-mix(in srgb, #fff 12%, var(--ink)); transform-origin: 0 60%; transition: color .5s, scale .6s var(--ease), translate .6s var(--ease); }
.pin-m .step:nth-child(2) h3 { grid-row: 2; } .pin-m .step:nth-child(3) h3 { grid-row: 3; } .pin-m .step:nth-child(4) h3 { grid-row: 4; }
.pin-m .step.past h3 { color: color-mix(in srgb, #fff 30%, var(--ink)); }
.pin-m .step.on h3 { color: var(--paper); scale: 1.1; translate: 8px 0; }
.pin-m .step-body { grid-column: 1; grid-row: 5; margin-top: clamp(16px, 3svh, 28px); opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity .45s, translate .6s var(--ease); }
.pin-m .step.on .step-body { opacity: 1; translate: 0 0; pointer-events: auto; }
.pin-m .step .do { font-size: 18px; }
.pin-m .step .you { margin-top: 12px; font-size: 16px; }
.pin-m .how-bar { display: block; height: 3px; margin-top: clamp(20px, 4svh, 40px); border-radius: 2px; overflow: hidden; background: color-mix(in srgb, #fff 14%, transparent); }
.pin-m .how-bar i { display: block; height: 100%; background: var(--accent-light); transform-origin: 0 50%; scale: 0 1; }
@media (min-width: 900px) and (min-height: 560px) and (prefers-reduced-motion: no-preference) {
  .js .how { padding: 0; }
  .js .how-track { height: 360vh; }
  .js .how-stage { position: sticky; top: 72px; height: calc(100vh - 72px); display: flex; flex-direction: column; justify-content: center; }
  .js .how-steps { display: grid; grid-template-columns: 5fr 7fr; column-gap: clamp(40px, 6vw, 112px); align-items: center; }
  .js .step { display: contents; }
  .js .step h3 { grid-column: 1; justify-self: start; color: color-mix(in srgb, #fff 12%, var(--ink)); transform-origin: 0 60%; transition: color .5s, scale .6s var(--ease), translate .6s var(--ease); }
  .js .step:nth-child(2) h3 { grid-row: 2; } .js .step:nth-child(3) h3 { grid-row: 3; } .js .step:nth-child(4) h3 { grid-row: 4; }
  .js .step.past h3 { color: color-mix(in srgb, #fff 30%, var(--ink)); }
  .js .step.on h3 { color: var(--paper); scale: 1.14; translate: 14px 0; }
  .js .step-body { grid-column: 2; grid-row: 1 / span 4; opacity: 0; translate: 0 16px; pointer-events: none; transition: opacity .45s, translate .6s var(--ease); }
  .js .step.on .step-body { opacity: 1; translate: 0 0; pointer-events: auto; }
  .js .how-bar { display: block; height: 3px; margin-top: clamp(40px, 5vw, 64px); border-radius: 2px; overflow: hidden; background: color-mix(in srgb, #fff 14%, transparent); }
  .js .how-bar i { display: block; height: 100%; background: var(--accent-light); transform-origin: 0 50%; scale: 0 1; }
}

/* Work teaser: dark band; thumbnails fan out as the section scrolls into view */
#work { background: var(--ink); color: #fff; }
#work .h2 .serif { color: var(--accent-light); }
#work .lede { color: var(--on-dark); }
@media (hover: hover) { #work .btn--solid:hover { background: #fff; border-color: #fff; color: var(--ink); } }
#work .btn:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }
#work .mini-quote { border-left-color: var(--accent-light); }
#work .mini-quote small { color: var(--on-dark); }
#work .fan .ph { box-shadow: none; }
.teaser { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.teaser .lede { margin: 20px 0 32px; }
.fan { position: relative; height: clamp(300px, 32vw, 440px); }
.fan .ph { position: absolute; left: 50%; top: 50%; width: 58%; aspect-ratio: 4 / 3; border: 8px solid #fff; box-shadow: 0 24px 50px color-mix(in srgb, var(--ink) 14%, transparent); translate: -50% -50%; will-change: transform; }
/* Resting fan for phones, reduced motion and no-JS (the desktop scroll effect overrides it) */
.fan .ph:nth-child(1) { transform: translate(-26%, -6%) rotate(-6deg); }
.fan .ph:nth-child(2) { transform: translate(24%, -12%) rotate(5deg); }
.fan .ph:nth-child(3) { transform: translate(0, 10%) rotate(-1deg); z-index: 2; }
.mini-quote { margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.2; border-left: 2px solid var(--accent); padding-left: 18px; }
.mini-quote small { display: block; margin-top: 10px; font-family: var(--sans); font-size: 13px; color: var(--muted); }

/* About: photo wipes in */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 112px); align-items: center; }
.about .ph { aspect-ratio: 4 / 5; }
.js .wipe { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); }
.js .wipe.in { clip-path: inset(0 0 0 0); }
.about-text { margin: 0; font-size: clamp(24px, 2.6vw, 38px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.18; }
.about-text .serif { color: var(--accent); }

/* Contact: centred heading (lines slide in from opposite sides), one clean white card with the form */
.contact { background: var(--ink); color: #fff; overflow: hidden; }
.contact-in { max-width: 760px; margin: 0 auto; text-align: center; }
.contact-h { margin: 0; font-size: clamp(44px, 7vw, 112px); font-weight: 600; letter-spacing: -0.035em; line-height: .95; }
.contact-h span { display: block; will-change: translate; }
.contact-h .serif { color: var(--accent-light); font-size: 1.05em; }
.contact-sub { margin: 22px auto 0; max-width: 46ch; color: var(--on-dark); font-size: 17px; line-height: 1.6; }
.c-card { margin-top: clamp(36px, 5vw, 56px); padding: clamp(22px, 3.5vw, 40px); background: #fff; color: var(--ink); border-radius: 20px; text-align: left; }
.c-card [hidden] { display: none !important; }
.c-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.c-form .full { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.float { position: relative; display: block; }
.float input, .float textarea { width: 100%; padding: 26px 16px 10px; border: 1px solid transparent; border-radius: 12px; background: var(--paper); font: 16px var(--sans); color: var(--ink); transition: border-color .2s, background .2s; }
.float textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.float input:focus, .float textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.float span { position: absolute; left: 17px; top: 18px; color: var(--muted); font-size: 16px; pointer-events: none; transform-origin: 0 0; transition: translate .2s var(--ease), scale .2s var(--ease), color .2s; }
.float :is(input, textarea):focus + span, .float :is(input, textarea):not(:placeholder-shown) + span { translate: 0 -10px; scale: .72; color: var(--accent); }
.float [aria-invalid="true"] { border-color: var(--error); }
.err { display: none; margin-top: 6px; font-size: 13px; color: var(--error); }
[aria-invalid="true"] ~ .err { display: block; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.seg legend { width: 100%; margin-bottom: 8px; padding: 0; font-size: 14px; color: var(--muted); }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; padding: 10px 16px; border-radius: 999px; background: var(--paper); font-size: 14px; font-weight: 500; transition: background .2s, color .2s; }
.seg input:checked + span { background: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.c-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.c-foot small { color: var(--muted); font-size: 13px; }
.send { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 26px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 600 15px var(--sans); cursor: pointer; transition: background .25s; }
@media (hover: hover) { .send:hover { background: var(--ink); } }
@media (hover: hover) { .send:hover .arr { translate: 3px 0; } }
.send:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.send:disabled { opacity: .7; cursor: progress; }
.form-err { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-left: 3px solid var(--error); background: color-mix(in srgb, var(--error) 7%, transparent); font-size: 15px; line-height: 1.5; }
.form-err a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.sent { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; }
.sent:focus { outline: none; }
.sent-mark { width: 52px; height: 52px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sent-mark * { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s var(--ease) forwards; }
.sent-mark path { animation-delay: .35s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sent h3 { margin: 0; font-size: clamp(32px, 3.6vw, 48px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.sent h3 .serif { color: var(--accent); }
.sent p { margin: 0; max-width: 44ch; color: var(--body); font-size: 17px; line-height: 1.6; }
.sent p b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.link-btn { all: unset; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .sent-mark * { animation: none; stroke-dashoffset: 0; } .float span, .float input, .float textarea { transition: none; } }
.c-call { margin: 28px 0 0; color: var(--on-dark); font-size: 15px; }
.c-call a { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; }
@media (hover: hover) { .c-call a:hover .arr { translate: 3px 0; } }
.foot { margin-top: clamp(64px, 8vw, 112px); padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark); }
@media (hover: hover) { .foot a:hover { color: #fff; } }
.foot { align-items: center; }
.foot .brand { color: #fff; }
.foot .brand .s { color: var(--accent-light); }
.foot .brand-word { border-left-color: rgba(255,255,255,.2); }
.foot-info { display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* Mobile / tablet: same content, no pinned sections */
@media (max-width: 899px) {
  html { scroll-padding-top: 60px; }
  section { padding: 64px 0; }
  .links { display: none; }
  nav .wrap { height: 60px; }
  .brand { font-size: 17px; padding: 13px 0; }
  .brand-mark { height: 26px; }
  .brand-word { margin-left: 11px; padding-left: 11px; }
  nav .wrap { gap: 12px; }
  nav .btn { padding: 6px 12px; min-height: 44px; font-size: 11px; letter-spacing: .03em; line-height: 1.2; text-align: center; max-width: 10.5em; } /* "Start a conversation" wraps onto two lines */
  nav .btn .arr { display: none; }
  .hero-foot, .svc-grid, .teaser, .about { grid-template-columns: 1fr; }

  /* Hero: sized so each of the three lines fits on one line; buttons stack full width */
  .hero { padding-top: 40px; padding-bottom: 56px; }
  .hero h1 { font-size: clamp(34px, calc(12.6vw - 5px), 56px); }
  .hero-foot { margin-top: 32px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { justify-content: center; }

  /* Services: the two cards sit side by side and you swipe between them (the next one peeks in).
     They keep sharing rows (subgrid), so titles, text and buttons still line up. */
  .svc-grid { position: relative; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; grid-template-rows: repeat(4, auto); gap: 12px; margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .svc-grid::-webkit-scrollbar { display: none; }
  .svc-card { scroll-snap-align: start; }
  .svc-dots { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
  .svc-dots button { all: unset; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
  .svc-dots button::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 22%, transparent); transition: width .3s var(--ease), background .3s; }
  .svc-dots button[aria-current="true"]::before { width: 24px; background: var(--accent); }
  .svc-dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; border-radius: 999px; }
  .svc-note { margin-top: 16px; }
  /* shorter drawings; the address pill never runs into the window dots */
  .ill { height: clamp(160px, 48vw, 220px); }
  .url { width: auto; max-width: calc(100% - 60px); padding: 0 8px; overflow: hidden; }

  /* Drew's process: tighter steps, less empty dark space before the work section */
  .how { padding-bottom: 32px; }
  .step { padding: 24px 0; }
  .step h3 { font-size: clamp(36px, 11vw, 44px); }

  /* Work: smaller resting fan, full-width button */
  .fan { height: clamp(220px, 62vw, 300px); }
  .fan .ph { width: 52%; border-width: 6px; }
  .teaser .btn { width: 100%; justify-content: center; padding-inline: 16px; letter-spacing: .02em; }

  /* About */
  .about .ph { max-width: 240px; }
  .about-text { font-size: clamp(21px, 6vw, 24px); }

  /* Contact: everything easy to tap */
  .c-card { padding: clamp(18px, 5vw, 22px); }
  .c-form { grid-template-columns: 1fr; }
  .seg span { min-height: 44px; align-items: center; padding: 0 16px; }
  .send { width: 100%; }
  .link-btn { padding: 12px 0; }
  .c-call a { padding: 13px 0; }
  .foot a { display: inline-block; padding: 15px 0; margin: -15px 0; }
}
/* Very narrow phones: a shorter address in the browser drawing so it never gets clipped */
@media (max-width: 400px) {
  .url { font-size: 0; max-width: 100%; }
  .url svg { display: none; }
  .url::after { content: 'yoursite.com'; font-size: 9.5px; }
  .ill { padding: 16px 12px 0; }
  .win-bar { padding-left: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
