/* ============================================================
   SimFather — coming-soon / waitlist landing
   Dark-first, brass-on-ink. Theme-aware (prefers-color-scheme
   + [data-theme] override, both directions). Self-contained:
   no webfonts, no external requests.
   ============================================================ */

/* ---- Tokens ---------------------------------------------- */
:root {
  --ink:          #141210;
  --ink-soft:     #1d1a16;
  --brass:        #c8a24b;
  --brass-bright: #e6cd88;
  --brass-deep:   #9a7a30;
  --bone:         #f1ece1;
  --slate:        #8b8578;

  /* semantic (dark = default) */
  --ground:       var(--ink);
  --panel:        var(--ink-soft);
  --text:         var(--bone);
  --muted:        var(--slate);
  --accent:       var(--brass);
  --accent-strong:var(--brass-bright);
  --accent-deep:  var(--brass-deep);
  --rule:         rgba(241, 236, 225, 0.13);
  --rule-strong:  rgba(241, 236, 225, 0.22);
  --pinstripe:    rgba(241, 236, 225, 0.055);
  --btn-ink:      #141210;         /* text on brass button (always dark) */
  --field-bg:     rgba(241, 236, 225, 0.04);
  --focus:        var(--brass-bright);
  --error:        #e0997a;

  --serif: Georgia, "Times New Roman", serif;
  --mono:  ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

/* Light theme when the OS asks for it and no manual override */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --ground:       #efe9dc;
    --panel:        #f6f2e9;
    --text:         #201d18;
    --muted:        #6b6558;
    --accent:       #9a7a30;
    --accent-strong:#7d6224;
    --accent-deep:  #7d6224;
    --rule:         rgba(32, 29, 24, 0.14);
    --rule-strong:  rgba(32, 29, 24, 0.26);
    --pinstripe:    rgba(32, 29, 24, 0.05);
    --field-bg:     rgba(32, 29, 24, 0.03);
    --focus:        #7d6224;
    --error:        #a4482a;
  }
}

/* Manual overrides win in both directions */
:root[data-theme="dark"] {
  --ground: var(--ink); --panel: var(--ink-soft); --text: var(--bone);
  --muted: var(--slate); --accent: var(--brass); --accent-strong: var(--brass-bright);
  --accent-deep: var(--brass-deep);
  --rule: rgba(241,236,225,0.13); --rule-strong: rgba(241,236,225,0.22);
  --pinstripe: rgba(241,236,225,0.055); --field-bg: rgba(241,236,225,0.04);
  --focus: var(--brass-bright); --error: #e0997a;
}
:root[data-theme="light"] {
  --ground: #efe9dc; --panel: #f6f2e9; --text: #201d18; --muted: #6b6558;
  --accent: #9a7a30; --accent-strong: #7d6224; --accent-deep: #7d6224;
  --rule: rgba(32,29,24,0.14); --rule-strong: rgba(32,29,24,0.26);
  --pinstripe: rgba(32,29,24,0.05); --field-bg: rgba(32,29,24,0.03);
  --focus: #7d6224; --error: #a4482a;
}

/* ---- Reset-ish -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background-color: var(--ground);
  /* subtle vertical pinstripe: reads as a suit and a data grid */
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0, transparent 22px,
    var(--pinstripe) 22px, var(--pinstripe) 23px
  );
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.08; margin: 0; }
p { margin: 0; }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---- Focus & skip link ------------------------------------ */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: 0.75rem; top: -3rem;
  z-index: 50;
  background: var(--accent);
  color: var(--btn-ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.9rem;
  border-radius: 3px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.75rem; }

