/* =========================================================
   Every.Farm marketing site — minimalist serif design
   Matches the existing Squarespace black-and-white aesthetic.
   ========================================================= */

:root {
  --serif: "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ink: #111111;
  --ink-soft: #444;
  --muted: #6b7280;
  --line: #e8e6e1;
  --paper: #ffffff;
  --paper-warm: #faf9f6;
  --paper-mid: #f4f2ed;
  --paper-dark: #0e0e0e;
  --accent: #2f6b3a; /* deep field green, drawn from the logo */
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent); }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  color: var(--ink);
  line-height: 1.15;
}

.display-1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(72px, 11vw, 156px);
  line-height: 1;
  letter-spacing: -0.025em;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.08em;
  margin: 0 0 0.25em;
}
.display-2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
}
.display-sub {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.8em;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(34px, 4.5vw, 56px);
  margin: 0 auto 0.4em;
  max-width: 18ch;
}
.section-title.centered { text-align: center; margin-left: auto; margin-right: auto; }
.section-title.small { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.section-title.alt { color: var(--paper); }

.section-subtitle {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.55;
  margin: 0 0 1em;
}
.section-subtitle.alt { color: rgba(255, 255, 255, 0.78); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  border: 0;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.btn-pill {
  background: #000;
  color: #fff !important;
  border-radius: 999px;
  padding: 12px 26px;
}
.btn-pill:hover { background: #1a1a1a; transform: translateY(-1px); }
.btn-lg {
  font-size: 18px;
  padding: 18px 38px;
}
.btn-text {
  color: var(--ink);
  background: none;
  padding: 12px 4px;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}
.btn-text:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Top nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav-left {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 36px;
  font-size: 16px;
}
.nav-left a {
  color: var(--ink);
  font-weight: 400;
  font-family: var(--serif);
  font-size: 18px;
  position: relative;
  padding-bottom: 4px;
}
.nav-left a.is-current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
}
.nav-logo {
  justify-self: center;
  display: inline-flex;
}
.nav-logo img { width: 56px; height: 56px; }
.nav-login {
  justify-self: end;
  font-size: 16px !important;
  padding: 12px 28px;
}

@media (max-width: 720px) {
  .nav-inner { grid-template-columns: auto 1fr auto; gap: 16px; padding: 16px 20px; }
  .nav-left { display: none; }
  .nav-logo img { width: 44px; height: 44px; }
  .nav-login { padding: 10px 22px; font-size: 14px !important; }
}

/* ---------- HERO ---------- */
.hero {
  padding: clamp(80px, 12vw, 160px) 0 clamp(80px, 12vw, 140px);
  text-align: center;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0.5em 0 2.4em;
}
.hero-tagline strong {
  color: var(--ink);
  font-weight: 600;
}
.hero-ctas {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Hero figure (device-mockup composite) ---------- */
.hero-figure {
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 0 32px;
}
.hero-figure img {
  width: 100%;
  height: auto;
  /* No border or extra shadow — the device mockup brings its own. */
}
@media (max-width: 720px) {
  .hero-figure { margin-top: 24px; padding: 0 16px; }
}

/* ---------- Pillars ---------- */
.pillars {
  padding: clamp(72px, 10vw, 120px) 0;
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pillars .section-title { text-align: center; }
.pillars .section-subtitle {
  text-align: center;
  margin: 0 auto 64px;
}
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pillar-thumb {
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-mid);
  border-bottom: 1px solid var(--line);
}
.pillar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.pillar > .pillar-num,
.pillar > h3,
.pillar > p {
  padding-left: 28px;
  padding-right: 28px;
}
.pillar > .pillar-num { padding-top: 24px; }
.pillar > p { padding-bottom: 28px; margin-bottom: 0; }
.pillar-num {
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 8px;
}
.pillar h3 {
  font-size: clamp(22px, 2vw, 28px);
  margin-bottom: 12px;
}
.pillar p {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0;
  line-height: 1.6;
}
@media (max-width: 880px) {
  .pillar-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Satellite (dark band) ---------- */
.satellite {
  padding: clamp(96px, 12vw, 160px) 0;
  background: var(--paper-dark);
  color: var(--paper);
}
.satellite .eyebrow {
  color: rgba(255, 255, 255, 0.6);
}
/* Product walkthrough — Browse a scene → Run an analysis */
.sat-walkthrough {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 56px;
}
.sat-walkthrough-step {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.sat-walkthrough-step img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a1a1a;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}
.sat-walkthrough-step figcaption {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
}
.sat-walkthrough-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
}
.sat-walkthrough-step-text strong {
  color: #fff;
  font-weight: 600;
}
@media (max-width: 880px) {
  .sat-walkthrough { grid-template-columns: 1fr; gap: 36px; }
}

.sat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.sat-col h4 {
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  margin-bottom: 18px;
}
.sat-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sat-col li {
  padding: 8px 0;
  font-family: var(--serif);
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pull-quote {
  margin: 64px 0 0;
  padding: 48px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--serif);
  color: var(--paper);
  max-width: 80ch;
}
.pull-quote-logo {
  display: inline-block;
  margin-bottom: 28px;
  transition: opacity 0.15s ease;
}
.pull-quote-logo:hover { opacity: 0.8; }
.pull-quote-logo img {
  display: block;
  height: auto;
  width: 220px;
  max-width: 100%;
}
.pull-quote-text {
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.4;
  margin: 0;
}
.pull-quote cite {
  display: block;
  margin-top: 18px;
  font-style: normal;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--sans);
  letter-spacing: 0.04em;
}
@media (max-width: 720px) {
  .sat-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Common Data Cycle ---------- */
.cycle {
  padding: clamp(80px, 11vw, 140px) 0;
  background: var(--paper);
}
.cycle .eyebrow,
.cycle .section-title,
.cycle .section-subtitle { text-align: center; }
.cycle .section-title { margin: 0 auto 0.4em; }
.cycle .section-subtitle { margin-left: auto; margin-right: auto; }

.cycle-steps {
  list-style: none;
  padding: 0;
  margin: 64px auto 0;
  max-width: 1080px;
  position: relative;
}
.cycle-steps::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 12px; bottom: 12px;
  width: 1px;
  background: var(--line);
}
.cycle-steps li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 32px 0;
  position: relative;
  align-items: center;
}
.cycle-steps li + li {
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.step-num {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  z-index: 1;
  grid-column: 1;
}
.step-body { grid-column: 2; }
.cycle-steps h3 {
  font-size: clamp(20px, 2vw, 26px);
  margin: 0 0 8px;
}
.cycle-steps p {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0;
  max-width: 56ch;
}
.step-figure {
  grid-column: 3;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper-mid);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}
.step-figure img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
@media (max-width: 880px) {
  .cycle-steps li {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 18px;
  }
  .step-figure {
    grid-column: 1 / -1;
  }
}

/* ---------- Ecosystem ---------- */
.ecosystem {
  padding: clamp(80px, 10vw, 130px) 0;
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
}
.ecosystem .eyebrow,
.ecosystem .section-title { text-align: center; margin-left: auto; margin-right: auto; }

.eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.eco-card {
  background: var(--paper);
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}
.eco-card h3 {
  font-size: clamp(22px, 2vw, 28px);
  margin: 0 0 4px;
}
.eco-meta {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  text-transform: lowercase;
}
.eco-card p {
  color: var(--ink-soft);
  font-size: 15px;
  flex: 1;
}
.card-link {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  margin-top: auto;
  align-self: flex-start;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  color: var(--ink);
}
.card-link:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 880px) {
  .eco-grid { grid-template-columns: 1fr; }
}

