/* ============================================================
   Getnomik — Founding Tester Program
   Design language: "Ledger & Seal" — ink, parchment, wax seal
   ============================================================ */

:root {
  --ink: #14213D;
  --ink-soft: #223056;
  --parchment: #F3EEE1;
  --paper: #FBF8F1;
  --seal: #8C2F39;
  --seal-soft: #a8434e;
  --brass: #B8935A;
  --line: #DCD3BA;
  --text: #211E1A;
  --muted: #6d6656;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--parchment);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* subtle paper grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--seal); color: var(--paper); }
.btn-primary:hover { background: var(--seal-soft); transform: translateY(-1px); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--parchment); }
.btn-text { color: var(--ink); font-weight: 500; padding: 12px 4px; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 238, 225, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--brass);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
}
.brand-mark.small { width: 26px; height: 26px; font-size: 13px; }
.brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); }

/* ---- Hero ---- */
.hero { padding: 88px 0 60px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--seal);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  line-height: 1.02;
  color: var(--ink);
  margin-bottom: 24px;
}
.hero-lede {
  font-size: 17px;
  color: var(--text);
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Wax seal signature element */
.hero-seal-wrap { display: flex; justify-content: center; }
.seal-stamp {
  position: relative;
  width: 220px;
  height: 220px;
  animation: stampIn 0.9s cubic-bezier(.2,1.4,.4,1) 0.15s both;
}
@keyframes stampIn {
  0% { transform: scale(1.6) rotate(-14deg); opacity: 0; }
  60% { transform: scale(0.96) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(-6deg); opacity: 1; }
}
.seal-ring-svg { width: 100%; height: 100%; }
.seal-ring-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 2px;
  fill: var(--seal);
}
.seal-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 128px; height: 128px;
  border-radius: 50%;
  border: 2px solid var(--seal);
  background: radial-gradient(circle at 35% 30%, #a8434e, var(--seal) 70%);
  color: var(--paper);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(140, 47, 57, 0.35), inset 0 0 0 6px rgba(255,255,255,0.06);
}
.seal-core span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; opacity: 0.85; }
.seal-core strong { font-family: var(--font-display); font-size: 22px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .seal-stamp { animation: none; transform: rotate(-6deg); }
}

/* ---- Ledger strip ---- */
.ledger-strip {
  background: var(--ink);
  color: var(--parchment);
  border-top: 1px solid rgba(184,147,90,0.35);
  border-bottom: 1px solid rgba(184,147,90,0.35);
}
.ledger-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 22px 28px;
}
.ledger-item {
  font-size: 13.5px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #E7E2D2;
}
.ledger-check { color: var(--brass); font-weight: 700; }

/* ---- Section shared ---- */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seal);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--ink);
  margin-bottom: 12px;
}
.section-sub { color: var(--muted); max-width: 60ch; margin-bottom: 40px; font-size: 15.5px; }

/* ---- Tracks ---- */
.tracks { padding: 88px 0; }
.track-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.track-card {
  background: var(--paper);
  padding: 32px;
  position: relative;
}
.track-index {
  font-family: var(--font-mono);
  color: var(--brass);
  font-size: 13px;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 14px;
}
.track-card h3 { font-size: 20px; color: var(--ink); margin-bottom: 10px; }
.track-card p { color: var(--muted); font-size: 14.5px; max-width: 42ch; }

/* ---- Apply / Docket form ---- */
.apply { padding: 0 0 110px; }
.docket {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--seal);
  padding: 44px;
  box-shadow: 0 30px 60px rgba(20,33,61,0.06);
}
.docket-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 8px;
}
.docket-stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--seal);
  border: 1.5px solid var(--seal);
  padding: 6px 14px;
  border-radius: 3px;
  transform: rotate(3deg);
  white-space: nowrap;
}
.docket-note { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 24px;
  margin-bottom: 30px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.field-optional { font-weight: 400; color: var(--muted); font-size: 12px; }
.req { color: var(--seal); }

.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--parchment);
  color: var(--text);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--seal);
  box-shadow: 0 0 0 3px rgba(140,47,57,0.12);
}
.field textarea { resize: vertical; min-height: 90px; }

.field-error {
  font-size: 12.5px;
  color: var(--seal);
  min-height: 15px;
}

.hp-field { position: absolute; left: -9999px; opacity: 0; }

.btn-submit { width: 100%; justify-content: center; padding: 15px; font-size: 15px; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-status {
  margin-top: 18px;
  font-size: 14px;
  min-height: 20px;
}
.form-status.success { color: #2f6b3f; }
.form-status.error { color: var(--seal); }

/* focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner > div { display: flex; align-items: center; gap: 8px; }
.footer-inner p { color: var(--muted); font-size: 12.5px; font-family: var(--font-mono); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-seal-wrap { order: -1; }
  .seal-stamp { width: 160px; height: 160px; }
  .seal-core { width: 96px; height: 96px; }
  .ledger-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .track-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .docket { padding: 28px 22px; }
}
