/* ==========================================================================
   RevoForge teaser — Silent Curator / Noir Editorial
   Tokens mirror tailwind.config.ts from the main app.
   ========================================================================== */

@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/NotoSerif-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/NotoSerif-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
}

:root {
  --surface: #131313;
  --surface-container-low: #1c1b1b;
  --surface-container: #201f1f;
  --surface-container-high: #2a2a2a;
  --surface-bright: #3a3939;

  --on-surface: #e5e2e1;
  --on-surface-variant: #c1c8ca;

  --primary: #a8ccd8;
  --primary-container: #4d707a;
  --on-primary-container: #cdf3fe;

  --tertiary: #eebc9c;
  --outline-variant: #41484a;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Noto Serif", Georgia, "Times New Roman", serif;

  --max-width: 640px;
  --side-padding: 24px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
h1, h2, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }

/* Layout */
.page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px var(--side-padding) 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Wordmark */
.wordmark {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--on-surface);
  margin-bottom: 8px;
}

/* Display tagline */
.display {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}

/* Body paragraph */
.lede {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--on-surface-variant);
  font-weight: 300;
  max-width: 52ch;
}
@media (min-width: 768px) {
  .lede { font-size: 1.125rem; }
}

/* Labels */
.label {
  font-size: 0.625rem;     /* 10px */
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin: 0;
}
.label--muted {
  color: rgba(193, 200, 202, 0.7); /* on-surface-variant at 70% */
}
.label--accent {
  color: var(--primary);
}

/* Tonal dividers — not borders */
.rule {
  border: 0;
  height: 1px;
  background: var(--surface-container-high);
  margin: 24px 0;
  width: 100%;
}

/* Beta block */
.beta {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Incentive headline — italic cyan serif */
.incentive {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--primary);
  max-width: 28ch;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field__label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(193, 200, 202, 0.7);
}

.field input,
.field select {
  background: var(--surface-container-low);
  color: var(--on-surface);
  border: 0;
  border-radius: 2px;            /* sm */
  padding: 14px 16px;
  font-size: 0.875rem;            /* 14px UI text */
  line-height: 1.4;
  outline: 0;
  transition: background 120ms ease;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}
.field input::placeholder {
  color: rgba(193, 200, 202, 0.4);
}
.field input:hover,
.field select:hover {
  background: var(--surface-container);
}
.field input:focus,
.field select:focus {
  background: var(--surface-container-high);
  box-shadow: 0 0 0 2px rgba(168, 204, 216, 0.3);   /* primary at 30% — ghost focus ring */
}
.field select {
  /* custom caret using inline SVG so it matches the palette */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23c1c8ca' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}
/* Hide default select placeholder style so "I'm a…" reads like placeholder, not active value */
.field select:invalid,
.field select option[disabled] {
  color: rgba(193, 200, 202, 0.4);
}

.field__error {
  margin: 0;
  font-size: 0.75rem;
  color: var(--tertiary);
  line-height: 1.4;
}

/* Button */
.button {
  background: var(--primary-container);
  color: var(--on-primary-container);
  border: 0;
  border-radius: 2px;
  padding: 16px 20px;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter 120ms ease, opacity 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}
@media (min-width: 640px) {
  .button {
    width: auto;
    align-self: flex-start;
    padding-inline: 28px;
  }
}
.button:hover {
  filter: brightness(1.1);
}
.button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.button:disabled {
  cursor: wait;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.button__arrow {
  transition: transform 120ms ease;
}
.button:not(:disabled):hover .button__arrow {
  transform: translateX(3px);
}

.fineprint {
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  line-height: 1.5;
  margin-top: 4px;
}

/* Submission-level error (above form) */
.form-error {
  font-size: 0.875rem;
  color: var(--tertiary);
  background: var(--surface-container-low);
  padding: 12px 16px;
  border-radius: 2px;
  line-height: 1.5;
}

/* Success */
.success[hidden] {
  display: none;
}

.success {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.success__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--on-surface);
}
.success__sub {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--primary);
  font-size: 1.125rem;
  line-height: 1.4;
}
.success__body {
  color: var(--on-surface-variant);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.55;
  max-width: 40ch;
}

/* Footer */
.footer {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(193, 200, 202, 0.6);
}

/* Desktop: vertical centering with breathing room */
@media (min-width: 1024px) {
  .page {
    padding-top: 96px;
    padding-bottom: 96px;
    gap: 36px;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .button:disabled { animation: none; opacity: 0.6; }
  .button__arrow,
  .field input, .field select { transition: none; }
}
