/* ─────────────────────────────────────────
   moaii — landing page (The Scroll)
   Mobile-first. Minimal. Intentional.
───────────────────────────────────────── */

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

:root {
  --bg:             #0d1018;
  --bg-mid:         #111520;
  --bg-dark:        #0a0d14;
  --text-primary:   #ffffff;
  --text-muted:     #d4cec6;
  --text-dim:       #8a8178;
  --accent:         #c9a96e;
  --accent-hover:   #d4b87e;
  --accent-subtle:  rgba(201, 169, 110, 0.10);
  --border:         rgba(212, 206, 198, 0.15);
  --input-bg:       rgba(212, 206, 198, 0.08);
  --error:          #e07070;
  --success:        #8ec9a0;

  --font-display:   'Cormorant Garamond', Georgia, serif;
  --font-body:      'DM Sans', system-ui, -apple-system, sans-serif;

  --radius:         10px;
  --max-width:      520px;
  --narrow-width:   600px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ── Ambient orbs ────────────────────────── */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.orb-top {
  top: -15%;
  right: -15%;
  width: 55vw; height: 55vw;
  max-width: 560px; max-height: 560px;
  background: radial-gradient(circle, rgba(201,169,110,0.06) 0%, transparent 68%);
}
.orb-bottom {
  bottom: -20%;
  left: -15%;
  width: 45vw; height: 45vw;
  max-width: 440px; max-height: 440px;
  background: radial-gradient(circle, rgba(90,110,160,0.05) 0%, transparent 70%);
}

/* ── Sections ────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
}

.section-hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.section-dark  { background-color: var(--bg-dark); }
.section-mid   { background-color: var(--bg-mid); }

.section-closing {
  background-color: var(--bg-dark);
  padding-bottom: 6rem;
}

/* ── Containers ──────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.container-narrow {
  max-width: var(--narrow-width);
}

/* ── Scroll animations ───────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }
.fade-up:nth-child(5) { transition-delay: 0.32s; }
.fade-up:nth-child(6) { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ── Hero elements ───────────────────────── */
.wordmark {
  margin-bottom: 3.5rem;
  color: var(--accent);
  opacity: 0.85;
}
.wordmark svg, .closing-wordmark svg {
  width: 130px;
  height: auto;
  display: block;
}

.headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.8rem, 9vw, 4rem);
  line-height: 1.12;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  margin-bottom: 2rem;
}
.headline em {
  font-style: italic;
  color: var(--accent);
}

.body-copy {
  font-weight: 400;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 0.85rem;
  letter-spacing: 0.4px;
}
.body-copy.secondary {
  color: var(--text-primary);
  opacity: 0.55;
  margin-bottom: 2.5rem;
  font-style: italic;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.6vw, 1.1rem);
}
.inline-em {
  font-style: italic;
  color: var(--text-primary);
  opacity: 0.9;
}

/* Scroll hint */
.scroll-hint {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
}
.scroll-hint-line {
  display: block;
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.4;
  animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: scaleY(0.8); }
  50%       { opacity: 0.6; transform: scaleY(1); }
}

/* ── Section typography ──────────────────── */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 1.2rem;
}

.section-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}
.section-headline em {
  font-style: italic;
  color: var(--accent);
}

.body-block {
  width: 100%;
  margin-bottom: 2rem;
}
.body-block p {
  font-weight: 400;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  line-height: 1.95;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 560px;
  letter-spacing: 0.5px;
}
.body-block p:last-child { margin-bottom: 0; }
.body-block em {
  font-style: italic;
  color: var(--text-primary);
  opacity: 0.85;
}

/* ── Pull quotes ─────────────────────────── */
.pull-quote {
  width: 100%;
  margin: 2rem 0;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 2px solid var(--accent);
}
.pull-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  line-height: 1.55;
  color: var(--text-primary);
  opacity: 1;
  margin-bottom: 0.5rem;
  letter-spacing: 0.2px;
}
.pull-quote cite {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
  opacity: 0.6;
  font-style: normal;
  letter-spacing: 0.02em;
}

