/* =========================================================
   Dr. Scarlett Jay – base stylesheet
   Edit the variables below to change colours and fonts.
   ========================================================= */
:root {
  --bg: #fbf9f8;
  --bg-soft: #fbf0f2;
  --bg-dark: #1b1324;
  --ink: #141218;
  --ink-soft: #4a4552;
  --line: #e7dfe3;

  --primary: #4338ca;
  --primary-hover: #3730a3;
  --green: #16a34a;
  --green-hover: #15803d;

  --rainbow: linear-gradient(90deg, #ef4444, #f97316, #eab308, #22c55e, #06b6d4, #3b82f6, #8b5cf6, #d946ef);

  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;

  --radius: 14px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- reset ---------- */
*, *::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 16px/1.6 var(--font-sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.1; }
h1, h2 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* ---------- shared bits ---------- */
.eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 1.2em; display: inline-block; position: relative; padding-bottom: .6em;
}
.eyebrow::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: min(100%, 220px); height: 2px;
  background: var(--rainbow); border-radius: 2px;
}
.rainbow-text {
  background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.script-note { font-family: var(--font-script); font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.05; transform: rotate(-12deg); }

.btn {
  display: inline-flex; align-items: center; gap: .6em; justify-content: center;
  padding: .95em 1.8em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .8rem/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-hover); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.8em; }

.text-link {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); text-decoration: underline; text-underline-offset: 4px;
}

.icon { width: 40px; height: 40px; fill: none; stroke: var(--c, currentColor); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* rainbow brush strokes (decorative) */
.brush {
  position: absolute; pointer-events: none; height: 22px; border-radius: 50%;
  background: var(--rainbow); filter: blur(.4px); opacity: .9;
  -webkit-mask: repeating-linear-gradient(0deg, #000 0 2px, transparent 2px 4px);
          mask: repeating-linear-gradient(0deg, #000 0 2px, transparent 2px 4px);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,249,248,.92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-script); font-size: 2rem; line-height: 1; }
.brand-tag { font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: clamp(14px, 2vw, 30px); }
.site-nav a { font-size: .9rem; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--primary); border-color: var(--primary); }


.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; margin-left: auto; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s, opacity .25s; }
.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); }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding: clamp(24px, 4vw, 48px) 0 clamp(32px, 5vw, 64px); }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.hero .lead { font-size: 1.12rem; }
.hero-copy p { max-width: 36em; }
.hero-art { position: relative; }
.hero-art img { width: 78%; max-width: 480px; margin: 0; }
.hero-art .script-note { position: absolute; right: 0; bottom: 18%; }

/* =========================================================
   VALUES
   ========================================================= */
.values { background: var(--bg-soft); padding: clamp(32px, 5vw, 56px) 0; }
.values-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.value { text-align: center; padding: 8px 20px; border-left: 1px solid var(--line); }
.value:first-child { border-left: 0; }
.value .icon { margin: 0 auto 14px; width: 44px; height: 44px; }
.value h3 { font: 600 .75rem/1.5 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: .6em; }
.value p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* =========================================================
   TOPICS
   ========================================================= */
.topics {
  background:
    radial-gradient(ellipse at 15% 20%, rgba(124,58,237,.35), transparent 60%),
    radial-gradient(ellipse at 85% 90%, rgba(219,39,119,.25), transparent 55%),
    var(--bg-dark);
  color: #fff; padding: clamp(40px, 6vw, 72px) 0;
}
.topics-inner { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.topics h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.topics-intro p { color: #ddd6e8; max-width: 26em; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.topic-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
  min-height: 130px; padding: 18px; border-radius: var(--radius); overflow: hidden;
  background: var(--bg, #333); background-size: cover; background-position: center;
  border: 1px solid rgba(255,255,255,.18); text-decoration: none; color: #fff;
  transition: transform .2s, border-color .2s;
}
.topic-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.45)); }
.topic-card > * { position: relative; }
.topic-card .icon { width: 34px; height: 34px; stroke: #fff; }
.topic-card span { font-weight: 500; line-height: 1.3; }
.topic-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.5); }

/* =========================================================
   FEATURED WORKBOOK
   ========================================================= */
