/* X-lok website */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #0f0c0a;
  --color-bg-raised: #16110e;
  --color-surface: #1d1713;
  --color-text: #f1e9de;
  --color-text-soft: #cfc3b4;
  --color-muted: #9a8c7d;
  --color-accent: #d9a35b;
  --color-accent-bright: #f0c27f;
  --color-accent-deep: #9c6a2c;
  --color-line: rgb(241 233 222 / 0.12);
  --color-line-strong: rgb(241 233 222 / 0.24);

  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --container: 1240px;
  --section-space: clamp(88px, 12vw, 168px);
  --header-height: 72px;
  --radius: 4px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-state: 700ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* A fine film grain over everything, for warmth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
}

p {
  margin: 0;
}

em {
  font-style: italic;
}

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

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

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--color-accent);
  color: var(--color-bg);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Type ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-title em,
.hero-title em,
.statement-text em,
.contact-title em {
  color: var(--color-accent-bright);
}

.section-lead {
  max-width: 34em;
  margin-top: 24px;
  color: var(--color-text-soft);
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  text-wrap: pretty;
}

.section {
  position: relative;
  padding-block: var(--section-space);
}

.section-header {
  max-width: 820px;
  margin-bottom: clamp(48px, 7vw, 88px);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out), transform 300ms var(--ease-out);
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--color-accent-bright), var(--color-accent) 55%, var(--color-accent-deep));
  color: #1a120a;
  box-shadow: 0 10px 30px -12px rgb(217 163 91 / 0.6);
}

.button-primary:hover {
  box-shadow: 0 14px 36px -12px rgb(240 194 127 / 0.75);
}

.button-ghost {
  border-color: var(--color-line-strong);
  color: var(--color-text);
  backdrop-filter: blur(6px);
}

.button-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-bright);
}

.button-large {
  min-height: 64px;
  padding: 0 40px;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-accent-bright);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid currentColor;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 400ms var(--ease-out), border-color 400ms var(--ease-out), backdrop-filter 400ms var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgb(15 12 10 / 0.78);
  border-bottom-color: var(--color-line);
  backdrop-filter: blur(14px) saturate(1.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand img {
  width: 84px;
  height: auto;
  transition: transform 300ms var(--ease-out);
}

.brand:hover img {
  transform: scale(1.04);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  color: var(--color-text-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 250ms var(--ease-out);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 350ms var(--ease-out);
}

.site-nav a:hover {
  color: var(--color-text);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav .nav-contact a {
  padding: 10px 20px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  color: var(--color-text);
}

.site-nav .nav-contact a::after {
  display: none;
}

.site-nav .nav-contact a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-bright);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle-bar {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  transition: transform 350ms var(--ease-out), top 350ms var(--ease-out);
}

.nav-toggle-bar:first-child {
  top: 17px;
}

.nav-toggle-bar:nth-child(2) {
  top: 26px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  top: 21.5px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  top: 21.5px;
  transform: rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
    z-index: 2;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgb(15 12 10 / 0.97);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 400ms var(--ease-out), visibility 0s linear 400ms;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 400ms var(--ease-out);
  }

  .site-nav ul {
    flex-direction: column;
    gap: 28px;
  }

  .site-nav a {
    font-family: var(--font-display);
    font-size: 2.25rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-text);
  }

  .site-nav .nav-contact a {
    padding: 8px 28px;
  }
}

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

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-height) + 40px) 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  width: 66%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34%), linear-gradient(to top, transparent 0, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 34%), linear-gradient(to top, transparent 0, #000 22%);
  mask-composite: intersect;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 14% 50%;
  transform: scale(1.08);
  filter: saturate(1.05) contrast(1.04);
  transition: transform 2600ms var(--ease-out);
}

.is-loaded .hero-image {
  transform: scale(1);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 70% at 70% 45%, rgb(217 163 91 / 0.16), transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 90%, rgb(156 106 44 / 0.12), transparent 70%);
}

.hero-content {
  position: relative;
}

.hero-title {
  max-width: 9ch;
  font-family: var(--font-display);
  font-size: clamp(3.75rem, 9vw, 8.5rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 30em;
  margin-top: 32px;
  color: var(--color-text-soft);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.hero-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1100ms var(--ease-out), transform 1100ms var(--ease-out);
}

.is-loaded .hero-reveal {
  opacity: 1;
  transform: none;
}

.is-loaded .hero-reveal:nth-child(2) {
  transition-delay: 120ms;
}

.is-loaded .hero-reveal:nth-child(3) {
  transition-delay: 260ms;
}

.is-loaded .hero-reveal:nth-child(4) {
  transition-delay: 400ms;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--color-accent);
  animation: scroll-cue 2.2s var(--ease-in-out) infinite;
}

