/* ── Reset ───────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Honeypot hiding ─────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Palette ─────────────────────────────────────────────── */
:root {
  --bg:            #0e0e0e;
  --bg-raised:     #161616;
  --fg:            #d4d4d4;
  --fg-muted:      #6a6a6a;
  --fg-dim:        #3a3a3a;
  --accent:        #c4aa78;
  --accent-hover:  #d6c098;
  --accent-glow:   rgba(196, 170, 120, 0.08);
  --rule:          #1e1e1e;
  --rule-visible:  #2a2a2a;
  --danger:        #c0392b;

  --mono: "SF Mono", "Cascadia Mono", "Fira Code", "Consolas",
          "Liberation Mono", monospace;
  --serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ── Body ────────────────────────────────────────────────── */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scene — centered vertical layout ────────────────────── */
.scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 3rem 2rem;
  position: relative;
  text-align: center;
}

/* ── Film grain overlay ──────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── Radial vignette ─────────────────────────────────────── */
.scene::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 0;
}

.scene > * {
  position: relative;
  z-index: 1;
}

/* ── Logo ────────────────────────────────────────────────── */
.logo-container {
  margin-bottom: 2rem;
}

.logo {
  width: 140px;
  height: 140px;
  color: var(--accent);
  filter: drop-shadow(0 0 40px var(--accent-glow));
  animation: logo-breathe 6s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%, 100% {
    filter: drop-shadow(0 0 40px var(--accent-glow));
    opacity: 0.95;
  }
  50% {
    filter: drop-shadow(0 0 60px rgba(196, 170, 120, 0.14));
    opacity: 1;
  }
}

/* ── Masthead ────────────────────────────────────────────── */
.masthead {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1em;
}

.masthead-the {
  font-size: 0.85rem;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.5em;
  color: var(--fg-muted);
  text-indent: 0.5em; /* visually center the tracked text */
}

.masthead-name {
  font-size: clamp(2.2rem, 8vw, 4rem);
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    #e8d5b0 40%,
    var(--accent) 70%,
    #9a8460 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ── Tagline ─────────────────────────────────────────────── */
.tagline {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-indent: 0.35em;
  margin-bottom: 2.5rem;
}

/* ── Decorative rule ─────────────────────────────────────── */
.rule {
  width: 60px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent) 50%,
    transparent
  );
  margin-bottom: 2.5rem;
  opacity: 0.5;
}

/* ── Proclamation ────────────────────────────────────────── */
.proclamation {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  color: var(--fg-muted);
  line-height: 1.8;
  max-width: 28em;
  margin-bottom: 3rem;
}

/* ── Status indicator ────────────────────────────────────── */
.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(196, 170, 120, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(196, 170, 120, 0);
  }
}

.status-text {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  text-transform: lowercase;
}

/* ── CTA Block ───────────────────────────────────────────── */
.cta-block {
  margin-bottom: 4rem;
}

.cta-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

/* ── Signup Form ─────────────────────────────────────────── */
.signup-form {
  display: flex;
  gap: 0;
  max-width: 360px;
  margin: 0 auto;
}

.signup-form input[type="email"] {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.65em 1em;
  background: var(--bg-raised);
  color: var(--fg);
  border: 1px solid var(--rule-visible);
  border-right: none;
  border-radius: 3px 0 0 3px;
  outline: none;
  transition: border-color 0.2s;
}

.signup-form input[type="email"]::placeholder {
  color: var(--fg-dim);
}

.signup-form input[type="email"]:focus {
  border-color: var(--accent);
}

.signup-form button {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65em 1.4em;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--rule-visible);
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.signup-form button:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.signup-form button:active {
  background: var(--accent-hover);
}

/* ── Back link (success page) ────────────────────────────── */
.back-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-visible);
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: 3rem;
}

.back-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  margin-top: auto;
  padding-top: 2rem;
}

.copyleft {
  display: inline-block;
}

/* ── Entrance animations ─────────────────────────────────── */
.logo-container,
.masthead,
.tagline,
.rule,
.proclamation,
.status,
.cta-block {
  animation: fade-up 0.8s ease-out both;
}

.logo-container  { animation-delay: 0.1s; }
.masthead        { animation-delay: 0.25s; }
.tagline         { animation-delay: 0.4s; }
.rule            { animation-delay: 0.55s; }
.proclamation    { animation-delay: 0.7s; }
.status          { animation-delay: 0.85s; }
.cta-block       { animation-delay: 1.0s; }

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

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .scene {
    padding: 2rem 1.25rem;
  }

  .logo {
    width: 110px;
    height: 110px;
  }

  .signup-form {
    flex-direction: column;
    gap: 0.5rem;
  }

  .signup-form input[type="email"] {
    border-right: 1px solid var(--rule-visible);
    border-radius: 3px;
  }

  .signup-form button {
    border-radius: 3px;
  }
}

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