:root {
  --olive:    #2C2A1E;
  --olive-mid:#3D3A28;
  --gold:     #B8973A;
  --gold-dim: #7A6326;
  --cream:    #E8E0CC;
  --cream-dim:#9E957E;
  --line:     rgba(184,151,58,0.18);
}

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

html, body {
  background: var(--olive);
  color: var(--cream);
  font-family: 'Geist Mono', monospace;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body.doc { min-height: 100%; }

/* Landing page tries to lock to one viewport, but only when there's enough
   vertical room — on short / landscape screens we let it scroll instead of
   clipping. */
@media (min-height: 640px) {
  html:has(body.landing),
  body.landing { height: 100%; overflow: hidden; }
}

/* Canvas for signal lines (landing only) */
canvas#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 2s ease;
  pointer-events: none;
  z-index: 0;
}
canvas#bg.visible { opacity: 1; }

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* ===== Landing layout ===== */

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 52px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(-8px);
  animation: fadeUp 0.9s ease 0.3s forwards;
}

.wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--cream);
  text-transform: uppercase;
  text-decoration: none;
}

.wordmark-alt {
  box-sizing: border-box;
  color: #F2EDE4;
  font-family: 'Georgia', system-ui, sans-serif;
  font-size: 18px;
  line-height: 22px;
  text-decoration: none;
}

.issue {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-top: 4px;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 680px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.6s forwards;
}

.eyebrow span {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 12px;
  margin-bottom: 1px;
}

h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.75s forwards;
}

h1 em {
  font-style: italic;
  color: var(--gold);
}

.sub {
  font-size: 13px;
  line-height: 1.7;
  color: var(--cream-dim);
  letter-spacing: 0.02em;
  max-width: 440px;
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.9s forwards;
}

/* Form */
.form-wrap {
  opacity: 0;
  animation: fadeUp 0.9s ease 1.1s forwards;
}

.form-row {
  display: flex;
  gap: 0;
  max-width: 420px;
  border: 1px solid var(--line);
  border-color: rgba(184,151,58,0.3);
  background: rgba(44,42,30,0.6);
  backdrop-filter: blur(4px);
}

.form-row:focus-within {
  border-color: rgba(184,151,58,0.7);
}

input[type="email"],
input[type="tel"],
input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 13px 18px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--cream);
  min-width: 0;
  width: 100%;
  /* iOS auto-zooms when an input's font-size < 16px on focus.
     We bump to 16px on touch screens. */
}

@media (max-width: 600px) {
  input[type="email"],
  input[type="tel"],
  input[type="text"] { font-size: 16px; }
}

input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="text"]::placeholder {
  color: var(--cream-dim);
  opacity: 0.5;
}

button[type="submit"] {
  background: var(--gold);
  border: none;
  padding: 13px 22px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

button[type="submit"]:hover { background: var(--cream); }
button[type="submit"]:active { opacity: 0.8; }
button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-msg {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  min-height: 16px;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.form-msg.visible { opacity: 1; }
.form-msg.error { color: #c87a5a; }

footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  opacity: 0;
  animation: fadeUp 0.9s ease 1.3s forwards;
}

.footer-left {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--cream-dim);
  opacity: 0.65;
  text-transform: uppercase;
}

.footer-left a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-left a:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.footer-right {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-style: italic;
  font-weight: 300;
  color: var(--gold-dim);
  letter-spacing: 0.04em;
}

.rule {
  width: auto;
  height: 1px;
  background: var(--line);
  margin: 0 52px;
  position: absolute;
  bottom: 88px;
  left: 0;
  right: 0;
  transform: scaleX(0);
  transform-origin: left;
  animation: scaleIn 1.2s ease 0.5s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  to { transform: scaleX(1); }
}

/* Disclosure paragraph beneath landing email form */
.form-disclosure {
  margin-top: 16px;
  max-width: 420px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--cream-dim);
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.form-disclosure a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.form-disclosure a:hover { border-color: var(--gold); }

/* ===== Stacked form variant (SMS opt-in) ===== */

/* Opt out of landing's one-viewport height lock — stacked form + consent
   copy won't fit cleanly on short screens. */
@media (min-height: 640px) {
  html:has(body.landing.form-page),
  body.landing.form-page { height: auto; overflow: auto; }
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px;
}

.form-stack .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-stack .form-field label {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold-dim);
  text-transform: uppercase;
}