@keyframes scroll-cue {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  80% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 899px) {
  .hero {
    display: block;
    min-height: 0;
    padding: 0 0 72px;
  }

  .hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    height: 64vh;
    height: 64svh;
    -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
  }

  .hero-image {
    object-position: 20% 50%;
  }

  .hero-content {
    margin-top: -14vh;
  }

  .scroll-cue {
    display: none;
  }
}

/* ---------- Statement ---------- */

.statement {
  padding-block: clamp(72px, 10vw, 140px);
  border-block: 1px solid var(--color-line);
  background: linear-gradient(to bottom, var(--color-bg), var(--color-bg-raised));
}

.statement-text {
  max-width: 20ch;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.875rem);
  line-height: 1.12;
  text-align: center;
  text-wrap: balance;
}

/* ---------- The switch ---------- */

.switch-section {
  background: var(--color-bg-raised);
}

.switch-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}

.lock-switch {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 44px;
  padding: 14px 22px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.02);
  cursor: pointer;
  transition: border-color 300ms var(--ease-out), background-color 300ms var(--ease-out);
}

.lock-switch:hover {
  border-color: var(--color-accent);
  background: rgb(217 163 91 / 0.06);
}

.lock-switch-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color var(--duration-state) var(--ease-out);
}

[data-lock="locked"] .lock-switch-label-locked,
[data-lock="free"] .lock-switch-label-free {
  color: var(--color-text);
}

.lock-switch-track {
  position: relative;
  width: 72px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(to bottom, #0b0907, #221b16);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 0.8), inset 0 0 0 1px rgb(255 255 255 / 0.06);
}

.lock-switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--color-accent-bright), var(--color-accent) 50%, var(--color-accent-deep));
  box-shadow: 0 0 18px rgb(240 194 127 / 0.55), 0 2px 4px rgb(0 0 0 / 0.6);
  transition: transform var(--duration-state) var(--ease-out), background var(--duration-state) var(--ease-out), box-shadow var(--duration-state) var(--ease-out);
}

[data-lock="free"] .lock-switch-thumb {
  transform: translateX(40px);
  background: radial-gradient(circle at 35% 30%, #f4f2ef, #a9acaf 55%, #5f6366);
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.6);
}

.switch-status {
  min-height: 1.65em;
  margin-top: 16px;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.switch-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 24px);
}

.state-photo {
  margin: 0;
}

.state-photo:nth-child(2) {
  margin-top: clamp(32px, 6vw, 80px);
}

.state-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.9);
}

/* The switch in the front photo can be flicked: an unseen button over its slot */
.photo-switch {
  position: absolute;
  top: 74%;
  left: 34%;
  z-index: 2;
  width: 39%;
  height: 13%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.state-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--duration-state) var(--ease-in-out);
}

.state-img-free,
[data-lock="free"] .state-img-locked {
  opacity: 0;
}

[data-lock="free"] .state-img-free {
  opacity: 1;
}

.state-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgb(15 12 10 / 0.72);
  backdrop-filter: blur(8px);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.state-badge > span {
  grid-area: 1 / 1;
  transition: opacity var(--duration-state) var(--ease-out);
}

.state-badge-locked {
  color: var(--color-accent-bright);
}

.state-badge-free,
[data-lock="free"] .state-badge-locked {
  opacity: 0;
}

[data-lock="free"] .state-badge-free {
  opacity: 1;
}

.state-photo figcaption {
  margin-top: 14px;
  color: var(--color-muted);
  font-size: 0.8125rem;
}

@media (max-width: 899px) {
  .switch-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Why ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-line);
}

.why-item {
  padding: clamp(32px, 4vw, 48px) clamp(20px, 3vw, 40px) clamp(36px, 4vw, 56px) 0;
  border-bottom: 1px solid var(--color-line);
}

.why-item:not(:nth-child(3n + 1)) {
  padding-left: clamp(20px, 3vw, 40px);
  border-left: 1px solid var(--color-line);
}

/* The key feature: marked with a brass rule and heading */
.why-item-key {
  position: relative;
}

.why-item-key::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 64px;
  height: 2px;
  background: linear-gradient(to right, var(--color-accent-bright), var(--color-accent-deep));
}

.why-item-key h3 {
  color: var(--color-accent-bright);
}

.why-number {
  display: block;
  margin-bottom: 28px;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
}

