/* ------------------------------------------------------------------
   Parth Kulkarni — site styles

   Two themes, both lifted from the dither references:
   light  cobalt ink on blue-white paper
   dark   cream and teal on near-black (the "night" palette)
   Every tint is a Bayer pattern on the hero's 3px grid, never opacity.
------------------------------------------------------------------- */
:root {
  --bg: #f4f8ff;
  --fg: #3f63c4;
  --accent: #3f63c4;
  --hero-bg: #3f63c4;
  --scene-ink: #3f63c4;
  --scene-paper-a: #f4f8ff;
  --scene-paper-b: #f4f8ff;
  --tint-25: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><rect width='12' height='12' fill='%23f4f8ff'/><path fill='%233f63c4' d='M0 0h3v3h-3zM6 0h3v3h-3zM0 6h3v3h-3zM6 6h3v3h-3z'/></svg>");
  --tint-50: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><rect width='12' height='12' fill='%23f4f8ff'/><path fill='%233f63c4' d='M0 0h3v3h-3zM6 0h3v3h-3zM3 3h3v3h-3zM9 3h3v3h-3zM0 6h3v3h-3zM6 6h3v3h-3zM3 9h3v3h-3zM9 9h3v3h-3z'/></svg>");
  --tint-75: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><rect width='12' height='12' fill='%23f4f8ff'/><path fill='%233f63c4' d='M0 0h3v3h-3zM3 0h3v3h-3zM6 0h3v3h-3zM9 0h3v3h-3zM3 3h3v3h-3zM9 3h3v3h-3zM0 6h3v3h-3zM3 6h3v3h-3zM6 6h3v3h-3zM9 6h3v3h-3zM3 9h3v3h-3zM9 9h3v3h-3z'/></svg>");
  color-scheme: light;

  --cell: 3px;
  --frame: clamp(8px, 1.1vw, 16px);
  --nav-h: 60px;
  --pad: clamp(16px, 4vw, 56px);
  --hero-pad: clamp(16px, 3vw, 40px);
  --measure: 66ch;

  /* type scale, ~1.25 from 17px */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.4rem, 2.2vw, 1.75rem);
  --step-3: clamp(2.1rem, 4.6vw, 3.75rem);
  --step-4: clamp(1.6rem, 5.8vw, 5.25rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #03070d;
    --fg: #fffbea;
    --accent: #86c2c8;
    --hero-bg: #010408;
    --scene-ink: #03070d;
    --scene-paper-a: #86c2c8;
    --scene-paper-b: #fffbea;
    --tint-25: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><rect width='12' height='12' fill='%2303070d'/><path fill='%2386c2c8' d='M0 0h3v3h-3zM6 0h3v3h-3zM0 6h3v3h-3zM6 6h3v3h-3z'/></svg>");
    --tint-50: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><rect width='12' height='12' fill='%2303070d'/><path fill='%2386c2c8' d='M0 0h3v3h-3zM6 0h3v3h-3zM3 3h3v3h-3zM9 3h3v3h-3zM0 6h3v3h-3zM6 6h3v3h-3zM3 9h3v3h-3zM9 9h3v3h-3z'/></svg>");
    --tint-75: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><rect width='12' height='12' fill='%2303070d'/><path fill='%2386c2c8' d='M0 0h3v3h-3zM3 0h3v3h-3zM6 0h3v3h-3zM9 0h3v3h-3zM3 3h3v3h-3zM9 3h3v3h-3zM0 6h3v3h-3zM3 6h3v3h-3zM6 6h3v3h-3zM9 6h3v3h-3zM3 9h3v3h-3zM9 9h3v3h-3z'/></svg>");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #03070d;
  --fg: #fffbea;
  --accent: #86c2c8;
  --hero-bg: #010408;
  --scene-ink: #03070d;
  --scene-paper-a: #86c2c8;
  --scene-paper-b: #fffbea;
  --tint-25: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><rect width='12' height='12' fill='%2303070d'/><path fill='%2386c2c8' d='M0 0h3v3h-3zM6 0h3v3h-3zM0 6h3v3h-3zM6 6h3v3h-3z'/></svg>");
  --tint-50: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><rect width='12' height='12' fill='%2303070d'/><path fill='%2386c2c8' d='M0 0h3v3h-3zM6 0h3v3h-3zM3 3h3v3h-3zM9 3h3v3h-3zM0 6h3v3h-3zM6 6h3v3h-3zM3 9h3v3h-3zM9 9h3v3h-3z'/></svg>");
  --tint-75: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'><rect width='12' height='12' fill='%2303070d'/><path fill='%2386c2c8' d='M0 0h3v3h-3zM3 0h3v3h-3zM6 0h3v3h-3zM9 0h3v3h-3zM3 3h3v3h-3zM9 3h3v3h-3zM0 6h3v3h-3zM3 6h3v3h-3zM6 6h3v3h-3zM9 6h3v3h-3zM3 9h3v3h-3zM9 9h3v3h-3z'/></svg>");
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--step-0);
  font-stretch: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--fg); color: var(--bg); }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--fg);
  color: var(--bg);
}
.skip:focus { top: 8px; }

