@font-face {
  font-family: Manrope;
  src: url('./vendor/Manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f5f3eb;
  --ink: #172620;
  --muted: #485950;
  --line: #17262028;
  --green: #1d6c49;
  --signal: #2be75a;
  font-family: Manrope, 'Helvetica Neue', sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #146a42; outline-offset: 4px; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed; z-index: 10; top: 12px; left: 12px; background: white;
  padding: 12px; transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.nav {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 74px);
  border-bottom: 1px solid var(--line);
}
.nav a { text-decoration: none; }
.nav nav { display: flex; gap: clamp(16px, 3vw, 46px); font-size: .84rem; font-weight: 750; }
.nav nav a:hover, .footer a:hover { color: var(--green); }
.wordmark { display: flex; align-items: center; gap: 9px; font-size: 1.16rem; font-weight: 800; letter-spacing: -.05em; }
.wordmark span { padding-left: 8px; border-left: 1px solid var(--line); font-size: .74rem; font-weight: 650; letter-spacing: 0; }
.wordmark i {
  display: block; width: 17px; height: 17px; border: 1px solid var(--ink); border-radius: 50%;
  background: linear-gradient(#31e252 44%, #203d36 44% 52%, #fff2cf 52%);
}

.sequence { height: 280svh; }
.sequence.is-static { height: auto; }
.stage {
  position: sticky; top: 0;
  height: calc(100svh - 70px);
  min-height: 530px;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  grid-template-rows: minmax(0, 1fr) 66px;
  align-items: center;
  padding: 0 clamp(18px, 5vw, 74px);
  background: radial-gradient(ellipse at 51% 42%, #fdfcf7 12%, #f5f3eb 54%, #edece1 100%);
}
.stage-rule { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, transparent calc(50% - .5px), #17262012 50%, transparent calc(50% + .5px)); }
.stage-intro { grid-area: 1 / 1; z-index: 1; align-self: start; padding-top: clamp(40px, 13vh, 112px); pointer-events: none; }
h1 {
  margin: 0;
  width: max-content;
  max-width: 100%;
  font-size: clamp(2.3rem, 5.15vw, 5.55rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.09em;
}
.stage-intro p, .stage-detail p { color: var(--muted); line-height: 1.6; font-size: clamp(.8rem, 1.3vw, 1rem); }
.stage-intro p { max-width: 25ch; margin: 20px 0 0; }
.visual {
  position: relative; grid-area: 1 / 2; width: 100%; height: 100%;
  min-width: 0; min-height: 0; display: grid; place-items: center;
}
.guide {
  position: absolute; width: min(93%, 54svh); aspect-ratio: 1; border: 1px solid #17412e23;
  border-radius: 50%; pointer-events: none;
}
.guide::after {
  content: ''; position: absolute; inset: 12%; border: 1px dashed #17412e24; border-radius: inherit;
}
.visual::after {
  content: ''; position: absolute; left: 13%; right: 13%; top: 50%; height: 1px; z-index: -1;
  background: #17412e17;
}
#lamp-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; visibility: hidden; }
.visual.is-ready #lamp-scene { visibility: visible; }
#lamp-still {
  width: min(95%, 630px); max-height: 83%;
  object-fit: contain; position: relative;
  border-radius: 4px; border: 1px solid var(--line);
}
.visual.is-ready #lamp-still { display: none; }
.stage-detail {
  grid-area: 1 / 3; justify-self: end; align-self: end;
  max-width: 190px; padding: 14px 0; margin-bottom: clamp(28px, 8vh, 72px);
  border-top: 1px solid var(--line);
}
.step {
  display: flex; align-items: center; gap: 7px; color: var(--green); font-size: .72rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
.step i { display: block; flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 1px #0d784656; }
.stage-detail h2 { margin: 10px 0 6px; font-size: 1.2rem; letter-spacing: -.045em; line-height: 1.12; }
.stage-detail p { margin: 0; }
.controls {
  grid-row: 2; grid-column: 1 / -1; display: grid; align-items: center;
  grid-template-columns: 1fr minmax(140px, 1fr) 1fr;
  border-top: 1px solid var(--line); width: 100%; height: 66px; gap: 16px;
}
.to-gallery { text-decoration: none; font-weight: 800; font-size: .79rem; width: max-content; }
.to-gallery span { margin-left: 5px; }
.scrub { display: flex; flex-direction: column; gap: 4px; align-items: center; min-width: 0; }
.scrub label { font-size: .72rem; font-weight: 750; }
input[type="range"] { width: min(100%, 252px); margin: 0; accent-color: #23754d; cursor: ew-resize; }
.scroll-mode {
  justify-self: end; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 12px; font-size: .72rem; font-weight: 800; cursor: pointer;
}
.scroll-mode[aria-pressed="true"] { background: #ddecdd; color: #19482f; border-color: #25663f44; }
.scroll-mode:hover { border-color: var(--green); }

.gallery {
  background: #142c26; color: #f8f6ec;
  padding: clamp(54px, 8vw, 115px) clamp(18px, 5vw, 74px);
}
.gallery-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: clamp(24px, 4vw, 52px); }
.gallery-head h2 { margin: 0; font-size: clamp(2.35rem, 6vw, 6rem); line-height: .95; letter-spacing: -.085em; }
.gallery-head p { margin: 0; max-width: 25ch; color: #ceddd2; line-height: 1.5; }
.gallery-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: start; }
.gallery-feature { margin: 0; min-width: 0; }
.gallery-feature > a { display: block; background: #0c211d; }
#feature-photo { display: block; width: 100%; height: clamp(280px, 47vw, 650px); object-fit: contain; }
.gallery-feature figcaption { display: flex; justify-content: space-between; gap: 8px; padding: 12px 0; font-size: .79rem; color: #e2e9de; }
.gallery-feature figcaption a { white-space: nowrap; }
.photo-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.photo-option {
  display: grid; grid-template-rows: auto 1fr; align-content: start;
  width: 100%; padding: 0; text-align: start; border: 1px solid #e5f1e433;
  color: #f3f4e9; background: #214038; cursor: pointer;
}
.photo-option:hover, .photo-option[aria-pressed="true"] { border-color: #6dee8f; }
.photo-option[aria-pressed="true"] { box-shadow: 0 0 0 1px #6dee8f; }
.photo-option img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #0c211d; }
.photo-option span { padding: 8px 8px 9px; font-size: clamp(.64rem, 1.2vw, .8rem); line-height: 1.25; }
.gallery :focus-visible { outline-color: #6dee8f; }
.footer {
  display: flex; justify-content: space-between; gap: 12px; padding: 24px clamp(18px, 5vw, 74px);
  font-size: .78rem; color: var(--muted);
}

@media (min-width: 1400px) {
  .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr) minmax(0, 1fr); }
}
@media (max-width: 790px) {
  .nav { height: 58px; }
  .sequence { height: 240svh; }
  .stage {
    height: calc(100svh - 58px); min-height: 520px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto 55px;
    align-items: start;
  }
  .stage-intro { grid-area: 1 / 1; padding-top: 20px; text-align: center; width: 100%; }
  h1 { margin-inline: auto; font-size: clamp(2rem, 7vw, 3.35rem); letter-spacing: -.075em; }
  h1 br { display: none; }
  h1 br::after { content: ' '; }
  .stage-intro p { max-width: 43ch; margin: 8px auto 0; font-size: .77rem; }
  .visual { grid-area: 2 / 1; }
  .guide { width: min(80%, 43svh); }
  .stage-detail {
    grid-area: 3 / 1; justify-self: stretch; display: grid; grid-template-columns: auto 1fr;
    column-gap: 10px; max-width: none; margin: 0;
    padding: 8px 0; border: 0; min-height: 56px;
  }
  .stage-detail h2 { margin: 0; text-align: end; font-size: .99rem; }
  .stage-detail p { grid-column: 1 / -1; margin-top: 3px; font-size: .71rem; }
  .controls { grid-row: 4; height: 55px; gap: 10px; grid-template-columns: auto minmax(0, 1fr) auto; }
  .to-gallery, .scroll-mode, .scrub label { font-size: .67rem; }
  .scroll-mode { padding: 7px 8px; }
  .gallery-head { display: block; }
  .gallery-head p { margin-top: 14px; }
  .gallery-layout { grid-template-columns: 1fr; }
  .photo-options { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .photo-option span { padding: 6px 4px; }
}
@media (max-width: 440px) {
  .wordmark { font-size: 1rem; gap: 6px; }
  .wordmark span { padding-left: 6px; font-size: .67rem; }
  .nav nav { gap: 11px; font-size: .76rem; }
  .photo-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-height: 610px) and (max-width: 790px) {
  .stage { position: relative; }
  .sequence { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