/* ---------- Bios ---------- */
.bios { padding: clamp(72px, 10vw, 120px) 0; }
.bios .section-title { text-align: center; margin: 0 auto 48px; }
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
}
.bio-photo {
  margin: 0 0 20px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-mid);
}
.bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.bio h3 { font-size: clamp(22px, 2.2vw, 28px); margin-bottom: 6px; }
.bio-role {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.bio p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}
.bio p a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.bio p a:hover {
  color: var(--accent);
}
@media (max-width: 720px) {
  .bio-grid { grid-template-columns: 1fr; gap: 32px; }
}

.bios-team-photo {
  max-width: 1080px;
  margin: 56px auto 0;
}
.bios-team-photo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
.bios-team-photo figcaption {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  margin-top: 14px;
}

/* ---------- Partners ---------- */
.partners {
  padding: clamp(72px, 10vw, 120px) 0;
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.partner-grid {
  /* Flexbox (not grid) so the trailing partial row centers automatically.
     With 7 sponsors that yields 4 on top + 3 centered on the bottom. */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1000px;
  margin: 32px auto 32px;
}
.partner {
  /* Width math: 4 cells per row with 20px gaps → 100% - (3 gaps * 20) = 100% - 60px,
     divided by 4 = 25% - 15px. */
  flex: 0 0 calc(25% - 15px);
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
  padding: 18px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 90px;
  letter-spacing: 0.02em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.partner:hover {
  border-color: var(--ink);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.partner img {
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(40%);
  opacity: 0.85;
  transition: filter 0.18s ease, opacity 0.18s ease;
}
.partner:hover img {
  filter: grayscale(0);
  opacity: 1;
}
.partner-text {
  font-style: normal;
}
/* Tall logos (e.g. New York Wines vertical lockup) need more vertical room
   so the mark doesn't get crushed against the 56px cap. */
.partner-tall {
  min-height: 110px;
}
.partner-tall img {
  max-height: 86px;
}
.partner-fine-print {
  max-width: 720px;
  margin: 24px auto 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 880px) {
  /* Tablet: 3 across (gap math: (100% - 2*20px) / 3) */
  .partner { flex: 0 0 calc(33.333% - 14px); }
}
@media (max-width: 540px) {
  /* Phone: 2 across, tighter gap */
  .partner-grid { gap: 12px; }
  .partner { flex: 0 0 calc(50% - 6px); }
}

/* ---------- Closing CTA ---------- */
.closing {
  padding: clamp(96px, 12vw, 160px) 0;
  text-align: center;
}
.closing-sub {
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--ink-soft);
  max-width: 50ch;
  margin: 0 auto 36px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 48px 0 64px;
  font-size: 14px;
  color: var(--muted);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.footer-logo img { width: 36px; height: 36px; }
.footer-tag {
  font-family: var(--serif);
  font-style: italic;
  margin: 6px 0 0;
  font-size: 14px;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
  justify-content: center;
}
.footer-links a {
  color: var(--ink-soft);
  font-size: 14px;
}
.footer-copy { margin: 0; font-size: 13px; }
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  .footer-links { flex-wrap: wrap; }
}

/* ---------- Sub-page (documentation, contact) shared ---------- */
.subpage-hero {
  padding: clamp(72px, 10vw, 120px) 0 clamp(40px, 6vw, 72px);
  text-align: center;
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
}
.subpage-hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  text-decoration: underline;
  text-decoration-thickness: 0.04em;
  text-underline-offset: 0.12em;
  margin: 0 0 0.3em;
}
.subpage-hero p {
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto;
}

/* Contact page form */
.contact-wrap {
  padding: clamp(48px, 8vw, 96px) 0 clamp(80px, 10vw, 140px);
}
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}
.contact-form label {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 17px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--serif);
  line-height: 1.55;
}
.contact-direct {
  text-align: center;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-soft);
}
.contact-direct a { font-weight: 600; }

