:root {
  --bg: #0a0a0a;
  --text: #f6f1e7;
  --text-soft: rgba(246, 241, 231, 0.72);
  --accent: #f6f1e7;

  /* Panel palette — dark "jungle nightclub": deep green, cream, warm gold */
  --panel-bg: #0c1f14;
  --panel-bg-end: #07140d;
  --panel-text: #f4ede1;
  --panel-text-soft: rgba(244, 237, 225, 0.58);
  --panel-line: rgba(244, 237, 225, 0.16);
  --panel-accent: #e9c984; /* warm gold */
  --panel-accent-hover: #f1da9f; /* brighter gold */
  --panel-gold-glow: rgba(233, 201, 132, 0.45);
}

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

html,
body {
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  /* iOS Safari tints its URL/status bars with this color.
     A dark earthy tone blends with the foliage in the video. */
  background: #2f3522;
}

body.panel-open {
  overflow: hidden;
}

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

/* ---------- Hero video ---------- */
.hero-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.35) 0%,
      rgba(0, 0, 0, 0.15) 30%,
      rgba(0, 0, 0, 0.2) 60%,
      rgba(0, 0, 0, 0.55) 100%
    );
}

/* ---------- Layout ---------- */
.container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  padding-top: max(clamp(20px, 4vh, 48px), env(safe-area-inset-top));
  padding-bottom: max(clamp(20px, 4vh, 48px), env(safe-area-inset-bottom));
  padding-left: max(clamp(20px, 5vw, 64px), env(safe-area-inset-left));
  padding-right: max(clamp(20px, 5vw, 64px), env(safe-area-inset-right));
}

/* ---------- Logo ---------- */
.logo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.logo {
  width: clamp(180px, 22vw, 320px);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.25));
}

/* ---------- Hero content ---------- */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  width: 100%;
  max-width: 560px;
  gap: clamp(28px, 4vh, 44px);
}

.coming-soon {
  font-family: "Fraunces", "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.mission {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.7vw, 1.12rem);
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: rgba(246, 241, 231, 0.9);
  max-width: 33ch;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
}

/* ---------- CTA Button (replaces inline form) ---------- */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(10, 10, 10, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(246, 241, 231, 0.6);
  border-radius: 999px;
  padding: 16px 28px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}

.cta-button:hover {
  background: var(--text);
  color: #0a0a0a;
  border-color: var(--text);
}

.cta-button:hover .cta-arrow {
  transform: translateX(4px);
}

.cta-button:active {
  transform: translateY(1px);
}

.cta-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

/* ---------- Footer ---------- */
.footer {
  width: 100%;
  display: flex;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* ---------- Waitlist Panel ---------- */
.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.panel-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.waitlist-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(520px, 100%);
  z-index: 20;
  background:
    radial-gradient(130% 55% at 50% 0%, rgba(233, 201, 132, 0.07) 0%, transparent 62%),
    linear-gradient(165deg, var(--panel-bg) 0%, var(--panel-bg-end) 100%);
  color: var(--panel-text);
  transform: translateX(100%);
  transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
  overflow: hidden;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.waitlist-panel.is-open {
  transform: translateX(0);
}

.panel-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  color: var(--panel-accent);
  opacity: 0.1;
  animation: watermarkPulse 8s ease-in-out infinite;
}

.panel-watermark svg {
  width: 130%;
  height: auto;
  max-width: none;
  display: block;
  animation: sunRotate 240s linear infinite;
  filter: drop-shadow(0 0 18px var(--panel-gold-glow));
}

@keyframes watermarkPulse {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.14; }
}

@keyframes sunRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .panel-watermark svg {
    animation: none;
  }
}

.panel-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(24px, 4vh, 40px) clamp(28px, 5vw, 48px);
  overflow-y: auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(28px, 5vh, 56px);
}

.panel-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--panel-text-soft);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--panel-accent);
  box-shadow: 0 0 9px var(--panel-gold-glow);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.panel-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--panel-text);
  padding: 4px;
  transition: color 0.2s ease;
}

.panel-close:hover {
  color: var(--panel-accent);
}

.panel-close span:last-child {
  font-size: 1.2rem;
  line-height: 1;
}

.panel-intro {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--panel-text-soft);
  max-width: 32ch;
  margin-bottom: clamp(36px, 7vh, 80px);
}

