@import "../tokens.css";

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--color-bg-warm);
  color: var(--color-ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ---- Top bar ---------------------------------------------------------- */
.reserve-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
}

.reserve-top__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ink);
  text-decoration: none;
  font-size: 16px;
  opacity: 0.8;
  transition: opacity 160ms ease;
}
.reserve-top__back:hover { opacity: 1; }
.reserve-top__back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---- Layout ----------------------------------------------------------- */
.reserve {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 28px) clamp(20px, 4vw, 56px) clamp(48px, 8vw, 96px);
}

/* Two-column layout once there's room for the panel + 3D render */
@media (min-width: 900px) {
  .reserve {
    max-width: 1160px;
    display: grid;
    grid-template-columns: minmax(0, 640px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(48px, 7vw, 112px);
  }
  .reserve__panel { min-width: 0; }
}

/* ---- 3D render -------------------------------------------------------- */
.reserve__render {
  display: flex;
  align-items: center;
  justify-content: center;
}
.reserve__viewer {
  width: 100%;
  max-width: 520px;
  height: clamp(320px, 46vw, 560px);
  --poster-color: transparent;
  background: transparent;
}

@media (max-width: 899px) {
  .reserve__render {
    margin: clamp(36px, 9vw, 56px) 0 0;
  }
  .reserve__viewer {
    height: clamp(280px, 70vw, 420px);
  }
}

/* ---- Reserve panel --------------------------------------------------- */
.reserve__panel {
  background: var(--color-bg-cream);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 3vw, 40px);
  box-shadow: 0 10px 40px rgba(27, 13, 13, 0.06);
}

.reserve__logo {
  display: flex;
  justify-content: center;
  margin: 0 0 clamp(18px, 3vw, 28px);
}

.reserve__logo-mark {
  width: clamp(46px, 8vw, 64px);
  aspect-ratio: 1821 / 2048;
  background-color: var(--color-ink);
  -webkit-mask: url(/assets/yehu-logo.svg?v=5) center / contain no-repeat;
  mask: url(/assets/yehu-logo.svg?v=5) center / contain no-repeat;
}

.reserve__waitlist-no {
  margin: 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-clay);
}

.reserve__headline {
  margin: 14px 0 0;
  text-align: center;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.1;
}

.reserve__lede {
  margin: 16px 0 0;
  text-align: center;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.5;
  color: var(--color-ink);
  opacity: 0.75;
}

/* Price row */
.reserve__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 28px 0 0;
  font-size: clamp(16px, 2.4vw, 19px);
}
.reserve__price-now {
  font-weight: 700;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1;
  color: var(--color-clay);
}
.reserve__price-per { font-weight: 600; opacity: 0.6; }
.reserve__price-was {
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 30px);
  text-decoration: line-through;
  opacity: 0.4;
}
.reserve__price-was-per { font-weight: 600; opacity: 0.4; }
.reserve__price-arrow {
  align-self: center;
  margin: 0 8px;
  color: var(--color-clay);
  opacity: 0.7;
  font-size: clamp(20px, 3vw, 26px);
}

.reserve__badge-row {
  margin: 16px 0 0;
  text-align: center;
}
.reserve__save {
  display: inline-block;
  background: var(--color-clay);
  color: #fff;
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 999px;
}

/* Benefits checklist */
.reserve__benefits {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.reserve__benefit {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
}
.reserve__benefit svg {
  width: 20px; height: 20px;
  margin-top: 2px;
  fill: none; stroke: var(--color-clay); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.reserve__benefit-title { font-size: 16px; font-weight: 600; line-height: 1.4; }

/* Email field + inline Join button */
.reserve__field {
  margin: 26px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.reserve__field input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  appearance: none;
  border: none;
  background: var(--color-input-bg);
  color: var(--color-input-text);
  font-family: var(--font-sans);
  font-size: 17px;
  padding: 15px 20px;
  border-radius: 999px;
}
.reserve__field input:focus {
  outline: 2px solid var(--color-clay);
  outline-offset: 2px;
}
.reserve__field ::placeholder { color: var(--color-input-text); opacity: 0.7; }

/* Filled state — the email is prefilled from the landing page, so mirror
   that page's autofilled look (light-blue surface + dark text) to confirm
   to the user their email is in place. */
.reserve__field input:not(:placeholder-shown) {
  background: #e9f1fe;
  color: var(--color-ink);
}
.reserve__field input:-webkit-autofill,
.reserve__field input:-webkit-autofill:hover,
.reserve__field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-ink);
  -webkit-box-shadow: 0 0 0 1000px #e9f1fe inset;
  box-shadow: 0 0 0 1000px #e9f1fe inset;
}

.reserve__join {
  width: 100%;
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: none;
  cursor: pointer;
  background: var(--color-clay);
  color: #fff;
  font-family: var(--font-sans);
  text-align: left;
  padding: clamp(14px, 2.2vw, 20px) clamp(18px, 2.6vw, 26px);
  border-radius: 999px;
  box-shadow: 0 4px 0 0 rgba(0, 0, 0, 0.14);
  transition: background-color 160ms ease, transform 120ms ease;
}
.reserve__join:hover { background: var(--color-clay-pressed); }
.reserve__join:active { transform: translateY(1px); }
.reserve__join:disabled { opacity: 0.6; cursor: not-allowed; }

