/* ============================================================
   getfirstfold.com — the quiet reverse side of the FirstFold
   broadsheet. A signed, once-folded letter on the studio's own
   newsprint. Zero JavaScript; the page is complete as ink.
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-var.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic-var.woff2") format("woff2");
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-var.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Spline Sans Mono";
  src: url("fonts/spline-sans-mono-var.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --paper: #F8F5EE;
  --paper-deep: #EFEADE;
  --sheet: #FCFAF5;
  --ink: #1A1712;
  --ink-muted: #5A5344;
  --ink-faint: rgba(26, 23, 18, 0.16);
  --ink-hairline: rgba(26, 23, 18, 0.28);
  --press-red: #C2391D;
  --press-red-deep: #A62F16;
  --paper-on-ink: #F4F0E6;

  --font-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", "Cascadia Code", Consolas, monospace;

  --ease-paper: cubic-bezier(0.16, 1, 0.3, 1);
  --pad-x: clamp(16px, 5vw, 72px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--press-red); color: var(--paper-on-ink); }

/* newsprint grain — the paper is a material, not a color */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%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; }

a:focus-visible {
  outline: 2px solid var(--press-red);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper-on-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 16px;
  text-decoration: none;
  transition: top 0.2s var(--ease-paper);
}
.skip-link:focus-visible { top: 12px; outline-color: var(--paper-on-ink); }

/* ---------- Dateline & masthead ---------- */

.dateline {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 10px var(--pad-x);
  border-bottom: 1px solid var(--ink-hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 20px var(--pad-x);
  border-bottom: 3px double var(--ink);
}

.masthead-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  line-height: 1;
}
.masthead-brand em { font-style: italic; font-weight: 500; }
.masthead-brand a { text-decoration: none; }

.masthead-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  padding: 4px 2px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease-paper), color 0.2s var(--ease-paper);
}
.masthead-link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.masthead-link:active { color: var(--press-red); }

/* ---------- Kicker / eyebrow ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.kicker .rule {
  flex: 0 0 32px;
  height: 1px;
  background: var(--press-red);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- The note (hero sheet) ---------- */

.note {
  padding: clamp(56px, 9vw, 120px) var(--pad-x);
}

.sheet {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  background: var(--sheet);
  border: 1px solid rgba(26, 23, 18, 0.14);
  box-shadow: 0 1px 0 rgba(26, 23, 18, 0.05), 0 16px 40px rgba(26, 23, 18, 0.08);
  padding: clamp(28px, 7vw, 88px);
}

/* the one craft gesture: two letterfold creases across the sheet.
   Shadow falls below each crease, a thin light catches above it —
   strong enough to read as a fold, never enough to dim the ink. */
.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 36px;
  pointer-events: none;
  border-top: 1px solid rgba(26, 23, 18, 0.11);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.75);
  background: linear-gradient(to bottom, rgba(26, 23, 18, 0.075), rgba(26, 23, 18, 0));
}
.sheet::before { top: 33%; }
.sheet::after { top: 66%; }

h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 1.5rem + 3.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 20ch;
  text-wrap: balance;
}
h1 em { font-style: italic; font-weight: 450; }

/* the letter itself is set in the serif — a written note, not UI copy */
.letter { margin-top: 28px; }
.letter p {
  font-family: var(--font-serif);
  font-size: 18.5px;
  line-height: 1.7;
  max-width: 62ch;
}
.letter p + p { margin-top: 20px; }

.letter a,
.prose-link {
  color: var(--press-red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
  transition: color 0.2s var(--ease-paper), text-decoration-color 0.2s var(--ease-paper);
}
.prose-link {
  color: var(--press-red-deep);
}
.letter a:hover,
.prose-link:hover { color: var(--press-red-deep); }
.letter a:active,
.prose-link:active { color: var(--ink); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.sign {
  margin-top: 44px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 450;
  font-size: 17px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.sign .sign-place {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 8px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 16px 28px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease-paper), color 0.2s var(--ease-paper),
              border-color 0.2s var(--ease-paper), transform 0.2s var(--ease-paper),
              box-shadow 0.2s var(--ease-paper);
}
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.btn-primary {
  background: var(--press-red);
  color: var(--paper-on-ink);
  box-shadow: 0 1px 0 rgba(26, 23, 18, 0.2), 0 6px 18px rgba(194, 57, 29, 0.22);
}
.btn-primary:hover {
  background: var(--press-red-deep);
  transform: translateY(-1px);
  box-shadow: 0 2px 0 rgba(26, 23, 18, 0.2), 0 10px 24px rgba(194, 57, 29, 0.28);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 0 rgba(26, 23, 18, 0.2); }

.btn-ghost {
  border-color: var(--ink-hairline);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper-on-ink); border-color: var(--ink); }
.btn-ghost:active { background: var(--press-red-deep); border-color: var(--press-red-deep); }

/* ---------- Section headings ---------- */

h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 1.2rem + 1.7vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 26ch;
  text-wrap: balance;
}
h2 em { font-style: italic; font-weight: 450; }