.featured { position: relative; overflow: hidden; background: var(--bg-soft); padding: clamp(40px, 6vw, 72px) 0; }
.featured-inner { display: grid; grid-template-columns: 1fr 1.25fr .6fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.featured h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-bottom: .2em; }
.featured .subhead { font-size: 1.1rem; }
.featured-copy > p { color: var(--ink-soft); }
.featured-copy .subhead { color: var(--ink); }
.checklist { margin: 0 0 1.6em; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: .45em; font-size: .95rem; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: .7rem; display: grid; place-items: center;
}
.fine { font-size: .8rem; margin-top: .8em; }
.featured-note { justify-self: center; }
.brush-featured { width: 70%; right: -15%; bottom: 40px; transform: rotate(-8deg); }

/* CSS-drawn book covers – swap .book-front for a real cover <img> later */
.book-stack { position: relative; aspect-ratio: 4 / 4.2; max-width: 380px; width: 100%; justify-self: center; }
.book {
  position: absolute; width: 66%; aspect-ratio: 3 / 4; background: #fff; border-radius: 4px;
  box-shadow: 0 18px 40px rgba(40,20,50,.18), 0 2px 6px rgba(0,0,0,.08);
}
.book-back { left: 0; top: 10%; transform: rotate(-8deg); }
.book-mid { left: 12%; top: 6%; transform: rotate(-4deg); }
.book-front {
  right: 0; top: 0; padding: 8% 7%; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.book-front img { width: 42%; margin-bottom: 4%; }
.book-title { font-family: var(--font-serif); font-size: clamp(1rem, 2.2vw, 1.5rem); line-height: 1.05; margin: 0 0 .4em; }
.book-sub { font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .8em; }
.book-badge { background: #7c3aed; color: #fff; font-size: .45rem; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.book-author { font-family: var(--font-script); font-size: 1.1rem; margin: auto 0 0; }

/* =========================================================
   ARTICLES
   ========================================================= */
.articles { padding: clamp(40px, 6vw, 72px) 0; }
.articles-inner { display: grid; grid-template-columns: 1fr 2.6fr; gap: clamp(24px, 4vw, 48px); }
.articles-intro { padding-right: clamp(0px, 2vw, 24px); border-right: 1px solid var(--line); }
.articles h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.articles-intro p { color: var(--ink-soft); }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.article-img { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--bg); margin-bottom: 14px; }
.article-img img { width: 100%; height: 100%; object-fit: cover; }
/* hide broken placeholder images so the gradient shows instead */
.article-img img:not([src]), .article-img img[data-missing] { display: none; }
.category { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .4em; }
.article-card h3 { font: 500 1.15rem/1.25 var(--font-serif); }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { text-decoration: underline; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: .9fr 1.4fr 1.4fr; gap: clamp(24px, 4vw, 48px); align-items: center;
  background: #fff; border-top: 1px solid var(--line);
}
.contact-art {
  align-self: stretch; min-height: 260px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #1d4e6b, #0b1d2b 70%);
}
.neon-heart { font-size: 6rem; color: #ff4fd8; text-shadow: 0 0 8px #ff4fd8, 0 0 24px #ff2fb5, 0 0 48px #c026d3; line-height: 1; }
.contact-copy { padding: 40px 0; }
.contact h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.contact-copy p:last-child { font-size: .9rem; color: var(--ink-soft); }
.contact-form { display: grid; gap: 10px; padding: 40px var(--gutter) 40px 0; position: relative; z-index: 1; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font: inherit; font-size: .9rem; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
}
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }
.brush-contact { width: 260px; right: -60px; bottom: 30px; transform: rotate(-55deg); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--bg-dark); color: #cfc7d9; font-size: .85rem; padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: #fff; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* small laptops / large tablets */
@media (max-width: 1080px) {
  .site-nav ul { gap: 16px; }
  .values-grid { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .value:nth-child(4) { border-left: 0; }
  .topics-inner { grid-template-columns: 1fr; }
  .featured-inner { grid-template-columns: 1fr 1.3fr; }
  .featured-note { display: none; }
  .articles-inner { grid-template-columns: 1fr; }
  .articles-intro { border-right: 0; padding-right: 0; }
  .contact { grid-template-columns: 1fr 1fr; }
  .contact-art { display: none; }
  .contact-copy { padding-left: var(--gutter); }
}

/* tablets: collapse nav into menu */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none; padding: 8px var(--gutter) 20px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .header-inner { gap: 12px; }
  .nav-toggle { margin-left: auto; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .hero-art img { width: 100%; margin: 0 auto; }
  .hero-art .script-note { font-size: 1.5rem; right: -8px; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .article-card:nth-child(3) { display: none; }
}

/* phones */
@media (max-width: 640px) {
  .header-inner { min-height: 68px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-name { font-size: 1.6rem; }
  .brand-tag { display: none; }

  .hero-art { max-width: 300px; }
  .hero-art .script-note { display: none; }
  .btn-row .btn { width: 100%; }

  .values-grid { grid-template-columns: 1fr 1fr; }
  .value { border-left: 0; padding: 8px 6px; }
  .value:last-child { grid-column: 1 / -1; }

  .topic-grid { gap: 10px; }
  .topic-card { min-height: 110px; padding: 14px; font-size: .92rem; }

  .featured-inner { grid-template-columns: 1fr; }
  .book-stack { max-width: 300px; }
  .featured .btn { width: 100%; }

  .article-grid { grid-template-columns: 1fr; }
  .article-card:nth-child(3) { display: block; }

  .contact { grid-template-columns: 1fr; gap: 0; }
  .contact-copy { padding: 40px var(--gutter) 8px; }
  .contact-form { padding: 16px var(--gutter) 48px; }
  .contact-form .btn { justify-self: stretch; }
  .brush-contact { display: none; }
}

/* narrow phones */
@media (max-width: 480px) {
  .brand { flex-shrink: 1; min-width: 0; }
  .brand-name { font-size: 1.4rem; white-space: nowrap; }
}

/* very small phones */
@media (max-width: 380px) {
  .values-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}


/* =========================================================
   INNER PAGES
   ========================================================= */
.section { padding: clamp(36px, 5vw, 64px) 0; }
.section.alt { background: var(--bg-soft); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-head p { color: var(--ink-soft); }

.page-hero { background: var(--bg-soft); padding: clamp(36px, 6vw, 64px) 0; overflow: hidden; }
.page-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.page-hero .lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 36em; margin: 0; }
.page-hero-art { height: 200px; width: auto; flex-shrink: 0; margin: -16px 0; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; background: #efeaf0; border-radius: 999px; padding: 4px; }
.seg button, .chips button { font: 500 .85rem/1 var(--font-sans); border: 0; cursor: pointer; color: var(--ink); }
.seg button { background: transparent; padding: 9px 18px; border-radius: 999px; }
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { background: #fff; border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.chips button:hover { border-color: var(--ink-soft); }
.chips button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.count { font-size: .85rem; color: var(--ink-soft); margin: 0 0 20px; }
.empty { padding: 40px 0; color: var(--ink-soft); grid-column: 1 / -1; }
.note { font-size: .85rem; color: var(--ink-soft); margin: 28px 0 0; }
button.text-link { background: none; border: 0; cursor: pointer; padding: 0; }

/* ---------- resource cards ---------- */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.res-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.res-card:hover { box-shadow: 0 12px 30px rgba(40,20,50,.1); transform: translateY(-2px); }
.res-cover { aspect-ratio: 16 / 7; background: var(--bg); display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 14px; color: #fff; }
.res-format { display: inline-flex; align-items: center; gap: 6px; font: 600 .7rem/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; }
.res-format svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge { font: 600 .72rem/1 var(--font-sans); letter-spacing: .06em; padding: 6px 10px; border-radius: 999px; }
.badge-free { background: #fff; color: var(--primary); }
.badge-paid { background: var(--green); color: #fff; }
.res-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 20px; }
.res-body h3 { font: 500 1.25rem/1.2 var(--font-serif); margin-bottom: .4em; }
.res-body > p { font-size: .92rem; color: var(--ink-soft); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag-list a { display: inline-block; font-size: .72rem; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); text-decoration: none; color: var(--ink-soft); }
.tag-list a:hover { color: var(--ink); }
.res-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.meta { font-size: .8rem; color: var(--ink-soft); }
.btn-sm { padding: .75em 1.2em; font-size: .68rem; }
.btn[aria-disabled="true"] { background: #e7e3ea; color: var(--ink-soft); pointer-events: none; }

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 40px 24px; }
.article-card .excerpt { font-size: .92rem; color: var(--ink-soft); }

.post { max-width: 720px; margin: 0 auto; padding-bottom: clamp(36px, 5vw, 64px); }
.post-header { text-align: center; padding: clamp(32px, 5vw, 56px) 0 28px; }
.post-header .eyebrow::after { left: 50%; transform: translateX(-50%); width: 80px; }
.post-header h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.back-link { display: table; margin: 0 auto 24px; }
.post-meta { font-size: .85rem; color: var(--ink-soft); margin: 0; }
.post-cover { aspect-ratio: 21 / 9; border-radius: var(--radius); background: var(--bg); margin-bottom: 36px; }
.prose { font-size: 1.07rem; line-height: 1.75; }
.prose h2 { font-size: 1.6rem; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; list-style: revert; }
.prose li { margin-bottom: .5em; }
.prose blockquote { margin: 1.6em 0; padding: 6px 0 6px 22px; border-left: 3px solid #8b5cf6; font: 500 1.3rem/1.4 var(--font-serif); }
.post-sign { font-family: var(--font-script); font-size: 1.8rem; margin-top: 1.4em; }

/* ---------- empty state (courses) ---------- */
.empty-state { text-align: center; max-width: 580px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) 0; }
.empty-state img { width: 150px; margin: 0 auto 24px; }
.empty-state h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.empty-state p { color: var(--ink-soft); }
.inline-form { display: flex; gap: 10px; max-width: 460px; margin: 28px auto 10px; }
.empty-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 500; }
.field .hint { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea, .inline-form input {
  font: inherit; font-size: .95rem; padding: 12px 14px; width: 100%;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 160px; }
.form-grid .btn { justify-self: start; }
.form-thanks { padding: 28px; background: var(--bg-soft); border-radius: var(--radius); }
.form-thanks h3 { font: 500 1.4rem/1.2 var(--font-serif); }
.form-thanks p { margin: 0; color: var(--ink-soft); }

.contact-page { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.info-card { background: var(--bg-soft); border-radius: var(--radius); padding: 28px; }
.info-card h3 { font: 600 .75rem/1.4 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; margin: 1.6em 0 .4em; }
.info-card h3:first-child { margin-top: 0; }
.info-card p { font-size: .92rem; color: var(--ink-soft); margin: 0; }

/* ---------- about ---------- */
.about-intro { display: grid; grid-template-columns: .85fr 1.3fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: 240px 240px var(--radius) var(--radius); overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #fff, #f3e8f1 60%, #e9d5ef);
  display: grid; place-items: end center;
}
.portrait img { width: 78%; }
.portrait figcaption { position: absolute; top: 18px; left: 0; right: 0; text-align: center; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.about-intro h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.about-intro .lead { font-size: 1.15rem; }
.about-intro p { color: var(--ink-soft); }
.about-intro .lead { color: var(--ink); }
.prose-cols { columns: 2 320px; column-gap: 48px; color: var(--ink-soft); }
.prose-cols p { break-inside: avoid; }

.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.cred { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.cred .year { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); font-weight: 600; }
.cred h3 { font: 500 1.15rem/1.3 var(--font-serif); margin: .5em 0 .3em; }
.cred p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

.timeline { list-style: none; margin-top: 0; margin-bottom: 0; border-left: 2px solid var(--line); padding-left: 26px; display: grid; gap: 28px; max-width: 760px; margin-left: 6px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(#ef4444, #eab308, #22c55e, #3b82f6, #d946ef, #ef4444); }
.timeline .when { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.timeline h3 { font: 500 1.2rem/1.3 var(--font-serif); margin: .3em 0; }
.timeline p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

.cta-band {
  background: radial-gradient(ellipse at 10% 10%, rgba(124,58,237,.45), transparent 60%), var(--bg-dark);
  color: #fff; border-radius: var(--radius); padding: clamp(28px, 5vw, 48px);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 .2em; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { margin: 0; color: #ddd6e8; }

@media (max-width: 760px) {
  .page-hero-art { display: none; }
  .contact-page, .about-intro { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .btn { justify-self: stretch; }
  .portrait { max-width: 300px; width: 100%; margin: 0 auto; }
  .inline-form { flex-direction: column; }
}
@media (max-width: 640px) {
  .filters { gap: 12px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex-shrink: 0; }
}

/* =========================================================
   PHP VERSION ADDITIONS
   ========================================================= */
/* filter links (server-side filters use links, not buttons) */
.seg a, .chips a { font: 500 .85rem/1 var(--font-sans); color: var(--ink); text-decoration: none; }
.seg a { padding: 9px 18px; border-radius: 999px; }
.seg a.is-active { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.chips a { background: #fff; border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.chips a:hover { border-color: var(--ink-soft); }
.chips a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 640px) { .chips a { flex-shrink: 0; } }

.res-cover { text-decoration: none; }
.res-body h3 a { text-decoration: none; }
.res-body h3 a:hover { text-decoration: underline; }
.book-stack { display: block; }
.book-front > span { display: block; }
.book-title { font-family: var(--font-serif); font-size: clamp(1rem, 2.2vw, 1.5rem); line-height: 1.05; margin: 0 0 .4em; }
.book-sub { font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .8em; }
.book-author { font-family: var(--font-script); font-size: 1.1rem; margin-top: auto; }
.book-front .book-badge { display: inline-block; }
.details-link { color: var(--primary); margin-left: .4em; }

/* honeypot spam trap */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form, .form-grid, .inline-form { position: relative; }
.form-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 14px; font-size: .9rem; margin: 0; }
.form-grid .full { grid-column: 1 / -1; }

/* Instagram */
.icon-sm { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.insta-link, .footer-insta { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 500; text-decoration: none; }
.insta-link:hover span { text-decoration: underline; }
.footer-insta { color: inherit; }
.about-insta, .post-follow { margin-top: 1.4em; font-size: .95rem; }
.post-follow { padding: 16px 20px; background: var(--bg-soft); border-radius: var(--radius); }

/* resource detail */
.back-link-left { display: inline-block; margin-bottom: 28px; }
.detail-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.detail-cover {
  aspect-ratio: 3 / 4; max-width: 380px; width: 100%; justify-self: center; border-radius: 6px; padding: 14px;
  background: var(--bg); box-shadow: 0 24px 50px rgba(40,20,50,.22);
}
.detail-cover-inner {
  height: 100%; background: #fff; border-radius: 3px; padding: 10% 8%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.detail-cover-inner > * { display: block; }
.detail-cover-inner img { width: 40%; margin-bottom: 6%; }
.detail-cover-inner .book-title { font-size: clamp(1.3rem, 2.6vw, 1.9rem); }
.detail-cover-inner .book-sub { font-size: .62rem; }
.detail-cover-inner .book-author { font-size: 1.4rem; }
.detail-copy h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin-bottom: .2em; }
.detail-copy .subhead { font-size: 1.15rem; color: var(--ink-soft); }
.detail-meta { display: flex; align-items: center; gap: 14px; font-size: .9rem; color: var(--ink-soft); }
.badge-free-solid { background: var(--primary); color: #fff; }
.detail-copy .lead { font-size: 1.08rem; margin: 1em 0 1.6em; }
.detail-copy .tag-list { margin-top: 24px; }
.detail-body { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(28px, 5vw, 64px); margin-top: clamp(40px, 6vw, 72px); align-items: start; }
.info-heading { font: 500 1.4rem/1.2 var(--font-serif); margin-bottom: .8em; }
.detail-body .checklist li { font-size: .92rem; }

@media (max-width: 760px) {
  .detail-grid, .detail-body { grid-template-columns: 1fr; }
  .detail-cover { max-width: 260px; }
  .detail-copy .btn { width: 100%; }
}
