:root {
  /* Palette — matches OLOOHO Studio Admin: dark midnight + warm gold */
  --bg: #0d0e18;             /* deep midnight */
  --bg-mute: #14152200;      /* slightly elevated (unused for hero, kept for V2) */
  --border: #2a2b3f;
  --ink: #f5f1e8;            /* warm cream */
  --ink-soft: #8a8a9c;       /* muted gray */
  --ink-dim: #5a5a6c;
  --gold: #e8a82e;           /* primary accent — matches OHO wordmark + admin CTAs */
  --gold-bright: #f4b934;    /* hover/active */
  --gold-deep: #b8821f;
  --error: #f87171;

  /* Typography */
  --font-display: 'Fraunces', 'Hoefler Text', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-width: 36rem;
}

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

html {
  background: var(--bg);
  font-size: 16px;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Subtle atmosphere — warm gold glow top-left, cool depth bottom-right */
  background:
    radial-gradient(at 18% 12%, rgba(232, 168, 46, 0.07) 0%, transparent 55%),
    radial-gradient(at 82% 88%, rgba(40, 30, 70, 0.35) 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
}

/* Faint film-grain overlay for cinematic texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 0.22 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 1.5rem 2rem;
}

.hero {
  width: 100%;
  max-width: var(--max-width);
  margin: auto 0;
  text-align: center;
}

.rule {
  height: 1px;
  width: 4rem;
  background: var(--gold);
  margin: 0 auto 2.5rem;
  transform-origin: center;
  box-shadow: 0 0 8px rgba(232, 168, 46, 0.35);
  animation: rule-expand 1.1s ease-out 0.1s both;
}

@keyframes rule-expand {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* Wordmark — matches admin: clean sans, OLO cream + OHO gold, tight spacing */
.wordmark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 5.5rem);
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 2rem;
  /* Optical adjustment for centered all-caps with positive tracking */
  text-indent: 0.05em;

  opacity: 0;
  animation: fade-up 0.9s ease-out 0.25s both;
}

.wordmark-light { color: var(--ink); }
.wordmark-gold  { color: var(--gold); }

.tagline {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: 'opsz' 36;
  font-size: clamp(1.25rem, 3.4vw, 1.625rem);
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 2.25rem;
  letter-spacing: 0.005em;

  opacity: 0;
  animation: fade-up 0.9s ease-out 0.45s both;
}

.status {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
  margin-bottom: 3rem;

  opacity: 0;
  animation: fade-up 0.9s ease-out 0.65s both;
}

.waitlist {
  display: flex;
  gap: 0.5rem;
  max-width: 24rem;
  margin: 0 auto;
  transition: opacity 0.3s ease;

  opacity: 0;
  animation: fade-up 0.9s ease-out 0.85s both;
}

.waitlist.is-hidden { display: none; }

.waitlist input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.waitlist input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(232, 168, 46, 0.05);
}

.waitlist input::placeholder {
  color: var(--ink-dim);
}

/* Gold CTA — matches "+ New Series" / "+ New Job" in admin */
.waitlist button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.9rem 1.25rem;
  background: var(--gold);
  color: var(--bg);
  border: 1px solid var(--gold);
  border-radius: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}

.waitlist button:hover:not(:disabled),
.waitlist button:focus-visible:not(:disabled) {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 0 24px rgba(232, 168, 46, 0.25);
}

.waitlist button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.waitlist button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.waitlist button:hover:not(:disabled) .btn-arrow,
.waitlist button:focus-visible:not(:disabled) .btn-arrow {
  transform: translateX(3px);
}

.waitlist button.is-loading .btn-arrow {
  animation: spin 0.7s linear infinite;
}

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

.form-message {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  min-height: 1.4rem;
  letter-spacing: 0.005em;
}

.form-message.is-success { color: var(--gold); }
.form-message.is-error   { color: var(--error); }

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

.footer {
  width: 100%;
  max-width: 60rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--ink-dim);
  padding-top: 3rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  opacity: 0;
  animation: fade-up 0.9s ease-out 1.1s both;
}

.footer-mark { font-weight: 500; }

.footer-link {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.8125rem;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--gold);
  border-bottom-color: var(--gold);
  outline: none;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 480px) {
  .page { padding: 2rem 1.25rem 1.5rem; }

  .waitlist {
    flex-direction: column;
    gap: 0.6rem;
  }

  .waitlist button { justify-content: center; }

  .footer {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding-top: 2.5rem;
  }
}

@media (max-width: 360px) {
  .wordmark { letter-spacing: 0.03em; text-indent: 0.03em; }
}

/* Honor reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0 !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
