/* ===========================================================
   Antler Labs — marketing site
   Colour: cream + near-black + single gold accent (carried from Afterword)
   Typography: Fraunces display serif + Inter body sans
   =========================================================== */

:root {
  /* Palette */
  --cream:        #F7F5EF;
  --cream-warm:   #F1EDE3;
  --ink:          #1A1A1A;
  --ink-soft:     #2E2E2E;
  --mid:          #6B6B68;
  --mid-light:    #9A968C;
  --gold:         #D4AF37;
  --gold-deep:    #A6852A;
  --hairline:     #D9D4C4;

  /* Typography */
  --serif: "Fraunces", "Georgia", "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:  "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* Spacing rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 5rem;
  --space-8: 8rem;
  --space-9: 12rem;

  /* Page grid */
  --content-max:     72rem;
  --content-inline:  2rem;
}

@media (min-width: 72rem) {
  :root { --content-inline: 3.5rem; }
}

/* ---- Reset + base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;     /* 17px */
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  font-feature-settings: "ss01", "ss02";
  min-height: 100dvh;
  /* subtle noise texture — editorial warmth */
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.04  0 0 0 0 0.04  0 0 0 0 0.04  0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Custom selection — tiny detail that matters */
::selection {
  background: var(--gold);
  color: var(--cream);
}

/* Scrollbar — bespoke rather than chrome default */
::-webkit-scrollbar       { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--hairline); border: 3px solid var(--cream); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--mid-light); }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, .display {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  color: var(--ink);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

p, li {
  text-wrap: pretty;
  max-width: 40ch;
}

.lede {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink-soft);
  max-width: 30ch;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  font-weight: 500;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

a.inline {
  background-image: linear-gradient(transparent 65%, var(--gold) 65%, var(--gold) 90%, transparent 90%);
  background-size: 100% 100%;
  transition: background-size 220ms ease;
  padding: 0 .1em;
}
a.inline:hover { color: var(--ink); background-size: 100% 120%; }

/* ---- Layout primitives ---- */
.page {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-inline);
}

section {
  padding-block: var(--space-8);
}

@media (max-width: 48rem) {
  section { padding-block: var(--space-7); }
}

hr.rule {
  border: 0;
  height: 1px;
  background: var(--hairline);
  margin: 0;
}

/* ===========================================================
   Top nav — quiet, two-column ledger layout
   =========================================================== */
.topnav {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-5) var(--space-4);
}

.topnav .brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.topnav .brand svg {
  width: 22px;
  height: 22px;
  color: var(--ink);
}

.topnav nav {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-5);
  font-size: 0.9375rem;
  color: var(--mid);
}

.topnav nav a { transition: color 160ms ease; }
.topnav nav a:hover { color: var(--ink); }

/* ===========================================================
   Hero — editorial, with a massive display treatment
   =========================================================== */
.hero {
  padding-block: var(--space-8) var(--space-7);
  position: relative;
}

.hero .eyebrow {
  display: block;
  margin-bottom: var(--space-5);
}

.hero .display {
  font-size: clamp(3.75rem, 11vw, 10.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.92;
  color: var(--ink);
  margin-bottom: var(--space-5);
}

.hero .display em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-deep);
}

.hero .lede {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  max-width: 32ch;
  margin-top: var(--space-4);
}

.hero-sigil {
  position: absolute;
  top: var(--space-7);
  right: var(--content-inline);
  width: clamp(80px, 12vw, 136px);
  color: var(--gold);
  opacity: 0.9;
}

@media (max-width: 48rem) {
  .hero-sigil {
    position: static;
    display: block;
    width: 60px;
    margin-bottom: var(--space-5);
  }
}

/* ===========================================================
   About — split layout, editorial
   =========================================================== */
.about {
  display: grid;
  grid-template-columns: 3fr 8fr;
  gap: var(--space-7);
  align-items: baseline;
}

