/* StatsFriend theme: "sage and oat".
   Loaded last. Retunes the base tokens to a soft, warm light palette drawn
   from the portrait backdrop, and swaps headings to a serif. Edit colors here. */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-standard-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-standard-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin-standard-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin-standard-italic.woff2") format("woff2");
}

:root {
  --color-bg: #eef0ea;        /* oat with a sage cast */
  --color-surface: #f8f9f5;   /* paper */
  --color-text: #22302c;      /* deep green ink */
  --color-accent: #2f6a5a;    /* eucalyptus */
  --color-accent-2: #8a6a33;  /* muted ochre, small marks only */
  --color-divider: color-mix(in srgb, #22302c 16%, transparent);

  /* Ramps are stored light-to-dark in reverse on purpose: the page layer was
     written for a dark theme (900 = ground, 100 = ink), so flipping the ramp
     keeps every existing rule correct on a light ground. */
  --color-accent-900: #e3ece7;
  --color-accent-800: #d2e1d9;
  --color-accent-700: #9fc0b1;
  --color-accent-600: #6f9c8a;
  --color-accent-500: #4b7f6d;
  --color-accent-400: #3a6e5e;
  --color-accent-300: #2f5d4f;
  --color-accent-200: #264b40;
  --color-accent-100: #1c3830;

  --color-neutral-900: #e7e9e3;
  --color-neutral-800: #d9dcd4;
  --color-neutral-700: #c5c9c0;
  --color-neutral-600: #a9aea4;
  --color-neutral-500: #8a9088;
  --color-neutral-400: #6c736c;
  --color-neutral-300: #525a54;
  --color-neutral-200: #3a433e;
  --color-neutral-100: #26302c;

  --color-section: #dde7e0;
  --color-section-glow: #e9efe9;
  --color-section-ghost: #cfdcd3;

  --font-heading: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-heading-weight: 560;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --shadow-sm: 0 0 0 1px color-mix(in srgb, #22302c 11%, transparent);
  --shadow-md: 0 0 0 1px color-mix(in srgb, #22302c 13%, transparent), 0 6px 18px rgb(34 48 44 / 0.08);
  --shadow-lg: 0 0 0 1px color-mix(in srgb, #22302c 15%, transparent), 0 16px 40px rgb(34 48 44 / 0.12);
}

body {
  font-size: 17px;
  line-height: 29px;
  background:
    radial-gradient(1100px 640px at 88% -200px, #e2ebe4, transparent 62%),
    var(--color-bg);
  background-repeat: no-repeat;
}

/* Headings: serif, optical sizing on, no negative tracking at large sizes. */
h1, h2, h3, h4, .display, .row-title, .tier h3, .pull, .cred-num, .price, .nav-brand b {
  font-optical-sizing: auto;
  letter-spacing: -0.005em;
}
.display { margin-left: -0.03em; font-weight: 520; }
.display .type-line { font-style: italic; font-weight: 480; }

/* Labels in sentence case, not tracked caps. */
.kicker, .tier .price small, .site-foot h2, h6, .card-kicker, .table th {
  text-transform: none; letter-spacing: 0.01em;
}
.kicker { font-size: 15px; color: var(--color-accent); }
.site-foot h2 { font-size: 15px; font-family: var(--font-body); font-weight: 600; }

/* Buttons: the primary is a filled eucalyptus pill, calm not loud. */
.btn-primary { background: var(--color-accent); color: #f8f9f5; border-color: var(--color-accent); }
.btn-primary:hover { background: #285c4e; color: #f8f9f5; }
.btn-primary:active { background: #224f43; }
.btn-secondary { background: var(--color-surface); color: var(--color-text); }

.tier { background: var(--color-surface); }
.tier[data-featured] { box-shadow: 0 0 0 1.5px var(--color-accent), 0 8px 24px rgb(34 48 44 / 0.10); }
.quote-card { background: var(--color-surface); }
.quote-card blockquote { font-family: var(--font-heading); font-size: 18px; line-height: 1.6; }
.quote-card .tag-line { font-size: 13px; color: var(--color-accent-2); margin: 0; }

.band .cred-num { color: var(--color-accent-100); }

/* Decorative row mark (replaces a stray dash): a small ochre dot. */
.row-num .mark {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-accent-2); transform: translateY(-2px);
}

/* Portrait on About. */
.portrait {
  width: 100%; max-width: 420px; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}

/* Form notice after submit (contact.html?sent=1 / ?error=1). */
.notice {
  padding: var(--space-6); border-radius: var(--radius-md);
  background: var(--color-accent-900); box-shadow: inset 0 0 0 1px var(--color-accent-700);
  margin: 0 0 var(--leading);
}
.notice[data-kind="error"] { background: #f3e6df; box-shadow: inset 0 0 0 1px #d6b3a2; }

/* Buttons use the body face for crisp small text; primary keeps light text everywhere, including the nav. */
.btn { font-family: var(--font-body); font-weight: 600; }
a.btn-primary, .nav-links a.btn-primary, .nav-drawer a.btn-primary,
a.btn-primary:hover, .nav-links a.btn-primary:hover { color: #f8f9f5; }
.nav-links a.btn-primary[aria-current="page"] { box-shadow: none; }

/* Portrait keeps its square proportions. */
.split-figure img.portrait { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }

/* Review attribution: monogram, name, role, and where the review came from.
   To use a real photo later, swap the span.avatar for an <img class="avatar">. */
.quote-card figcaption {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start;
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--color-accent-800); color: var(--color-accent-200);
  font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  object-fit: cover;
}
.quote-card .who { display: block; }
.quote-card .who b { display: block; }
.quote-card .src { display: block; margin-top: 4px; font-size: 12.5px; color: var(--color-accent-2); }

/* Benefit list under a price. */
.benefits { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.benefits li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.45; }
.benefits li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 9px; height: 1px; background: var(--color-accent);
}

/* Pull-quote inside prose. */
.pull-quote { margin: var(--leading) 0; padding-left: var(--space-6); border-left: 2px solid var(--color-accent-700); }
.pull-quote .pull { font-size: clamp(19px, 2vw, 23px); max-width: 40ch; text-indent: 0; }
.pull-quote figcaption { margin-top: var(--space-3); font-size: 14px; }

/* Price label sits above the number everywhere, not only inside a tier card. */
.price small { display: block; font-size: 13px; letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--color-text) 64%, transparent); margin-bottom: 4px; }

/* Logo mark in the masthead and footer. */
.logo { height: 34px; width: auto; }
.nav-brand { gap: 10px; }

/* Four starting points: two by two on wide screens, and every card's button
   lines up because the blurb takes the slack. */
.tiers[data-four] { grid-template-columns: 1fr; }
@media (min-width: 900px) { .tiers[data-four] { grid-template-columns: repeat(2, 1fr); } }
.tier .for { flex: 1; }
.tier .btn { margin-top: var(--space-4); }
.async-price {
  margin: 0; font-size: 15px; color: var(--color-accent);
  font-feature-settings: "tnum" 1;
}

/* Label above the credentials band. */
.band-label {
  margin: 0 0 var(--space-6); font-family: var(--font-body); font-size: 15px;
  font-weight: 600; color: var(--color-accent-200);
}

/* Longer credential headline needs a smaller size to sit on one or two lines. */
.cred-num.cred-sm { font-size: clamp(21px, 2.1vw, 27px); line-height: 1.2; }

/* Logo sizing: larger in the masthead, large in the footer, centred against
   the wordmark rather than sitting on its baseline. */
.nav-brand { align-items: center; }
.logo { height: 38px; }
.site-foot .nav-brand { align-items: center; gap: 12px; }
.site-foot .logo { height: 60px; }
.site-foot .nav-brand b { font-size: 22px; }

/* Reviewer photographs sit in the same circle the monograms use. */
.quote-card figcaption { grid-template-columns: 48px 1fr; }
.quote-card figcaption picture { display: block; width: 48px; height: 48px; }
img.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; }
span.avatar { width: 48px; height: 48px; }

/* Photographs and illustrations placed between sections. */
.figure-band { margin: var(--leading) 0; }
.figure-band img {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.figure-band figcaption { margin-top: var(--space-2); font-size: 13.5px; color: var(--color-accent-2); }

/* Smaller source images stay at their own scale rather than being blown up. */
.figure-band.figure-sm { max-width: 640px; }
.figure-band.figure-sm img { max-height: 360px; }

/* Intake page: the form gets the wider column, and the email address is
   offered up front for people who only want to write. */
@media (min-width: 860px) {
  .split.form-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.email-card {
  margin: 0 0 var(--leading); padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-lg); background: var(--color-surface);
  box-shadow: inset 0 0 0 1.5px var(--color-accent-700);
}
.email-card-label { margin: 0; font-size: 15px; color: color-mix(in srgb, var(--color-text) 72%, transparent); }
.email-card-address {
  margin: 4px 0 0; font-family: var(--font-heading); font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
}
.email-card-address a { text-decoration: none; }
.email-card-address a:hover { text-decoration: underline; }
.email-card-note { margin: var(--space-3) 0 0; font-size: 14.5px; max-width: 60ch;
  color: color-mix(in srgb, var(--color-text) 78%, transparent); }
.field > label { font-size: 14px; }
.figure-band.figure-center { margin-inline: auto; }

/* At-a-glance list: scannable for people, unambiguous for machines. */
.glance { display: grid; gap: 0; margin: 0; max-width: 90ch; }
.glance > div {
  display: grid; gap: var(--space-2) clamp(24px, 4vw, 56px);
  padding: calc(0.75 * var(--leading)) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
}
@media (min-width: 760px) { .glance > div { grid-template-columns: 200px minmax(0, 1fr); } }
.glance dt { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 17px; }
.glance dd { margin: 0; color: color-mix(in srgb, var(--color-text) 82%, transparent); }