.form-stack .form-field label .opt {
  letter-spacing: 0.1em;
  text-transform: none;
  color: var(--cream-dim);
  opacity: 0.7;
}

.form-stack .form-field > input {
  border: 1px solid rgba(184,151,58,0.3);
  background: rgba(44,42,30,0.6);
  backdrop-filter: blur(4px);
  transition: border-color 0.2s ease;
}

.form-stack .form-field > input:focus {
  border-color: rgba(184,151,58,0.7);
}

.form-hint {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cream-dim);
  opacity: 0.7;
  margin-top: 2px;
}

.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 4px;
}

.form-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 1px solid rgba(184,151,58,0.5);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-consent input[type="checkbox"]:hover {
  border-color: rgba(184,151,58,0.8);
}

.form-consent input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}

.form-consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: solid var(--olive);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.form-consent label {
  font-size: 11px;
  line-height: 1.6;
  color: var(--cream-dim);
  letter-spacing: 0.01em;
  cursor: pointer;
}

.form-consent label a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.form-consent label a:hover { border-color: var(--gold); }

.form-stack button[type="submit"] {
  align-self: flex-start;
  margin-top: 6px;
  padding: 14px 28px;
}

@media (max-width: 600px) {
  .form-stack { max-width: 100%; }
  .form-stack button[type="submit"] { align-self: stretch; }
}

/* ===== Privacy / document layout ===== */

.doc-page {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 28px 88px;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.doc-header .wordmark {
  font-size: 18px;
  letter-spacing: 0.12em;
}

.doc-header .back {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}

.doc-header .back:hover { border-color: var(--gold); }

.doc h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  animation: none;
  opacity: 1;
}

.doc .last-updated {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 40px;
}

.doc h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--cream);
  margin: 56px 0 20px;
}

.doc h3 {
  font-family: 'Geist Mono', monospace;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 36px 0 16px;
}

.doc p,
.doc li {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--cream-dim);
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.doc p { margin-bottom: 16px; }

.doc p em {
  color: var(--cream);
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 15.5px;
  line-height: 1.6;
}

.doc strong {
  color: var(--cream);
  font-weight: 400;
}

.doc a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.doc a:hover { border-color: var(--gold); }

.doc ul,
.doc ol {
  margin: 0 0 20px 20px;
}

.doc li { margin-bottom: 6px; }

.doc hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

.doc .table-wrap {
  margin: 20px 0 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
}

.doc .table-wrap table { border: none; margin: 0; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 12px;
  line-height: 1.5;
  min-width: 520px;
}

.doc th,
.doc td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--cream-dim);
}

.doc th {
  color: var(--cream);
  font-weight: 400;
  background: var(--olive-mid);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.doc-footer {
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0.65;
}

.doc-footer .right {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--gold-dim);
  text-transform: none;
}

/* Responsive */
@media (max-width: 600px) {
  .page { padding: 28px 28px; }
  .form-row { flex-direction: column; max-width: 100%; }
  button[type="submit"] { padding: 14px; text-align: center; }
  footer { flex-direction: column; gap: 12px; align-items: flex-start; }
  .rule { margin: 0 28px; bottom: 110px; }
  .doc-page { padding: 32px 20px 64px; }
  .doc-header { flex-direction: column; gap: 8px; align-items: flex-start; }
  .doc h2 { margin: 44px 0 16px; }
  .doc-footer { flex-direction: column; gap: 8px; align-items: flex-start; }
}

@media (max-width: 380px) {
  .page { padding: 24px 20px; }
  .eyebrow { margin-bottom: 20px; }
  .sub { margin-bottom: 32px; }
  .rule { margin: 0 20px; }
}

/* Honor user motion preferences — kill the canvas + fade-up animations. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  canvas#bg { display: none; }
  header, .eyebrow, h1, .sub, .form-wrap, footer, .rule {
    opacity: 1 !important;
    transform: none !important;
  }
}