.reserve__cta-main {
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.reserve__cta-note {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  padding: clamp(10px, 1.6vw, 14px) clamp(16px, 2.2vw, 22px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}
.reserve__cta-note-lead {
  font-size: clamp(16px, 2.4vw, 20px);
  font-weight: 700;
  line-height: 1.1;
}
.reserve__cta-strike {
  font-weight: 600;
  opacity: 0.6;
  text-decoration: line-through;
}
.reserve__cta-note-sub {
  font-size: clamp(11px, 1.6vw, 13px);
  font-weight: 500;
  line-height: 1.2;
  opacity: 0.82;
}

.reserve__feedback {
  min-height: 1.2em;
  margin: 12px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--color-brown);
}
.reserve__feedback.error { color: var(--color-blood-red); }

.reserve__fineprint {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-ink);
  opacity: 0.55;
}

/* ---- Trust bar (refundable / secure / shipping) ---------------------- */
.reserve__usps {
  list-style: none;
  margin: 28px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(27, 13, 13, 0.1);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.reserve__usp {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.reserve__usp-icon {
  width: 26px; height: 26px;
  margin-bottom: 4px;
  fill: none;
  stroke: var(--color-clay);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reserve__usp-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}
.reserve__usp-sub {
  font-size: 14px;
  line-height: 1.3;
  color: var(--color-ink);
  opacity: 0.55;
}
.reserve__terms {
  display: block;
  margin: 20px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--color-ink);
  opacity: 0.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reserve__terms:hover { opacity: 0.75; }

@media (max-width: 520px) {
  .reserve__usps {
    grid-template-columns: 1fr 1fr;
    gap: 24px 18px;
  }

  .reserve__join {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-radius: 28px;
    padding: 18px;
    text-align: center;
  }
  .reserve__cta-main {
    white-space: normal;
  }
}

/* Honeypot */
.reserve__hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---- Confirmation page ------------------------------------------------ */
.confirm {
  max-width: 560px;
  margin: clamp(24px, 6vw, 80px) auto;
  padding: clamp(28px, 4vw, 48px);
  text-align: center;
}
.confirm__check {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--color-clay);
  display: flex; align-items: center; justify-content: center;
}
.confirm__check svg { width: 38px; height: 38px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.confirm__title { font-size: clamp(28px, 5vw, 44px); margin: 0 0 8px; }
.confirm__lede { font-size: 18px; opacity: 0.8; margin: 0 0 28px; line-height: 1.5; }
.confirm__card {
  background: var(--color-bg-cream);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: left;
  display: grid;
  gap: 12px;
}
.confirm__row { display: flex; justify-content: space-between; gap: 16px; font-size: 16px; }
.confirm__row dt { opacity: 0.6; }
.confirm__row dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.confirm__share-wrap {
  position: relative;
  display: inline-block;
  margin-top: 28px;
}
.confirm__share {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--color-clay);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 14px 24px;
  cursor: pointer;
}
.confirm__share:hover { background: var(--color-clay-pressed); }

/* Desktop share menu (native share sheet is used where available). */
.confirm__share-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  min-width: 200px;
  padding: 6px;
  background: var(--color-bg-cream);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.confirm__share-menu[hidden] { display: none; }
.confirm__share-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: none;
  background: transparent;
  border-radius: 11px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--color-ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.confirm__share-item:hover { background: rgba(0, 0, 0, 0.06); }
.confirm__share-item svg { width: 20px; height: 20px; flex: 0 0 20px; }
.confirm__home {
  display: block;
  margin-top: 18px;
  color: var(--color-ink);
  opacity: 0.6;
  text-decoration: underline;
}

/* The check, card, and share controls each set their own `display`, which would
   otherwise beat the [hidden] attribute's default display:none. This makes the
   attribute authoritative for anything toggled inside the confirm view. */
.confirm [hidden] { display: none !important; }

/* Recovery form (shown when no stored/verified reservation exists). */
.confirm__recover {
  max-width: 380px;
  margin: 4px auto 0;
  text-align: left;
}
.confirm__recover-field { margin: 0 0 12px; }
.confirm__recover input {
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  border: none;
  background: var(--color-input-bg);
  color: var(--color-input-text);
  font-family: var(--font-sans);
  font-size: 17px;
  padding: 15px 20px;
  border-radius: 999px;
}
.confirm__recover input:focus {
  outline: 2px solid var(--color-clay);
  outline-offset: 2px;
}
.confirm__recover ::placeholder { color: var(--color-input-text); opacity: 0.7; }
.confirm__recover-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  background: var(--color-clay);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  padding: 15px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 0 0 rgba(0, 0, 0, 0.14);
  transition: background-color 160ms ease, transform 120ms ease;
}
.confirm__recover-btn:hover { background: var(--color-clay-pressed); }
.confirm__recover-btn:active { transform: translateY(1px); }
.confirm__recover-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.confirm__recover-feedback {
  margin: 14px 0 0;
  font-size: 15px;
  text-align: center;
  opacity: 0.85;
  min-height: 1.2em;
}
.confirm__recover-feedback.error { color: var(--color-blood-red); opacity: 1; }
