/* Tideline v2 layout and components. Uses tokens.css only. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--deep); font: 400 var(--t-body)/1.6 var(--font); font-stretch: 100%; }
.sec { background-color: var(--bg); background-image: var(--tex); color: var(--ink); position: relative; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; transition: text-decoration-color var(--t-fast) ease; }
a:hover { text-decoration-color: var(--warm); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 125%; letter-spacing: -0.035em; line-height: 0.92; }
h2 { font-size: var(--t-h2); }
p { margin: 0; }
b, strong { font-weight: 650; }
.credit { white-space: nowrap; }

.skip { position: absolute; left: var(--gut); top: -80px; z-index: 50; background: var(--glacier); color: var(--deep); padding: 12px 18px; font-weight: 650; text-decoration: none; }
.skip:focus { top: 12px; }

/* Nav */
.top { z-index: 5; overflow: hidden; }
.btn { display: inline-flex; align-items: center; background: var(--act); color: var(--on-act); text-decoration: none; font: 650 16px/1 var(--font); padding: 18px 26px; border: 0; border-radius: 999px; cursor: pointer; transition: transform var(--t-fast) ease, filter var(--t-fast) ease; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

/* Style control: the seed of "pick a site style" */
.style-ctl { position: relative; }
.style-btn { display: inline-flex; align-items: center; gap: 8px; font: 550 15px/1 var(--font); color: var(--ink); background: var(--bg-2); border: 0; border-radius: 999px; padding: 12px 16px 12px 13px; cursor: pointer; transition: background var(--t-fast) ease; }
.style-btn:hover, .style-btn[aria-expanded="true"] { background: var(--raise); }
.style-btn svg { width: 18px; height: 18px; flex: none; }
.style-btn circle { fill: none; stroke: currentColor; stroke-width: 1.6; }
.style-btn svg path { fill: var(--warm); }
.style-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(340px, calc(100vw - 2 * var(--gut))); background: var(--raise); color: var(--ink); padding: 22px 22px 18px; border-radius: 18px; box-shadow: 0 18px 50px rgba(4, 10, 18, 0.45); z-index: 20; } /* taste-skill-ignore: the Style panel is a real floating dialog */
.style-panel[hidden] { display: none; }
.style-panel h2 { font-size: 22px; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.1; margin-bottom: 6px; }
.style-panel > p { font-size: 15px; line-height: 1.45; color: var(--ink-2); margin-bottom: 18px; }
.style-panel fieldset { border: 0; margin: 0 0 16px; padding: 0; }
.style-panel legend { font-size: 15px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg-2); border-radius: 999px; padding: 4px; }
.seg label { flex: 1 1 auto; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 10px 12px; border-radius: 999px; font-size: 15px; font-weight: 550; line-height: 1; transition: background var(--t-fast) ease, color var(--t-fast) ease; }
.seg label:hover span { background: var(--bg); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.style-close { font: 600 15px/1 var(--font); color: var(--ink); background: none; border: 0; padding: 10px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 5px; }
.style-close:hover { text-decoration-color: var(--warm); text-decoration-thickness: 2px; }

/* Hero */
.hero { position: relative; min-height: max(640px, calc(100svh - 86px)); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(40px, 6vh, 80px); }
.hero canvas { position: absolute; left: 0; top: 0; width: 100%; height: 78%; display: block; touch-action: pan-y; }
.hero .clip { position: absolute; left: 0; right: 0; bottom: 0; top: -90px; display: none; background: var(--bg); overflow: hidden; }
.hero .clip video { width: 100%; height: 100%; object-fit: cover; object-position: 62% 35%; display: block; filter: grayscale(1) contrast(1.08); mix-blend-mode: luminosity; opacity: 0.62; }
/* Neutral scrim so the headline stays readable over the footage (the one allowed fade) */
.hero .clip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 8%, color-mix(in srgb, var(--bg) 70%, transparent) 42%, transparent 72%, color-mix(in srgb, var(--bg) 55%, transparent) 100%); } /* taste-skill-ignore: scrim under text on footage */
:root[data-motion="subtle"] .hero canvas, :root[data-motion="subtle"] .hero .lines { display: none; }
:root[data-motion="subtle"] .hero .clip { display: block; }
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero h1 { font-size: var(--t-hero); letter-spacing: -0.035em; word-spacing: 0.06em; line-height: 0.92; }
.hero h1 span { display: block; }
.shore { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); margin-top: 36px; align-items: end; row-gap: 24px; }
.shore p { grid-column: 1 / 6; font-size: var(--t-lead); line-height: 1.5; }
.shore .acts { grid-column: 7 / 13; display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: center; justify-content: flex-end; }
.hero-credit { display: none; position: absolute; z-index: 2; right: max(var(--gut), calc((100vw - var(--max)) / 2 + var(--gut))); bottom: 14px; margin: 0; font-size: 14px; color: var(--ink-2); }
:root[data-motion="subtle"] .hero-credit { display: block; }
.lines { display: flex; align-items: center; gap: 4px; font-size: var(--t-small); font-weight: 500; }
.lines span { color: var(--ink-2); margin-right: 8px; }
.lines button { font: 550 15px/1 var(--font); color: var(--ink); background: var(--bg-2); border: 0; padding: 12px 16px; border-radius: 999px; cursor: pointer; transition: background var(--t-fast) ease, color var(--t-fast) ease; }
.lines button:hover { background: var(--raise); }
.lines button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.lines button[data-l="1"][aria-pressed="true"] { background: var(--warm); color: var(--on-warm); }
.pause { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg-2); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; transition: background var(--t-fast) ease; }
.pause[hidden] { display: none; }
.pause:hover { background: var(--raise); }
.pause svg { width: 16px; height: 16px; fill: currentColor; }
.pause .i-play, .pause[aria-pressed="true"] .i-pause { display: none; }
.pause[aria-pressed="true"] .i-play { display: inline; }

