/* ProtoTanks — the artwork, its lineage and the commissioned installation. */

:root {
  --bg: #0b0c0e;
  --panel: #131518;
  --panel-2: #1a1d21;
  --ink: #f2f1ee;
  --ink-2: #b7b5b0;
  --muted: #86847f;
  --line: rgba(242, 241, 238, .10);
  --line-strong: rgba(242, 241, 238, .22);
  --accent: #6fc7d6;           /* tank water, used sparingly */
  --radius: 14px;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --max: 1360px;
  --nav-bg: rgba(11, 12, 14, .78);
  --caption-bg: rgba(11, 12, 14, .82);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f3f0;
  --panel: #ffffff;
  --panel-2: #f7f6f3;
  --ink: #141518;
  --ink-2: #4a4a48;
  --muted: #6b6a66;
  --line: rgba(20, 21, 24, .10);
  --line-strong: rgba(20, 21, 24, .24);
  --accent: #157a8a;
  --nav-bg: rgba(244, 243, 240, .82);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 400; font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
main:focus { outline: none; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 100; }

.mono { font-family: var(--mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ─── nav ─── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem;
  padding: 1.1rem var(--gutter);
  transition: background .35s ease, border-color .35s ease;
  border-bottom: 1px solid var(--line); background: var(--nav-bg); backdrop-filter: blur(16px);
}
.nav.scrolled { background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--line); }
.wordmark { font-weight: 600; font-size: 1.125rem; letter-spacing: -.01em; color: var(--ink); }
.wordmark span { font-weight: 400; color: var(--ink-2); }
.nav nav { display: flex; gap: clamp(.9rem, 2.2vw, 2rem); align-items: center; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.nav nav a { font-size: .875rem; color: var(--ink-2); transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.cta { color: var(--bg); background: var(--ink); padding: .5rem 1rem; border-radius: 999px; font-weight: 500; }
.nav nav a.cta:hover { opacity: .85; }
.theme { font: inherit; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); cursor: pointer; }
.theme:hover { color: var(--ink); border-color: var(--ink-2); }
.theme svg { width: 1rem; height: 1rem; }
.theme .sun { display: none; }
:root[data-theme="light"] .theme .sun { display: block; }
:root[data-theme="light"] .theme .moon { display: none; }
@media (max-width: 800px) { .nav nav a:not(.cta) { display: none; } }
@media (max-width: 380px) { .nav { padding: .9rem 1rem; gap: .5rem; } .nav nav { gap: .6rem; } .nav nav a.cta { font-size: .8125rem; padding: .5rem .75rem; } }

/* ─── type ─── */
.eyebrow { font-family: var(--mono); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.025em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.25rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; margin-bottom: .5rem; }
.lede { font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.5; color: var(--ink-2); max-width: 44ch; margin: 1.5rem 0 0; }
.lede strong { font-weight: 500; color: var(--ink); }
.prose p { margin: 0 0 1.1rem; color: var(--ink-2); max-width: 58ch; }
.prose p:last-child { margin-bottom: 0; }
.prose a { border-bottom: 1px solid var(--line-strong); color: var(--ink); }
.prose a:hover { border-color: var(--accent); }
.prose a.btn { color: var(--bg); border-bottom: none; }
.small { font-size: .875rem; color: var(--muted); }

.btn {
  display: inline-block; font-size: .9375rem; font-weight: 500;
  color: var(--bg); background: var(--ink); padding: .9rem 1.5rem; border-radius: 999px;
  transition: background .2s, transform .2s;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn.ghost { color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: rgba(255,255,255,.14); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ─── layout ─── */
.section { padding: clamp(3.5rem, 7vw, 6rem) var(--gutter); max-width: var(--max); margin: 0 auto; }
.section + .section { border-top: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ─── hero and recorded studies ─── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; max-width: var(--max); margin: 0 auto; padding: clamp(7rem, 10vw, 9rem) var(--gutter) 4rem; }
.hero-copy { min-width: 0; }
.hero-copy h1 { font-size: clamp(2.75rem, 5.4vw, 4.75rem); }
.hero-copy .lede { max-width: 39ch; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); }
.hero-copy .actions { align-items: flex-start; flex-direction: column; gap: 1rem; }
.hero-note { margin: 2.5rem 0 0; font-size: .8125rem; color: var(--muted); }
.hero-film { margin: 0; min-width: 0; }
.art-film { display: block; width: 100%; height: auto; max-width: 100%; background: #091416; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.hero-film figcaption { margin-top: 1rem; font-size: .9375rem; }
.film-credit { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hero-film .small { font-size: .75rem; }
.film-description { margin: .65rem 0 0; font-size: .8125rem; color: var(--muted); line-height: 1.6; }
.motion { flex-shrink: 0; font: inherit; font-size: .8125rem; color: var(--ink); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: .6rem .9rem; cursor: pointer; }
.motion:hover { border-color: var(--ink-2); }
.text-link { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .3em; }
.text-link:hover { text-decoration-color: var(--accent); }
.film-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-top: 2.5rem; }
.film-grid figure { margin: 0; min-width: 0; }
.film-grid video { aspect-ratio: 1 / 1; object-fit: contain; max-height: 530px; }
.film-grid figcaption { margin-top: 1.25rem; }
.film-grid figcaption p { margin: .4rem 0 0; color: var(--ink-2); }
.film-grid figcaption .small { max-width: 53ch; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; padding-top: 7rem; gap: 2.5rem; } .hero-copy .actions { flex-direction: row; align-items: center; gap: 1.25rem; } .hero-copy .lede { max-width: 48ch; } .hero-note { margin-top: 1.5rem; } .hero-film { max-width: 580px; width: 100%; justify-self: center; } }
@media (max-width: 600px) { .film-grid { grid-template-columns: 1fr; gap: 2.5rem; } .film-credit { align-items: flex-start; } .hero-film .small { display: inline-block; margin-top: .3rem; } }

/* ─── placement concepts and population view ─── */
.places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.places figure { margin: 0; min-width: 0; }
.places img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.places figcaption { display: flex; flex-direction: column; gap: .3rem; margin-top: 1rem; }
.places figcaption b { font-size: 1rem; font-weight: 500; }
.places figcaption span { font-size: .875rem; color: var(--ink-2); }
.bleed { margin: 2.5rem 0 0; }
.bleed img { width: 100%; border-radius: var(--radius); }
.bleed figcaption { margin-top: .9rem; }
@media (max-width: 700px) { .places { grid-template-columns: 1fr; gap: 2rem; } }

/* ─── studio worlds (ProtoHabitats tank studies) ─── */
.worlds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.25rem; margin-top: 2.5rem; }
.worlds figure { margin: 0; min-width: 0; }
.worlds video { aspect-ratio: 16 / 9; object-fit: cover; }
.worlds figcaption { display: flex; flex-direction: column; gap: .3rem; margin-top: 1rem; }
.worlds figcaption b { font-size: 1rem; font-weight: 500; }
.worlds figcaption span { font-size: .875rem; color: var(--ink-2); }
.worlds figcaption .small { color: var(--muted); font-size: .8125rem; }
.worlds-live { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.25rem; margin: 2.5rem 0 0; }
.worlds-live .small { color: var(--muted); }
@media (max-width: 900px) { .worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .worlds { grid-template-columns: 1fr; } }

/* ─── included cards ─── */
.offer { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 760px) { .offer { grid-template-columns: 1fr; } }
.offer li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem 1.75rem 1.9rem; display: flex; flex-direction: column; min-width: 0; }
.offer .num { font-family: var(--mono); font-size: .6875rem; letter-spacing: .14em; color: var(--accent); margin-bottom: 1.75rem; }
.offer p { margin: 0; color: var(--ink-2); font-size: .9375rem; }
.note { margin: 1.25rem 0 0; color: var(--ink-2); font-size: .9375rem; }

/* ─── certificate card ─── */
.prov-grid { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (max-width: 900px) { .prov-grid { grid-template-columns: 1fr; } }
.cert, .heredity { min-width: 0; }
.cert { margin: 0; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.5rem; }
.cert-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.cert-series { font-weight: 600; font-size: .9375rem; }
.cert-no { color: var(--accent); }
.cert-plate { margin: 1.25rem 0; background: #000; border-radius: 10px; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; position: relative; }
.cert-plate img { width: 70%; height: 82%; max-width: 420px; object-fit: contain; }
.cert-plate span { position: absolute; left: .9rem; bottom: .7rem; color: rgba(242,241,238,.6); }
.cert-name { font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; margin: .25rem 0 1rem; }
.cert-name em { font-style: italic; font-weight: 400; color: var(--ink-2); }
.cert-dl { margin: 0; display: grid; gap: .4rem; }
.cert-dl div { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); gap: 1rem; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.cert-dl dt { font-family: var(--mono); font-size: .625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cert-dl dd { margin: 0; font-size: .9375rem; min-width: 0; overflow-wrap: anywhere; }
.cert-dl dd.hash { font-size: .6875rem; text-transform: none; letter-spacing: .02em; color: var(--accent); word-break: break-all; }
.genes { display: block; width: 100%; height: 36px; margin: 1.1rem 0 .75rem; }
.genes rect { fill: var(--ink-2); opacity: .55; }
.cert-foot { text-transform: none; letter-spacing: .01em; font-size: .75rem; color: var(--muted); margin: 0; }
@media (max-width: 480px) { .cert { padding: 1.1rem; } .cert-dl div { grid-template-columns: 1fr; gap: .2rem; } }

.heredity .eyebrow { margin-bottom: 1.25rem; }
.fig3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.fig3 figure { margin: 0; }
.fig3 img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #0e1014; border-radius: 10px; border: 1px solid var(--line); }
.fig3 figcaption { margin-top: .6rem; display: flex; flex-direction: column; gap: .15rem; }
.fig3 b { font-weight: 500; font-size: .8125rem; }
.fig3 span { font-size: .75rem; color: var(--muted); }
.heredity .small { margin-top: 1.25rem; max-width: 42ch; }
@media (max-width: 480px) { .fig3 { grid-template-columns: 1fr; } .fig3 img { max-width: 220px; } }

/* ─── selected history ─── */
.lineage-figs { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.lineage-figs figure { margin: 0; min-width: 0; }
.archive-image { display: flex; align-items: center; justify-content: center; width: 100%; height: 320px; background: #0a1419; border-radius: var(--radius); overflow: hidden; }
.archive-image img { width: 100%; height: 100%; object-fit: contain; }
.archive-image.paper { background: #f7f7f5; padding: 1rem; }
.archive-image.garden { background: #081e30; }
.archive-image.garden img { max-width: 250px; max-height: 365px; }
.lineage-figs figcaption { margin-top: 1.25rem; }
.lineage-figs h3 { font-size: 1.0625rem; line-height: 1.25; overflow-wrap: anywhere; }
.lineage-figs .eyebrow { font-size: .5625rem; letter-spacing: .09em; margin-bottom: .75rem; }
.lineage-figs figcaption > p:not(.eyebrow) { font-size: .875rem; color: var(--ink-2); margin: .7rem 0; }
.lineage-figs .text-link { font-size: .8125rem; }
.lineage-note { padding-top: 1.5rem; border-top: 1px solid var(--line); margin: 2rem 0 0; font-size: .9375rem; color: var(--ink-2); }
.lineage-note a { display: inline-block; margin-top: .5rem; }
@media (max-width: 1000px) { .lineage-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.25rem; } .archive-image { height: 350px; } }
@media (max-width: 560px) { .lineage-figs { grid-template-columns: 1fr; gap: 2.5rem; } .archive-image { height: 380px; } .lineage-figs .eyebrow { font-size: .6875rem; } .lineage-figs h3 { font-size: 1.25rem; } }

/* ─── care and enquiry ─── */
.care-details { margin-top: 2.5rem; }
.care-details > h3 { margin-bottom: 1.25rem; }
details { border-top: 1px solid var(--line-strong); padding: 1rem 0; }
summary { cursor: pointer; font-weight: 500; padding: .2rem 0; }
details p { color: var(--ink-2); max-width: 75ch; margin: .75rem 0 .25rem; font-size: .9375rem; }
.enquiry-form { max-width: 850px; margin-top: 2.5rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.form-intro { margin: 0 0 1.5rem; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.form-grid .wide { grid-column: 1 / -1; }
label { display: block; font-size: .875rem; font-weight: 500; }
input, select, textarea { display: block; width: 100%; min-width: 0; margin-top: .45rem; padding: .8rem; font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 7px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; }
button.btn { border: none; cursor: pointer; font-family: inherit; line-height: inherit; }
button.btn.ghost { border: 1px solid var(--line-strong); }
.enquiry-form > .btn { margin-top: 1.5rem; }
.enquiry-form > .small { margin-bottom: 0; }
.enquiry-draft { max-width: 850px; margin-top: 2rem; padding: 1.5rem; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.enquiry-draft p { color: var(--ink-2); }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ─── footer ─── */
.foot { border-top: 1px solid var(--line); padding: 3rem var(--gutter) 3.5rem; max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: start; }
.foot nav { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.foot nav a { font-size: .875rem; color: var(--ink-2); }
.foot nav a:hover { color: var(--ink); }
.foot > .mono { grid-column: 1 / -1; text-transform: none; letter-spacing: .02em; margin: 0; }
.foot div .mono { margin: .5rem 0 0; }
@media (max-width: 640px) { .foot { grid-template-columns: 1fr; } }

:root[data-theme="light"] .offer li, :root[data-theme="light"] .cert { box-shadow: 0 1px 2px rgba(20,21,24,.04), 0 8px 24px -12px rgba(20,21,24,.12); }
:root[data-theme="light"] .cert-plate span { color: rgba(242,241,238,.7); }

/* ─── secondary pages ─── */
.page { max-width: 44rem; margin: 0 auto; padding: clamp(5rem, 14vh, 9rem) var(--gutter) 6rem; }
.page .wordmark { display: inline-block; margin-bottom: 3rem; }
.page h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 1.5rem; }
.page .prose { margin-top: 1.5rem; }
.page .actions { margin-top: 2.5rem; }

[hidden] { display: none !important; }
.film-introduction .film-feature { margin: 2.5rem 0 1.5rem; }
.film-introduction .film-feature video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #efeada; }
.film-introduction .film-feature figcaption { margin-top: 1rem; color: var(--ink-2); font-size: .875rem; max-width: 80ch; }
.film-introduction .film-downloads { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; margin: 1.5rem 0; font-size: .875rem; }
.film-introduction .film-chapters ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; }
.film-introduction .film-chapters button { display: block; width: 100%; min-height: 44px; padding: .65rem .75rem; text-align: left; font: inherit; font-size: .875rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 5px; cursor: pointer; }
.film-introduction .film-chapters button span { font-family: var(--mono); color: var(--accent); margin-right: .5rem; }
.film-introduction .film-transcript h3 { margin-top: 2rem; }
@media (max-width: 600px) { .film-introduction .film-chapters ol { grid-template-columns: 1fr; } }
section[id], #enquiry-draft { scroll-margin-top: 7rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } .btn:hover { transform: none; } }
@media (forced-colors: active) { .btn, .motion, .theme, input, select, textarea, .archive-image { border: 1px solid ButtonText; } .art-film { forced-color-adjust: none; } }
