/* From All Mankind — the plainness is the brand.
   One family (Fraunces), two grounds (ivory/near-black), one accent (terracotta).
   The block cursor is the only ornament allowed. */

:root {
  --primary: #D97757;
  --clay-deep: #CC785C;
  --ivory: #F0EEE6;
  --black: #191919;
  --ground: var(--ivory);
  --ink: var(--black);
  --hairline: color-mix(in srgb, var(--ink) 22%, transparent);
  --measure: 41rem;
}

@media (prefers-color-scheme: dark) {
  :root { --ground: var(--black); --ink: var(--ivory); }
}

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

::selection { background: var(--primary); color: var(--ground); }

html { scroll-behavior: smooth; }

body {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  background: var(--ground);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  font-weight: 380;
  padding: 0 1.5rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--clay-deep); }

/* ── Masthead ─────────────────────────────────────────── */

.masthead {
  max-width: var(--measure);
  width: 100%;
  margin: 0 auto;
  padding: 1.4rem 0 1.1rem;
  border-bottom: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.masthead-right { color: color-mix(in srgb, var(--ink) 62%, transparent); }

/* ── Hero ─────────────────────────────────────────────── */

main { max-width: var(--measure); width: 100%; margin: 0 auto; flex: 1; }

.hero { padding: clamp(3.5rem, 9vh, 6.5rem) 0 0; }

h1 {
  font-size: clamp(2.05rem, 5.4vw, 3.35rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.015em;
  max-width: 21ch;
}

.sub {
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  max-width: 54ch;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
}

/* The one ornament: the true cursor — a horizontal bar, mid-sentence, still writing.
   Proportions match the logo mark (black box, cream bar). Ink-colored: black on the
   ivory page, ivory on the dark ground. One instance only (hero). */
.cursor {
  display: inline-block;
  width: 0.72em;
  height: 0.21em;
  margin-left: 0.22em;
  background: var(--ink);
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Form ─────────────────────────────────────────────── */

#subscribe {
  margin-top: 2.75rem;
  display: flex;
  gap: 0.75rem;
  max-width: 33rem;
}

#email {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.65rem 0.1rem;
}
#email::placeholder { color: color-mix(in srgb, var(--ink) 45%, transparent); }
#email:focus { outline: none; border-bottom-color: var(--primary); box-shadow: 0 1px 0 0 var(--primary); }

button {
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ivory);
  background: var(--primary);
  border: none;
  border-radius: 0;
  padding: 0.72rem 1.35rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease;
}
button:hover { background: var(--clay-deep); }
button:focus-visible, #email:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
button:disabled { opacity: 0.55; cursor: default; }

.form-status { margin-top: 0.9rem; font-size: 0.9375rem; min-height: 1.4em; }
.form-status.ok { color: var(--clay-deep); }

.caveat {
  margin-top: 2.1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 52ch;
  color: color-mix(in srgb, var(--ink) 58%, transparent);
}

/* ── Colophon ─────────────────────────────────────────── */

.colophon {
  max-width: var(--measure);
  width: 100%;
  margin: 2.5rem auto 0;
  padding: 1.2rem 0 2.5rem;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

/* ── Reveal on load ───────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(6px); animation: reveal 0.55s ease forwards; }
.d1 { animation-delay: 0.06s; }
.d2 { animation-delay: 0.14s; }
.d3 { animation-delay: 0.22s; }
.d4 { animation-delay: 0.30s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .cursor { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── Small screens ────────────────────────────────────── */

@media (max-width: 34rem) {
  #subscribe { flex-direction: column; gap: 1rem; }
  button { width: 100%; padding: 0.85rem 1.35rem; }
}

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