:root {
  --gold: #d4a64a;
  --gold-light: #f1d48a;
  --gold-dark: #8a6420;
  --ink: #0d0906;
  --parchment: #efe2c4;
}

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

html, body { height: 100%; }

body {
  background: var(--ink);
  color: var(--parchment);
  font-family: "Cormorant Garamond", Georgia, serif;
  overflow-x: hidden;
  min-height: 100svh;
}

/* ---------- Background ---------- */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  filter: sepia(0.35) saturate(0.9) contrast(1.05);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at center, rgba(13, 9, 6, 0.35) 0%, rgba(13, 9, 6, 0.75) 70%, rgba(13, 9, 6, 0.92) 100%),
    linear-gradient(to bottom, rgba(40, 25, 10, 0.25), rgba(13, 9, 6, 0.6));
}

/* subtle film grain for the aged look */
.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Content ---------- */
.stage {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vh, 1.5rem);
  padding: 2rem 16px;
  text-align: center;
}

.logo {
  display: block;
  width: min(68vw, 52vh, 460px);
  height: auto;
  filter: drop-shadow(0 0 28px rgba(212, 166, 74, 0.35)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.8));
  opacity: 0;
  animation: rise 2.2s ease-out 0.3s forwards, glow 6s ease-in-out 2.5s infinite;
}

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

@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 22px rgba(212, 166, 74, 0.3)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.8)); }
  50%      { filter: drop-shadow(0 0 40px rgba(241, 212, 138, 0.5)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.8)); }
}

.signup {
  width: 100%;
  max-width: 480px;
  opacity: 0;
  animation: rise 1.6s ease-out 1.6s forwards;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}
.divider span {
  height: 1px;
  width: 70px;
  background: linear-gradient(to right, transparent, var(--gold));
}
.divider span:last-child { background: linear-gradient(to left, transparent, var(--gold)); }

h1 {
  font-family: "Cinzel", serif;
  font-weight: 400;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  margin-bottom: 1.1rem;
}

form {
  display: flex;
  border: 1px solid rgba(212, 166, 74, 0.55);
  background: rgba(13, 9, 6, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 0 0 4px rgba(13, 9, 6, 0.35), inset 0 0 18px rgba(212, 166, 74, 0.08);
}

input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1rem;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--parchment);
  font-family: inherit;
  font-size: 1.1rem;
}
input[type="email"]::placeholder { color: rgba(239, 226, 196, 0.5); font-style: italic; }

form:focus-within { border-color: var(--gold-light); }

button {
  padding: 0 1.4rem;
  border: 0;
  cursor: pointer;
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  transition: filter 0.2s;
  white-space: nowrap;
}
button:hover { filter: brightness(1.12); }
button:disabled { filter: grayscale(0.4) brightness(0.8); cursor: wait; }

.form-msg {
  min-height: 1.5em;
  margin-top: 0.8rem;
  font-style: italic;
  font-size: 1.05rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
.form-msg.ok { color: var(--gold-light); }
.form-msg.error { color: #e9a08a; }

.hp { position: absolute; left: -9999px; opacity: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 480px) {
  form { flex-direction: column; }
  button { padding: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .logo, .signup { animation: none; opacity: 1; }
}
