/*
 * SILO Apps: one stylesheet for the whole site.
 *
 * Colour has two layers:
 *   theme   dark (the default) or light, chosen by the visitor: html[data-theme].
 *   accent  each project carries one colour of its own: [data-accent="notes|loom|addes|mend"].
 *           Outside a project the accent is a quiet neutral, so colour arrives only with the work.
 * Type is SILO Serif for display and SILO Sans for text, both drawn for our own apps.
 */

@font-face { font-family: "SILO Serif"; src: url("/assets/fonts/SILOSerif-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "SILO Serif"; src: url("/assets/fonts/SILOSerif-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "SILO Sans"; src: url("/assets/fonts/SILOSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "SILO Sans"; src: url("/assets/fonts/SILOSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "SILO Sans"; src: url("/assets/fonts/SILOSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --serif: "SILO Serif", Georgia, "Times New Roman", serif;
  --sans: "SILO Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --wide: 86rem;
  --text: 38rem;
  --radius: clamp(.9rem, 1.6vw, 1.6rem);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --bg: #0b0b0c; --raise: #141416; --fg: #f3f0e9; --muted: #a39f95; --line: #29292d;
  --accent: #d9d3c5; --amber: #e9b45f;
  --scene-silo: #4b4c54;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f1ea; --raise: #fbf9f4; --fg: #17171a; --muted: #5a574f; --line: #d6d1c4;
  --accent: #3a3833; --amber: #c8872a;
  --scene-silo: #dcd6c8;
  color-scheme: light;
}
[data-accent="notes"] { --accent: #7cc4f5; }
[data-accent="loom"]  { --accent: #e3cc8f; }
[data-accent="addes"] { --accent: #b9a8f4; }
[data-accent="mend"]  { --accent: #a9c48f; }
:root[data-theme="light"] [data-accent="notes"] { --accent: #125a9c; }
:root[data-theme="light"] [data-accent="loom"]  { --accent: #7d5c0c; }
:root[data-theme="light"] [data-accent="addes"] { --accent: #5a3fb0; }
:root[data-theme="light"] [data-accent="mend"]  { --accent: #3f6427; }

*, *::before, *::after { box-sizing: border-box; }
/* Very wide screens get a larger base size, so the page fills them instead of floating in the middle. */
@media (min-width: 110em) { html { font-size: 112.5%; } }
@media (min-width: 150em) { html { font-size: 137.5%; } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, canvas { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -.015em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--fg); color: var(--bg); }
[hidden] { display: none !important; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--fg); color: var(--bg); padding: .7rem 1rem; border-radius: .5rem; }
.skip:focus { top: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Small parts used everywhere ---- */
.eyebrow { font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.eyebrow .num { color: var(--accent); font-variant-numeric: tabular-nums; }
.lede { font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.5; color: var(--muted); max-width: var(--text); }
.fine { font-size: .875rem; color: var(--muted); }

.button {
  display: inline-flex; align-items: center; gap: .9rem; min-height: 3rem; padding: .55rem .6rem .55rem 1.4rem;
  border-radius: 999px; background: var(--fg); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 1rem;
  border: 1px solid var(--fg); cursor: pointer; font-family: inherit; line-height: 1.2;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.button .arrow { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--bg); color: var(--fg); flex: none; transition: transform .35s var(--ease); }
.button .arrow svg { width: 1rem; height: 1rem; }
.button:hover .arrow { transform: translateX(.2rem); }
.button.down:hover .arrow { transform: translateY(.2rem); }
.button.ghost { background: color-mix(in srgb, var(--bg) 60%, transparent); color: var(--fg); border-color: var(--line); }
.button.ghost .arrow { background: var(--fg); color: var(--bg); }
.button.ghost:hover { border-color: var(--fg); }
.button.plain { padding-right: 1.4rem; }
.button[disabled] { opacity: .55; cursor: default; }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: .5rem; min-height: 2rem; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: .4rem; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
a.tag { color: var(--bg); background: var(--fg); border-color: var(--fg); font-weight: 700; min-height: 2.75rem; padding-inline: .9rem; }
a.tag svg { width: .85rem; height: .85rem; transition: transform .3s var(--ease); }
a.tag:hover svg { transform: translate(.15rem, -.15rem); }
.tag.live::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }

/* ---- Header: one floating bar ---- */
.site-header {
  position: fixed; z-index: 50; top: .75rem; left: 50%; transform: translateX(-50%);
  width: min(100% - 1.5rem, 72rem);
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .4rem .35rem .9rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
}
.brand { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; text-decoration: none; min-height: 2.75rem; min-width: 2.75rem; flex: none; margin-right: auto; }
/* The mark: two silos with an S between them. One takes the text colour, the other is amber. */
.logo { display: block; width: 1.3rem; height: 1.9rem; flex: none; }
.logo-b { fill: var(--amber); }
.brand-word { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .01em; white-space: nowrap; }
.site-header nav { display: flex; align-items: center; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .85rem; border-radius: 999px; text-decoration: none; font-size: .9375rem; color: var(--muted); transition: color .2s; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--fg); }
.site-header nav a[aria-current="page"] { background: color-mix(in srgb, var(--fg) 9%, transparent); }
.theme-toggle { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.theme-toggle:hover { color: var(--fg); }
.theme-toggle .moon, :root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
.header-cta { min-height: 2.75rem; padding: .3rem .35rem .3rem 1.1rem; font-size: .9375rem; gap: .6rem; }
.header-cta .arrow { width: 1.9rem; height: 1.9rem; }
@media (max-width: 47.99em) { .header-cta { display: none; } .site-header { padding-right: .2rem; } }
@media (max-width: 26em) { .brand-word { display: none; } .site-header nav a { padding: 0 .6rem; } .site-header { padding-left: .3rem; } }
@media (max-width: 22.5em) { .site-header { gap: .15rem; } .site-header nav a { padding: 0 .3rem; font-size: .875rem; } }

/* ---- Hero ---- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
  padding: clamp(6.5rem, 14vh, 9rem) var(--gutter) clamp(1.5rem, 4vh, 2.75rem);
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; z-index: -2; opacity: 0; transition: opacity 1.6s ease; pointer-events: none; --scene-bg: var(--bg); --scene-accent: var(--accent); }
.scene.is-live { opacity: 1; }
/* Where the 3D field cannot run, a flat field of dots stands in for it. */
.hero-dots { position: absolute; inset: 38% 0 0 0; z-index: -3; pointer-events: none; transition: opacity 1.2s ease;
  background: radial-gradient(circle, var(--scene-silo) 0 5px, transparent 6px) 0 0 / 30px 26px, radial-gradient(circle, var(--scene-silo) 0 5px, transparent 6px) 15px 13px / 30px 26px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%, #000 70%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 45%, #000 70%, transparent); opacity: .55; }
.scene.is-live + .hero-dots { opacity: 0; }
/* Two soft veils keep the words readable over the field: one from the top, one from the bottom. */
.hero::before, .hero::after { content: ""; position: absolute; left: 0; right: 0; z-index: -1; pointer-events: none; }
.hero::before { top: 0; height: 58%; background: linear-gradient(to bottom, var(--bg) 18%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent); }
.hero::after { bottom: 0; height: 34%; background: linear-gradient(to top, var(--bg) 6%, color-mix(in srgb, var(--bg) 78%, transparent) 50%, transparent); }
.hero-top { width: 100%; max-width: var(--wide); margin: 0 auto; }
.hero h1 { font-size: clamp(2.25rem, 11vw, 8.25rem); line-height: 1; letter-spacing: -.025em; margin-top: 1.25rem; }
.hero h1 .line { display: block; }
.hero h1 a {
  display: inline-block; line-height: 1; min-height: 2.75rem; /* a box one line tall, so two links on neighbouring lines never share a tap area */
  color: inherit; text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 .93em / 100% .03em;
  transition: color .35s var(--ease), background-size .35s var(--ease);
}
.hero h1 a:hover, .hero h1 a:focus-visible { color: var(--accent); background-size: 100% .07em; }
.hero-foot { width: 100%; max-width: var(--wide); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; }
.hero-foot .lede { color: var(--fg); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
/* The heading rises once, line by line, when the page opens. */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero h1 .line, html.js .hero .eyebrow, html.js .hero-foot > * { opacity: 0; transform: translateY(1.1em); animation: rise 1s var(--ease) forwards; }
  html.js .hero .eyebrow { animation-delay: .05s; transform: translateY(.6em); }
  html.js .hero h1 .line:nth-child(1) { animation-delay: .12s; }
  html.js .hero h1 .line:nth-child(2) { animation-delay: .22s; }
  html.js .hero h1 .line:nth-child(3) { animation-delay: .32s; }
  html.js .hero-foot > :nth-child(1) { animation-delay: .5s; transform: translateY(.8em); }
  html.js .hero-foot > :nth-child(2) { animation-delay: .6s; transform: translateY(.8em); }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---- Sections ---- */
.section { padding: clamp(4.5rem, 11vw, 10rem) var(--gutter) 0; }
.section > * { max-width: var(--wide); margin-inline: auto; }
.section-head { display: grid; gap: 1.25rem; }
.section-head h2 { font-size: clamp(2.25rem, 5.6vw, 5rem); }

/* SILONotes, the featured project: words centred above a wide demo, the button centred below. */
.feature .section-head { justify-items: center; text-align: center; }
.feature .eyebrow { justify-content: center; }
.feature h2 { display: inline-flex; align-items: center; gap: .3em; font-size: clamp(3rem, 10vw, 9rem); letter-spacing: -.03em; }
.feature h2 img { width: .78em; height: .78em; flex: none; }
.feature .lede { text-align: center; max-width: 40rem; }

.panel {
  display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--raise);
  border: 1px solid var(--line);
  box-shadow: 0 2.5rem 7rem -3rem color-mix(in srgb, var(--accent) 55%, transparent);
}
.panel img, .panel video { width: 100%; }
/* A soft light follows the pointer across a panel. */
.panel::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(28rem circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); }
.panel:hover::after { opacity: 1; }

.stage { margin-top: clamp(2rem, 5vw, 4rem); }
.stage-frame { aspect-ratio: 1120 / 626; background-size: cover; background-position: center; }
.stage-video { width: 100%; height: 100%; object-fit: cover; transition: opacity .28s ease; }
.stage-video.is-swapping { opacity: 0; }
.stage-play { position: absolute; right: .75rem; bottom: .75rem; min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-size: .875rem; cursor: pointer; white-space: nowrap; z-index: 1; }
.picker { display: flex; gap: .4rem; justify-content: center; margin: 1.5rem auto 0; overflow-x: auto; scrollbar-width: none; padding: .25rem; max-width: 100%; }
.picker::-webkit-scrollbar { display: none; }
.picker button { flex: none; min-height: 2.75rem; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: .9375rem; cursor: pointer; white-space: nowrap; transition: color .2s, background .2s, border-color .2s; }
.picker button:hover { color: var(--fg); border-color: var(--muted); }
.picker button[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 700; }
@media (max-width: 40em) { .picker { justify-content: flex-start; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); max-width: none; } }
.stage-caption { margin-top: 1.5rem; text-align: center; display: grid; gap: .6rem; justify-items: center; align-content: start; }
@media (min-width: 40em) { .stage-caption { min-height: 8.5rem; } }
.stage-title { font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.15; }
.stage-text { color: var(--muted); max-width: 42rem; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 2.5rem; margin-top: clamp(2.5rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.pillars li { padding: 1.75rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .6rem; align-content: start; }
.pillars h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.12; }
.pillars p { color: var(--muted); font-size: 1rem; max-width: 26rem; }
.pillars .n { font-size: .75rem; letter-spacing: .14em; color: var(--accent); }
.pillars p a { color: var(--fg); }
.cta-row { display: grid; justify-items: center; gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); text-align: center; }

/* The other projects: a wide picture, then title on the left and the write-up on the right. */
.work .section-head { border-bottom: 1px solid var(--line); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.case { padding-top: clamp(2.5rem, 6vw, 5rem); }
.case + .case { margin-top: clamp(1.5rem, 4vw, 3.5rem); }
.case-media { display: block; }
.case-media .panel { aspect-ratio: 16 / 9; }
.case-media img { width: 100%; height: 100%; object-fit: cover; }
.case-body { display: grid; gap: 1.25rem 4rem; margin-top: clamp(1.25rem, 2.5vw, 2rem); }
@media (min-width: 56em) { .case-body { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.case-title { display: grid; gap: .7rem; align-content: start; justify-items: start; }
.case-title h3 { font-size: clamp(2.1rem, 4.6vw, 4rem); display: flex; align-items: center; gap: .35em; }
.case-title h3 img { width: .9em; height: .9em; border-radius: 22%; flex: none; object-fit: contain; }
.case-kind { color: var(--muted); font-size: 1.125rem; }
.case-text { display: grid; gap: 1.1rem; align-content: start; }
.case-text p { color: var(--muted); max-width: var(--text); }
.case-text p.strong { color: var(--fg); font-size: clamp(1.125rem, 1.5vw, 1.3rem); line-height: 1.45; }

/* LOOM: a slideshow of screenshots in one frame */
.loom-frame { position: relative; }
.loom-still { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.loom-still.is-on { opacity: 1; }
.slides-nav { display: inline-flex; align-items: center; gap: .15rem; padding: .2rem; border: 1px solid var(--line); border-radius: 999px; }
.slides-nav[hidden] { display: none; }
.slides-nav button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.slides-nav button:hover { background: color-mix(in srgb, var(--fg) 12%, transparent); color: var(--fg); }
.slides-pause .i-play, .slides-pause.is-paused .i-pause { display: none; }
.slides-pause.is-paused .i-play { display: block; }
.slides-pause.is-paused { color: var(--accent); }
.slides-count { padding: 0 .9rem 0 .5rem; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slides-caption { color: var(--muted); font-size: .9375rem; min-height: 1.5em; }
/* ADdes: the art drifts very slowly */
@media (prefers-reduced-motion: no-preference) {
  .drift img { animation: drift 46s ease-in-out infinite alternate; transform-origin: 62% 42%; }
}
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) rotate(.6deg); } }

/* ---- Closing band and footer ---- */
.closing-inner { display: grid; gap: 2rem; border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 6vw, 5rem); }
.closing h2 { font-size: clamp(2.4rem, 6.4vw, 6rem); max-width: 18ch; }
.closing .lede { margin-top: 1.25rem; }
.closing-inner > .button { justify-self: start; }
@media (min-width: 56em) { .closing-inner { grid-template-columns: 1fr auto; align-items: end; } }

.site-footer { padding: clamp(4.5rem, 11vw, 10rem) var(--gutter) 2rem; overflow: hidden; }
.footer-inner { max-width: var(--wide); margin: 0 auto; display: grid; gap: 2.5rem; border-top: 1px solid var(--line); padding-top: 2.5rem; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 48em) { .footer-inner { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); } .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--muted); max-width: 22rem; margin-top: .75rem; }
.site-footer nav { display: grid; align-content: start; }
.site-footer nav h2 { font: 400 .75rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; text-decoration: none; justify-self: start; }
.site-footer nav a:hover { text-decoration: underline; }
.footer-word { max-width: var(--wide); margin: clamp(2.5rem, 6vw, 5rem) auto 0; font-family: var(--serif); font-size: clamp(3.2rem, 21.5vw, 20.5rem); line-height: .8; letter-spacing: -.035em; color: color-mix(in srgb, var(--fg) 12%, transparent); white-space: nowrap; user-select: none; }
.footer-fine { max-width: var(--wide); margin: 1.75rem auto 0; font-size: .8125rem; color: var(--muted); }

/* ---- Inner pages ---- */
.page-head { padding: clamp(8rem, 18vh, 12rem) var(--gutter) 0; }
.page-head > * { max-width: var(--wide); margin-inline: auto; }
.page-head h1 { font-size: clamp(3rem, 11vw, 10rem); letter-spacing: -.03em; margin-top: 1rem; }
.page-head .lede-wrap { margin-top: 1.5rem; }

/* Projects: an index, then each project in full */
.index { margin-top: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.index a { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); align-items: baseline; gap: .15rem 1rem; padding: 1.1rem 0; min-height: 4.5rem; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .35s var(--ease), color .25s; }
.index .num { font-size: .8125rem; letter-spacing: .12em; color: var(--muted); }
.index .name { font-family: var(--serif); font-size: clamp(1.6rem, 3.6vw, 2.75rem); line-height: 1.05; }
.index .kind, .index .state { grid-column: 2; color: var(--muted); }
.index .state { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.index a:hover { padding-left: .75rem; color: var(--accent); }
@media (min-width: 56em) {
  .index a { grid-template-columns: 4rem minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); }
  .index .kind { grid-column: 3; }
  .index .state { grid-column: 4; text-align: right; }
}

.project { padding-top: clamp(4.5rem, 10vw, 9rem); }
.project-head { display: grid; gap: 1rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.project-head h2 { font-size: clamp(2.6rem, 8vw, 7rem); letter-spacing: -.03em; display: flex; align-items: center; gap: .3em; }
.project-head h2 img { width: .8em; height: .8em; flex: none; border-radius: 22%; object-fit: contain; }
.project-head .case-kind { font-size: clamp(1.2rem, 2vw, 1.6rem); color: var(--fg); max-width: 44rem; }
.project .panel { aspect-ratio: 16 / 9; }
.project .panel img { width: 100%; height: 100%; object-fit: cover; }
.project-grid { display: grid; gap: 2.5rem 4rem; margin-top: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 62em) { .project-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.why h3 { font: 400 .8125rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.why ol { counter-reset: why; border-top: 1px solid var(--line); }
.why li { counter-increment: why; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .35rem 0; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.why li::before { content: counter(why, decimal-leading-zero); font-size: .75rem; letter-spacing: .12em; color: var(--accent); padding-top: .5rem; }
.why h4 { font: 400 clamp(1.3rem, 2vw, 1.7rem)/1.15 var(--serif); letter-spacing: -.01em; }
.why p { grid-column: 2; color: var(--muted); max-width: var(--text); }
.why p a { color: var(--fg); }
.facts { align-self: start; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: var(--raise); display: grid; gap: 1.1rem; }
@media (min-width: 62em) { .facts { position: sticky; top: 6rem; } }
.facts dl { display: grid; gap: .9rem; }
.facts dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin-top: .15rem; }
.facts .button { justify-self: start; margin-top: .4rem; }

/* About: a placeholder that waits */
.waiting { min-height: 100vh; min-height: 100svh; display: grid; justify-items: center; align-content: center; gap: 1.25rem; padding: 7rem var(--gutter) 3rem; text-align: center; }
.waiting-art { position: relative; width: min(100%, 30rem); aspect-ratio: 3 / 2; }
.waiting-art .scene { z-index: 0; }
.bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 7%; padding-bottom: 12%; transition: opacity .6s; }
.bars span { width: 17%; height: 36%; border-radius: 999px 999px 0 0; background: var(--scene-silo); }
.waiting-art.has-scene .bars { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .bars span { animation: bar 2s var(--ease) infinite; }
  .bars span:nth-child(2) { animation-delay: .34s; }
  .bars span:nth-child(3) { animation-delay: .68s; }
  .dots span { animation: dot 1.8s linear infinite; }
  .dots span:nth-child(2) { animation-delay: .3s; }
  .dots span:nth-child(3) { animation-delay: .6s; }
}
@keyframes bar { 0%, 62%, 100% { height: 36%; } 30% { height: 78%; background: var(--fg); } }
@keyframes dot { 0%, 100% { opacity: .15; } 30%, 70% { opacity: 1; } }
.waiting h1 { font-size: clamp(2.6rem, 8vw, 6rem); letter-spacing: -.02em; }
.waiting p { color: var(--muted); max-width: 30rem; }
.waiting-links { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: .75rem; }

/* Contact */
.contact { display: grid; gap: 3rem 5rem; padding: clamp(8rem, 18vh, 12rem) var(--gutter) 0; max-width: calc(var(--wide) + var(--gutter) * 2); margin: 0 auto; }
@media (min-width: 60em) { .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } .contact-intro { position: sticky; top: 7rem; } }
.contact-intro { display: grid; gap: 1.5rem; }
.contact-intro h1 { font-size: clamp(3rem, 9vw, 7.5rem); letter-spacing: -.03em; }
.contact-list { border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 2.6rem 1fr; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.contact-list .n { font-size: .75rem; letter-spacing: .12em; color: var(--muted); padding-top: .3rem; }
.form { display: grid; gap: 1.25rem; padding: clamp(1.25rem, 3vw, 2.25rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--raise); }
.field { display: grid; gap: .4rem; }
.field label { font-size: .875rem; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 3rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--bg); color: var(--fg); font: inherit; }
.field textarea { resize: vertical; min-height: 9rem; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #e2725b; }
.field-error { font-size: .875rem; color: #f0907c; }
:root[data-theme="light"] .field-error { color: #a3301a; }
.hp { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.form .button { justify-self: start; }
.form-status { min-height: 1.5rem; font-size: .9375rem; color: var(--muted); }
.form-status.is-error { color: #f0907c; }
:root[data-theme="light"] .form-status.is-error { color: #a3301a; }
.form-done { padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--raise); display: grid; gap: 1rem; }
.form-done h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }

/* 404 */
.lost { min-height: 80vh; display: grid; align-content: center; justify-items: start; gap: 1.5rem; padding: 8rem var(--gutter) 2rem; max-width: calc(var(--wide) + var(--gutter) * 2); margin: 0 auto; }
.lost h1 { font-size: clamp(3rem, 11vw, 9rem); }

/* ---- Arriving: sections ease in once as they are reached ---- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(2rem); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
  html.js .reveal.panel { transform: translateY(2rem) scale(.97); }
  html.js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