/* ---------- The source note (provenance) ---------- */

.prov {
  background: var(--paper-deep);
  border-top: 1px solid var(--ink-hairline);
  border-bottom: 1px solid var(--ink-hairline);
  padding: clamp(64px, 8vw, 112px) var(--pad-x);
}

.prov-inner { max-width: 880px; margin-inline: auto; }

.prov-list {
  list-style: none;
  margin-top: 48px;
  border-top: 1px solid var(--ink-hairline);
}

.prov-list li {
  display: grid;
  grid-template-columns: 64px 148px 1fr;
  gap: 8px 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--ink-faint);
  min-width: 0;
}
.prov-list li:last-child { border-bottom: 1px solid var(--ink-hairline); }

.prov-num {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--press-red-deep);
  font-variant-numeric: tabular-nums;
}

.prov-list h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.prov-list p {
  font-size: 17px;
  line-height: 1.65;
  max-width: 56ch;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- Verification paths ---------- */

.verify {
  padding: clamp(64px, 8vw, 112px) var(--pad-x) clamp(72px, 9vw, 128px);
}

.verify-inner { max-width: 1040px; margin-inline: auto; }

.verify-lead {
  margin-top: 20px;
  font-size: 17.5px;
  color: var(--ink-muted);
  max-width: 58ch;
}

.verify-list {
  list-style: none;
  margin-top: 48px;
  border-top: 1px solid var(--ink-hairline);
}

.verify-list li {
  display: grid;
  grid-template-columns: 56px minmax(0, 5fr) minmax(0, 6fr) auto;
  gap: 8px 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--ink-faint);
}
.verify-list li:last-child { border-bottom: 1px solid var(--ink-hairline); }

.v-num {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--press-red);
  font-variant-numeric: tabular-nums;
}

.verify-list h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.v-link {
  text-decoration: none;
  transition: color 0.2s var(--ease-paper);
}
.v-link .arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.2s var(--ease-paper);
}
.v-link:hover { color: var(--press-red); }
.v-link:hover .arrow { transform: translateX(4px); }
.v-link:active { color: var(--press-red-deep); }

.v-desc {
  color: var(--ink-muted);
  font-size: 16.5px;
  max-width: 46ch;
}

.v-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

/* ---------- Footer / colophon ---------- */

.footer {
  border-top: 3px double var(--ink);
  padding: clamp(40px, 5vw, 64px) var(--pad-x);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 40px;
  max-width: 1040px;
  margin-inline: auto;
}

.footer-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.footer-brand em { font-style: italic; font-weight: 500; }

.footer-tagline {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 34ch;
}

.footer h2,
.footer .f-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  max-width: none;
}

.f-address {
  font-style: normal;
  font-size: 15px;
  line-height: 1.6;
  margin-top: 12px;
}

.f-mail { display: grid; gap: 16px; }
.f-mail > div:first-child { margin-top: 0; }
.f-mail dd {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
.f-mail a {
  text-decoration: none;
  border-bottom: 1px solid var(--ink-hairline);
  transition: border-color 0.2s var(--ease-paper), color 0.2s var(--ease-paper);
}
.f-mail a:hover { border-bottom-color: var(--ink); }
.f-mail a:active { color: var(--press-red); }

.colophon {
  max-width: 1040px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--ink-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .verify-list li {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .v-desc, .v-meta { grid-column: 2; }
}

@media (max-width: 820px) {
  .prov-list li {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .prov-list h3 { grid-column: 2; }
  .prov-list p { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 560px) {
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
  .letter p { font-size: 17.5px; }
  .verify-list h3 { font-size: 20px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn-primary:hover { transform: none; }
  .v-link:hover .arrow { transform: none; }
}

/* ---------- Print — the note is meant to be kept ---------- */

@media print {
  body::after { display: none; }
  .sheet { border: none; box-shadow: none; padding: 0; }
  .sheet::before, .sheet::after { display: none; }
  .btn { border: 1px solid var(--ink); background: none; color: var(--ink); box-shadow: none; }
}