/* About (light): the photo runs to the left edge */
.about { padding-top: var(--gap); padding-bottom: var(--gap); }
.about .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; max-width: calc(var(--max) + (100vw - var(--max)) / 2); }
.about figure { margin: 0; }
.about .frame { overflow: hidden; aspect-ratio: 5 / 6; background: var(--bg-2); }
.about img { width: 100%; height: 114%; object-fit: cover; object-position: 40% 40%; display: block; filter: grayscale(1); will-change: transform; }
figcaption { margin-top: 12px; font-size: var(--t-small); line-height: 1.5; color: var(--ink-2); }
.about figcaption { padding-left: max(var(--gut), calc((100vw - var(--max)) / 2 + var(--gut))); }
.book { display: block; margin-top: 6px; color: var(--ink); }
.about .text { padding-right: var(--gut); max-width: 640px; padding-top: 12px; }
.about h2 { font-size: clamp(44px, 5.6vw, 88px); }
.underline { display: block; width: min(100%, 520px); height: 18px; margin: 14px 0 36px; color: var(--warm); }
.about .bio { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.45; font-weight: 450; margin-bottom: 22px; }
.about .story { margin-bottom: 36px; }
/* And?: what else he does, one tap at a time (carried over from Slate) */
.and { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; margin: 8px 0 36px; padding: 22px 0; box-shadow: inset 0 2px 0 var(--bg-2), inset 0 -2px 0 var(--bg-2); } /* taste-skill-ignore: 2px tone steps, not hairlines */
.and-line { font-size: clamp(24px, 2.1vw, 30px); font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; min-height: 2.4em; display: grid; align-content: center; }
.and-who { color: var(--mark); font-weight: 750; font-stretch: 112%; }
.and-what { display: inline-block; }
.and-what.swap { animation: and-in 0.42s var(--ease-out); }
@keyframes and-in { from { opacity: 0; transform: translateY(0.4em); } }
.and-btn { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--act); color: var(--on-act); font: 700 19px/1 var(--font); font-stretch: 112%; cursor: pointer; transition: transform 0.2s var(--ease-out), filter var(--t-fast) ease; }
.and-btn:hover { transform: rotate(-8deg); filter: brightness(1.15); }
.and-btn:active { transform: scale(0.94); }
.how { margin: 0 0 32px; padding: 0; list-style: none; display: grid; gap: 4px; }
.how li { background: var(--bg-2); padding: 18px 22px; font-weight: 600; font-size: 18px; line-height: 1.35; }
.off { color: var(--ink-2); font-size: 16px; }
.sig { display: block; width: 150px; height: 84px; margin-top: 32px; color: var(--ink); }

