/* 3:17 founding-list site
   Palette derived from the bottle (amber glass, sand label, gold wordmark, black copy),
   adjusted for screen contrast. Ratios measured against the surface they sit on. */

:root {
  /* primitives */
  --c-night: #15110E;
  --c-espresso: #2B1E16;
  --c-amber: #8C4A12;
  --c-amber-deep: #6E3A10;
  --c-gold: #B89148;
  --c-gold-light: #D4B06A;
  --c-sand: #E6D7BE;
  --c-parchment: #F7F1E6;
  --c-ink: #1E1813;
  --c-muted: #5E5247;       /* 6.73:1 on parchment, 5.4:1 on sand */
  --c-night-muted: #C9BBA5; /* 10.0:1 on night */

  /* semantic */
  --focus-dark: var(--c-gold-light);   /* 9.1:1 on night */
  --focus-light: var(--c-amber-deep);  /* 8.2:1 on parchment */

  /* type */
  --f-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --f-body: "Figtree", "Avenir Next", "Segoe UI", sans-serif;

  /* rhythm */
  --rail: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 10vw, 128px);
  --radius: 5px;
  --control: 56px;

  /* motion */
  --t-fast: 100ms;
  --t-std: 160ms;
  --ease: cubic-bezier(0.2, 0, 0.38, 0.9);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.125rem; /* 18px: comfortable for 45+ readers */
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-parchment);
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

.rail { width: 100%; max-width: var(--rail); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; inset-inline-start: 12px; top: -100px; z-index: 50;
  background: var(--c-parchment); color: var(--c-ink); padding: 12px 16px; border-radius: var(--radius);
  font-weight: 600;
}
.skip:focus { top: 12px; }

/* Focus: one shared treatment, colour chosen per surface */
:focus-visible { outline: 2px solid var(--focus-light); outline-offset: 3px; }
.night :focus-visible, .amber :focus-visible, .site-footer :focus-visible { outline-color: var(--focus-dark); }

/* Placeholder content the founder must supply */
.ph { background: rgba(212, 176, 106, 0.18); outline: 1px dashed currentColor; outline-offset: 1px; padding-inline: 3px; border-radius: 2px; }

/* ---------- Surfaces ---------- */
.night { background: var(--c-night); color: var(--c-parchment); }
.parchment { background: var(--c-parchment); color: var(--c-ink); }
.sand { background: var(--c-sand); color: var(--c-ink); }
.amber { background: var(--c-amber-deep); color: var(--c-parchment); }

