/* jessanslow.com - static rebuild
   Design tokens ported from the original jess-anslow WordPress theme so the
   look carries over. Atkinson Hyperlegible (body) + Fraunces (display). */

:root {
  --bg: #fbf7f4;
  --surface: #ffffff;
  --surface-soft: #efe9fb;
  --ink: #1c1a1f;
  --muted: #5b5660;
  --accent: #4f3fc4;
  --accent-bg: #4f3fc4;
  --accent-soft: #6a5dd6;
  --border: #cfc3e2;
  --divider: rgba(207, 195, 226, 0.5);

  --shadow: 0 20px 60px rgba(48, 36, 92, 0.16);
  --shadow-sm: 0 4px 12px rgba(48, 36, 92, 0.08);
  --shadow-button: 0 12px 24px rgba(75, 63, 166, 0.2);

  --radius-sm: 14px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --max-width: 1120px;
  --gutter: 24px;
  --header-height: 80px;

  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;

  --focus-ring: #4f3fc4;
  --accent-ghost: rgba(91, 73, 200, 0.12);
  --header-bg: rgba(251, 247, 244, 0.92);
  --header-border: rgba(230, 222, 239, 0.7);
  --footer-bg: #eee8f4;
  --footer-border: #ddd4ea;
  --footer-muted: #6b5f7d;
  --footer-link: #3d3550;
  --gradient-brand: linear-gradient(135deg, #6a4fda, #4b7dff 60%, #f3b28f);
  --hero-grad: linear-gradient(118deg, #ece5f9 0%, #e4ecfc 52%, var(--bg) 100%);
  --portrait-ring: linear-gradient(140deg, #8f6ff0, #4b7dff);
  --transition: 180ms ease;
}

:root[data-theme="dark"] {
  --bg: #0f0a1a;
  --surface: #1a1425;
  --surface-soft: #2e1065;
  --ink: #f5f3f0;
  --muted: #a8a29e;
  --accent: #a78bfa;
  --accent-bg: #7c3aed;
  --accent-soft: #c4b5fd;
  --border: #3f3850;
  --divider: rgba(63, 56, 80, 0.5);
  --focus-ring: #a78bfa;
  --accent-ghost: rgba(167, 139, 250, 0.15);
  --header-bg: rgba(15, 10, 26, 0.92);
  --header-border: rgba(63, 56, 80, 0.7);
  --footer-bg: #1e1b25;
  --footer-border: #2e2640;
  --footer-muted: #9e95ac;
  --footer-link: #c4b5d8;
  --hero-grad: linear-gradient(118deg, #1d1436 0%, #131a34 52%, var(--bg) 100%);
  --portrait-ring: linear-gradient(140deg, #a78bfa, #4b7dff);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0a1a;
    --surface: #1a1425;
    --surface-soft: #2e1065;
    --ink: #f5f3f0;
    --muted: #a8a29e;
    --accent: #a78bfa;
    --accent-bg: #7c3aed;
    --accent-soft: #c4b5fd;
    --border: #3f3850;
    --divider: rgba(63, 56, 80, 0.5);
    --focus-ring: #a78bfa;
    --accent-ghost: rgba(167, 139, 250, 0.15);
    --header-bg: rgba(15, 10, 26, 0.92);
    --header-border: rgba(63, 56, 80, 0.7);
    --footer-bg: #1e1b25;
    --footer-border: #2e2640;
    --footer-muted: #9e95ac;
    --footer-link: #c4b5d8;
    --hero-grad: linear-gradient(118deg, #1d1436 0%, #131a34 52%, var(--bg) 100%);
    --portrait-ring: linear-gradient(140deg, #a78bfa, #4b7dff);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Anchor jumps must clear the sticky header. */
[id] { scroll-margin-top: calc(var(--header-height) + 12px); }

/* Screen-reader-only text (e.g. disambiguating repeated link labels). */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-soft); }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 720px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--accent-bg);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  z-index: 100;
}
.skip-link:focus { left: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--header-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
}
.brand-logo { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.brand-tagline { font-family: var(--font-body); font-size: 0.82rem; color: var(--muted); }
@media (max-width: 480px) { .brand-text { display: none; } }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; padding-block: 11px; }
.site-nav a:hover { color: var(--accent); }
/* Current page: colour + underline, so the state survives colour-blindness. */
.site-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .ico { width: 18px; height: 18px; }
.theme-toggle__label { line-height: 1; }
/* Show the moon (-> switch to dark) in light mode; the sun in dark mode. */
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; }
}
@media (max-width: 560px) { .theme-toggle__label { display: none; } .theme-toggle { padding: 0; width: 44px; justify-content: center; } }

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-grad);
  padding: clamp(44px, 8vw, 104px) 0 clamp(44px, 8vw, 96px);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}