@media (max-width: 52rem) {
  .about {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}

.about .heading {
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  letter-spacing: -0.025em;
  color: var(--ink);
}

.about .body {
  max-width: 40ch;
  font-size: 1.125rem;
}

.about .body p + p {
  margin-top: var(--space-4);
}

.about .body em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08em;
}

/* ===========================================================
   Products — the Afterword card, a single hero product
   =========================================================== */
.products {
  padding-top: 0;
}

.products-inner {
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-7);
}

.products .section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-6);
}

.products h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
}

.products .section-head .count {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--mid);
  letter-spacing: 0.04em;
}

.product-card {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-6);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
  transition: background-color 220ms ease;
}

.product-card:hover {
  background: var(--cream-warm);
}

@media (max-width: 52rem) {
  .product-card { grid-template-columns: 1fr; gap: var(--space-4); }
}

.product-card .index {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--mid);
  letter-spacing: 0.04em;
  padding-top: .45rem;
}

.product-card .name {
  font-family: var(--serif);
  font-size: clamp(1.625rem, 2.8vw, 2.25rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.product-card .meta {
  display: inline-flex;
  gap: .6rem;
  align-items: center;
  margin-bottom: var(--space-3);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--mid);
  font-family: var(--mono);
  text-transform: uppercase;
}

.product-card .meta .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); display: inline-block;
}

.product-card p.description {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 48ch;
}

.product-card .links {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-4);
  font-size: 0.9375rem;
}

.product-card .links a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--mid);
  transition: color 160ms ease;
}
.product-card .links a:hover { color: var(--ink); }
.product-card .links a::after {
  content: "→";
  font-family: var(--sans);
  transition: transform 180ms ease;
}
.product-card .links a:hover::after { transform: translateX(3px); }

/* ===========================================================
   Contact — quiet closing section
   =========================================================== */
.contact {
  display: grid;
  grid-template-columns: 3fr 8fr;
  gap: var(--space-7);
  border-top: 1px solid var(--hairline);
  align-items: baseline;
}

@media (max-width: 52rem) {
  .contact { grid-template-columns: 1fr; gap: var(--space-5); }
}

.contact .heading {
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  letter-spacing: -0.025em;
  color: var(--ink);
}

.contact .email {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  display: inline-block;
  position: relative;
  transition: color 200ms ease;
}
.contact .email::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 8px;
  background: var(--gold);
  opacity: 0.22;
  transform: scaleX(0.97);
  transform-origin: left;
  transition: transform 280ms ease, opacity 220ms ease;
  z-index: -1;
}
.contact .email:hover::after {
  transform: scaleX(1.02);
  opacity: 0.32;
}

.contact .note {
  font-size: 1.0625rem;
  color: var(--mid);
  margin-top: var(--space-3);
}

/* ===========================================================
   Colophon / footer — small, precise, unobtrusive
   =========================================================== */
footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--space-5);
  margin-top: var(--space-7);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  font-size: 0.8125rem;
  color: var(--mid);
  letter-spacing: 0.01em;
}

footer .colophon {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mid-light);
}

footer nav {
  display: flex;
  gap: var(--space-5);
}

footer nav a {
  color: var(--mid);
  transition: color 160ms ease;
}
footer nav a:hover { color: var(--ink); }

@media (max-width: 48rem) {
  footer {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

/* ===========================================================
   Legal (privacy / terms) page styling
   =========================================================== */
article.legal {
  max-width: 36rem;
  padding-block: var(--space-7) var(--space-8);
}

article.legal h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.04em;
  margin-bottom: var(--space-5);
}

article.legal h2 {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--ink);
}

article.legal p, article.legal li {
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-3);
}

article.legal ul {
  padding-left: 1.25rem;
  margin-bottom: var(--space-4);
}

article.legal .published {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: var(--space-5);
}

article.legal a.back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: var(--space-6);
  font-size: 0.875rem;
  color: var(--mid);
}
article.legal a.back::before { content: "←"; }
article.legal a.back:hover { color: var(--ink); }
