/* Silent Hill — OPX-style void gallery + glass controls */
:root {
  --void: #020202;
  --black: #000;
  --hairline: #292a2c;
  --white: #fff;
  --ash: #9b9b9b;

  --glass-bg: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  --glass-bg-hover: linear-gradient(135deg, rgba(255,255,255,.26), rgba(255,255,255,.10));
  --glass-line: rgba(255,255,255,.28);
  --glass-blur: blur(22px) saturate(160%);

  --f-display: 'Inter Tight', 'Söhne', ui-sans-serif, system-ui, sans-serif;
  --f-ui: 'Inter', ui-sans-serif, system-ui, sans-serif;

  --pad: clamp(20px, 4.2vw, 80px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--void); color: var(--white); }
body {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.67;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.muted { color: var(--ash); }

/* ---------- Stage ---------- */
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
.shade {
  position: fixed; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(2,2,2,.55) 0%, rgba(2,2,2,0) 22%),
    linear-gradient(to top, rgba(2,2,2,.72) 0%, rgba(2,2,2,.25) 32%, rgba(2,2,2,0) 55%);
}

/* ---------- Glass ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  transition: background .5s var(--ease), border-color .5s var(--ease), transform .6s var(--ease);
}
.glass:hover { background: var(--glass-bg-hover); border-color: rgba(255,255,255,.5); }
.glass-panel {
  background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.04));
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255,255,255,.22);
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-ui); font-weight: 500; font-size: 14px; line-height: 1;
  letter-spacing: .01em;
  padding: 13px 22px;
  border-radius: 45px;
  white-space: nowrap;
}
.pill.lg { padding: 18px 30px; font-size: 15px; }
.pill.solid { background: rgba(255,255,255,.88); color: var(--void); border-color: #fff; }
.pill.solid:hover { background: #fff; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.round {
  width: 60px; height: 60px; border-radius: 50%;
  display: inline-grid; place-items: center;
}
.round svg { transition: transform .6s var(--ease); }
.round:hover svg { transform: translateY(3px); }
.round.up svg { transform: rotate(180deg); }
.round.up:hover svg { transform: rotate(180deg) translateY(3px); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 1px solid #fff; outline-offset: 3px;
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50;
  background: var(--void);
  padding: var(--pad);
  display: flex; flex-direction: column; justify-content: space-between;
}
.loader-top { display: flex; justify-content: space-between; font-size: 18px; }
.loader-foot { display: flex; flex-direction: column; }
.loader-num {
  font-size: clamp(96px, 22vw, 340px);
  line-height: .82; letter-spacing: -.055em; font-weight: 300;
  display: flex; align-items: flex-start;
  overflow: hidden; padding-top: .04em;
  font-variant-numeric: tabular-nums;
}
.loader-sign { font-size: .28em; letter-spacing: 0; margin: .12em 0 0 .08em; color: var(--ash); }
.loader-bar { position: relative; height: 1px; background: var(--hairline); margin-top: 28px; }
.loader-bar i { position: absolute; inset: 0; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px var(--pad);
}
.brand { font-size: 26px; line-height: 1; letter-spacing: -.02em; }
.nav-links {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 4px; border-radius: 45px;
}
.nav-links:hover { transform: translateX(-50%); }
.nav-links button {
  font-family: var(--f-ui); font-weight: 500; font-size: 14px; line-height: 1;
  padding: 11px 18px; border-radius: 45px;
  transition: background .4s var(--ease);
}
.nav-links button:hover { background: rgba(255,255,255,.14); }

/* ---------- Scenes ---------- */
.scene {
  position: fixed; inset: 0; z-index: 10;
  padding: 0 var(--pad) calc(var(--pad) * .9);
  display: flex; flex-direction: column; justify-content: flex-end;
  pointer-events: none; visibility: hidden;
}
.scene.is-active { pointer-events: auto; visibility: visible; }

.kicker { font-family: var(--f-ui); font-size: 14px; letter-spacing: .02em; color: rgba(255,255,255,.78); margin-bottom: 18px; }
.display {
  font-size: clamp(64px, 12.4vw, 220px);
  line-height: .9; letter-spacing: -.05em; font-weight: 400;
  margin-left: -.05em;
}
.h-xl { font-size: clamp(48px, 7vw, 111px); line-height: 1; letter-spacing: -.04em; font-weight: 400; }
.h-lg { font-size: clamp(32px, 3.4vw, 50px); line-height: 1.1; letter-spacing: -.03em; font-weight: 400; }

/* split text */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.split .c { display: inline-block; will-change: transform; }

.scene-hero .actions { display: flex; align-items: center; gap: 14px; margin-top: 34px; }

