/* Nearly Purple Studio. Charcoal canvas, pansy purple, rare yellow. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/fraunces-latin-opsz-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
}

:root {
  --ink: #151318;
  --ink-2: #1f1c25;
  --ink-3: #2a2631;
  --line: #3a3544;
  --text: #ece8f2;
  --muted: #b3abc0;
  --purple: #3e0b7c;
  --purple-2: #5a1fb0;
  --lilac: #9a74ea;
  --lilac-deep: #b79cf2;
  --yellow: #fdc524;
  --display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --narrow: 44rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: clip;
}

img, video, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--lilac); text-underline-offset: .2em; }
a:hover { color: var(--text); }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--yellow); color: var(--ink); padding: .6rem 1rem; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

main:focus { outline: none; }

.mark { color: var(--yellow); }

/* "Nearly" lightens and glows when you approach it. */
.nearly { color: var(--lilac); transition: color .6s var(--ease), text-shadow .6s var(--ease); }
.nearly:hover,
a:hover .nearly,
a:focus-visible .nearly { color: var(--lilac-deep); text-shadow: 0 0 .6em rgba(90, 31, 176, .55); }
body.purpler .nearly { color: var(--lilac-deep); }

.preview-banner {
  background: var(--ink-3); color: var(--muted); font: 500 .8125rem/1.4 var(--sans);
  text-align: center; padding: .45rem var(--gutter); border-bottom: 1px solid var(--line);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .75rem var(--gutter);
  background: rgba(21, 19, 24, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(58, 53, 68, .6);
}

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; }
.brand__logo { width: auto; height: 2.5rem; transition: transform .5s var(--ease); }
.brand:hover .brand__logo, .brand:focus-visible .brand__logo { transform: rotate(-4deg) scale(1.04); }
.brand__name { font: 600 1.05rem/1 var(--display); letter-spacing: .01em; }
.brand.spin .brand__logo { animation: spin 1.2s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .975rem; padding: .35rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--purple-2); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--lilac); }

.menu-toggle {
  font: 600 .9rem/1 var(--sans); color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: .6rem 1rem; cursor: pointer; min-height: 44px;
}

/* JS enables the collapsible menu on small screens. Without JS the nav simply wraps. */
@media (max-width: 47.99rem) {
  .js .menu-toggle { display: inline-block; }
  .js .site-nav { display: none; width: 100%; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; padding: .5rem 0 1rem; }
  .js .site-nav a { display: block; padding: .8rem 0; font-size: 1.25rem; font-family: var(--display); border-bottom: 1px solid var(--line); }
  .site-nav { width: 100%; }
}
@media (min-width: 48rem) {
  .menu-toggle { display: none !important; }
}

/* ---------- Layout ---------- */

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap .wrap--narrow { padding-inline: 0; margin-inline: 0; }

.section { padding-block: clamp(3.5rem, 9vw, 7rem); border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.section__heading { font-size: clamp(2.1rem, 5.5vw, 4rem); }
.section__intro { color: var(--muted); max-width: 40rem; font-size: 1.125rem; }
.statement { font: 500 clamp(1.8rem, 4.5vw, 3.25rem)/1.15 var(--display); max-width: 22ch; margin-bottom: .75em; }

.page-head { padding-block: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 4vw, 3rem); }
.page-title { font-size: clamp(2.75rem, 9vw, 6.5rem); font-weight: 600; }
.kicker { font: 600 .8rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; }
.kicker a { color: var(--muted); }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--muted); max-width: 38rem; }

.text-link { font-weight: 600; text-decoration: none; display: inline-block; padding-block: .5rem; }
.text-link:hover { text-decoration: underline; }

