:root {
  --pearl:     #FBF9FF;
  --ink:       #1C1733;
  --lilac:     #CCB2FF;
  --font-body: 'Instrument Sans', -apple-system, 'SF Pro Text', system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--pearl);
  color-scheme: light;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

html::-webkit-scrollbar { display: none; }

html.stage-paging {
  scroll-snap-type: none;
  overscroll-behavior-y: none;
  touch-action: pan-x pinch-zoom;
}

body {
  font-family: var(--font-body);
  background: var(--pearl);
  color: var(--ink-soft);
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--lilac); color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: var(--pearl);
  pointer-events: none;
}

.hero-screen {
  z-index: 1;
  opacity: 0;
}

body.static .veil { opacity: 0; }
body.static { background: var(--pearl); }
body.static::before { display: none; }

.hero {
  --logo-size: min(320px, 80vw);
  position: relative;
  z-index: 3;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  text-align: center;
  padding: 0 var(--gutter);
  pointer-events: none;
  scroll-snap-align: start;
}

.spin {
  position: relative;
  z-index: 3;
  height: 100svh;
  pointer-events: none;
  scroll-snap-align: start;
}

body.static .spin { display: none; }

.hero-logo {
  grid-row: 2;
  width: var(--logo-size);
  aspect-ratio: 1556 / 416;
}

body.static .hero-logo { background: url(/images/orrivo-wordmark.svg) center / contain no-repeat; }

.hero-line,
.hero-hint {
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 600;
  line-height: 1.9;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: transparent;
  user-select: none;
}

.hero-line {
  grid-row: 1;
  align-self: end;
  margin-bottom: max(12px, calc(var(--logo-size) * 0.05));
  text-indent: 0.34em;
}

.hero-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(clamp(16px, 3.4svh, 34px) + env(safe-area-inset-bottom) + 7px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2em;
  padding-left: 0.34em;
  font-size: calc(clamp(12px, 1.1vw, 14px) * 0.86);
  opacity: 0.72;
}

.hero-hint::before {
  content: '';
  box-sizing: border-box;
  width: 1em;
  height: 1.55em;
  border: 0.1em solid;
  border-radius: 999px;
}

body.static .hero-line,
body.static .hero-hint { color: var(--ink); user-select: auto; }

.finish-picker {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  background: rgba(248, 247, 251, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(28, 23, 51, 0.12);
  color: var(--ink);
  width: 432px;
  max-width: calc(100vw - 32px);
}

.finish-picker p { font-size: 11px; text-align: center; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.finish-picker > div { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.finish-picker button {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: 600 12px var(--font-body);
  white-space: nowrap;
  cursor: pointer;
}
.finish-picker button[aria-pressed="true"] { background: white; border-color: rgba(28, 23, 51, 0.12); box-shadow: 0 2px 6px rgba(28, 23, 51, 0.06); }
.finish-picker button:focus-visible { outline: 2px solid #7764A8; outline-offset: 2px; }
.finish-swatch { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.finish-picker button[data-finish="galaxy"], .finish-picker button[data-finish="helix"] { grid-column: span 3; }
.finish-helix { background: linear-gradient(135deg, #070832, #122DBE 22%, #EEA7CD 37%, #9DE0D5 52%, #BBE9DD 72%, #080D30); }
.finish-galaxy { background: radial-gradient(circle at 65% 35%, #C5F5FF, #5479FF 18%, #152456 42%, #050D23 75%); }
.finish-ink { background: linear-gradient(135deg, #7B7399, #29233F); }
.finish-cobalt { background: linear-gradient(135deg, #7994FF, #2039D2); }
.finish-pearl { background: linear-gradient(135deg, #FFFFFF, #6B7699, #E6EAF8); }
.finish-aurora { background: linear-gradient(135deg, #0DADC2, #F25CA8, #FAB347); }
.finish-plasma { background: conic-gradient(#0D566D, #F25CA8, #FA7D21, #FAB347, #0D566D); }
.finish-prism { background: linear-gradient(25deg, #0DADC2, #F25CA8 45%, #FA7D21 70%, #FAB347); }

@media (max-width: 480px) {
  .finish-picker { padding: 10px; }
  .finish-picker button { flex-direction: column; gap: 6px; padding: 10px 8px; font-size: 11px; }
}
