/*
Theme Name: Elanabelle Notes
Theme URI: https://write.kavicorner.uk/
Author: Elanabelle
Description: Warm ivory reading theme for Elanabelle. One column, one left edge, Source Serif 4. Keeps the SEO, structured data and hardening features from the Kavi Logs build.
Version: 2.0.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: elanabelle-notes
*/
/*
 * LAYOUT CONTRACT:
 *   one column, one left edge. Every text block on every template starts at the
 *   same left margin and is left aligned. The only centred thing on the site is
 *   the ring graphic on the home hero.
 *   reading measure: --measure (33em, ~66 characters at 19px)
 *   body: Source Serif 4, 19px / 1.66 (fonts/ is SIL Open Font License)
 *   palette: warm ivory ground, espresso ink, oxblood accent (#7d3b37),
 *            pink (#b8325f) only in the wordmark and on hover.
 */
:root {
  /* reading surface: warm ivory paper, espresso ink, oxblood as the working accent.
     Pink is reserved for the wordmark and hover states. */
  --night: #f8f4eb;      /* page ground */
  --deep: #f2ebdf;       /* raised ground */
  --ink: #2b2521;        /* body text, 13.4:1 */
  --muted: #5a5048;      /* secondary */
  --quiet: #6f6053;      /* metadata, 5.6:1 */
  --rose: #7d3b37;       /* working accent: oxblood, 8.0:1 */
  --pink: #b8325f;       /* wordmark and hover only, 5.2:1 */
  --pink-soft: rgba(184, 50, 95, .12);
  --ember: #6a2d35;      /* links, 9.4:1 */
  --paper: #efe7d9;      /* inverted band */
  --paper-ink: #2b2521;
  --line: #ddd3c4;
  --glow: rgba(125, 59, 55, .16);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --measure: 33em;       /* ~66 characters at 19px */
  --column: calc(var(--measure) + 2px);  /* every text column, everywhere */
  --body-size: 19px;
  --body-leading: 1.66;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/sourceserif4-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/sourceserif4-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/sourceserif4-600-normal.woff2") format("woff2");
}

* { box-sizing: border-box; }
html { background: var(--night); scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -16rem, rgba(125, 59, 55, .07) 0, transparent 34rem),
    radial-gradient(circle at 8% 40%, rgba(125, 59, 55, .04), transparent 26rem),
    linear-gradient(180deg, #fdfaf5 0%, var(--night) 62%);
  font-family: var(--serif);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-thickness: .06em; text-underline-offset: .2em; }
a:hover { color: var(--pink); }
.site-shell { width: min(1180px, calc(100% - 42px)); margin: 0 auto; }
.top-rune { justify-content: space-between;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--quiet);
  font: 700 .64rem/1.2 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.top-rune a { color: var(--muted); text-decoration: none; }