.button {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px;
  background: var(--purple-2); color: #fff; text-decoration: none; font-weight: 600;
  padding: .8rem 1.4rem; border-radius: 999px; transition: background .3s var(--ease);
}
.button:hover { background: var(--purple); color: #fff; }

.todo {
  border-left: 3px solid var(--line); padding: .25rem 0 .25rem 1rem; color: var(--muted);
  font-family: var(--mono); font-size: .875rem;
}
.empty { color: var(--muted); font-size: 1.125rem; }

/* ---------- Media slots ---------- */

.media { position: relative; overflow: hidden; background: var(--ink-2); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero ---------- */

.hero {
  position: relative; min-height: min(100svh, 62rem); display: grid; align-items: end;
  overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; aspect-ratio: auto !important; }
.hero__poster, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* A faint brand-purple wash keeps the imagery on brand, then the dark fade keeps the title readable. */
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(21, 19, 24, .1) 30%, rgba(21, 19, 24, .92) 100%),
    linear-gradient(rgba(154, 116, 234, .2), rgba(154, 116, 234, .2));
}
.hero__content { padding: 0 var(--gutter) clamp(3rem, 9vh, 6rem); max-width: var(--max); width: 100%; margin-inline: auto; }
.hero__title {
  font-size: clamp(3rem, 12vw, 9.5rem); line-height: .95; margin-bottom: .25em;
  --hero-title-shadow: 0 2px 6px rgba(0, 0, 0, .75), 0 8px 32px rgba(0, 0, 0, .6);
  text-shadow: var(--hero-title-shadow);
}
/* Keep the drop shadow under the "Nearly" hover glow. */
.hero__title .nearly:hover { text-shadow: var(--hero-title-shadow), 0 0 .6em rgba(90, 31, 176, .55); }
.hero__tagline { font: 400 clamp(1.25rem, 3vw, 2rem)/1.3 var(--display); max-width: 30ch; margin-bottom: 2rem; }
.hero__prompt { color: var(--text); text-decoration: none; font-weight: 600; display: inline-block; padding-block: .5rem; }
.hero__prompt span { display: inline-block; transition: transform .4s var(--ease); }
.hero__prompt:hover span { transform: translateY(4px); }
.hero__pause {
  position: absolute; right: var(--gutter); bottom: var(--gutter); z-index: 2;
  font: 600 .85rem/1 var(--sans); color: var(--text); background: rgba(21, 19, 24, .7);
  border: 1px solid var(--line); border-radius: 999px; padding: .65rem 1rem; min-height: 44px; cursor: pointer;
}

/* ---------- Panels ---------- */

.panels { display: grid; gap: clamp(1rem, 2.5vw, 2rem); }
.panels__pair { display: grid; gap: clamp(1rem, 2.5vw, 2rem); }
@media (min-width: 48rem) { .panels__pair { grid-template-columns: 1fr 1fr; } }

.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.panel__link { display: grid; color: inherit; text-decoration: none; height: 100%; }
.panel__media img { transition: transform 1.2s var(--ease); }
.panel__link:hover .panel__media img, .panel__link:focus-visible .panel__media img { transform: scale(1.035); }
.panel__body { padding: clamp(1.25rem, 3vw, 2.25rem); }
.panel__title { font-size: clamp(1.9rem, 4.5vw, 3.25rem); margin: .6rem 0 .3rem; }
.panel__prop { font: 400 clamp(1.15rem, 2vw, 1.4rem)/1.35 var(--display); }
.panel__summary { color: var(--muted); max-width: 40rem; }
.panel__cta { color: var(--lilac); font-weight: 600; }
.panel__link:hover .panel__cta { color: var(--text); }

@media (min-width: 62rem) {
  .panel--large .panel__link { grid-template-columns: 1.4fr 1fr; align-items: center; }
}

.status {
  display: inline-block; font: 600 .72rem/1 var(--mono); letter-spacing: .14em;
  padding: .45rem .6rem; border: 1px solid var(--lilac); color: var(--lilac); border-radius: 2px;
}
.status[data-status="EXPERIMENT"] { border-color: var(--yellow); color: var(--yellow); }