/* Work (dark): four big words */
.work { padding-top: var(--gap); padding-bottom: var(--gap); }
.work h2 { margin-bottom: clamp(48px, 6vw, 88px); }
.words { list-style: none; margin: 0; padding: 0; }
.words li { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; padding: clamp(22px, 2.6vw, 36px) 0; }
.words li + li { box-shadow: inset 0 2px 0 var(--bg-2); } /* taste-skill-ignore: a 2px tone step between rows, not a hairline */
.words .w { grid-column: 1 / 8; font-weight: 800; font-stretch: 125%; letter-spacing: -0.045em; line-height: 0.9; font-size: var(--t-word); transition: color 0.25s ease, transform 0.35s var(--ease-out); }
.words li:hover .w { color: var(--mark); transform: translateX(10px); }
.words .d { grid-column: 8 / 13; }
.words h3 { font-size: 22px; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.1; margin-bottom: 8px; }
.words .line { font-weight: 550; margin-bottom: 4px; }
.words .d p { color: var(--ink-2); }
.go { display: inline-block; margin-top: 10px; font-weight: 600; }
/* Work rows: the link's underline is hidden until the row is hovered or focused, then it is ember */
.words .go { text-decoration-line: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; }
.words li:hover .go, .words li:focus-within .go { text-decoration-color: var(--warm); }
.words li:focus-within .w { color: var(--mark); transform: translateX(10px); }
.shots { margin-top: clamp(56px, 7vw, 104px); row-gap: 28px; }
.shot { margin: 0; display: flex; flex-direction: column; }
.shot.a { grid-column: 1 / 8; } .shot.b { grid-column: 8 / 13; }
.shot img, .shot .ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.shot.b img, .shot.b .ph { flex: 1; aspect-ratio: auto; min-height: 0; }
.ph { position: relative; overflow: hidden; background: var(--walnut); }
.ph::before { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='560'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0035 0.09' numOctaves='3' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 0.62 0 0 0 0 0.4 0 0 0 0 0.26 2.6 0 0 0 -1.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E") center / cover; }
.shot.b .ph { background: var(--deep-3); } .shot.b .ph::before { opacity: 0.35; }

/* Now (light): grouped by when */
.now { padding-top: var(--gap); padding-bottom: var(--gap); }
.now h2 { margin-bottom: 24px; }
.now .intro { max-width: 34em; margin-bottom: clamp(48px, 6vw, 88px); color: var(--ink-2); }
.when { display: grid; grid-template-columns: 0.8fr 1.1fr 1.35fr 1fr; gap: clamp(24px, 3vw, 48px); }
.when section { position: relative; }
.when h3 { font-size: clamp(40px, 4.4vw, 68px); color: var(--mark); margin-bottom: 22px; position: relative; display: inline-block; }
.when ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.when li b { display: block; font-size: 20px; line-height: 1.25; font-weight: 650; margin-bottom: 4px; }
.when li p { color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.when .big h3 { font-size: clamp(56px, 6.6vw, 104px); }
.when .big li:first-child b { font-size: clamp(24px, 2vw, 30px); letter-spacing: -0.01em; }
.inl { font-weight: 600; }
.circle { position: absolute; left: -12%; top: -22%; width: 126%; height: 146%; color: var(--warm); pointer-events: none; }

/* The line band: in Subtle mode the water and wood-grain lines open the Contact section */
.band { position: relative; height: clamp(300px, 34vw, 500px); display: none; }
:root[data-motion="subtle"] .band { display: block; }
.band canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.band-acts { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 16px 20px; }
:root[data-motion="subtle"] .contact { padding-top: clamp(40px, 5vw, 80px); }

/* Contact (dark) and footer */
.contact { padding-top: var(--gap); padding-bottom: 80px; }
.contact h2 { font-size: clamp(56px, 10vw, 168px); margin-bottom: 40px; }
.contact .row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; row-gap: 32px; }
.contact .row p { grid-column: 1 / 6; font-size: var(--t-lead); }
.contact .row .mailbox { grid-column: 6 / 13; justify-self: end; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 28px; }
.mail { display: inline-block; font-weight: 700; font-stretch: 112%; letter-spacing: -0.02em; font-size: clamp(26px, 3.2vw, 48px); line-height: 1.1; text-decoration: none; }
.mail .underline { margin: 8px 0 0; width: 100%; }
footer.sec { padding-top: 48px; padding-bottom: 28px; }
footer .links { display: flex; flex-wrap: wrap; gap: 12px 36px; font-size: 16px; font-weight: 500; margin-bottom: 36px; align-items: center; }
footer .links .sig { width: 96px; height: 54px; margin: 0 0 0 auto; }
footer .mark { margin: 0; font-weight: 850; font-stretch: 125%; letter-spacing: -0.05em; font-size: clamp(32px, 8.6vw, 124px); line-height: 0.9; white-space: nowrap; }

/* Hand marks and entrances. early.js removes .js if site.js never runs, so content always shows. */
.hand path { fill: none; stroke: currentColor; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.js .hand.draw path { stroke-dasharray: var(--len, 900); stroke-dashoffset: var(--len, 900); transition: stroke-dashoffset 1.3s cubic-bezier(0.6, 0.1, 0.2, 1); }
.js .hand.draw.in path { stroke-dashoffset: 0; }
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; } .js .hand.draw path { stroke-dashoffset: 0; }
}