.hero-copy { max-width: 34em; }
.hero-eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-heading { font-size: clamp(2.6rem, 7vw, 4.4rem); margin: 0 0 0.3em; letter-spacing: -0.01em; }
.hero-body { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--muted); margin: 0 0 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Circular portrait: gradient ring -> white gap -> image (matches the original).
   Size lives on the ring div (a square box) so the img's intrinsic width/height
   attributes can never stretch it into an oval. */
.hero-portrait { justify-self: center; }
.hero-portrait__ring {
  width: clamp(210px, 32vw, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 5px;
  background: var(--portrait-ring);
  box-shadow: var(--shadow);
}
.hero-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--surface);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: 40em; margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-portrait { order: -1; }
  .hero-portrait__ring { width: clamp(200px, 52vw, 260px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent-bg); color: #fff; box-shadow: var(--shadow-button); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--muted); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Section scaffolding ---------- */
section { padding-block: clamp(28px, 5vw, 56px); }
.section-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 1.2em; }

/* ---------- Path cards (the three ways in) ---------- */
.path-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* Card artwork bleeds to the card edges (cancels the card padding). */
.path-card__media {
  margin: -28px -26px 0;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px) 0 0;
  background: var(--surface-soft);
}
.path-card__media img { width: 100%; height: 100%; object-fit: cover; }
.path-name { font-size: 1.5rem; margin: 0; }
.path-name a { text-decoration: none; color: var(--ink); }
.path-name a:hover { color: var(--accent); }
.path-blurb { margin: 0; color: var(--muted); }
.path-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; justify-content: center; }
.subscribe-embed { margin-top: 6px; min-height: 60px; }
.subscribe-embed iframe { width: 100%; }
.subscribe-embed--wide { max-width: 480px; margin-top: 20px; }

/* ---------- Article cards ---------- */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.article-card__media { display: block; aspect-ratio: 2 / 1; overflow: hidden; background: var(--surface-soft); }
.article-card__media img { width: 100%; height: 100%; object-fit: cover; }
.article-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.article-card__series {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent);
}
.article-card__title { font-size: 1.3rem; margin: 0; }
.article-card__title a { text-decoration: none; color: var(--ink); }
.article-card__title a:hover { color: var(--accent); }
.article-card__date { font-size: 0.85rem; color: var(--muted); }
.article-card__excerpt { margin: 4px 0 0; color: var(--muted); font-size: 0.98rem; }
/* Inline links grow their hit area to ~44px without shifting the layout. */
.article-card__more { margin-top: 10px; font-weight: 700; font-size: 0.95rem; text-decoration: none; display: inline-block; padding-block: 11px; margin-block: -1px -11px; align-self: flex-start; }

/* ---------- Series pages ---------- */
.series-head { padding-top: clamp(36px, 6vw, 64px); }
.series-eyebrow { margin: 0 0 12px; }
.series-eyebrow a { text-decoration: none; font-weight: 700; display: inline-block; padding-block: 11px; margin-block: -11px; }
.series-title { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0 0 0.3em; }
.series-blurb { font-size: 1.15rem; color: var(--muted); max-width: 36em; margin: 0; }
.series-all { margin-top: 32px; }
.series-empty { color: var(--muted); }

/* ---------- Prose (About) ---------- */
.prose-page { padding-top: clamp(36px, 6vw, 64px); }
.page-title { font-size: clamp(2.2rem, 6vw, 3.2rem); margin: 0 0 0.6em; }
.prose h2 { font-size: 1.6rem; margin: 1.6em 0 0.5em; }
.prose p { margin: 0 0 1.1em; }
.draft-note {
  background: var(--accent-ghost);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 28px; flex-wrap: wrap; gap: 8px;
}
.footer-copy, .footer-meta { color: var(--footer-muted); font-size: 0.9rem; }

@media (max-width: 620px) {
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
  .article-card:hover, .btn-primary:hover { transform: none; }
}