.why-item h3 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.3vw, 2rem);
  line-height: 1.1;
}

.why-item p {
  margin-top: 14px;
  color: var(--color-text-soft);
  font-size: 0.96875rem;
}

@media (max-width: 899px) {
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .why-item:not(:nth-child(3n + 1)) {
    padding-left: 0;
    border-left: 0;
  }

  .why-item:nth-child(even) {
    padding-left: clamp(20px, 3vw, 40px);
    border-left: 1px solid var(--color-line);
  }
}

@media (max-width: 560px) {
  .why-grid {
    grid-template-columns: 1fr;
  }

  .why-item:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }
}

/* ---------- Inside: the 3D model ---------- */

.inside-section {
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 40% at 50% 45%, rgb(217 163 91 / 0.06), transparent 70%),
    var(--color-bg-raised);
  border-top: 1px solid var(--color-line);
}

.inside-section .section-header {
  margin-bottom: clamp(16px, 3vw, 40px);
}

.model-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: 76vh;
  margin-inline: auto;
}

/* A pool of warm light behind the model, and its shadow underneath */
.model-stage::before,
.model-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.model-stage::before {
  inset: -12% -20%;
  background: radial-gradient(ellipse 46% 50% at 50% 46%, rgb(217 163 91 / 0.2), rgb(217 163 91 / 0.05) 55%, transparent 75%);
}

.model-stage::after {
  inset: auto 18% 2% 18%;
  height: 12%;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgb(0 0 0 / 0.55), transparent 70%);
}

.model-poster,
.model-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  transition: opacity 900ms var(--ease-out);
}

.model-poster {
  object-fit: contain;
}

.model-canvas {
  display: block;
  opacity: 0;
  cursor: grab;
  touch-action: pan-y;
  outline-offset: -4px;
}

.model-canvas.is-over-switch {
  cursor: pointer;
}

.model-canvas:active {
  cursor: grabbing;
}

.model-stage.is-ready .model-canvas {
  opacity: 1;
}

.model-stage.is-ready .model-poster {
  opacity: 0;
  transition-duration: 200ms;
}

.model-labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms var(--ease-out);
}

.model-stage.is-exploded .model-labels {
  opacity: 1;
  transition-delay: 500ms;
}

/* A label hangs from its point by a short brass rule, to the right or to the left */
.model-label {
  position: absolute;
  top: -0.7em;
  left: 0;
  padding-left: 46px;
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.9);
}

.model-label::before,
.model-label::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
}

.model-label::before {
  width: 36px;
  height: 1px;
  background: var(--color-accent);
}

.model-label::after {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--color-accent-bright);
}

.model-label-left {
  left: auto;
  right: 100%;
  padding-left: 0;
  padding-right: 46px;
}

.model-label-left::before,
.model-label-left::after {
  left: auto;
  right: 0;
}

.model-label-left::after {
  margin: -2.5px -2.5px 0 0;
}

.model-hint {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms var(--ease-out);
}

.model-hint::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.model-stage.is-ready .model-hint {
  opacity: 1;
}

.model-stage.is-ready.is-touched .model-hint {
  opacity: 0;
}

.model-controls {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: clamp(16px, 2.5vw, 32px);
  padding-top: 24px;
  border-top: 1px solid var(--color-line);
}

.model-controls .lock-switch {
  margin-top: 0;
}

.model-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

/* Without WebGL the picture stays, and the controls that need the model go */
.model-stage.is-static ~ .model-controls .model-options,
.model-stage.is-static .model-hint {
  display: none;
}

.pill-button,
.segmented {
  min-height: 44px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
}

.pill-button,
.segmented button {
  color: var(--color-text-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

.pill-button {
  padding: 0 22px;
  background: none;
}

.pill-button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-bright);
}

.pill-button[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #1a120a;
}

.segmented {
  display: inline-flex;
  padding: 3px;
}

.segmented button {
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: none;
}

.segmented button:hover {
  color: var(--color-accent-bright);
}

.segmented button[aria-pressed="true"] {
  background: rgb(241 233 222 / 0.12);
  color: var(--color-text);
}

/* Three short notes on how it works, under the model */
.model-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  margin: clamp(56px, 7vw, 96px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: note;
}

.model-note {
  padding-top: 24px;
  border-top: 1px solid var(--color-line);
  counter-increment: note;
}

.model-note::before {
  content: counter(note, upper-roman);
  display: block;
  margin-bottom: 14px;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
}

.model-note h3 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 2.3vw, 2rem);
  line-height: 1.1;
}