/* ---- Shared layout ---------------------------------------- */
.site-header,
.hero, .coming, .why, .cta, .site-footer {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow, .kicker, .descriptor, .feature-kicker, .field-label,
.feature-num, .theme-toggle, .footer-links a, .copy {
  font-family: var(--mono);
}

/* ---- Header ----------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}
.mark { display: inline-flex; line-height: 0; }
.mark-frame { fill: var(--panel); stroke: var(--accent); stroke-width: 1.5; }
.mark-base  { stroke: var(--accent); stroke-width: 1; opacity: 0.3; }
.mark-curve { fill: none; stroke: var(--accent-strong); stroke-width: 1.7; stroke-linecap: round; }
.mark-peak  { fill: var(--accent-strong); }

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}
.wm-the    { color: var(--muted); font-style: italic; font-weight: 400; font-size: 0.66em; letter-spacing: 0; }
.wm-sim    { color: var(--text); }
.wm-father { color: var(--accent); }
.wordmark-sm { font-size: 1.15rem; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.35rem; height: 2.35rem;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-strong); }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme-toggle .icon-sun circle { fill: currentColor; stroke: none; }

/* icon shown = current theme; dark default -> moon */
.icon-sun  { display: none; }
.icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .icon-moon { display: none; }
  :root:not([data-theme]) .icon-sun  { display: block; }
}
:root[data-theme="light"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun  { display: block; }
:root[data-theme="dark"]  .icon-moon { display: block; }
:root[data-theme="dark"]  .icon-sun  { display: none; }

/* ---- Hero ------------------------------------------------- */
.hero {
  padding-top: clamp(2.5rem, 9vw, 6rem);
  padding-bottom: clamp(2.5rem, 7vw, 5rem);
  max-width: 54rem;
}
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 1.9rem; height: 1px;
  background: var(--accent);
  display: inline-block;
}
h1 {
  font-size: clamp(2.7rem, 9vw, 5.2rem);
  letter-spacing: -0.015em;
}
.lede {
  margin-top: 1.5rem;
  max-width: 40ch;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  color: color-mix(in srgb, var(--text) 88%, transparent);
}
.descriptor {
  margin-top: 1.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.descriptor .dot { color: var(--accent); }

.hero-actions {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  padding: 0.85rem 1.5rem;
  border-radius: 3px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease,
              border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-brass {
  background: var(--accent);
  color: var(--btn-ink);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 0 var(--accent-deep);
}
.btn-brass:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* ---- Section heads ---------------------------------------- */
.section-head { margin-bottom: 2.5rem; }
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.9rem;
}
.coming h2, .why h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  letter-spacing: -0.01em;
  max-width: 20ch;
}

.coming, .why, .cta {
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--rule);
}

/* ---- Feature list (ruled, NOT a card grid) ---------------- */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}
.feature-num {
  font-size: 0.95rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 0.4rem;
}
.feature-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--text);
}
.feature-kicker {
  margin-top: 0.35rem;
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.feature-line {
  margin-top: 0.85rem;
  max-width: 52ch;
  color: color-mix(in srgb, var(--text) 82%, transparent);
}

/* ---- Why block -------------------------------------------- */
.why-body { max-width: 46ch; display: grid; gap: 1.1rem; }
.why-lead {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.25;
  color: var(--text);
}
.why-body p:not(.why-lead) {
  color: color-mix(in srgb, var(--text) 82%, transparent);
}

/* ---- CTA / waitlist --------------------------------------- */
.cta { max-width: 44rem; }
.cta h2 { font-size: clamp(1.8rem, 5vw, 2.7rem); letter-spacing: -0.01em; }
.cta-lead {
  margin-top: 1rem;
  max-width: 46ch;
  color: color-mix(in srgb, var(--text) 85%, transparent);
}
.waitlist-form { margin-top: 2rem; }
.field-label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.field-row input {
  flex: 1 1 16rem;
  min-width: 0;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.85rem 1rem;
  transition: border-color 0.15s ease;
}
.field-row input::placeholder { color: var(--muted); }
.field-row input:focus-visible { border-color: var(--accent); outline-offset: 1px; }
.field-row .btn { flex: 0 0 auto; }

.form-status {
  min-height: 1.4rem;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}
.form-status.is-success { color: var(--accent-strong); }
.form-status.is-error   { color: var(--error); }

.cta-discord {
  margin-top: 2.6rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--rule);
}
.cta-discord-line {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* ---- Footer ----------------------------------------------- */
.site-footer {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.footer-links {
  display: flex;
  gap: 1.4rem;
}
.footer-links a {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent-strong); }
.legal {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 64ch;
}
.copy {
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ---- Motion (one subtle load-in + ambient peak shimmer) --- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.hero .reveal:nth-child(1) { animation-delay: 0.05s; }
.hero .reveal:nth-child(2) { animation-delay: 0.13s; }
.hero .reveal:nth-child(3) { animation-delay: 0.21s; }
.hero .reveal:nth-child(4) { animation-delay: 0.29s; }
.hero .reveal:nth-child(5) { animation-delay: 0.37s; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.mark-peak {
  transform-box: fill-box;
  transform-origin: center;
  animation: peak-shimmer 4.5s ease-in-out infinite;
}
@keyframes peak-shimmer {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
  .mark-peak { animation: none; }
  .skip-link { transition: none; }
  * { scroll-behavior: auto; }
}

/* ---- Small screens ---------------------------------------- */
@media (max-width: 30rem) {
  .hero-actions .btn,
  .field-row .btn { width: 100%; }
  .feature { grid-template-columns: 1fr; gap: 0.4rem; }
  .feature-num { padding-top: 0; }
}

/* ---- Cinematic background field (canvas) ------------------ */
#fx {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.site-header, #main, .site-footer { position: relative; z-index: 1; }
/* On light theme the golden field is dialed almost off (reads best on ink). */
:root[data-theme="light"] #fx,
:root:not([data-theme]) #fx { opacity: 0.55; }
@media (prefers-reduced-motion: reduce) { #fx { opacity: 0.5; } }