/* ── Callout box ─────────────────────────── */
.callout {
  width: 100%;
  background: var(--accent-subtle);
  border: 1px solid rgba(201,169,110,0.15);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.callout p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 2.7vw, 1.2rem);
  line-height: 1.7;
  color: var(--text-primary);
  opacity: 1;
  letter-spacing: 0.3px;
}

/* ── Stats ───────────────────────────────── */
.stat-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
  margin: 2rem 0;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem 1.5rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Definition block ────────────────────── */
.definition-block {
  width: 100%;
  padding: 2rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: 12px;
  margin: 2rem 0;
}
.def-word {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 6px;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.def-phonetic {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  opacity: 0.6;
}
.def-text {
  font-weight: 400;
  font-size: clamp(0.95rem, 2.3vw, 1.05rem);
  line-height: 1.85;
  color: var(--text-primary);
  opacity: 1;
  letter-spacing: 0.3px;
}

/* ── Closing section ─────────────────────── */
.closing-wordmark {
  margin-bottom: 2.5rem;
  color: var(--accent);
  opacity: 0.7;
}

.closing-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 7vw, 3.5rem);
  line-height: 1.12;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  margin-bottom: 2rem;
}
.closing-headline em {
  font-style: italic;
  color: var(--accent);
}

.closing-body {
  margin-bottom: 2.5rem;
}
.closing-body p {
  color: var(--text-muted);
  opacity: 0.9;
}

.closing-tagline {
  margin-top: 3rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  font-weight: 300;
  color: var(--text-primary);
  opacity: 0.35;
  letter-spacing: 0.02em;
}
.closing-tagline em {
  font-style: italic;
  color: var(--accent);
  opacity: 1;
}

/* ── Form ────────────────────────────────── */
.waitlist-form {
  width: 100%;
}
.waitlist-form-bottom {
  margin-top: 0;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  margin-bottom: 0.6rem;
}

.email-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
}
.email-input::placeholder {
  color: var(--text-muted);
  opacity: 0.45;
}
.email-input:focus {
  border-color: rgba(201,169,110,0.5);
  background-color: var(--accent-subtle);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.06);
}
.email-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 0.875rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
  -webkit-appearance: none;
}
.submit-btn:hover:not(:disabled) {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}
.submit-btn:active:not(:disabled) { transform: translateY(0); }
.submit-btn:disabled { cursor: not-allowed; opacity: 0.7; }

.btn-spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(13,16,24,0.3);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.submit-btn.loading .btn-text { opacity: 0.6; }
.submit-btn.loading .btn-spinner { display: block; }

.form-feedback {
  font-size: 0.82rem;
  font-weight: 300;
  min-height: 1.2em;
  letter-spacing: 0.01em;
  padding: 0 0.1rem;
  transition: opacity 0.2s ease;
}
.form-feedback.error   { color: var(--error); }
.form-feedback.success { color: var(--success); }

.waitlist-form.submitted .input-row { display: none; }

.footnote {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.4;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ── Divider between sections ────────────── */
.section + .section::before {
  content: '';
  display: block;
  height: 1px;
  background: var(--border);
  margin-bottom: 0;
}

/* ── Tablet+ ─────────────────────────────── */
@media (min-width: 560px) {
  .input-row {
    flex-direction: row;
    gap: 0;
  }
  .email-input {
    flex: 1;
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: none;
  }
  .email-input:focus {
    position: relative;
    z-index: 1;
    border-right: 1px solid rgba(201,169,110,0.5);
  }
  .submit-btn {
    width: auto;
    white-space: nowrap;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.875rem 1.5rem;
  }

  .stat-block {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .section { padding: 7rem 2rem; }
  .section-hero { padding-top: 5rem; }
}

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