/* ═══════════════════════════════════════════════════════════
   Restaurangare Ätare — editorial Scandinavian, cinematic near-black
   ═══════════════════════════════════════════════════════════ */

:root {
  --accent: #E8DEC9;
  --accent-bright: #F4ECD8;
  --accent-soft: rgba(232, 222, 201, .22);
  --glow: rgba(232, 222, 201, .26);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: #070605;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  color: #EBE4D7;
}
input, textarea, button { font-family: inherit; font-size: inherit; }
textarea { field-sizing: content; }
input[type=date] { color-scheme: dark; }
::selection { background: var(--accent); color: #161310; }

.app { min-height: 100dvh; position: relative; overflow-x: hidden; }

/* The [hidden] attribute must beat the display rules on .screen--* below.
   Author `display` values override the UA's `[hidden]{display:none}`, so make
   it !important — otherwise every screen renders stacked on one page. */
[hidden] { display: none !important; }

/* Every screen fills the viewport; without this the short screens (gate, door,
   confirmation) collapse to content height and leave the page half-black. */
.screen { min-height: 100dvh; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

@keyframes glowPulse { 0%, 100% { opacity: .45 } 50% { opacity: .72 } }
@keyframes enterUp { from { transform: translateY(12px) } to { transform: none } }

/* ─────────── shared wordmark ─────────── */
.wordmark-frame {
  border: 1.5px solid var(--accent);
  display: flex; flex-direction: column; align-items: center;
}
.wordmark-kicker {
  font-family: 'Marcellus', serif; font-size: 10px; letter-spacing: .4em;
  color: var(--accent); margin: 0 0 12px; padding-left: .4em;
}
.wordmark-title {
  font-family: 'Marcellus', serif; font-weight: 400; line-height: .9;
  letter-spacing: .14em; color: var(--accent); margin: 0; padding-left: .14em;
}

/* ─────────── shared accent button ─────────── */
.btn-accent {
  background: var(--accent); color: #161310; border: none; border-radius: 0;
  font-family: 'Familjen Grotesk', sans-serif; font-weight: 600;
  text-transform: uppercase; cursor: pointer;
  transition: transform .12s ease, filter .2s ease;
}
.btn-accent:hover { filter: brightness(1.08); }
.btn-accent:active { transform: scale(.985); }

/* ═══════════════════ GATE ═══════════════════ */
.screen--gate {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 26px;
  background: radial-gradient(125% 85% at 50% 40%, #1a1815 0%, #100e0c 50%, #070605 100%);
  position: relative; overflow: hidden;
}
.gate-inner {
  animation: enterUp .6s cubic-bezier(.2, .7, .2, 1) both;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.wordmark-frame--gate { padding: 26px 36px 30px; }
.wordmark-title--gate { font-size: clamp(40px, 12vw, 56px); }
.gate-sub {
  font-size: 10px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: #8E8775; margin: 26px 0 34px;
}
#ra-pass {
  width: 100%; max-width: 320px; text-align: center;
  background: transparent; border: none; border-bottom: 1px solid var(--accent-soft);
  border-radius: 0; padding: 12px 4px; color: #EBE4D7;
  font-size: 20px; letter-spacing: .3em; outline: none;
}
.gate-btn {
  margin-top: 26px; width: 100%; max-width: 320px; padding: 18px;
  font-size: 12px; letter-spacing: .26em;
}
.gate-msg {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: 18px; color: var(--accent-bright); min-height: 22px; margin: 22px 0 0;
}

/* ═══════════════════ DOOR ═══════════════════ */
.screen--door {
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 24px 40px;
  background: radial-gradient(125% 85% at 50% 38%, #1a1815 0%, #100e0c 48%, #070605 100%);
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 95% at 50% 40%,
    rgba(8, 7, 5, .5) 0%, rgba(7, 6, 4, .8) 56%, rgba(5, 4, 3, .96) 100%);
}
.door-top {
  position: relative; z-index: 2; width: 100%; max-width: 540px;
  display: flex; justify-content: flex-end;
}
.menu-btn {
  background: none; border: none; cursor: pointer; padding: 8px;
  display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
}
.menu-btn span { display: block; height: 1.5px; background: var(--accent); }
.menu-btn span:nth-child(1),
.menu-btn span:nth-child(2) { width: 26px; }
.menu-btn span:nth-child(3) { width: 17px; }
.door-center {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; max-width: 540px;
}
.door-center-inner { animation: enterUp .55s cubic-bezier(.2, .7, .2, 1) both; }
.wordmark-frame--door {
  padding: 40px 46px 44px; margin: 0 auto; cursor: default;
}
.wordmark-kicker--door { font-size: 13px; margin-bottom: 16px; }
.wordmark-title--door { font-size: clamp(56px, 17vw, 82px); }
.door-tagline {
  text-align: center; font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-weight: 400; font-size: 22px; letter-spacing: .01em; color: #B3AB99;
  margin: 28px auto 0; max-width: 26ch; line-height: 1.45;
}
.menu-msg {
  text-align: center; font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-weight: 500; font-size: 19px; color: var(--accent-bright);
  min-height: 24px; margin: 14px 0 0;
}
.door-bottom { position: relative; z-index: 2; width: 100%; max-width: 540px; }
.door-bottom-inner { animation: enterUp .55s cubic-bezier(.2, .7, .2, 1) both; }
.door-cta { width: 100%; padding: 22px; font-size: 13px; letter-spacing: .26em; }
.door-fineprint {
  text-align: center; font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: #6E6655; margin: 18px 0 0;
}

/* ═══════════════════ RESERVATION ═══════════════════ */
.screen--reservation {
  padding: 24px 24px 52px;
  background: radial-gradient(125% 85% at 50% 30%, #181612 0%, #0f0d0b 50%, #070605 100%);
}
.res-wrap { max-width: 540px; margin: 0 auto; }
.res-inner { animation: enterUp .55s cubic-bezier(.2, .7, .2, 1) both; }
.res-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 36px;
}
.res-back {
  background: none; border: none; cursor: pointer;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: #8E8775; padding: 0;
}
.res-wordmark {
  font-family: 'Marcellus', serif; font-size: 12px; letter-spacing: .26em;
  color: var(--accent); text-align: right;
}
.res-title {
  font-family: 'Marcellus', serif; font-weight: 400; font-size: clamp(36px, 9.5vw, 46px);
  line-height: 1.02; letter-spacing: .005em; margin: 0; color: #EBE4D7;
}
.res-subtitle {
  font-family: 'Cormorant Garamond', serif; font-weight: 400; font-style: italic;
  font-size: 20px; color: #B3AB99; margin: 12px 0 36px;
}
.field-label {
  display: block; font-size: 11px; font-weight: 500; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent); margin: 28px 0 11px;
}
.field-label--date { margin: 0 0 11px; }
.field-label .muted { color: #6E6655; }
#res-date {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid var(--accent-soft); border-radius: 0;
  padding: 12px 2px; color: #EBE4D7; font-size: 17px; outline: none;
}
.field-error {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: 17px; color: var(--accent-bright); margin: 9px 2px 0;
}
.time-group { display: flex; gap: 10px; }
.time-chip {
  flex: 1; min-height: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 12px 8px; cursor: pointer; border-radius: 0;
  transition: all .18s ease;
  border: 1px solid var(--accent-soft); background: rgba(255, 255, 255, .02); color: #EBE4D7;
}
.time-chip.is-selected {
  border: 1.5px solid var(--accent); background: var(--accent); color: #161310;
}
.time-chip .num { font-family: 'Marcellus', serif; font-size: 28px; line-height: 1; }
.time-chip .sub {
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase; opacity: .75;
}
.party-box {
  border: 1px solid var(--accent-soft); border-radius: 0; padding: 16px 18px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  cursor: pointer; background: transparent;
}
.party-box .main {
  font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 21px; color: #EBE4D7;
}
.party-box .note {
  font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  color: #6E6655; text-align: right;
}
.occ-group { display: flex; flex-wrap: wrap; gap: 9px; }
.occ-chip {
  cursor: pointer; padding: 10px 16px; border-radius: 0; white-space: nowrap;
  transition: all .18s ease; font-weight: 400; font-size: 15px;
  border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: #9A9282;
}
.occ-chip.is-selected {
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-bright);
}
#res-note {
  width: 100%; min-height: 104px; background: transparent;
  border: 1px solid var(--accent-soft); border-radius: 0; padding: 16px; color: #EBE4D7;
  font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 21px;
  line-height: 1.45; outline: none; resize: none;
}
.submit-btn {
  position: relative; overflow: hidden; margin-top: 32px; width: 100%; padding: 22px;
  font-size: 13px; letter-spacing: .26em;
}
.submit-btn:active { transform: scale(.99); }
.submit-label { position: relative; z-index: 2; }
.submit-progress {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 1;
  background: rgba(0, 0, 0, .18); width: 0; transition: width 1.25s ease;
}
.submit-msg {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: 18px; color: var(--accent-bright); text-align: center; margin: 16px 0 0;
}