@media (max-width: 1180px) {
  .when { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 72px; }
}
@media (max-width: 900px) {
  .shore p, .shore .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .about .row { grid-template-columns: minmax(0, 1fr); }
  .about .text { padding-left: var(--gut); max-width: none; }
  .about figure { order: 2; } .about .text { padding-top: 0; padding-bottom: 48px; }
  .words .w, .words .d { grid-column: 1 / -1; } .words .d { margin-top: 14px; }
  .words li { padding-top: 96px; padding-bottom: 8px; }
  .words h3.same { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .shot.a, .shot.b { grid-column: 1 / -1; } .shot.b img, .shot.b .ph { aspect-ratio: 16 / 10; flex: none; }
  .when { grid-template-columns: minmax(0, 1fr); row-gap: 96px; }
  .band-acts { justify-content: flex-start; }
  .contact .row p, .contact .row .mailbox { grid-column: 1 / -1; justify-self: start; text-align: left; align-items: flex-start; }
  footer .links .sig { margin-left: 0; }
}
@media (max-width: 560px) {
  .hero { min-height: 680px; }
  .hero canvas { height: 66%; }
  .hero h1 { font-stretch: 100%; font-size: 12.2vw; letter-spacing: -0.04em; }
  .hero .clip video { object-position: 50% 30%; }
  .lines span { display: none; }
  .style-btn { padding: 12px 14px 12px 12px; }
}

/* Without JavaScript the controls cannot work, so they are not shown */
html:not(.js) .style-ctl, html:not(.js) .lines, html:not(.js) .pause, html:not(.js) .and-btn, html:not(.js) .band { display: none; }
.no-webgl .band { display: none; }

/* Listening to (Then and now). Glacier is the accent; no ember here, the 2027 circle is this section's ember moment. */
.listen { margin-top: clamp(56px, 7vw, 104px); max-width: 52em; }
.listen h3 { font-size: clamp(24px, 2.4vw, 34px); color: var(--mark); margin-bottom: 18px; }
.listen ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.listen li { font-size: 17px; line-height: 1.35; padding: 9px 16px; border-radius: 999px; background: var(--raise); }
.listen li span { color: var(--ink-2); }

/* Phone buttons in Contact (only rendered when contact.phone is set) */
.mailbox .phone { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; }
.mailbox .phone .num { color: var(--ink-2); font-size: var(--t-small); }
@media (max-width: 700px) { .mailbox .phone { justify-content: flex-start; } }

/* Bigger tap area for text links on touch screens (V6 check, about 44 px). Vertical padding on an inline link grows the hit box without moving the text. */
@media (pointer: coarse) { p a:not(.btn), li a:not(.btn), footer .links a { padding-block: 10px; } figcaption a:not(.btn) { padding-block: 12px; } }

/* Cloudflare Web Analytics disclosure (2026-11-21) */
.an-note { font-size: .8rem; opacity: .75; margin: .75rem 0 0; }

/* Style control on phones (the phone menu itself lives in nav.css) */
@media (max-width: 900px) {
  .style-ctl { position: static; }
  .style-panel { right: var(--gut); top: calc(100% - 4px); }
  .style-btn { min-height: 44px; }
}
@media (max-width: 560px) {
  .style-btn { width: 44px; padding: 0; justify-content: center; }
  .style-btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Email link was 344px wide in a 324px column at 360 (2px side scroll): scale it with the screen on phones */
@media (max-width: 560px) { .mail { font-size: clamp(22px, 6.6vw, 26px); } }