.panel-heading {
  font-family: "Instrument Serif", "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(3.2rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--panel-text);
  margin-bottom: clamp(36px, 6vh, 56px);
}

.panel-heading em {
  font-style: italic;
  font-weight: 400;
  color: var(--panel-accent);
  font-family: "Instrument Serif", Georgia, serif;
  text-shadow: 0 0 28px var(--panel-gold-glow);
}

/* ---------- Panel Form ---------- */
.panel-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1;
  min-height: 0;
}

.field {
  position: relative;
  padding-top: 18px;
}

.field-label {
  position: absolute;
  top: 0;
  left: 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--panel-text-soft);
  pointer-events: none;
  transition: color 0.2s ease;
}

.field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  border-bottom: 1px solid var(--panel-line);
  padding: 10px 0;
  font-family: inherit;
  font-size: 1rem;
  color: var(--panel-text);
  transition: border-color 0.2s ease;
}

.field input:focus {
  border-bottom-color: var(--panel-accent);
  box-shadow: 0 10px 22px -14px var(--panel-gold-glow);
}

.field input::placeholder {
  color: rgba(244, 237, 225, 0.3);
}

.field input:focus + .field-label,
.field:focus-within .field-label {
  color: var(--panel-accent);
}

/* ---------- Checkbox ---------- */
.checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--panel-text-soft);
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1px solid var(--panel-line);
  background: transparent;
  margin-top: 2px;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.checkbox input:checked + .checkbox-box {
  background: var(--panel-accent);
  border-color: var(--panel-accent);
  box-shadow: 0 0 12px var(--panel-gold-glow);
}

.checkbox input:checked + .checkbox-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--panel-bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox input:focus-visible + .checkbox-box {
  outline: 2px solid var(--panel-accent);
  outline-offset: 2px;
}

/* ---------- Submit ---------- */
.panel-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 20px 28px;
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: auto;
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease,
    border-color 0.35s ease, transform 0.1s ease;
  /* Dull / "powered off" — checkbox unchecked */
  background: rgba(244, 237, 225, 0.04);
  color: var(--panel-text-soft);
  cursor: not-allowed;
}

