@font-face {
  font-family: "LTC Octic Gothic";
  src: url("assets/fonts/LTCOcticGothicW00One.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --brand-dark: #000000;
  --brand-light: #ffffff;
  --text: #000000;
  --text-secondary: rgba(20, 18, 16, 0.62);
  --text-muted: rgba(20, 18, 16, 0.4);
  --border: rgba(0, 0, 0, 0.14);
  --body: "DM Sans", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  font-family: var(--body);
  color: var(--text);
  background: #e8eaee;
  position: relative;
  overflow-x: hidden;
}

/* ── Holographic background ─────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("assets/cover-holographic.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Soft scrim to lift text legibility off the holographic */
.scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    120% 90% at 50% 38%,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0) 80%
  );
}

/* ── Layout ─────────────────────────────────────────────────── */
.stage {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 6vw, 5rem);
}

.brand {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}
.wordmark {
  display: block;
  width: min(86vw, 620px);
  height: auto;
  opacity: 0.9;
}

.hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 5rem) 0;
}

.eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.headline {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: var(--text);
}

.rule {
  width: 44px;
  height: 1px;
  background: rgba(0, 0, 0, 0.25);
  margin: 0 auto 2rem;
}

.lede {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 38ch;
  margin: 0 auto 2.5rem;
}

/* ── Flavours ───────────────────────────────────────────────── */
.flavours {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 0.75rem;
  margin: 0 auto 2.75rem;
}
.flavours li {
  --t: #1a1614;
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--t);
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  background: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 78%, black);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ── Form ───────────────────────────────────────────────────── */
.form {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.field {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field:focus-within {
  border-color: rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.7);
}

#email {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  padding: 0.7rem 0.85rem;
}
#email::placeholder {
  color: var(--text-muted);
}
#email:focus {
  outline: none;
}

.submit {
  flex: 0 0 auto;
  position: relative;
  border: 0;
  border-radius: 2px;
  background: var(--brand-dark);
  color: var(--brand-light);
  font-family: var(--body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 1.5rem;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.05s ease;
}
.submit:hover {
  opacity: 0.84;
}
.submit:active {
  transform: translateY(1px);
}
.submit:disabled {
  cursor: default;
  opacity: 0.6;
}

.submit-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.form.loading .submit-label {
  display: none;
}
.form.loading .submit-spinner {
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-msg {
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.5;
  margin-top: 0.85rem;
  min-height: 1.1em;
  color: var(--text-secondary);
}
.form-msg.error {
  color: #9a2a2a;
}
.form-msg.success {
  color: var(--text);
}

/* Collapse the form on success, reveal a serif confirmation */
.form.done .field,
.form.done .form-msg {
  display: none;
}
.form.done::after {
  content: attr(data-success);
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--text);
}

/* ── Footer ─────────────────────────────────────────────────── */
.meta {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

@media (max-width: 520px) {
  .field {
    flex-direction: column;
  }
  .submit {
    padding: 0.85rem;
  }
}
