/* Shared layout. Each site sets its tokens and personality in theme.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight, 600); line-height: 1.15; letter-spacing: var(--display-tracking, -.01em); margin: 0 0 .5em; color: var(--heading); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
p { margin: 0 0 1.1em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(740px, 100% - 32px); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

.eyebrow { font: 600 .75rem/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .8em; }
.eyebrow a { color: inherit; text-decoration: none; }
.meta { font-size: .875rem; color: var(--muted); margin: 0; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 42em; }

.btn {
  display: inline-block; font: 600 .95rem/1 var(--font-body); padding: .95em 1.5em; border-radius: var(--radius-btn);
  background: var(--accent); color: var(--accent-ink); border: 1.5px solid var(--accent); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg); color: var(--header-ink); border-bottom: 1px solid var(--header-line); backdrop-filter: saturate(1.2) blur(8px); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font: var(--brand-font); letter-spacing: var(--brand-tracking, 0); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand:hover { color: inherit; }
.nav { display: flex; gap: 26px; }
.nav a { color: inherit; text-decoration: none; font-size: .92rem; font-weight: 500; opacity: .85; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { opacity: 1; border-color: var(--nav-accent); color: inherit; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; color: var(--header-ink); transition: transform .2s; }

/* hero + sections */
.hero { background: var(--hero-bg); color: var(--hero-ink); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: clamp(56px, 9vw, 120px) 0; }
.hero h1 { color: var(--hero-heading); }
.hero .lede { color: var(--hero-muted); }
.hero .btn--ghost { color: var(--hero-ink); border-color: var(--hero-line); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art svg { width: 100%; height: auto; }

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--alt { background: var(--surface-alt); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.2em; }

.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.topic { display: flex; flex-direction: column; padding: 26px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .2s, border-color .2s; }
.topic:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--ink); }
.topic-num { font: 500 .8rem var(--font-body); color: var(--accent); letter-spacing: .1em; margin-bottom: 18px; }
.topic h3 { font-size: 1.35rem; }
.topic p { color: var(--muted); font-size: .95rem; flex: 1; }
.topic-count { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

.feature { display: block; padding: clamp(28px, 4vw, 44px); background: var(--feature-bg); color: var(--feature-ink); border-radius: var(--radius); text-decoration: none; margin-bottom: 22px; }
.feature:hover { color: var(--feature-ink); }
.feature h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: inherit; max-width: 22em; }
.feature p { max-width: 44em; opacity: .85; }
.feature .eyebrow { color: var(--feature-accent); }
.feature .meta { color: inherit; opacity: .75; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-link { display: flex; flex-direction: column; height: 100%; padding: 24px; color: var(--ink); text-decoration: none; }
.card-link:hover { color: var(--ink); }
.card h3 { font-size: 1.25rem; }
.card p:not(.eyebrow):not(.meta) { color: var(--muted); font-size: .95rem; flex: 1; }

.principles ul { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; }
.principles li { padding-left: 28px; position: relative; color: var(--muted); }
.principles li::before { content: ""; position: absolute; left: 0; top: .6em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); opacity: .85; }
.principles strong { color: var(--ink); display: block; }

/* article + pages */
.page-head, .post-head { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); background: var(--head-bg); border-bottom: 1px solid var(--line); }
.page-head--center { text-align: center; padding: 100px 0; }
.page-head--center .lede { margin-inline: auto; }
.post-head h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 22px; font-size: .82rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }

.post-body { padding-top: 40px; padding-bottom: 64px; }
.post-body h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-top: 1.8em; scroll-margin-top: 90px; }
.post-body h3 { font-size: 1.2rem; margin-top: 1.5em; }
.post-body ul, .post-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.post-body li { margin-bottom: .45em; }
.post-body li::marker { color: var(--accent); }
.callout { margin: 1.8em 0; padding: 20px 22px; background: var(--callout-bg); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
.callout p { margin: 0; }
.toc { margin: 0 0 2em; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc p { font: 600 .75rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6em; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin: .25em 0; }
.toc a { text-decoration: none; }
.note { margin-top: 3em; padding-top: 1.4em; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

/* footer */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 56px 0 28px; }
.site-footer a { color: inherit; text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; color: inherit; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-grid p { opacity: .75; font-size: .95rem; max-width: 30em; margin-top: 14px; }
.footer-grid h2 { font: 600 .75rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; opacity: .6; color: inherit; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: .45em 0; font-size: .95rem; }
.footer-note { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--footer-line); font-size: .82rem; opacity: .65; }
.footer-note p { margin: .3em 0; }

/* age gate */
.agegate { display: none; }
.js:not(.age-ok) body { overflow: hidden; }
.js:not(.age-ok) .agegate { display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000; padding: 16px; background: var(--gate-bg); backdrop-filter: blur(14px); }
.agegate-card { width: min(460px, 100%); padding: 40px 32px; text-align: center; background: var(--surface); color: var(--ink); border-radius: calc(var(--radius) * 1.5); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.agegate-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font: 600 1.1rem var(--font-body); margin: 0 auto 18px; }
.agegate-card h2 { font-size: 1.7rem; }
.agegate-card p { color: var(--muted); }
.agegate-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

@media (max-width: 960px) {
  .topics { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 360px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px 16px 18px; background: var(--header-bg-solid); border-bottom: 1px solid var(--header-line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--header-line); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .cards, .principles ul, .footer-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}
@media (max-width: 520px) {
  .topics { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Freyja: ciruela nocturna + dorado. */
:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --display-weight: 500;
  --brand-font: 500 1.45rem/1 "Fraunces", Georgia, serif;
  --brand-tracking: .01em;

  --bg: #fbf7f2;
  --surface: #ffffff;
  --surface-alt: #f4ece3;
  --head-bg: #f4ece3;
  --ink: #2b2129;
  --heading: #2a1024;
  --muted: #6d6069;
  --line: #e7dcd1;
  --line-strong: #cbbcae;
  --link: #7a2e5c;
  --accent: #9b3a6f;
  --accent-strong: #7a2e5c;
  --accent-ink: #ffffff;
  --callout-bg: #f7eef0;
  --radius: 14px;
  --radius-btn: 999px;

  --header-bg: rgba(42, 16, 36, .94);
  --header-bg-solid: #2a1024;
  --header-ink: #f6e9d8;
  --header-line: rgba(212, 169, 84, .22);
  --nav-accent: #d4a954;

  --hero-bg: radial-gradient(120% 90% at 85% 20%, #4a1b3d 0%, #2a1024 55%, #1c0a18 100%);
  --hero-ink: #f6e9d8;
  --hero-heading: #fbf1e3;
  --hero-muted: #d8c3cf;
  --hero-line: rgba(246, 233, 216, .35);

  --feature-bg: linear-gradient(135deg, #2a1024, #4a1b3d);
  --feature-ink: #fbf1e3;
  --feature-accent: #d4a954;

  --footer-bg: #1c0a18;
  --footer-ink: #eadccb;
  --footer-line: rgba(234, 220, 203, .15);
  --gate-bg: rgba(28, 10, 24, .82);
}
.hero h1 em { font-style: italic; color: #d4a954; }
.hero .eyebrow { color: #d4a954; }
.hero .btn:not(.btn--ghost) { background: #d4a954; border-color: #d4a954; color: #2a1024; }
.hero .btn:not(.btn--ghost):hover { background: #e6c173; border-color: #e6c173; color: #2a1024; }
.topic-num { font-family: "Fraunces", serif; font-size: 1rem; font-style: italic; }
.post-body > p:first-of-type { font-size: 1.18rem; color: var(--heading); }