.section--lab .panel, .lab .panel { border-style: dashed; }
.panel--lab .panel__title { font-style: italic; }

.chips { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font-weight: 500; }

.notes-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.notes-list li { border-top: 1px solid var(--line); padding-block: 1.25rem; }
.notes-list a { display: flex; justify-content: space-between; gap: 1rem; text-decoration: none; color: var(--text); }
.notes-list__title { font: 600 1.4rem/1.2 var(--display); }
.notes-list time { color: var(--muted); font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
.notes-list p { color: var(--muted); margin: .4rem 0 0; }

/* ---------- Case studies ---------- */

.case__status { margin-top: -1rem; }
.case__hero { max-width: var(--max); margin: 1rem auto 3rem; }
@media (min-width: 80rem) { .case__hero { border-radius: 4px; } }
.case__block { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.case__block h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
.hood { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.hood li { font-family: var(--mono); font-size: .95rem; padding: .7rem 1rem; background: var(--ink-2); border-left: 3px solid var(--purple-2); }

/* ---------- Experiments (a bit stranger) ---------- */

.page-lab { background-image: radial-gradient(circle at 85% 10%, rgba(90, 31, 176, .18), transparent 40%); }
.lab .page-title { font-style: italic; }
.lab__question { font: 400 clamp(1.4rem, 3vw, 2.2rem)/1.3 var(--display); max-width: 32ch; }
.lab--page { overflow: hidden; }
.lab__media { transform: rotate(-.6deg); }

/* ---------- Studio ---------- */

.interests { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.interests li { border: 1px solid var(--line); padding: .45rem .9rem; border-radius: 999px; }
.founder { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .founder { grid-template-columns: 14rem 1fr; align-items: start; } }
.founder__portrait { border-radius: 4px; }
.founder__name { font-size: 1.75rem; }
.founder__name span { display: block; font: 600 .8rem/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Work with us / Contact ---------- */

.paths { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 2rem; }
@media (min-width: 48rem) { .paths { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .paths { grid-template-columns: repeat(3, 1fr); } }
.path { background: var(--ink); padding: 1.75rem; }
.path h2 { font-size: 1.75rem; }
.path p { color: var(--muted); margin: 0; }
.aside { color: var(--muted); max-width: 40rem; }

.contacts { margin: 0; }
.contacts__row { padding-block: 1.25rem; border-top: 1px solid var(--line); }
.contacts dt { font: 600 1.4rem/1.2 var(--display); margin-bottom: .3rem; }
.contacts dd { margin: 0; color: var(--muted); }
.contacts dd p { margin-bottom: .4rem; }
.email { font-family: var(--mono); font-size: 1rem; word-break: break-word; }
.email--pending { color: var(--muted); font-style: italic; }

/* ---------- Prose / articles ---------- */

.prose h2 { font-size: 1.75rem; margin-top: 2rem; }
.prose p { max-width: 40rem; }
.article__meta { color: var(--muted); font-family: var(--mono); font-size: .9rem; }

/* ---------- 404 and eggs ---------- */

.not-found { padding-bottom: 4rem; }
.not-found__small { color: var(--muted); font-size: .9rem; margin-top: 3rem; font-style: italic; }
.egg-page { padding-bottom: 4rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line); margin-top: clamp(3rem, 8vw, 6rem);
  padding: 3rem var(--gutter) 2rem; display: grid; gap: 1.5rem; max-width: var(--max); margin-inline: auto;
}
.site-footer__name { font: 600 1.5rem/1.2 var(--display); margin-bottom: .25rem; }
.site-footer__tagline { color: var(--muted); margin: 0; }
.site-footer__nav { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-footer__nav a { color: var(--text); text-decoration: none; display: inline-block; padding-block: .3rem; }
.site-footer__nav a:hover { text-decoration: underline; }
.site-footer__legal { color: var(--muted); font-size: .875rem; margin: 0; }
.footer-egg { color: var(--muted); text-decoration: none; padding: .3rem; }
.footer-egg:hover, .footer-egg:focus-visible { color: var(--lilac); }
.footer-button {
  background: none; border: 0; padding: 0; font: inherit; color: var(--muted);
  text-decoration: underline; text-underline-offset: .2em; cursor: pointer;
}
.footer-button:hover, .footer-button:focus-visible { color: var(--lilac); }

/* ---------- Analytics consent ---------- */

.consent {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 80; margin-inline: auto; max-width: 40rem;
  background: var(--ink-2); color: var(--text); border: 1px solid var(--line); border-radius: 1rem;
  padding: 1.1rem 1.25rem; box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, .45);
}
.consent[hidden] { display: none; }
.consent__text { margin: 0 0 .9rem; font-size: .9375rem; }
.consent__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.button--quiet { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.button--quiet:hover { background: var(--ink-3); color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); z-index: 90;
  background: var(--purple); color: #fff; padding: .8rem 1.2rem; border-radius: 999px;
  font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .4s, transform .4s var(--ease);
  max-width: calc(100vw - 2rem); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Parallax is opt-in via JS and only nudges panel media a few pixels. */
[data-parallax] .panel__media img { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .lab__media { transform: none; }
}

@media print {
  .site-header, .site-footer, .preview-banner, .hero__media, .toast, .consent { display: none; }
  body { background: #fff; color: #000; }
}

/* Only opacity animates; retain the existing overlay and hero geometry. */
.hero__slide { opacity: 0; transition: opacity 1200ms var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__controls { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: 1rem; }
.hero__controls[hidden] { display: none; }
.hero__controls button { min-height: 44px; min-width: 44px; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(21,19,24,.85); color: var(--text); font: 600 .85rem/1 var(--sans); cursor: pointer; }
.hero__controls button[aria-pressed="true"] { background: var(--text); color: #151318; }
/* The video sits over the slideshow and fades in once it is really playing. */
.hero__video { opacity: 0; transition: opacity 700ms var(--ease); object-position: 65% 35%; }
.hero__video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero__slide, .hero__video { transition: none; } }
@media print { .hero__controls { display: none; } }

@media (max-width: 30rem) {
  .hero__controls { display: grid; grid-template-columns: repeat(3, 44px); }
  [data-slideshow-toggle] { grid-column: 1 / -1; justify-self: start; }
  .hero__video { object-position: 60% 40%; }
}

/* Asset slot geometry, generated from src/content/assets.mjs */
[data-slot="hero"]{aspect-ratio:1672 / 941}[data-slot="hero"] img,[data-slot="hero"] video{object-position:75% 35%}
[data-slot="project-adventure-app"]{aspect-ratio:1600 / 900}[data-slot="project-adventure-app"] img,[data-slot="project-adventure-app"] video{object-position:50% 45%}
[data-slot="project-audio-drama"]{aspect-ratio:1200 / 900}[data-slot="project-audio-drama"] img,[data-slot="project-audio-drama"] video{object-position:50% 50%}
[data-slot="project-collaborative-creator"]{aspect-ratio:1200 / 900}[data-slot="project-collaborative-creator"] img,[data-slot="project-collaborative-creator"] video{object-position:50% 50%}
[data-slot="experiment-motorsport"]{aspect-ratio:1600 / 900}[data-slot="experiment-motorsport"] img,[data-slot="experiment-motorsport"] video{object-position:50% 50%}
[data-slot="founder-portrait"]{aspect-ratio:800 / 1000}[data-slot="founder-portrait"] img,[data-slot="founder-portrait"] video{object-position:50% 30%}
[data-slot="hero"] img[data-slide="0"]{object-position:75% 35%}
[data-slot="hero"] img[data-slide="1"]{object-position:50% 45%}
[data-slot="hero"] img[data-slide="2"]{object-position:50% 40%}