/* Lit state — checkbox checked: the button powers on and pulses */
.panel-form:has(#consent:checked) .panel-submit,
.panel-submit.is-active {
  background: linear-gradient(180deg, #f3dca2 0%, #e3bc6f 100%);
  color: #0c1f14;
  border-color: transparent;
  cursor: pointer;
  box-shadow: 0 0 30px -4px var(--panel-gold-glow),
    0 10px 26px -14px rgba(0, 0, 0, 0.7);
  animation: btnGlow 2.8s ease-in-out infinite;
}

.panel-form:has(#consent:checked) .panel-submit:hover,
.panel-submit.is-active:hover {
  background: linear-gradient(180deg, #f8e6b8 0%, #eccc86 100%);
  transform: translateY(-1px);
}

.panel-form:has(#consent:checked) .panel-submit:hover .cta-arrow,
.panel-submit.is-active:hover .cta-arrow {
  transform: translateX(4px);
}

.panel-form:has(#consent:checked) .panel-submit:active,
.panel-submit.is-active:active {
  transform: translateY(1px);
}

.panel-submit:disabled {
  pointer-events: none;
}

@keyframes btnGlow {
  0%, 100% {
    box-shadow: 0 0 22px -3px var(--panel-gold-glow),
      0 10px 26px -14px rgba(0, 0, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 46px 1px var(--panel-gold-glow),
      0 10px 26px -14px rgba(0, 0, 0, 0.7);
  }
}

/* Submit press burst — expanding ring */
.panel-submit.is-bursting::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 8px;
  border: 2px solid var(--panel-accent);
  opacity: 0.7;
  animation: submitRing 0.7s ease-out forwards;
  pointer-events: none;
}

@keyframes submitRing {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* Form exit */
.panel-form.is-exiting {
  opacity: 0;
  transform: scale(0.96) translateY(-8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.panel-form.is-hidden {
  display: none;
}

/* ---------- Success state ---------- */
.panel-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: auto;
  margin-bottom: auto;
  padding: 24px 0;
}

.panel-success.is-visible {
  display: flex;
}

.success-heading {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--panel-text);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(12px);
  animation: successFadeUp 0.6s ease 0.35s forwards;
}

.success-heading em {
  font-style: italic;
  color: var(--panel-accent);
  text-shadow: 0 0 26px var(--panel-gold-glow);
}

.success-message {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--panel-text-soft);
  max-width: 34ch;
  opacity: 0;
  transform: translateY(12px);
  animation: successFadeUp 0.6s ease 0.6s forwards;
}

@keyframes successFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-submit.is-bursting,
  .panel-submit.is-bursting::before {
    animation: none;
  }
  /* Disable the reveal animation but keep the success copy VISIBLE —
     otherwise it stays stuck at opacity:0 when motion is reduced. */
  .success-heading,
  .success-message {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .panel-form.is-exiting {
    transition: none;
  }
}

.form-message {
  font-size: 0.85rem;
  color: var(--panel-text-soft);
  min-height: 1.2em;
  margin-top: -8px;
}

.form-message.success {
  color: var(--panel-accent);
}

.form-message.error {
  color: #f0a896;
}

/* ---------- Panel Footer ---------- */
.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(20px, 3vh, 28px);
  padding-top: 18px;
  border-top: 1px solid var(--panel-line);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--panel-text-soft);
}

.panel-socials {
  display: flex;
  gap: 18px;
}

.panel-socials a {
  color: var(--panel-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.panel-socials a:hover {
  color: var(--panel-accent);
  text-shadow: 0 0 14px var(--panel-gold-glow);
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .waitlist-panel {
    width: 100%;
    box-shadow: none;
  }
  .panel-heading {
    font-size: clamp(2.4rem, 10vw, 3.4rem);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
  body {
    background-image: url("assets/hero-poster.jpg");
    background-size: cover;
    background-position: center;
  }
  .waitlist-panel,
  .panel-backdrop {
    transition: none;
  }
}

/* ============================================================
   Intro — loading screen + hero reveal
   ============================================================ */

/* Loader is hidden unless JS is active (no-JS users skip straight to content) */
.loader {
  display: none;
}

html.js .loader {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 50% 45%,
    #1c4128 0%,
    #0c1d12 58%,
    #07130c 100%
  );
  transition: transform 0.95s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.loader.is-done {
  transform: translateY(-100%);
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(26px, 5vh, 38px);
  animation: loaderIn 0.6s ease both;
}

.loader-sun {
  width: clamp(170px, 40vw, 250px);
  height: auto;
  display: block;
}

.loader-track {
  stroke: rgba(244, 231, 198, 0.1);
}

.loader-ring {
  stroke: #f4e7c6;
}

.loader-rays {
  transform-box: fill-box;
  transform-origin: center;
  animation: sunRotate 14s linear infinite;
  opacity: 0.92;
}

.loader-count {
  display: flex;
  align-items: baseline;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: #f4e7c6;
  font-variant-numeric: tabular-nums;
  padding-left: 0.22em;
}

.loader-pct {
  margin-left: 0.12em;
  opacity: 0.5;
}

@keyframes loaderIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Hero reveal --- */
html.intro .logo,
html.intro .coming-soon,
html.intro .mission,
html.intro .cta-button,
html.intro .footer {
  opacity: 0;
}

.coming-soon .char {
  display: inline-block;
  white-space: pre;
  will-change: transform, opacity, filter;
}

html.intro-reveal .logo {
  animation: introFade 1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s both;
}

html.intro-reveal .coming-soon {
  opacity: 1;
}

html.intro-reveal .coming-soon .char {
  animation: charIn 0.75s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  animation-delay: calc(0.5s + var(--i) * 0.045s);
}

html.intro-reveal .mission {
  animation: introUp 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) 1s both;
}

html.intro-reveal .cta-button {
  animation: introUp 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) 1.35s both;
}

html.intro-reveal .footer {
  animation: introUp 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) 1.55s both;
}

@keyframes introFade {
  from { opacity: 0; transform: scale(0.93) translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes introUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes charIn {
  from { opacity: 0; transform: translateY(0.5em); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .loader {
    transition: none;
  }
  .loader-inner,
  .loader-rays,
  .panel-watermark,
  .pulse-dot,
  .panel-form:has(#consent:checked) .panel-submit,
  .panel-submit.is-active,
  .panel-submit.is-bursting::before {
    animation: none;
  }
  html.intro-reveal .logo,
  html.intro-reveal .mission,
  html.intro-reveal .cta-button,
  html.intro-reveal .footer,
  html.intro-reveal .coming-soon,
  html.intro-reveal .coming-soon .char {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