/* still scene */
.scene-still { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 40px; }
.still-copy { max-width: 640px; }
.still-copy .lede { font-family: var(--f-ui); font-size: 17px; line-height: 1.67; color: rgba(255,255,255,.82); max-width: 460px; margin-top: 20px; }
.info {
  width: min(520px, 100%);
  border-radius: 28px; padding: 26px 26px 22px;
  flex-shrink: 0;
}
.dock {
  position: fixed; z-index: 15;
  right: var(--pad); bottom: calc(var(--pad) * .9);
  opacity: 0; pointer-events: none;
}
.dock.is-shown { pointer-events: auto; }
.scene-still .still-copy { max-width: min(640px, calc(100vw - 520px - var(--pad) * 2 - 40px)); }
.specs { display: grid; grid-template-columns: repeat(4, 1fr); }
.spec { padding: 4px 16px 0; border-left: 1px solid rgba(255,255,255,.2); }
.spec:first-child { border-left: 0; padding-left: 0; }
.spec b { display: block; font-weight: 400; font-size: 38px; line-height: 1.05; letter-spacing: -.03em; }
.spec b small { font-size: 16px; letter-spacing: 0; margin-left: 2px; color: rgba(255,255,255,.7); }
.spec span { display: block; font-family: var(--f-ui); font-size: 13px; line-height: 1.4; color: rgba(255,255,255,.66); margin-top: 8px; }
.info-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18); }
.info-actions .spacer { flex: 1; }
.info-actions .round { width: 48px; height: 48px; }

/* ---------- Rail ---------- */
.rail {
  position: fixed; z-index: 20; right: calc(var(--pad) * .5); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px;
}
.rail button { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 7px 0; font-family: var(--f-ui); font-size: 12px; }
.rail button span { opacity: 0; transform: translateX(6px); transition: opacity .4s var(--ease), transform .5s var(--ease); color: rgba(255,255,255,.85); }
.rail button:hover span { opacity: 1; transform: none; }
.rail button i { display: block; width: 18px; height: 1px; background: rgba(255,255,255,.4); transition: width .6s var(--ease), background .4s; }
.rail button.is-active i { width: 36px; background: #fff; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,2,2,.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-panel {
  position: relative; width: min(640px, 100%); max-height: calc(100dvh - 40px); overflow: auto;
  touch-action: pan-y; overscroll-behavior: contain;
  border-radius: 32px; padding: clamp(24px, 4vw, 44px);
}
.modal-panel .kicker { margin-bottom: 8px; }
.close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-family: var(--f-ui); font-size: 13px; color: rgba(255,255,255,.7); }
.fields .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; font-family: var(--f-ui); font-size: 13px; color: rgba(255,255,255,.7); }