/* ═══════════════════ CONFIRMATION ═══════════════════ */
.screen--confirmation {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 26px;
  background: radial-gradient(120% 80% at 50% 42%, #221d16 0%, #13100c 52%, #060504 100%);
  position: relative; overflow: hidden;
}
.conf-glow {
  position: absolute; top: 34%; left: 50%; width: 520px; height: 520px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--glow) 0%, rgba(0, 0, 0, 0) 62%);
  animation: glowPulse 6s ease-in-out infinite; pointer-events: none;
}
.conf-inner { position: relative; z-index: 2; max-width: 460px; width: 100%; text-align: center; }
.conf-kicker {
  font-size: 11px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 22px;
}
.conf-welcome {
  font-family: 'Marcellus', serif; font-weight: 400; font-size: clamp(38px, 10vw, 50px);
  line-height: 1.02; color: #EBE4D7; margin: 0;
}
.conf-when {
  font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 20px;
  color: #B3AB99; margin: 18px 0 0; line-height: 1.5;
}
.conf-occasion {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: 17px; color: #8E8775; margin: 8px 0 0;
}
.conf-rule { height: 1px; width: 42px; background: var(--accent-soft); margin: 30px auto; }
.conf-line1 {
  font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 23px;
  color: #EBE4D7; margin: 0;
}
.conf-line2 {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: 21px; color: var(--accent-bright); margin: 8px 0 0;
}
.conf-code {
  display: inline-flex; flex-direction: column; align-items: center;
  border: 1.5px solid var(--accent); padding: 18px 36px; margin: 34px 0 0; cursor: pointer;
}
.conf-code .label {
  font-size: 9px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
  color: #8E8775; margin-bottom: 9px;
}
.conf-code .code {
  font-family: 'Marcellus', serif; font-weight: 400; font-size: 30px; letter-spacing: .18em;
  color: var(--accent-bright); padding-left: .18em;
}
.conf-code-secret {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: 17px; color: var(--accent); margin: 12px 0 0;
}
.conf-cal {
  margin: 30px auto 0; display: block; width: 100%; max-width: 340px; padding: 19px;
  font-size: 12px; letter-spacing: .24em;
}
.conf-oktack {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 400;
  font-size: 18px; color: #6E6655; margin: 28px 0 0;
}
.conf-sign {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: 16px; color: #8E8775; margin: 6px 0 0;
}
.conf-return {
  background: none; border: none; cursor: pointer;
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: #56503f; margin-top: 26px; padding: 6px;
}

/* staged reveal on confirmation */
.reveal-item {
  opacity: 0; transform: translateY(8px); display: block;
  transition: opacity .65s ease, transform .65s cubic-bezier(.2, .7, .2, 1);
}
.reveal-item.is-revealed { opacity: 1; transform: translateY(0); }

/* ═══════════════════ WHISPER OVERLAY ═══════════════════ */
.whisper {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 6, 5, .86); opacity: 0; pointer-events: none;
  transition: opacity .5s ease;
}
.whisper.is-on { opacity: 1; }
.whisper span {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 400;
  font-size: clamp(46px, 13vw, 80px); letter-spacing: .02em; color: #EBE4D7;
}

/* ═══════════════════ REDUCED MOTION ═══════════════════ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal-item { opacity: 1; transform: none; }
}
