/* Superlabs / superlabs.cc
   Direction: the sentence is the layout. Carmine bookends, charcoal between. Cormorant Garamond for
   the statements, Albert Sans for everything read at text size. No rules, no gradients, no shadows. */

:root {
  --carmine: #9c1220;
  --carmine-deep: #85101b;
  --char: #1b1917;
  --char-2: #262219;
  --ivory: #f2f0eb;
  --rose: #f3c3c6;
  --sand: #cfc4b0;

  --bg: var(--carmine);
  --ink: var(--ivory);
  --muted: var(--rose);
  --accent: var(--ivory);
  --accent-ink: var(--carmine);

  --font-display: "Cormorant Garamond", "Times New Roman", Times, serif;
  --font-text: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-statement: clamp(1.5rem, 1.1rem + 1.75vw, 2.25rem);
  --step-head: clamp(2.5rem, 1.2rem + 4.5vw, 4.25rem);
  --step-display: clamp(3.75rem, 9vw, 11rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(6rem, 12vw, 12rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;

  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0; background: var(--char); color: var(--ink);
  font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5;
  font-kerning: normal; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }
ul[class] { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 2rem; }
::selection { background: var(--ivory); color: var(--carmine); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
p { max-width: 62ch; text-wrap: pretty; }

.wrap { padding-inline: var(--margin); }

/* ---------- controls ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.4rem;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-text); font-size: 1rem; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap; border-radius: 0;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:hover { background: #fff; }
.button:active { transform: scale(0.97); }

.link {
  text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 0.18em; text-decoration-thickness: 0.07em;
  transition: text-decoration-color var(--t-hover) ease;
}
.link:hover, .link:focus-visible { text-decoration-color: currentColor; }
.link-plain {
  text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em;
  text-decoration-color: var(--muted);
  transition: text-decoration-color var(--t-hover) ease;
}
.link-plain:hover, .link-plain:focus-visible { text-decoration-color: currentColor; }

/* =========================================================
   HERO - the living Last Supper, one sentence in the middle
   ========================================================= */
.hero {
  position: relative; height: 100svh; min-height: 34rem; overflow: hidden;
  background: var(--char); color: var(--ivory);
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; background: var(--char); }
.hero__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }

.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 4;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem var(--margin);
  font-size: 1rem;
}
.bar__mark {
  margin-right: auto;
  font-family: var(--font-display); font-weight: 500; font-size: 1.625rem; line-height: 1;
  letter-spacing: 0.005em; text-decoration: none;
}
.bar__nav { display: flex; gap: 1.5rem; }
.bar__nav a {
  text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 0.22em; text-decoration-thickness: 0.07em;
  transition: text-decoration-color var(--t-hover) ease;
}
.bar__nav a:hover, .bar__nav a:focus-visible { text-decoration-color: currentColor; }
.bar__cta { min-height: 2.75rem; padding: 0 1.1rem; font-size: 1rem; }

.hero__sentence {
  position: absolute; z-index: 2; left: var(--margin); right: var(--margin); top: 50%;
  transform: translateY(-50%); margin: 0;
  text-align: center; white-space: nowrap;
  font-family: var(--font-display); font-weight: 300; font-size: var(--step-display);
  line-height: 0.95; letter-spacing: -0.01em;
}
.rot {
  display: inline-block; vertical-align: top; position: relative; overflow: hidden;
  text-align: left; line-height: 1.25; margin: -0.15em 0;
  transition: width 650ms var(--ease-in-out);
}
.rot__word { display: inline-block; white-space: nowrap; }
.rot__word.is-out { position: absolute; left: 0; top: 0; }
.rot__word.is-out { animation: rot-out 480ms var(--ease-in-out) forwards; }
.rot__word.is-in { animation: rot-in 620ms var(--ease-out); }
@keyframes rot-out { to { transform: translateY(-110%); opacity: 0; } }
@keyframes rot-in { from { transform: translateY(110%); opacity: 0; } }

.hero__support {
  position: absolute; z-index: 2; left: var(--margin); bottom: 2rem;
  width: min(36ch, 32vw); font-size: var(--step-body); line-height: 1.45;
}
.claude-mark { display: inline-block; width: 0.95em; height: 0.95em; vertical-align: -0.12em; margin: 0 0.3em 0 0.1em; fill: #d97757; } /* taste-skill-ignore: the real Claude mark keeps its own colour */
.hero__sound {
  position: absolute; z-index: 3; right: var(--margin); bottom: 2rem;
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--ivory); font-size: var(--step-body); line-height: 1;
  text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em;
  text-decoration-color: rgba(242, 240, 235, 0.45);
  transition: text-decoration-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.hero__sound:hover, .hero__sound:focus-visible { text-decoration-color: currentColor; }
.hero__sound:active { transform: scale(0.97); }
.hero__sound[aria-pressed="false"] .hero__sound-wave { opacity: 0.35; }

/* =========================================================
   WORK / names as one paragraph
   ========================================================= */
.work { background: var(--char); color: var(--ivory); --muted: var(--sand); padding: var(--section) 0; }
.names {
  font-family: var(--font-display); font-weight: 300;
  font-size: var(--step-head); line-height: 1.1; letter-spacing: -0.005em;
}
.names__lead { display: inline; font: inherit; letter-spacing: inherit; color: var(--ivory); }
.names__list, .names__list li { display: inline; }
.names__list li { color: var(--muted); }
.name { color: var(--muted); text-decoration: none; transition: color var(--t-hover) ease; }
a.name:hover, a.name:focus-visible { color: var(--ivory); }
.name__frame {
  display: inline-block; width: 1.6em; height: 1em; vertical-align: -0.22em; margin-left: 0.22em;
  overflow: hidden; border-radius: 2px; background: var(--char-2);
  transform-origin: left center; position: relative;
  transition: transform var(--t-ui) var(--ease-out);
}
.name__frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
a.name:hover .name__frame, a.name:focus-visible .name__frame { transform: scale(1.6); z-index: 2; }
.names__note { margin-top: 2.25rem; font-size: var(--step-body); color: var(--ivory); }

/* =========================================================
   STUDIO / portrait as drop cap
   ========================================================= */
.studio { background: var(--char-2); color: var(--ivory); --muted: var(--sand); padding: calc(var(--section) * 0.85) 0; }
.studio__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.studio__facts {
  grid-column: 1 / span 2; display: flex; flex-direction: column; gap: 0.45rem;
  font-size: var(--step-small); line-height: 1.4; color: var(--sand); padding-top: 0.35em;
}
.studio__facts p { max-width: none; }
.studio__body { grid-column: 3 / span 10; }
.studio__p {
  font-family: var(--font-display); font-weight: 400; font-size: var(--step-statement);
  line-height: 1.2; max-width: none; color: var(--ivory);
}
.studio__p strong { font-weight: 500; }
.studio__p--soft { color: var(--sand); margin-top: 1em; }
.studio__portrait {
  float: left; width: 3.6em; height: 3.6em; object-fit: cover;
  margin: 0.12em 0.5em 0.15em 0; background: var(--char);
}

/* =========================================================
   SERVICES / statement, table pushed right
   ========================================================= */
.services { background: var(--char); color: var(--ivory); --muted: var(--sand); padding: var(--section) 0; }
.services__head {
  font-family: var(--font-display); font-weight: 300; font-size: var(--step-display);
  line-height: 0.95; letter-spacing: -0.01em; text-wrap: balance;
}
.services__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  margin-top: 5rem; align-items: start;
}
.services__pic { grid-column: 1 / span 4; align-self: end; width: 22vw; max-width: 100%; }
.services__pic img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--char-2); }
.services__pic figcaption { margin-top: 0.75rem; font-size: var(--step-small); color: var(--sand); }
.services__word { grid-column: 7 / span 1; font-size: var(--step-small); color: var(--sand); padding-top: 0.95rem; }
.services__table { grid-column: 7 / span 6; width: 100%; border-collapse: collapse; font-size: var(--step-body); line-height: 1.4; }
.services__table td { padding: 13px 0; vertical-align: baseline; }
.services__table .kind { width: 24%; color: var(--sand); padding-right: 1rem; }
.services__table .what { color: var(--ivory); }
.services__table tbody + tbody tr:first-child td { padding-top: calc(13px + 44px); }