/* ---------- Glass select ---------- */
.select { position: relative; }
.select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: 400 16px/1.4 var(--f-ui); color: #fff; text-align: left;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px; padding: 13px 16px;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.select-btn:hover { background: rgba(255,255,255,.11); }
.select-btn svg { transition: transform .5s var(--ease); opacity: .8; }
.select.is-open .select-btn { border-color: rgba(255,255,255,.6); }
.select.is-open .select-btn svg { transform: rotate(180deg); }
.select-list {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 8px);
  list-style: none; padding: 6px; max-height: 248px; overflow: auto;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(60,46,36,.72), rgba(24,20,18,.78));
  -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255,255,255,.22);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent;
}
.select-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 12px; cursor: pointer;
  font: 400 15px/1.3 var(--f-ui); color: rgba(255,255,255,.86);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.select-list li.is-active { background: rgba(255,255,255,.12); color: #fff; }
.select-list li[aria-selected="true"] { color: #fff; }
.select-list li[aria-selected="true"]::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.fields input, .fields select, .fields textarea {
  font: 400 16px/1.4 var(--f-ui); color: #fff;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px; padding: 13px 16px; resize: vertical;
  color-scheme: dark;
}
.fields select option { background: #111; }
.fields input:focus, .fields select:focus, .fields textarea:focus { border-color: rgba(255,255,255,.6); outline: none; }
#book .modal-panel { width: min(760px, 100%); }

/* ---------- Calendar ---------- */
.date-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.date-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 13px 16px; border-radius: 16px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2);
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.date-chip span { font-family: var(--f-ui); font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.2; }
.date-chip b { font: 400 16px/1.4 var(--f-ui); color: #fff; }
.date-chip b.empty { color: rgba(255,255,255,.45); }
.date-chip.is-active { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.12); }

.cal {
  margin-top: 12px; padding: 18px 20px 14px; border-radius: 24px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14);
  font-family: var(--f-ui);
}
.cal-head { display: flex; align-items: center; gap: 12px; }
.cal-nav { width: 38px; height: 38px; flex-shrink: 0; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-titles { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; text-align: center; }
.cal-titles div { font-family: var(--f-display); font-size: 20px; letter-spacing: -.02em; line-height: 1; }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.cal-wd { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.5); text-align: center; padding: 6px 0 8px; }
.cell { position: relative; }
.cell.in-range, .cell.in-preview { background: rgba(255,255,255,.1); }
.cell.in-preview { background: rgba(255,255,255,.06); }
.cell.range-start { background: linear-gradient(to right, transparent 50%, rgba(255,255,255,.1) 50%); }
.cell.range-end { background: linear-gradient(to left, transparent 50%, rgba(255,255,255,.1) 50%); }
.cell.range-start.range-end { background: none; }
.day {
  position: relative; display: grid; place-items: center;
  width: 100%; aspect-ratio: 1; max-height: 40px; margin: 0 auto;
  border-radius: 50%; font-size: 14px; line-height: 1; color: #fff;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.day:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.day:disabled { color: rgba(255,255,255,.22); cursor: default; }
.day.today::after { content: ''; position: absolute; bottom: 5px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.cell.range-start .day, .cell.range-end .day { background: #fff; color: var(--void); }
.cal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: rgba(255,255,255,.7); }
.cal-clear { font-family: var(--f-ui); font-size: 13px; color: rgba(255,255,255,.7); text-decoration: underline; text-underline-offset: 3px; }
.cal-clear:hover { color: #fff; }

.plan-panel { width: min(1100px, 100%); }
.plan-body { margin-top: 26px; }
.plan-body svg { display: block; width: 100%; height: auto; overflow: visible; }
.plan-body { overflow-x: auto; touch-action: pan-x pan-y; }
@media (max-width: 860px) { .plan-body svg { min-width: 720px; } }
.plan-empty {
  aspect-ratio: 16 / 9; border: 1px dashed rgba(255,255,255,.3); border-radius: 16px;
  display: grid; place-items: center; font-family: var(--f-ui); font-size: 14px; color: rgba(255,255,255,.6);
}
.sent { font-family: var(--f-ui); font-size: 14px; color: rgba(255,255,255,.75); margin-top: 14px; }

/* ---------- Intro state ---------- */
.is-loading .nav, .is-loading .rail { opacity: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .nav { padding: 16px; }
  .nav-links { display: none; }
  .brand { font-size: 20px; }
  .scene { padding: 0 16px 20px; }
  .scene-still { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 18px; }
  .still-copy .lede { display: none; }
  .info { width: auto; padding: 18px 18px 16px; border-radius: 24px; }
  .dock { left: 16px; right: 16px; bottom: 20px; }
  .scene-still { padding-bottom: 196px; }
  .scene-still .still-copy { max-width: none; }
  .spec { padding: 2px 10px 0; }
  .spec b { font-size: 26px; }
  .spec b small { font-size: 12px; }
  .spec span { font-size: 11px; }
  .info-actions { margin-top: 16px; padding-top: 14px; }
  .rail { display: none; }
  .fields { grid-template-columns: 1fr; }
  .cal { padding: 14px 12px 12px; }
  .cal-titles, .cal-months { grid-template-columns: 1fr; }
  .cal-titles div:nth-child(2), .cal-months .cal-grid:nth-child(2) { display: none; }
  .pill.lg { padding: 16px 24px; }
}
@media (max-width: 380px) {
  .info-actions .pill { padding: 12px 16px; }
}

/* ---------- Thank-you page ---------- */
.thanks-page { overflow: auto; touch-action: auto; height: auto; min-height: 100%; }
html:has(.thanks-page) { overflow: auto; height: auto; }
.bg-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thanks-shade { background: linear-gradient(to top, rgba(2,2,2,.82) 0%, rgba(2,2,2,.5) 45%, rgba(2,2,2,.35) 100%); }
.thanks-page .nav a { text-decoration: none; color: #fff; }
.thanks {
  position: relative; z-index: 10; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 48px;
  padding: 130px var(--pad) calc(var(--pad) * .9);
}
.thanks-copy { max-width: 1100px; }
.thanks .display { font-size: clamp(56px, 9vw, 160px); }
.thanks-lede { font-family: var(--f-ui); font-size: 17px; line-height: 1.67; color: rgba(255,255,255,.84); max-width: 620px; margin-top: 26px; }
.thanks-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 520px)); gap: 20px; }
.card { border-radius: 28px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; }
.card .kicker { margin-bottom: 10px; }
.h-card { font-size: clamp(26px, 2.4vw, 35px); line-height: 1.15; letter-spacing: -.03em; font-weight: 400; }
.card p:not(.kicker) { font-family: var(--f-ui); font-size: 15px; line-height: 1.67; color: rgba(255,255,255,.76); margin: 12px 0 26px; }
.card .pill { margin-top: auto; text-decoration: none; color: #fff; }
.card .pill.solid { color: var(--void); }
.card .pill svg { transition: transform .5s var(--ease); }
.card .pill:hover svg { transform: translate(2px, -2px); }
.page-veil { position: fixed; inset: 0; z-index: 60; background: var(--void); pointer-events: none; }
@media (max-width: 860px) {
  .thanks { padding: 100px 16px 24px; gap: 32px; }
  .thanks-cards { grid-template-columns: 1fr; }
  .card { padding: 22px; border-radius: 24px; }
  .card .pill { white-space: normal; }
}