.model-note p {
  margin-top: 12px;
  color: var(--color-text-soft);
  font-size: 0.96875rem;
}

@media (max-width: 899px) {
  .model-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .model-stage {
    aspect-ratio: 1;
    margin-inline: calc(var(--gutter) * -1);
  }

  .model-hint {
    right: var(--gutter);
  }

  .model-label {
    padding-left: 26px;
    font-size: 0.625rem;
  }

  .model-label::before {
    width: 20px;
  }

  .model-label-left {
    padding-left: 0;
    padding-right: 26px;
  }

  .model-controls {
    justify-content: center;
  }

  .model-options {
    justify-content: center;
  }
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(220px, 26vw, 360px);
  grid-auto-flow: dense;
  gap: clamp(10px, 1.6vw, 20px);
}

.gallery-item {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  cursor: zoom-in;
}

.gallery-wide {
  grid-column: span 2;
}

.gallery-tall {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1200ms var(--ease-out), filter 600ms var(--ease-out);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(15 12 10 / 0.35), transparent 40%);
  opacity: 0;
  transition: opacity 500ms var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item:hover::after {
  opacity: 1;
}

.photo-credit {
  margin-top: 20px;
  color: var(--color-muted);
  font-size: 0.8125rem;
  text-align: right;
}

@media (max-width: 760px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 44vw;
  }
}

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 4vw, 56px);
  border: 0;
  background: rgb(10 8 6 / 0.96);
  color: var(--color-text);
}

.lightbox[open] {
  display: grid;
  place-items: center;
  animation: lightbox-in 400ms var(--ease-out);
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 0.6);
}

@keyframes lightbox-in {
  from { opacity: 0; }
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 40px 120px rgb(0 0 0 / 0.8);
}

.lightbox-button {
  position: fixed;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  background: rgb(15 12 10 / 0.6);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 250ms var(--ease-out), color 250ms var(--ease-out);
}

.lightbox-button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-bright);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  margin-top: -26px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media (max-width: 760px) {
  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 20px;
    margin-top: 0;
  }

  .lightbox-prev {
    left: calc(50% - 64px);
  }

  .lightbox-next {
    right: calc(50% - 64px);
  }
}

/* ---------- For builders ---------- */

.builders-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}

.builders-figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 50px 100px -50px rgb(0 0 0 / 0.9);
}

.spec-list {
  margin: 48px 0 0;
}

.spec {
  display: grid;
  grid-template-columns: minmax(120px, 2fr) 5fr;
  gap: 8px 24px;
  padding: 18px 0;
  border-top: 1px solid var(--color-line);
}

.spec:last-child {
  border-bottom: 1px solid var(--color-line);
}

.spec dt {
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.9;
  text-transform: uppercase;
}

.spec dd {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 0.96875rem;
}

@media (max-width: 899px) {
  .builders-layout {
    grid-template-columns: 1fr;
  }

  .builders-figure {
    max-width: 520px;
  }
}

@media (max-width: 480px) {
  .spec {
    grid-template-columns: 1fr;
  }
}

/* ---------- Story ---------- */

.story-section {
  background: var(--color-bg-raised);
  border-block: 1px solid var(--color-line);
}

.story-inner {
  max-width: 900px;
  text-align: center;
}

.story-inner .eyebrow {
  justify-content: center;
}

.story-inner .eyebrow::after {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.story-text {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3vw, 2.375rem);
  line-height: 1.3;
  text-wrap: pretty;
}

.story-signature {
  margin-top: 32px;
  color: var(--color-muted);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
}

/* ---------- Contact ---------- */

.contact-section {
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 70% at 50% 100%, rgb(217 163 91 / 0.16), transparent 70%),
    var(--color-bg);
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-inner .eyebrow::after {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.contact-title {
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.4vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.contact-inner .section-lead {
  margin-bottom: 44px;
}

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

.site-footer {
  padding-block: 56px;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
}

.footer-logo {
  width: 64px;
  margin-right: auto;
  opacity: 0.85;
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1000ms var(--ease-out), transform 1000ms var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .model-poster,
  .model-canvas,
  .model-labels {
    transition-duration: 1ms;
  }

  .hero-image,
  .hero-reveal,
  .js .reveal {
    transform: none;
    transition: opacity 400ms linear;
  }

  .hero-reveal,
  .js .reveal {
    opacity: 1;
  }

  .scroll-cue span {
    animation: none;
  }

  .gallery-item img {
    transition: none;
  }

  .gallery-item:hover img {
    transform: none;
  }
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
}

.not-found-logo {
  width: 160px;
  margin-bottom: 48px;
}
