/* ==========================================================
   Miles Thornton portfolio — fresh start
   So far: opening signature, top links, hero.
   ========================================================== */
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("fonts/eb-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #fbfbf8;
  --ink: #111111;
  --ink-2: #55554f;        /* secondary text, 7:1 on the page */
  --line: #e2e2dc;
  --serif: "EB Garamond", Garamond, Georgia, serif;
  --font: "Hanken Grotesk", Arial, sans-serif;
  --mono: var(--font);     /* used by the intro's skip button */
  --gutter: clamp(20px, 4vw, 56px);
  --nav-h: 80px;
  --target: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
a { color: inherit; }
main:focus, .panel:focus, .site-footer:focus { outline: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  display: inline-flex; align-items: center; min-height: var(--target); padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Top links: signature on the left, three links on the right ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--bg); }   /* solid bar so the hero texture stops below the links */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); padding: 0 var(--gutter); }
.logo { display: flex; align-items: center; min-height: var(--target); margin-left: -6px; }
.logo svg { display: block; height: 56px; width: auto; fill: currentColor; stroke: currentColor; }
.nav-links { display: flex; gap: clamp(0px, 1.5vw, 20px); margin: 0 -12px 0 0; padding: 0; list-style: none; }
.nav-links a {
  position: relative; display: inline-flex; align-items: center; min-height: var(--target); padding: 0 12px;
  font-size: 1rem; text-decoration: none;
}
.nav-links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 9px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }

/* ---------- Hero: scrolling strip, statement on the left, face on the right ---------- */
.hero { position: relative; isolation: isolate; min-height: 100svh; display: flex; flex-direction: column; padding-top: var(--nav-h); overflow: hidden; }
/* Damask pattern behind the hero: grey, very faint, fading out toward the bottom. Raise or lower opacity here. */
.hero::before, .soon::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("images/hero-damask.png") center top / 1480px 740px repeat; opacity: .2;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
@media (prefers-contrast: more) { .hero::before, .soon::before { display: none; } }
.marquee { margin-top: clamp(8px, 3vh, 40px); overflow: hidden; color: #8a8a83; }   /* silver-grey logos and dots; change the colour here */   /* 3:1 or better for this large text */
.marquee-track { display: flex; width: max-content; }
.motion .marquee-track { animation: marquee 38s linear infinite; }
.marquee.is-paused .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee ul { display: flex; margin: 0; padding: 0; list-style: none; }
.marquee li {
  display: flex; align-items: center; white-space: nowrap;
  font-family: var(--serif); font-style: italic; font-size: clamp(3.75rem, 12vw, 10.5rem); line-height: 1.05;
}
.strip-logo { display: block; height: .62em; width: auto; fill: currentColor; }   /* logos take the strip's grey */
.strip-logo--tall { height: .98em; }   /* logos with marks that reach above and below the lettering */
.strip-logo--novus { height: .74em; }
.marquee li::after { content: ""; width: .14em; height: .14em; margin: .12em .34em 0; border-radius: 50%; background: currentColor; }
.hero-grid {
  flex: 1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(16px, 3vw, 48px);
  padding: 0 var(--gutter) clamp(40px, 7vh, 80px);
}
.hero h1 { max-width: 13em; font-family: var(--serif); font-size: clamp(2.375rem, 5.2vw, 4.75rem); font-weight: 500; line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; margin-top: clamp(24px, 3.5vw, 44px); padding: 0 30px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none;
  transition: transform .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button span { transition: transform .2s ease; }
.button:hover span { transform: translateY(3px); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 3.5vw, 44px); }
.hero-actions .button { margin-top: 0; }
/* Liquid glass buttons: a clear capsule that blurs what is behind it, with a bright rim and a soft shadow */
.button--glass {
  border-radius: 999px; color: var(--ink);
  background: linear-gradient(to bottom, rgba(255, 255, 255, .78), rgba(255, 255, 255, .34));
  -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(17, 17, 17, .06), 0 0 0 1px rgba(17, 17, 17, .12), 0 1px 2px rgba(17, 17, 17, .08), 0 10px 28px rgba(17, 17, 17, .13);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.button--glass:hover {
  background: linear-gradient(to bottom, rgba(255, 255, 255, .95), rgba(255, 255, 255, .6));
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(17, 17, 17, .06), 0 0 0 1px rgba(17, 17, 17, .2), 0 2px 4px rgba(17, 17, 17, .1), 0 16px 36px rgba(17, 17, 17, .18);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .button--glass { background: #fff; } }
@media (prefers-reduced-transparency: reduce) { .button--glass { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) { .button--glass { background: #fff; border: 2px solid var(--ink); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* The face overlaps the scrolling strip, like a sticker on top of it */
.face { position: relative; z-index: 1; display: block; width: 100%; max-width: 620px; height: auto; justify-self: end; align-self: start; margin-top: clamp(-110px, -6.5vw, -28px); }
.face { rotate: 3deg; }   /* slight tilt to the right; change the angle here */
.face .cover, .face .glint { fill: var(--bg); }
.face .lid { fill: var(--bg); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.face .rim { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.face .pupil { fill: var(--ink); }

.marquee-toggle {
  position: absolute; right: var(--gutter); bottom: 16px; z-index: 2;
  display: grid; place-items: center; width: var(--target); height: var(--target); padding: 0;
  border: 1px solid var(--ink-2); border-radius: 50%; background: var(--bg); color: var(--ink); cursor: pointer;
}
.marquee-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.marquee-toggle .icon-play, .marquee-toggle.is-paused .icon-pause { display: none; }
.marquee-toggle.is-paused .icon-play { display: block; }
html:not(.motion) .marquee-toggle { display: none; }

/* Stacked scroll: every section holds still while the next one slides up over it, all the way down the page.
   Switched on by main.js, and never with Reduce Motion. */
.cover .panel { position: sticky; top: var(--stick, 0px); }
.cover .hero, .cover .about-intro { opacity: calc(1 - var(--cover, 0)); }
.cover .about { display: contents; }
.cover .about-row { box-shadow: 0 -14px 40px rgba(0, 0, 0, .08); }
.cover .work { display: contents; }                      /* lets its two panels pin against the whole page */
.cover-spacer { height: var(--footer-h, 0px); }          /* room for the footer to slide over the last panel */
.cover .site-footer { margin-top: calc(-1 * var(--footer-h, 0px)); }
.cover .features { z-index: 1; }
.cover .work-inner { z-index: 2; box-shadow: 0 -24px 60px rgba(0, 0, 0, .28); }
.cover .site-footer { z-index: 3; box-shadow: 0 -14px 40px rgba(0, 0, 0, .07); }
.sentinel { height: 0; scroll-margin-top: calc(-1 * var(--nav-h)); }

/* The hero eases in once the opening signature has landed */
.motion .hero-copy > *, .motion .face, .motion .marquee { opacity: 0; transition: opacity .8s ease, transform .8s ease; }
.motion .hero-copy > *, .motion .face { transform: translateY(16px); }
.motion .hero-copy > :nth-child(2) { transition-delay: .12s; }
.motion .face { transition-delay: .2s; }
.motion.ready .hero-copy > *, .motion.ready .face, .motion.ready .marquee { opacity: 1; transform: none; }

/* Larger screens: a bigger headline and a bigger character */
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 13fr) minmax(0, 11fr); }
  .hero h1 { max-width: 12em; font-size: clamp(4.75rem, 6.3vw, 7.25rem); }
  .face { max-width: 800px; }
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; }
  .face { order: -1; width: min(72vw, 340px); justify-self: center; align-self: auto; margin-top: -9vw; margin-bottom: 12px; }
  .hero h1 { max-width: none; }
}

/* ---------- About page: numbered rows, text left, photos right ---------- */
.about-intro { background: var(--bg); padding: calc(var(--nav-h) + clamp(28px, 5vw, 72px)) var(--gutter) 0; }
.about-row:last-child { padding-bottom: clamp(56px, 8vw, 120px); }
.about-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; padding-bottom: clamp(28px, 4vw, 56px); }
.about-where {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: .55em; padding: 10px 18px 10px 14px; border-radius: 999px;
  font-size: clamp(1rem, 1.3vw, 1.1875rem); font-weight: 600;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .85), rgba(255, 255, 255, .45));
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(17, 17, 17, .12), 0 8px 22px rgba(17, 17, 17, .1);
}
.about-where svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.about-place { display: inline-block; min-width: 7.4em; }   /* room for the longest name so the badge does not jump while rolling */
.about-place.is-rolling { color: var(--ink-2); }
.about-title { margin: 0; font-family: var(--serif); font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.about-row {
  display: grid; grid-template-columns: 3.75rem minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(16px, 3vw, 48px); align-items: start;
  padding: clamp(24px, 3vw, 40px) var(--gutter);
  /* hairline divider inset to the page margins, drawn as a background so the row can be full width */
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat, var(--bg);
}
.about-num { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9375rem; color: var(--ink-2); line-height: 1.9; }
.about-text { max-width: 32em; font-size: clamp(1.0625rem, 1.35vw, 1.25rem); line-height: 1.5; }
.about-text h2 { margin-bottom: 14px; line-height: 1.9; }
.about-text p + p { margin-top: 1em; }
.photos { display: grid; gap: clamp(8px, 1.2vw, 18px); }
.photos--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photos--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo { aspect-ratio: 2 / 3; overflow: hidden; border-radius: 8px; background: #ecece6; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-empty {
  display: grid; place-items: center; height: 100%; padding: 12px; text-align: center;
  font-size: .8125rem; font-weight: 600; letter-spacing: .06em; color: var(--ink-2); overflow-wrap: anywhere;
}
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.motion .reveal.in { opacity: 1; transform: none; }
@media (max-width: 860px) {
  .about-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .about-num { line-height: 1.2; }
  .photos { margin-top: 8px; }
  .photos--3 .photo:last-child { display: block; }
}

/* ---------- Case study page ---------- */
.cs { padding: calc(var(--nav-h) + clamp(32px, 6vw, 88px)) var(--gutter) 0; }
.cs-head { max-width: 62rem; }
.cs-head h1 { margin-top: 12px; font-family: var(--serif); font-size: clamp(3.5rem, 10vw, 8.5rem); font-weight: 500; line-height: .95; letter-spacing: -.03em; }
.cs-sub { max-width: 30em; margin-top: clamp(14px, 2vw, 24px); font-size: clamp(1.25rem, 2.1vw, 1.75rem); line-height: 1.3; color: var(--ink-2); text-wrap: balance; }
.yc-badge.yc-badge--light { color: var(--ink-2); margin-top: clamp(18px, 2.4vw, 28px); }
.cs-hero { margin: clamp(32px, 5vw, 64px) 0 0; }
.cs-hero-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 20px; background: #000; }
.cs-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-hero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(0,0,0,.45); }
.cs-hero-media .video-toggle { position: absolute; right: 16px; bottom: 16px; z-index: 1; }
.cs-hero figcaption, .cs-figure figcaption { margin-top: 12px; font-family: var(--serif); font-style: italic; font-size: 1.0625rem; color: var(--ink-2); }
.cs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px clamp(16px, 2vw, 32px); margin: clamp(32px, 4vw, 56px) 0 0; padding: clamp(20px, 2.4vw, 28px) 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.cs-facts dd { margin: 6px 0 0; line-height: 1.4; }
.cs-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(24px, 4vw, 72px); padding: clamp(40px, 6vw, 88px) 0; }
.cs-toc { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.cs-toc ol { margin: 14px 0 0; padding: 0; list-style: none; }
.cs-toc a { display: flex; align-items: center; gap: 12px; min-height: var(--target); color: var(--ink-2); text-decoration: none; }
.cs-toc a:hover, .cs-toc a[aria-current="true"] { color: var(--ink); }
.cs-toc a[aria-current="true"] .cs-toc-num { color: var(--ink); }
.cs-toc-num { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .8125rem; color: var(--ink-2); }
.cs-content { max-width: 44rem; min-width: 0; }
.cs-section { padding-bottom: clamp(48px, 6vw, 88px); scroll-margin-top: calc(var(--nav-h) + 24px); }
.cs-section + .cs-section { padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.cs-num { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9375rem; color: var(--ink-2); }
.cs-section h2 { margin: 6px 0 clamp(16px, 2vw, 24px); font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 500; line-height: 1.05; letter-spacing: -.015em; }
.cs-section h3 { margin: 1.8em 0 .5em; font-size: 1.1875rem; font-weight: 600; }
.cs-section p, .cs-section li { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.6; }
.cs-section p + p { margin-top: 1em; }
.cs-section ul { margin: 1em 0; padding: 0; list-style: none; }
.cs-section li { position: relative; padding-left: 22px; }
.cs-section li + li { margin-top: .55em; }
.cs-section li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cs-quote { margin: 1.4em 0; padding-left: clamp(16px, 2vw, 28px); border-left: 2px solid var(--ink); }
.cs-quote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.625rem, 3vw, 2.375rem) !important; line-height: 1.2 !important; letter-spacing: -.01em; }
.cs-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 1.2em; }
.cs-stat-num { font-family: var(--serif); font-size: clamp(4rem, 8vw, 6.5rem); font-weight: 500; line-height: 1; letter-spacing: -.03em; }
.cs-stat-label { font-size: 1.125rem; color: var(--ink-2); }
.cs-figure { margin: clamp(28px, 3vw, 40px) 0 0; }
.cs-shot { aspect-ratio: 16 / 10; }
.cs-lessons { display: grid; gap: 28px; }
.cs-lessons h3 { margin-top: 0; }
.cs-next { padding: clamp(32px, 4vw, 48px) 0 clamp(56px, 8vw, 104px); border-top: 1px solid var(--ink); }
.cs-next-link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 24px; margin-top: 14px; color: var(--ink); text-decoration: none;
}
.cs-next-title { font-family: var(--serif); font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.cs-next-line { grid-row: 2; color: var(--ink-2); font-size: 1.125rem; }
.cs-next-link .card-go { grid-row: 1 / span 2; grid-column: 2; background: var(--ink); color: #fff; width: 56px; height: 56px; }
.cs-next-link:hover .card-go, .cs-next-link:focus-visible .card-go { transform: rotate(45deg); }
@media (max-width: 860px) {
  .cs-body { grid-template-columns: minmax(0, 1fr); }
  .cs-toc { position: static; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-hero-media { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .cs-next-link .card-go { transition: none; } .cs-next-link:hover .card-go { transform: none; } }

/* ---------- Resume page ---------- */
.resume { padding: calc(var(--nav-h) + clamp(32px, 5vw, 72px)) var(--gutter) clamp(56px, 8vw, 104px); }
.resume-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: clamp(24px, 3vw, 40px); }
.resume-head h1 { font-family: var(--serif); font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.resume-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.resume-actions .button { margin-top: 0; }
.resume-frame { max-width: 980px; margin: 0 auto; aspect-ratio: 8.5 / 11; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 48px rgba(17, 17, 17, .12); }
.resume-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.resume-missing { max-width: 40em; font-size: 1.125rem; }
.resume.is-missing .resume-frame, .resume.is-missing .resume-actions { display: none; }
@media (max-width: 700px) { .resume-frame { aspect-ratio: auto; height: 75svh; } }

/* ---------- Coming soon page ---------- */
.soon {
  position: relative; isolation: isolate; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(16px, 3vw, 48px);
  padding: calc(var(--nav-h) + 24px) var(--gutter) clamp(40px, 7vh, 80px);
}
.soon h1 { font-family: var(--serif); font-size: clamp(4rem, 13vw, 11.5rem); font-weight: 500; line-height: .92; letter-spacing: -.03em; }
.soon-line { max-width: 26em; margin-top: clamp(16px, 2vw, 28px); font-size: clamp(1.125rem, 1.7vw, 1.375rem); color: var(--ink-2); }
.soon .button { margin-top: clamp(24px, 3vw, 40px); }
.soon .button:hover span[aria-hidden] { transform: translateX(-3px); }
.soon .face { margin-top: 0; align-self: center; }
.motion .soon-copy > * { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.motion .soon-copy > :nth-child(2) { transition-delay: .1s; }
.motion .soon-copy > :nth-child(3) { transition-delay: .2s; }
.motion.ready .soon-copy > * { opacity: 1; transform: none; }
@media (max-width: 760px) {
  .soon { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 8px; }
  .soon .face { order: -1; margin: 0 auto 12px; }
}

/* ---------- Work: featured case study with a video header ---------- */
.work { position: relative; z-index: 1; }
.work-inner { background: var(--bg); padding: 1px var(--gutter) clamp(56px, 8vw, 120px); }
.site-footer { position: relative; z-index: 1; background: var(--bg); }
.work .section-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(20px, 2.5vw, 32px); }
.section-kicker::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.feature {
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
  min-height: 128svh; background: #000; color: #fff;   /* taller than the screen so it is clearly the main focus; change the height here */
}
.feature-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Shadowing over the video: a vignette darkens every edge and a heavier gradient sits behind the text,
   so the white type stays far above 4.5:1 on any frame */
.feature::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(0,0,0,.82) 0, rgba(0,0,0,.66) 38%, rgba(0,0,0,0) 78%),
    linear-gradient(to right, rgba(0,0,0,.55) 0, rgba(0,0,0,0) 55%),
    radial-gradient(ellipse at 60% 40%, rgba(0,0,0,0) 35%, rgba(0,0,0,.6) 100%);
  box-shadow: inset 0 0 120px rgba(0,0,0,.55);
}
.feature-copy { position: relative; z-index: 1; max-width: 46rem; padding: clamp(20px, 4vw, 56px); padding-right: clamp(20px, 4vw, 56px); }
.feature .label { color: #fff; }
.feature-title { margin: 10px 0 0; font-family: var(--serif); font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.feature-line { margin-top: 14px; font-size: clamp(1.125rem, 1.7vw, 1.375rem); line-height: 1.4; }
.feature-proof { margin-top: 10px; font-size: .9375rem; color: #ececec; }
/* "Backed by Y Combinator" line, in YC's orange square */
.yc-badge {
  display: flex; align-items: center; gap: .6em; margin-top: clamp(20px, 2.4vw, 28px);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9375rem; letter-spacing: .14em; text-transform: uppercase; color: #e6e6e6;
}
.yc-mark {
  display: inline-grid; place-items: center; width: 1.6em; height: 1.6em;
  background: #f26522; color: #fff; font-family: Arial, sans-serif; font-weight: 400; font-size: 1.05em; letter-spacing: 0; line-height: 1;
}
.yc-badge + .button { margin-top: clamp(16px, 2vw, 22px); }
@media (forced-colors: active) { .yc-mark { forced-color-adjust: none; } }
.button--light { background: #fff; color: #000; }
.button:hover span[aria-hidden] { transform: translateX(3px); }
.hero .button:hover span[aria-hidden] { transform: translateY(3px); }
/* Full-width featured block. Its top edge fades in from the hero instead of starting with a hard line. */
.features {
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--nav-h), #000 calc(var(--nav-h) + 200px));
  mask-image: linear-gradient(to bottom, transparent var(--nav-h), #000 calc(var(--nav-h) + 200px));
}
.feature[hidden], .video-toggle[hidden] { display: none; }
.feature--soon { background: #0b0d14; }
/* NovusNorth slide: a still picture pushed back with darkening and film grain; the slide's edge shadowing sits on top */
.feature-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: saturate(.85) contrast(1.05) brightness(.85); }
.feature-grain { position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 200px 200px; mix-blend-mode: overlay; opacity: .5; }
.motion .feature:not([hidden]) { animation: feature-in .5s ease both; }
@keyframes feature-in { from { opacity: 0; } }
.feature-controls {
  position: absolute; right: clamp(16px, 2.5vw, 32px); bottom: clamp(16px, 2.5vw, 32px); z-index: 2;
  display: flex; align-items: center; gap: 8px; color: #fff;
}
.video-toggle, .feature-arrow {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(255,255,255,.6); border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
@media (hover: hover) { .video-toggle:hover, .feature-arrow:hover { background: #fff; color: #000; } }
.video-toggle { margin-right: 8px; }
.video-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.feature-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.video-toggle .icon-play, .video-toggle.is-paused .icon-pause { display: none; }
.video-toggle.is-paused .icon-play { display: block; }
.feature-count { min-width: 3.6em; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,.55); text-align: center; font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.features :focus-visible { outline-color: #fff; box-shadow: 0 0 0 3px #000; }
.feature :focus-visible { outline-color: #fff; box-shadow: 0 0 0 3px #000; }
@media (max-width: 760px) {
  .feature-copy { padding-bottom: 88px; }
  .feature-controls { right: auto; left: 20px; bottom: 20px; }
}
@media (forced-colors: active) { .feature, .video-toggle, .feature-arrow { border: 1px solid CanvasText; } }

/* ---------- Smaller case study cards: image or video with a glass caption ---------- */
.work .more-kicker { margin-top: clamp(40px, 5vw, 72px); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); margin: 0; padding: 0; list-style: none; }
.card {
  position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 20px;
  background: #1a1a1a; color: var(--ink); text-decoration: none;
}
.card video, .card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.card-img { filter: saturate(.7) contrast(1.08) brightness(.58); }   /* darkened so the picture sits back and the caption leads */
.card:hover video, .card:focus-visible video, .card:hover .card-img, .card:focus-visible .card-img { transform: scale(1.04); }
/* Logo cards: the company logo on its own brand background, kept clear of the caption */
.card--logo { background: var(--card-bg, #111); box-shadow: inset 0 0 0 1px rgba(17, 17, 17, .1); }
.card-logo { position: absolute; left: 14%; top: 10%; width: 72%; height: 52%; object-fit: contain; transition: transform .7s ease; }
.card:hover .card-logo, .card:focus-visible .card-logo { transform: scale(1.04); }
.card--logo .card-glass { background: rgba(12, 12, 12, .78); }   /* darker tint so white text stays readable on a white card */
.card--logo:hover .card-glass, .card--logo:focus-visible .card-glass { background: rgba(12, 12, 12, .86); }
.card--logo .card-fx { background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 50%, rgba(0,0,0,.18) 100%); box-shadow: none; }   /* logos keep their true colours: grain and a faint vignette only */
/* Heavy shadowing over the picture, under the glass caption */
.card-fx {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(0,0,0,.65) 0, rgba(0,0,0,.3) 45%, rgba(0,0,0,.12) 100%),
    radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%);
  box-shadow: inset 0 0 90px rgba(0,0,0,.45);
}
/* Film grain: fine monochrome noise blended softly over the photo */
.card-fx::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 200px 200px;
  mix-blend-mode: overlay; opacity: .55;
}
/* Smoked glass caption with white text. The dark tint keeps white text far above 4.5:1 even where the photo is brightest. */
.card-glass {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(14px, 1.6vw, 22px) clamp(16px, 1.8vw, 24px); border-radius: 16px;
  background: rgba(12, 12, 12, .42); color: #fff;
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 8px 28px rgba(0, 0, 0, .3);
  transition: background-color .25s ease, transform .25s ease;
}
.card:hover .card-glass, .card:focus-visible .card-glass { background: rgba(12, 12, 12, .58); transform: translateY(-3px); }
.card-text { display: grid; gap: 2px; min-width: 0; }
.card .label { color: #fff; }
.card-title { font-family: var(--serif); font-size: clamp(1.625rem, 2.6vw, 2.25rem); font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
.card-line { font-size: 1rem; line-height: 1.35; }
.card-go { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #111; transition: transform .25s ease; }
.card-go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card-go, .card:focus-visible .card-go { transform: rotate(45deg); }
.card:focus-visible { outline-offset: 4px; border-radius: 20px; }
.card { color: #fff; }
@media (max-width: 760px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { aspect-ratio: 4 / 4.2; border-radius: 16px; }
  .card-glass { left: 8px; right: 8px; bottom: 8px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card-glass { background: rgba(12, 12, 12, .82); } }
@media (prefers-reduced-transparency: reduce) { .card-glass { background: #111; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) { .card-glass { background: #000; border: 2px solid #fff; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (forced-colors: active) { .card, .card-glass, .card-go { border: 1px solid CanvasText; } }
@media (prefers-reduced-motion: reduce) {
  .card video, .card-img, .card-logo, .card-glass, .card-go { transition: none; }
  .card:hover video, .card:hover .card-logo, .card:focus-visible .card-logo, .card:hover .card-img, .card:focus-visible .card-img, .card:hover .card-glass, .card:hover .card-go, .card:focus-visible video, .card:focus-visible .card-glass, .card:focus-visible .card-go { transform: none; }
}

/* ---------- Footer: contact details ---------- */
.site-footer { padding: clamp(40px, 6vw, 80px) var(--gutter) 24px; border-top: 1px solid var(--ink); }
.label { font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
h2.label, dt.label { margin: 0; }
.footer-kicker { display: flex; align-items: center; gap: 14px; }
.footer-kicker::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.footer-email { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: clamp(16px, 2vw, 28px); }
.footer-email a {
  display: inline-block; min-height: var(--target); padding: 4px 0 6px; border-bottom: 2px solid var(--ink);
  font-family: var(--serif); font-style: italic; font-size: clamp(1.75rem, 5vw, 4rem); line-height: 1.15; text-decoration: none; overflow-wrap: anywhere;
}
.footer-email a:hover { color: var(--ink-2); }
.copy-email {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); padding: 0 16px;
  border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
  font: 600 .8125rem var(--font); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.copy-email:hover { background: var(--ink); color: var(--bg); }
.copy-email svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 20px clamp(32px, 6vw, 88px); margin: clamp(36px, 5vw, 72px) 0 0; }
.footer-meta dd { margin: 4px 0 0; }
.footer-clock { margin-left: 8px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--target); margin-block: -10px; font-weight: 600; text-underline-offset: 4px; }
.footer-links a:hover { text-decoration-thickness: 2px; }
.footer-base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: clamp(28px, 4vw, 48px); padding-top: 16px; border-top: 1px solid var(--line);
}
.footer-sig { width: 150px; }
.footer-sig svg { display: block; width: 100%; height: auto; fill: currentColor; stroke: currentColor; }

/* ---------- Opening signature ---------- */
.intro { display: none; }
.intro-on .intro { display: flex; align-items: center; justify-content: center; position: fixed; inset: 0; z-index: 90; overflow: hidden; }
.intro-on body { overflow: hidden; }
.intro-bg { position: absolute; inset: 0; background: var(--bg); }
.intro-sig { position: relative; width: min(94vw, 1180px); height: auto; overflow: visible; color: #000; fill: currentColor; stroke: currentColor; stroke-width: 0; stroke-linejoin: round; transform-origin: 0 0; }
.intro-stroke { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1.02; stroke-dashoffset: 1; animation: intro-write var(--t) linear var(--d) forwards; }
@keyframes intro-write { to { stroke-dashoffset: 0; } }
.intro-skip {
  position: absolute; right: var(--gutter); bottom: var(--gutter);
  min-height: var(--target); padding: 0 18px; border: 0; border-radius: 999px;
  background: rgba(17, 17, 17, .08); color: var(--ink); font: 600 .9375rem var(--font); cursor: pointer;
}

.menu-toggle {
  display: none; align-items: center; min-height: var(--target); padding: 0 16px;
  border: 1px solid var(--ink); border-radius: 999px; background: var(--bg); color: var(--ink);
  font: 600 .9375rem var(--font); cursor: pointer;
}
/* Phones: the five links fold into a menu (only when JavaScript is running; otherwise they wrap) */
@media (max-width: 700px) {
  :root { --nav-h: 68px; }
  .logo svg { height: 44px; }
  .js .menu-toggle { display: inline-flex; }
  .js .nav-links {
    display: none; position: absolute; top: calc(100% - 4px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; gap: 0; margin: 0; padding: 8px; border: 1px solid var(--ink); border-radius: 16px;
    background: var(--bg); box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  }
  .js .nav-links.is-open { display: flex; }
  .js .nav-links a { display: flex; min-height: 52px; padding: 0 12px; font-size: 1.125rem; }
  .js .nav-links a::after { display: none; }
  html:not(.js) .nav { height: auto; min-height: var(--nav-h); flex-wrap: wrap; }
  html:not(.js) .nav-links { flex-wrap: wrap; }
}
@media (max-width: 360px) { .logo svg { height: 36px; } }
@media (forced-colors: active) { .button { border: 1px solid ButtonText; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .button span, .nav-links a::after { transition: none; }
  .button:hover, .button:hover span { transform: none; }
}
}