.top-rune a:hover { color: var(--pink); }
.site-header::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 1.55rem;
  background: linear-gradient(90deg, var(--pink-soft), transparent 62%);
}
.site-header {
  padding: 1.55rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-brand { color: var(--ink); text-decoration: none; font-size: 1.45rem; letter-spacing: -.035em; }
.site-brand span { color: var(--pink); }
.site-nav { display: flex; gap: clamp(.9rem, 3vw, 1.55rem); align-items: center; align-self: center; line-height: 1; padding-top: .18rem; font: 800 .66rem/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--pink); }
.home-hero { min-height: 560px; display: grid; grid-template-columns: .86fr 1.14fr; align-items: center; border-bottom: 1px solid var(--line); }
.lantern-field { display: grid; place-items: center; min-height: 520px; }
.lantern-ring {
  width: min(360px, 72vw);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(125, 59, 55, .26);
  border-radius: 50%;
  animation: lantern-breathe 5.5s ease-in-out infinite;
}
.lantern-ring::before, .lantern-ring::after { content: ""; position: absolute; border-radius: 50%; }
.lantern-ring::before { inset: 12%; border: 1px solid rgba(125, 59, 55, .5); }
.lantern-ring::after {
  inset: 27%;
  background: radial-gradient(circle, #fdf6e8 0 4%, #e8c9bd 10%, #b06a5e 25%, rgba(125, 59, 55, .22) 55%, transparent 70%);
  box-shadow: 0 0 90px var(--glow), inset 0 0 50px rgba(176, 106, 94, .2);
  filter: blur(2px);
}
.lantern-ring span { z-index: 2; color: var(--ink); background: rgba(251, 247, 240, .82); padding: .45rem .6rem; text-align: center; font: 800 .62rem/1.6 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
@keyframes lantern-breathe { 50% { transform: scale(1.025); box-shadow: 0 0 72px rgba(125, 59, 55, .08); } }
.hero-copy { padding-left: clamp(0rem, 5vw, 4rem); }
.eyebrow { margin: 0 0 .85rem; color: var(--rose); font: 800 .67rem/1.35 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.eyebrow .category-link { color: var(--rose); text-decoration: none; border-bottom: 1px solid transparent; }
.eyebrow .category-link:hover { color: var(--ember); border-bottom-color: currentColor; }
.hero-copy h1, .archive-prologue h2, .featured-main h2, .shelves-head h2, .archive-drawer h2, .single-hero h1, .empty-state h1 { text-wrap: balance; }
.hero-copy h1 { margin: 0; font-size: clamp(3.25rem, 6.8vw, 5.6rem); font-weight: 400; line-height: .92; letter-spacing: -.058em; }
.hero-deck { max-width: 36rem; margin: 1.35rem 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.text-link { display: inline-block; margin-top: 1.3rem; padding-bottom: .28rem; border-bottom: 1px solid var(--rose); color: var(--ember); font: 800 .7rem/1 var(--sans); letter-spacing: .12em; text-decoration: none; text-transform: uppercase; transition: letter-spacing .2s ease; }
.text-link:hover { letter-spacing: .18em; color: var(--pink); }
.archive-prologue { display: grid; grid-template-columns: 12rem 1fr; gap: 2rem; padding: 3.3rem 0 1.2rem; }
.archive-prologue h2 { margin: 0; max-width: 51rem; font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 400; line-height: 1.12; letter-spacing: -.045em; }
.featured-note { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.featured-main { padding: 2.8rem clamp(2rem, 5vw, 3.4rem) 2.8rem 0; border-right: 1px solid var(--line); }
.featured-main h2 { margin: .9rem 0 1.3rem; font-size: clamp(2.5rem, 4.7vw, 4.15rem); font-weight: 400; line-height: .95; letter-spacing: -.048em; }
.featured-main h2 a, .shelf-row h3 a, .next-note h3 a, .site-brand, .entry-title a { text-decoration: none; }
.featured-main p:not(.eyebrow) { max-width: 38rem; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.3rem; color: var(--quiet); font: 800 .66rem/1.35 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.note-meta a { color: var(--ember); text-decoration: none; }
.featured-aside { padding: 2.8rem 0 2.8rem clamp(2rem, 5vw, 3.4rem); }
.pull-quote { margin: 0 0 3rem; font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.28; }
.pull-quote::before { content: "“"; color: var(--rose); font-size: 3.8rem; line-height: 0; vertical-align: -1.05rem; margin-right: .18rem; }
.next-note { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.next-note h3 { margin: .75rem 0 0; font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 400; line-height: 1.14; }
.reading-shelves { padding: 3.8rem 0; }
.shelves-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; }
.shelves-head h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.1rem); font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.ghost-button { flex: 0 0 auto; border: 1px solid var(--line); padding: .78rem .95rem; color: var(--muted); background: transparent; text-decoration: none; font: 800 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.ghost-button:hover { border-color: var(--pink); color: var(--pink); }
.shelf-list { border-bottom: 1px solid var(--line); }
.shelf-row { display: grid; grid-template-columns: 9rem 1fr minmax(14rem, .75fr) 2.5rem; gap: 1.4rem; align-items: start; padding: 1.35rem 0; border-top: 1px solid var(--line); }
.shelf-kicker { color: var(--rose); font: 800 .65rem/1.45 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.shelf-kicker .shelf-category { display: inline-block; color: var(--rose); text-decoration: none; border-bottom: 1px solid transparent; }
.shelf-kicker .shelf-category:hover { color: var(--ember); border-bottom-color: currentColor; }
.shelf-kicker time { display: block; margin-top: .25rem; color: var(--quiet); }
.shelf-row h3 { margin: 0; font-size: clamp(1.45rem, 2.7vw, 1.9rem); font-weight: 400; line-height: 1.08; letter-spacing: -.03em; }
.shelf-row p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.shelf-row .arrow { justify-self: end; color: var(--rose); text-decoration: none; transition: transform .18s ease; }
.shelf-row:hover h3 a { color: var(--pink); }
.shelf-row:hover .arrow { transform: translateX(.35rem); }
.archive-drawer { margin: 0 calc(50% - 50%); width: 100%; padding: 4rem max(24px, calc((100% - 1180px) / 2)); display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; background: var(--paper); color: var(--paper-ink); }
.archive-drawer .eyebrow { color: var(--rose); }
.archive-drawer h2 { margin: 0; font-size: clamp(2.25rem, 5vw, 3.15rem); font-weight: 400; line-height: 1.04; letter-spacing: -.045em; }
.archive-drawer p:not(.eyebrow) { margin: .8rem 0 0; color: var(--muted); }
.drawer-links { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: flex-end; }
.drawer-links a { border: 1px solid var(--paper-ink); padding: .9rem 1rem; color: inherit; text-decoration: none; font: 800 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.drawer-links a:hover { background: #2b1c21; color: #fff; }
.pagination, .post-nav { margin: 2rem 0; color: var(--muted); font: 800 .72rem/1.5 var(--sans); letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.single-note, .empty-state { width: min(var(--column), 100%); margin: 2.6rem auto 0; }
.single-hero { padding: 3rem 0 2rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry-title { margin: .7rem 0 .8rem; font-size: clamp(2.2rem, 6vw, 3.9rem); font-weight: 400; line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.entry-meta { color: var(--quiet); font: 800 .68rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.entry-content { padding: 2rem 0 1rem; color: var(--ink); }
.entry-content > * { max-width: 100%; }
.entry-content > p, .entry-content > ul, .entry-content > ol,
.entry-content > blockquote, .entry-content > h2, .entry-content > h3,
.entry-content > h4, .entry-content > pre, .entry-content > figure,
.page .linktree-intro { max-width: var(--measure); }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.2rem; }
.entry-content > p:first-of-type::first-letter {
  float: left;
  margin: .08rem .42rem 0 0;
  color: var(--rose);
  font-size: 3.6em;
  line-height: .86;
  font-weight: 400;
}
@media (max-width: 560px) {
  .entry-content > p:first-of-type::first-letter { font-size: 3.1em; }
}
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 2.1rem 0 .85rem; color: var(--ink); font-weight: 400; line-height: 1.1; letter-spacing: -.03em; }
.entry-content h2 { font-size: clamp(1.85rem, 4vw, 2.5rem); }
.entry-content h3 { font-size: clamp(1.45rem, 3vw, 1.85rem); }
.entry-content blockquote { margin: 1.8rem 0; padding-left: 1.2rem; border-left: 1px solid var(--rose); color: var(--ember); font-size: 1.18rem; }
.entry-content img { max-width: 100%; height: auto; border-radius: 1rem; }
.entry-content a { color: var(--ember); }
.entry-content code, .entry-content pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.entry-content pre { overflow-x: auto; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(36, 26, 20, .05); }
.post-nav { width: min(var(--column), 100%); margin-left: auto; margin-right: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; text-align: left; }
.post-nav div:last-child { text-align: right; }
.post-nav a { color: var(--muted); text-decoration: none; }
.post-nav a:hover { color: var(--pink); }
.page-note .entry-content { color: var(--ink); }
.page .linktree-intro { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.6rem; }
.page .linktree-section { margin: 2rem 0 .75rem; color: var(--ink); font-size: clamp(1.45rem, 4vw, 2rem); letter-spacing: -.025em; }
.page .link-card { margin: 1rem 0 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(125, 59, 55, .04); }
.page .link-card .link-title { margin: 0 0 .45rem; line-height: 1.35; }
.page .link-card .link-title a { display: block; color: var(--ember); font-family: var(--sans); font-weight: 760; letter-spacing: -.01em; }
.page .link-card .link-desc { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.55; }
.site-footer { padding: 2rem 0 4.2rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--quiet); font: 800 .64rem/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
/* mobile tap targets: nav and utility links get a real hit area, not just the glyph */
.site-nav a, .top-rune a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; scroll-behavior: auto !important; transition-duration: .001ms !important; } }
@media (max-width: 880px) {
  .home-hero { grid-template-columns: 1fr; min-height: auto; }
  .lantern-field { min-height: 330px; }
  .lantern-ring { width: min(280px, 72vw); }
  .hero-copy { padding: 0 0 3rem; }
  .archive-prologue { grid-template-columns: 1fr; gap: .4rem; }
  .featured-note { grid-template-columns: 1fr; }
  .featured-main { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .featured-aside { padding-left: 0; }
  .shelf-row { grid-template-columns: 7rem 1fr 2rem; }
  .shelf-row p { display: none; }
  .archive-drawer { grid-template-columns: 1fr; }
  .drawer-links { justify-content: flex-start; }
}
@media (max-width: 560px) {
  /* the spec's 19px is the mobile reading size, so it holds here too */
  body { font-size: 19px; }
  .site-shell { width: calc(100% - 24px); }
  .top-rune { justify-content: flex-start; text-align: left; }
  .top-rune span { display: none; }
  .site-header { align-items: flex-start; }
  .site-nav { gap: .85rem; font-size: .6rem; }
  .site-brand { font-size: 1.22rem; }
  .hero-copy h1 { font-size: 3.25rem; }
  .archive-prologue h2 { font-size: 1.7rem; }
  .note-meta { display: block; line-height: 2; }
  .shelves-head { display: block; }
  .ghost-button { display: inline-block; margin-top: 1rem; }
  .shelf-row { grid-template-columns: 1fr 2rem; gap: .7rem; }
  .shelf-kicker { grid-column: 1 / -1; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav div:last-child { text-align: left; }
  .site-footer { display: block; line-height: 2; }
}

.site-footer-link { color: inherit; text-decoration: none; display: contents; }
.site-footer-link:hover span { opacity: .75; }
/* Archive index for an optional Links page. */

.page .archive-index {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  counter-reset: none;
}

.page .archive-index-item {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: .2rem 1rem;
  align-items: baseline;
  padding: .85rem .2rem;
  border-bottom: 1px solid var(--line);
}

.page .archive-index-item:last-child { border-bottom: 0; }

.page .archive-index-num {
  font: 800 .72rem/1.6 var(--sans);
  letter-spacing: .1em;
  color: var(--quiet);
  text-align: right;
}

.page .archive-index-body { display: block; min-width: 0; }

.page .archive-index-title {
  display: block;
  color: var(--ember);
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.4;
  text-decoration: none;
}

.page .archive-index-title:hover { color: var(--rose); text-decoration: underline; }

.page .archive-index-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .3rem;
  font: 800 .6rem/1.5 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--quiet);
}

.page .archive-index-cat { color: var(--muted); }

.page .archive-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.8rem 0 .5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.page .archive-pager-count {
  font: 800 .62rem/1.5 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--quiet);
}

@media (max-width: 560px) {
  .page .archive-index-item { grid-template-columns: 2rem 1fr; gap: .15rem .7rem; }
  .page .archive-pager { flex-direction: column; align-items: stretch; text-align: left; }
}
/* Home-page shelf pager. */

.reading-shelves .shelf-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.6rem;
}

.reading-shelves .shelf-pager a {
  display: inline-block;
  border: 1px solid var(--line);
  padding: .95rem 1.15rem;
  color: var(--ember);
  background: transparent;
  text-decoration: none;
  font: 800 .66rem/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: border-color .2s ease, letter-spacing .2s ease;
}

.reading-shelves .shelf-pager a:hover {
  border-color: var(--rose);
  letter-spacing: .16em;
}

@media (max-width: 560px) {
  .reading-shelves .shelf-pager {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .reading-shelves .shelf-pager a {
    width: 100%;
  }
}

/* Elanabelle additions: accessibility, pagination, privacy link, 404 and empty states. */
a:focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: .75rem;
  z-index: 100;
  padding: .7rem 1rem;
  background: var(--ink);
  color: var(--night);
  font: 800 .7rem/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible { left: .75rem; outline: 2px solid var(--rose); outline-offset: 2px; color: var(--night); }
.site-main:focus { outline: none; }
.archive-prologue h1.eyebrow { margin: 0 0 .85rem; }
.pagination { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: .6rem 2rem; }
.pagination a { color: var(--ember); text-decoration: none; }
.pagination a:hover { color: var(--pink); }
.pagination .page-count { color: var(--quiet); }
.entry-meta time, .entry-meta .byline, .entry-meta .updated-wrap { white-space: nowrap; }
.empty-home-note { margin: 2rem 0; color: var(--muted); font-style: italic; }
.shelf-list > .empty-home-note { margin: 0; padding: 1.35rem 0; border-top: 1px solid var(--line); }
.error404 .empty-state { min-height: 52vh; display: grid; align-content: center; justify-items: start; }
.error404 .empty-state h1 { margin: 0 0 .6rem; font-size: clamp(2.2rem, 6vw, 3.9rem); font-weight: 400; line-height: 1.02; letter-spacing: -.035em; }
.error404 .empty-state p { color: var(--muted); }
.lost-links { margin-top: 2.4rem; }
.lost-links ul { margin: 0; padding: 0; list-style: none; }
.lost-links li { margin: .45rem 0; }
.lost-links a { color: var(--ember); text-decoration: none; }
.lost-links a:hover { color: var(--pink); }
.site-footer { flex-wrap: wrap; }
.site-footer-privacy { color: inherit; text-decoration: none; }
.site-footer-privacy:hover { color: var(--pink); }
@media (max-width: 560px) { .site-footer-link span, .site-footer-privacy { display: block; } }