/* ---------- Type ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 1.6rem + 4.2vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display-sm { font-size: clamp(2.3rem, 1.5rem + 3.2vw, 3.9rem); }
.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.3rem);
  line-height: 1.06;
  text-wrap: balance;
}
h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.6rem; line-height: 1.15; }
.lede { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3rem); line-height: 1.55; color: var(--c-night-muted); max-width: 34em; }
.body-lg { font-size: 1.2rem; line-height: 1.6; }

/* Timestamps: the page moves through the night. Used as a real sequence, not decoration. */
.time {
  font-family: var(--f-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold-light);
  margin-bottom: 16px;
}
.parchment .time, .sand .time { color: var(--c-amber); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--control); padding: 0 28px;
  border: 0; border-radius: var(--radius);
  font: 600 1.0625rem/1.2 var(--f-body);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-std) var(--ease), color var(--t-std) var(--ease);
}
.btn-gold { background: var(--c-gold-light); color: var(--c-night); }         /* 9.1:1 */
.btn-gold:hover { background: #E2C27F; } /* night text on it: 10.96:1 */
.btn-gold:active { background: var(--c-gold); }
.btn-dark { background: var(--c-espresso); color: var(--c-parchment); }       /* 14.4:1 */
.btn-dark:hover { background: var(--c-amber-deep); }
.btn-dark:active { background: var(--c-night); }
.btn[aria-disabled="true"] { cursor: progress; opacity: 0.85; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 2; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.wordmark {
  font-family: var(--f-display); font-weight: 600; font-size: 2.1rem; line-height: 1;
  color: var(--c-gold-light); text-decoration: none; letter-spacing: 0.01em;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(24px, 5vw, 64px) clamp(56px, 8vw, 104px);
  /* one warm lamp, off to the right */
  background:
    radial-gradient(ellipse 46% 60% at 76% 46%, rgba(212, 176, 106, 0.20), rgba(140, 74, 18, 0.08) 45%, transparent 72%),
    var(--c-night);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy .display { margin-bottom: 22px; }
.hero-copy .lede { margin-bottom: 36px; }
.proof { margin-top: 22px; font-size: 1rem; color: var(--c-night-muted); }

/* ---------- Join form ---------- */
.join { max-width: 560px; }
.join-label { display: block; font-size: 1rem; font-weight: 500; margin-bottom: 8px; }
.join-row { display: flex; gap: 0; }
.join input[type="email"] {
  flex: 1 1 auto; min-width: 0; min-height: var(--control);
  padding: 0 18px;
  font: 400 1.0625rem/1.2 var(--f-body); /* >=16px prevents iOS zoom */
  color: var(--c-ink); background: var(--c-parchment);
  border: 2px solid var(--c-parchment); border-inline-end: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  transition: border-color var(--t-std) var(--ease);
}
.join input[type="email"]::placeholder { color: var(--c-muted); }
.join .btn { border-radius: 0 var(--radius) var(--radius) 0; }
.join input[aria-invalid="true"] { border-color: #F2A38A; }
.join-error { min-height: 0; font-size: 1rem; font-weight: 500; color: #F6B8A2; } /* 9.6:1 on night */
.join-error:not(:empty) { margin-top: 10px; }
.join-error:not(:empty)::before { content: "! "; font-weight: 700; }
.join-note { margin-top: 12px; font-size: 0.95rem; color: var(--c-night-muted); }
.join-note a { color: inherit; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Hero art (product photo, edges fade into the night surface) ---------- */
.hero-art { position: relative; height: clamp(360px, 42vw, 520px); }
.hero-art img {
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}

/* ---------- Footer ---------- */
/* Landing page: one screen. Header, hero, a slim footer; the hero takes the remaining height. */
.one-screen { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.one-screen .hero { flex: 1 0 auto; display: flex; align-items: center; }
.one-screen .hero { padding-block: clamp(8px, 3vh, 40px); }
.one-screen .display { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 4rem); }
.one-screen .hero-copy .display { margin-bottom: 18px; }
.one-screen .hero-copy .lede { margin-bottom: 28px; }
.one-screen .proof { margin-top: 16px; }
.one-screen .hero-art { height: clamp(320px, 58vh, 480px); }
.one-screen .header-row { min-height: 64px; }
.one-screen .site-footer { padding-block: 20px; font-size: 0.875rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; }
.footer-row .disclaimer { border: 0; padding: 0; max-width: 46em; font-size: 0.85rem; }
.footer-row ul { gap: 20px; }

.site-footer { background: var(--c-night); color: var(--c-night-muted); border-top: 1px solid rgba(212, 176, 106, 0.16); padding-block: 48px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: start; }
.site-footer .wordmark { font-size: 1.8rem; }
.footer-faith { margin-top: 8px; }
.site-footer ul { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { display: inline-block; padding-block: 10px; }
.site-footer a:hover { color: var(--c-parchment); }
.disclaimer { grid-column: 1 / -1; max-width: 60em; font-size: 0.9rem; line-height: 1.5; border: 1px solid rgba(201, 187, 165, 0.35); padding: 14px 16px; border-radius: var(--radius); }
.copyright { grid-column: 1 / -1; font-size: 0.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { height: 300px; order: 2; }
  .one-screen .hero-art { height: 260px; }
}
@media (max-width: 560px) {
  .join-row { flex-direction: column; gap: 10px; }
  .join input[type="email"] { border-radius: var(--radius); border-inline-end: 2px solid var(--c-parchment); }
  .join .btn { border-radius: var(--radius); width: 100%; }
  .hero-art { height: 240px; }
  .one-screen .hero-art { height: 220px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .ph { outline-color: CanvasText; }
}