/* =========================================================
   CLOSE / the commission, a portrait, two links
   ========================================================= */
.close { background: var(--carmine); color: var(--ivory); --muted: var(--rose); padding: calc(var(--section) * 0.9) 0; }
.close__row { display: flex; align-items: center; gap: 2rem; }
.close__pic { width: 160px; flex: 0 0 auto; margin: 0; }
.close__pic img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--carmine-deep); }
.close__links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.close__q { font-size: var(--step-body); font-weight: 500; }
.close__links a { font-family: var(--font-display); font-size: var(--step-statement); line-height: 1.1; text-underline-offset: 0.12em; text-decoration-thickness: 0.05em; }

/* =========================================================
   GALLERY - a walk through a hundred paintings
   ========================================================= */
.gallery { background: var(--char); color: var(--ivory); padding: 0; }
.gallery__stage { position: relative; height: 100svh; min-height: 32rem; overflow: hidden; background: #171310; }
.gallery__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.gallery__canvas:focus-visible { outline: 3px solid var(--ivory); outline-offset: -3px; }
.gallery__enter {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: var(--margin); padding-bottom: 3rem; gap: 1.25rem; background: rgba(23, 19, 16, 0.55);
}
.gallery__title { font-family: var(--font-display); font-weight: 300; font-size: var(--step-display); line-height: 0.95; letter-spacing: -0.01em; }
.gallery__lead { font-family: var(--font-display); font-size: var(--step-statement); line-height: 1.2; max-width: 24ch; }
.gallery__hint { font-size: var(--step-body); color: var(--sand); max-width: 52ch; }
.gallery--in .gallery__enter { display: none; }
.gallery__hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.gallery__leave { pointer-events: auto; position: absolute; top: 1.1rem; right: var(--margin); min-height: 2.75rem; padding: 0 1.1rem; background: var(--ivory); color: var(--char); font-weight: 500; font-size: 1rem; }
.gallery__leave:active { transform: scale(0.97); }
.gallery__near { pointer-events: auto; position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); padding: 0.7rem 1.1rem; background: var(--ivory); color: var(--char); font-size: var(--step-body); font-weight: 500; white-space: nowrap; max-width: none; transition: transform var(--t-press) var(--ease-out); }
.gallery__near:active { transform: translateX(-50%) scale(0.97); }
.gallery__stick { display: none; position: absolute; left: 1.5rem; bottom: 1.5rem; width: 7.5rem; height: 7.5rem; border-radius: 50%; background: rgba(242, 240, 235, 0.14); pointer-events: auto; touch-action: none; }
.gallery__knob { position: absolute; left: 50%; top: 50%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border-radius: 50%; background: rgba(242, 240, 235, 0.85); }
@media (pointer: coarse) { .gallery--in .gallery__stick { display: block; } }
.gallery__card {
  position: absolute; z-index: 3; right: var(--margin); top: 50%; transform: translateY(-50%);
  width: min(26rem, calc(100% - 2 * var(--margin))); max-height: calc(100% - 4rem); overflow: auto;
  padding: 1.25rem 1.25rem 1.5rem; background: var(--ivory); color: var(--char); color-scheme: light;
}
.gallery__card[hidden] { display: none; }
.gallery__card-img { width: 100%; height: auto; max-height: 40svh; object-fit: contain; background: #e9e4da; margin-bottom: 1rem; }
.gallery__card-title { font-family: var(--font-display); font-weight: 500; font-size: var(--step-lead); line-height: 1.15; margin-bottom: 0.35rem; }
.gallery__card-artist { font-size: var(--step-body); margin-bottom: 0.75rem; }
.gallery__card-meta, .gallery__card-credit { font-size: var(--step-small); color: #5a524a; max-width: none; }
.gallery__card-credit { margin-top: 0.5rem; }
.gallery__card-link { display: inline-block; margin-top: 1rem; font-size: var(--step-body); }
.gallery__close { position: absolute; top: 0.9rem; right: 0.9rem; min-height: 2.25rem; padding: 0 0.8rem; background: var(--char); color: var(--ivory); font-size: 0.9375rem; font-weight: 500; }
.gallery__list { padding: 1.5rem var(--margin) 2.5rem; font-size: var(--step-body); color: var(--sand); }
.gallery__list summary { cursor: pointer; color: var(--ivory); }
.gallery__list ol { margin: 1rem 0 0; padding-left: 1.4rem; columns: 2; column-gap: 3rem; }
.gallery__list li { margin-bottom: 0.35rem; break-inside: avoid; }
.gallery__list a { color: var(--ivory); }

/* =========================================================
   FOOT / the name in Pacioli's capitals
   ========================================================= */
.foot { background: var(--carmine-deep); color: var(--ivory); padding-bottom: 2rem; }
.foot__name { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; padding: 0 4px; }
.foot__name img { width: 100%; height: auto; aspect-ratio: 0.9 / 0.84; object-fit: cover; background: var(--ivory); }
.foot__row { display: flex; justify-content: space-between; gap: 3rem; padding-top: 2rem; font-size: var(--step-body); line-height: 1.5; color: var(--ivory); }
.foot__row p { max-width: 58ch; }
.foot__credits { text-align: right; max-width: 44ch; }
.foot__credits a { text-decoration-color: transparent; text-underline-offset: 0.18em; transition: text-decoration-color var(--t-hover) ease; }
.foot__credits a:hover { text-decoration-color: currentColor; }

/* =========================================================
   MOTION / entrances, feedback, the signature move
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  html.js .rv {
    opacity: 0; transform: translateY(24px);
    transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  html.js .in .rv { opacity: 1; transform: none; }
  /* names arrive word by word, quicker */
  html.js .names .rv { transform: translateY(0.35em); transition-duration: 600ms; transition-delay: calc(var(--i, 0) * 55ms); }
  /* table rows slide in from the left edge of the measure */
  html.js .services__table .rv { transform: translateX(-16px); transition-delay: calc(var(--i, 0) * 60ms); }
  /* pictures settle from a slight scale */
  html.js .services__pic .rv { transform: scale(1.04); transition-duration: 1100ms; transition-timing-function: var(--ease-soft); }
  /* the letters are cut one by one */
  html.js .foot__name .rv { transform: none; transition-duration: 700ms; transition-delay: calc(var(--i, 0) * 90ms); }
  /* the revealed state wins over every variant above */
  html.js .in .rv { opacity: 1; transform: none; }

  /* hero entrance, once */
  html.js .hero__sentence { opacity: 0; transform: translateY(calc(-50% + 0.25em)); transition: opacity 900ms var(--ease-out) 150ms, transform 900ms var(--ease-out) 150ms; }
  html.js .hero__support, html.js .hero__sound { opacity: 0; transition: opacity 900ms var(--ease-out) 700ms; }
  html.js .hero.ready .hero__sentence { opacity: 1; transform: translateY(-50%); }
  html.js .hero.ready .hero__support, html.js .hero.ready .hero__sound { opacity: 1; }

  .studio__portrait { transition: transform 1100ms var(--ease-soft); }
  .studio__body.in .studio__portrait { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rot { transition: none; }
  .rot__word.is-out, .rot__word.is-in { animation: none; }
  .name__frame, .button { transition: none; }
}

/* =========================================================
   PHONE / its own composition
   ========================================================= */
@media (max-width: 48em) {
  :root { --step-display: clamp(3.25rem, 15vw, 4.75rem); }
  .hero { min-height: 100svh; }
  .bar { padding: 0.9rem var(--margin); gap: 1rem; }
  .bar__nav { display: none; }
  .bar__mark { font-size: 1.5rem; }
  .bar__cta { min-height: 2.375rem; padding: 0 0.9rem; font-size: 0.875rem; }
  .hero__sentence { white-space: normal; top: 46%; }
  .hero__a { display: block; }
  .hero__video { object-position: 50% 45%; }
  .hero__support { width: calc(100vw - 2 * var(--margin)); bottom: 1.1rem; font-size: 1rem; line-height: 1.4; max-width: 38ch; }
  .hero__sound { bottom: 7.6rem; right: var(--margin); font-size: 1rem; }
  .work { padding: calc(var(--section) * 0.9) 0; }
  .names { font-size: 9vw; line-height: 1.12; }
  .names__list li { line-height: 1.3; }
  .names__list li .name { color: var(--ivory); }
  .names__list li:nth-child(n + 4) .name__frame { display: none; }

  .services__head { font-size: 15vw; }
  .services__grid { display: block; margin-top: 3rem; }
  .services__word { display: none; }
  .services__table { display: block; width: 100%; }
  .services__table tbody { display: block; }
  .services__table tr { display: grid; grid-template-columns: 1fr; padding: 12px 0; }
  .services__table td { display: block; padding: 0; }
  .services__table .kind { grid-column: 1; grid-row: 1; width: auto; font-size: var(--step-small); padding: 0; }
  .services__table .what { grid-column: 1; grid-row: 2; padding: 0; }
  .services__table tbody + tbody tr:first-child td { padding-top: 0; }
  .services__table tbody + tbody tr:first-child { padding-top: calc(12px + 28px); }
  .services__pic { width: 60%; margin: 3rem 0 0 auto; }

  .close { padding: calc(var(--section) * 0.9) 0; }
  .close__row { gap: 1.25rem; }
  .close__pic { width: 96px; }
  .close__links a { font-size: 1.375rem; }
  .gallery__lead { font-size: 1.375rem; }
  .gallery__hint { font-size: 0.9375rem; }
  .gallery__card { top: auto; bottom: 0; right: 0; left: 0; transform: none; width: 100%; max-height: 70svh; }
  .gallery__list ol { columns: 1; }
  .gallery__near { bottom: 1.5rem; font-size: 0.9375rem; white-space: normal; text-align: center; width: calc(100% - 11rem); left: auto; right: 1rem; transform: none; }
  .gallery__near:active { transform: scale(0.97); }

  .foot__name { grid-template-columns: repeat(3, 1fr); }
  .foot__row { flex-direction: column; gap: 1.25rem; }
  .foot__credits { text-align: left; }
}

@media (max-width: 48em) and (max-height: 640px) {
  .hero__support { display: none; }
}

/* while walking, the page keeps still so the arrow keys and the thumb belong to the gallery */
html.gallery-open, html.gallery-open body { overflow: hidden; }