/* Documentation embed */
.docs-frame-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 32px 80px;
}
.docs-frame {
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}
.docs-fallback {
  text-align: center;
  padding: 32px 24px;
  font-family: var(--serif);
  color: var(--ink-soft);
  font-size: 17px;
}

/* Skip-to-content for screen readers */
.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;
}

/* ---------- Legal pages (privacy, terms) ---------- */
.legal-wrap {
  padding: clamp(48px, 8vw, 96px) 0 clamp(80px, 10vw, 140px);
}
.legal {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--serif);
}
.legal h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  margin: 36px 0 12px;
  color: var(--ink);
}
.legal p, .legal li {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.legal ul { padding-left: 20px; margin: 0 0 16px; }
.legal li { margin-bottom: 6px; }
.legal a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal a:hover { color: var(--accent); }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--paper-mid);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.92em;
}
.legal .btn-text {
  font-family: var(--sans);
  font-size: 14px;
  padding: 4px 0;
}

/* ---------- Cookie consent banner ---------- */
.consent-banner {
  position: fixed;
  z-index: 100;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
  padding: 18px 22px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  /* Slide-in from below on first paint */
  animation: consentIn 380ms cubic-bezier(.2,.8,.2,1) both;
}
.consent-banner[hidden] {
  display: none !important;
}
.consent-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.consent-text {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}
.consent-text a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.consent-text a:hover { color: var(--accent); }
.consent-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}
.consent-actions .btn-text {
  font-size: 14px;
  padding: 8px 4px;
}
.consent-actions .btn-pill {
  font-size: 14px;
  padding: 10px 22px;
}
@media (min-width: 720px) {
  .consent-banner { right: 24px; bottom: 24px; left: auto; }
  .consent-inner { flex-direction: row; align-items: center; }
  .consent-actions { flex-shrink: 0; }
}
@keyframes consentIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .consent-banner { animation: none; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