/* one-cell dotted rules on the hero's grid, shared by lists and dividers */
.proof li::before,
.offer__also::before,
.also li::before,
.steps li::before,
.timeline li::before,
.faq details::before,
.facts div::before,
.stats div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--cell);
  background: var(--tint-50) 0 0 / 12px 12px repeat-x;
}

/* ------------------------------------------------------------------
   Buttons
------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--bg); color: var(--fg); }
.btn--line { background: transparent; color: var(--fg); }
.btn--line:hover { background: var(--fg); color: var(--bg); }

/* ------------------------------------------------------------------
   Nav
------------------------------------------------------------------- */
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 calc(var(--frame) + 4px);
}
.nav__name {
  font-stretch: 125%;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 6px 8px;
  white-space: nowrap;
}
.nav__right { display: flex; align-items: center; gap: 4px; }
.nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav ul a {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover { background: var(--fg); color: var(--bg); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: 6px;
  padding: 0;
  border: 2px solid var(--fg);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-toggle:hover { background: var(--fg); color: var(--bg); }

@media (max-width: 720px) {
  .nav .nav__optional { display: none; }
}
@media (max-width: 420px) {
  .nav__name { font-size: 0.95rem; padding-inline: 4px; }
  .nav ul a { padding: 6px 7px; }
  .theme-toggle { width: 36px; height: 36px; margin-left: 2px; }
}

/* ------------------------------------------------------------------
   Hero (home only): the shader lives here and nowhere else
------------------------------------------------------------------- */
.hero {
  position: relative;
  margin: 0 var(--frame);
  height: calc(100svh - var(--nav-h) - var(--frame));
  min-height: 600px;
  max-height: 1100px;
  overflow: hidden;
  background: var(--hero-bg);
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero__card {
  position: absolute;
  top: var(--hero-pad);
  right: var(--hero-pad);
  width: min(30rem, calc(100% - 2 * var(--hero-pad)));
  padding: 22px 24px 24px;
  background: var(--bg);
  color: var(--fg);
}
.hero__card h1 {
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  font-stretch: 112%;
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.hero__card p { margin-top: 14px; line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero__error {
  position: absolute;
  left: var(--hero-pad);
  bottom: var(--hero-pad);
  max-width: 44ch;
  padding: 12px 14px;
  background: var(--bg);
  font-size: var(--step--1);
}
.hero__error code { font-family: inherit; font-weight: 700; }
.hero--static .hero__canvas { display: none; }

@media (max-width: 640px) {
  .hero { min-height: 640px; }
  .hero__card { left: var(--hero-pad); width: auto; padding: 18px 18px 20px; }
}

/* ------------------------------------------------------------------
   Home sections
------------------------------------------------------------------- */
.section { padding-top: clamp(88px, 11vw, 160px); }
.section__title {
  font-size: var(--step-3);
  font-stretch: 125%;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: clamp(32px, 5vw, 64px);
}

/* Proof */
.proof {
  list-style: none;
  margin: 0;
  padding: clamp(40px, 5vw, 64px) 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px clamp(20px, 3vw, 40px);
}
.proof li { position: relative; padding-top: 18px; max-width: 30ch; line-height: 1.45; }
.proof strong { font-stretch: 112%; font-weight: 700; }
@media (max-width: 960px) { .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .proof { grid-template-columns: 1fr; } }

/* Services */
.offers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.offer {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  border: 2px solid var(--fg);
}
.offer__for { font-size: var(--step-1); font-stretch: 112%; font-weight: 650; line-height: 1.25; }
.offer__name { margin-top: 28px; font-size: var(--step-2); font-stretch: 125%; font-weight: 750; line-height: 1.1; }
.offer__terms { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 14px 0 0; }
.offer__terms div { display: flex; gap: 8px; align-items: baseline; }
.offer__terms dt { font-size: var(--step--1); }
.offer__terms dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.offer__desc { margin-top: 18px; max-width: 54ch; }
.offer__also { position: relative; flex: 1; margin-top: 22px; padding-top: 18px; }
.offer__also h4 { font-size: var(--step--1); font-weight: 700; }
.offer__also ul { margin: 6px 0 0; padding-left: 1.1em; }
.offer__also li { margin: 2px 0; }
.offer .btn { margin-top: 28px; align-self: flex-start; }
@media (max-width: 860px) { .offers { grid-template-columns: 1fr; } }

/* Work */
.work {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(56px, 7vw, 104px) clamp(20px, 3vw, 40px);
  align-items: start;
}
.project { grid-column: span 5; }
.project--wide { grid-column: span 7; }
.project__link { display: block; text-decoration: none; }
.scene {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg);
}
.scene canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  image-rendering: pixelated;
}
.project__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}
.project h3 {
  font-size: var(--step-2);
  font-stretch: 115%;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.project__link:hover h3,
.project__link:focus-visible h3 { text-decoration-color: currentColor; }
.project__year { font-variant-numeric: tabular-nums; white-space: nowrap; }
.project__summary { margin-top: 8px; max-width: 48ch; }
.project__kind { margin-top: 8px; font-size: var(--step--1); font-weight: 600; }

.also {
  margin-top: clamp(56px, 7vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 12px clamp(24px, 4vw, 56px);
}
.also h3 { font-size: var(--step-1); font-stretch: 115%; font-weight: 650; }
.also ul { list-style: none; margin: 0; padding: 0; }
.also li { position: relative; padding: 14px 0 12px; }
.also li a { font-weight: 650; }
@media (max-width: 860px) {
  .project, .project--wide { grid-column: 1 / -1; }
  .also { grid-template-columns: 1fr; }
}

/* How I work: a real sequence, so it's numbered */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px) clamp(20px, 3vw, 40px);
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 18px; max-width: 36ch; }
.steps h3 { font-size: var(--step-1); font-stretch: 112%; font-weight: 650; line-height: 1.25; }
.steps h3::before {
  content: counter(step);
  display: block;
  margin-bottom: 10px;
  font-size: var(--step-3);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1;
}
.steps p { margin-top: 8px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 0 clamp(24px, 4vw, 56px);
}
.about__body > p { margin: 0 0 1.1em; max-width: 60ch; }
.about__body .lead { font-size: var(--step-2); line-height: 1.32; max-width: 36ch; margin-bottom: 1em; }
.sub {
  margin: clamp(40px, 6vw, 64px) 0 12px;
  font-size: var(--step-1);
  font-stretch: 115%;
  font-weight: 650;
}
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 4px 24px;
  padding: 16px 0 14px;
}
.timeline__when { font-variant-numeric: tabular-nums; }
.timeline__where { font-weight: 650; }
.about__body .tools { max-width: 60ch; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

/* FAQ */
.faq { max-width: 60rem; }
.faq details { position: relative; }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 18px;
  font-size: var(--step-1);
  font-stretch: 108%;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-stretch: 125%; font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { max-width: 62ch; padding: 0 0 22px; }

/* Contact */
.contact { padding-bottom: clamp(88px, 11vw, 160px); }
.contact .section__title { max-width: 22ch; }
.contact__mail {
  display: inline-block;
  font-size: var(--step-4);
  font-stretch: 125%;
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
  padding: 0.04em 0.08em;
  margin-left: -0.08em;
}
.contact__mail:hover { background: var(--fg); color: var(--bg); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.contact__meta { margin-top: 28px; max-width: 52ch; }

/* ------------------------------------------------------------------
   Case study pages
------------------------------------------------------------------- */
.case__head { padding-top: clamp(40px, 6vw, 88px); }
.case__back { margin-bottom: clamp(24px, 4vw, 48px); font-weight: 600; }
.case__client { font-size: var(--step-1); font-stretch: 115%; font-weight: 650; }
.case__title {
  margin-top: 12px;
  max-width: 24ch;
  font-size: var(--step-3);
  font-stretch: 118%;
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px clamp(20px, 3vw, 40px);
  margin: clamp(32px, 4vw, 56px) 0 0;
}
.facts div { position: relative; padding-top: 14px; }
.facts dt { font-size: var(--step--1); font-weight: 700; }
.facts dd { margin: 4px 0 0; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.case__banner { margin-top: clamp(40px, 5vw, 64px); }
.case__banner .scene { aspect-ratio: 21 / 9; }
@media (max-width: 640px) { .case__banner .scene { aspect-ratio: 4 / 3; } }

.case__body {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 0 clamp(24px, 4vw, 56px);
  padding-top: clamp(56px, 7vw, 96px);
}
.case__body > * { grid-column: 2; }
.case__body > h2 {
  grid-column: 1;
  font-size: var(--step-1);
  font-stretch: 115%;
  font-weight: 700;
  line-height: 1.25;
}
.case__body > h2:not(:first-child),
.case__body > h2:not(:first-child) + * { margin-top: clamp(48px, 6vw, 80px); }
.prose p, .prose li { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }
.prose ol, .prose ul { margin: 0; padding-left: 1.3em; }
.prose li + li { margin-top: 1em; }
.prose strong { font-weight: 700; }
.summary { font-size: var(--step-1); line-height: 1.45; }
.summary li + li { margin-top: 0.6em; }
@media (max-width: 860px) {
  .case__body { grid-template-columns: 1fr; }
  .case__body > *, .case__body > h2 { grid-column: 1; }
  .case__body > h2 + * { margin-top: 12px !important; }
}

/* flow diagram: a vertical pipeline of boxes joined by dithered rails */
.flow { margin: 0; }
.flow ol { list-style: none; margin: 0; padding: 0; max-width: 40rem; }
.flow__node { padding: 16px 18px; border: 2px solid var(--fg); }
.flow__node strong { display: block; font-stretch: 112%; font-weight: 700; }
.flow__node span { display: block; margin-top: 2px; font-size: var(--step--1); line-height: 1.45; }
.flow__edge {
  position: relative;
  margin-left: 28px;
  padding: 14px 0 14px 28px;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.4;
}
.flow__edge::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--tint-75) 0 0 / 12px 12px repeat-y;
}
.flow figcaption { margin-top: 14px; font-size: var(--step--1); max-width: 56ch; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px clamp(20px, 3vw, 32px);
  margin: 0;
}
.stats div { position: relative; display: flex; flex-direction: column-reverse; justify-content: flex-end; padding-top: 14px; }
.stats dt { font-size: var(--step--1); }
.stats dd {
  margin: 0 0 4px;
  font-size: clamp(1.6rem, 2.9vw, 2.5rem);
  font-stretch: 108%;
  white-space: nowrap;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats__note { margin-top: 20px; font-size: var(--step--1); max-width: 56ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.prose .chips li { margin: 0; max-width: none; padding: 4px 10px; border: 2px solid var(--fg); font-size: var(--step--1); font-weight: 600; }

.case__cta {
  margin-top: clamp(88px, 11vw, 160px);
  padding: clamp(40px, 6vw, 72px) 0;
  background: var(--fg);
  color: var(--bg);
}
.case__cta h2 {
  max-width: 24ch;
  font-size: var(--step-3);
  font-stretch: 118%;
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.case__cta .btn { margin-top: 28px; border-color: var(--bg); background: var(--bg); color: var(--fg); }
.case__cta .btn:hover { background: var(--fg); color: var(--bg); }
.case__cta :focus-visible { outline-color: var(--bg); }

.case__next { padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 112px); }
.case__next p { margin-bottom: 6px; font-weight: 600; }
.case__next a {
  display: inline-block;
  font-size: var(--step-2);
  font-stretch: 118%;
  font-weight: 700;
  text-decoration: none;
}
.case__next a:hover { text-decoration: underline; }

/* 404 */
.notfound { padding: clamp(64px, 10vw, 140px) 0; }
.notfound p { margin-top: 16px; max-width: 48ch; }
.notfound .btn { margin-top: 28px; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------- */
.footer { position: relative; padding: 88px 0 40px; }
/* the page fades into the footer through the dither steps */
.footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 48px;
  background:
    linear-gradient(var(--fg), var(--fg)) 0 0 / 100% 12px no-repeat,
    var(--tint-75) 0 12px / 12px 12px repeat-x,
    var(--tint-50) 0 24px / 12px 12px repeat-x,
    var(--tint-25) 0 36px / 12px 12px repeat-x;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: 32px clamp(24px, 4vw, 56px);
  font-size: var(--step--1);
}
.footer__name { font-size: var(--step-1); font-stretch: 125%; font-weight: 750; }
.footer p + p { margin-top: 8px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 4px; }
.footer h2 { margin-bottom: 8px; font-size: var(--step--1); font-weight: 700; }
.palette { display: flex; gap: 6px; margin-top: 12px; }
.palette span { width: 24px; height: 24px; box-shadow: inset 0 0 0 2px var(--fg); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------
   Shader tuning panel, only with ?tune in the URL
------------------------------------------------------------------- */
.tune {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  width: min(290px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: 16px;
  border: 2px solid var(--fg);
  background: var(--bg);
  font-size: var(--step--1);
  line-height: 1.3;
}
.tune h2 { margin-bottom: 12px; font-size: var(--step-0); font-stretch: 125%; font-weight: 750; }
.tune label { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin-bottom: 10px; font-weight: 650; }
.tune output { font-weight: 400; font-variant-numeric: tabular-nums; }
.tune input[type="range"] { grid-column: 1 / -1; width: 100%; margin: 0; accent-color: var(--fg); }
.tune .btn { min-height: 36px; padding: 6px 12px; font-size: var(--step--1); }
.tune__status { margin-left: 10px; }
