/* The Logoluv journal look (from logoluv_redesign/): warm paper, ink rules, square corners, Instrument Serif
   headlines and Work Sans text in a vermilion red. --brand is only for large type and rules; small red text
   uses --brand-ink, so every text colour below passes WCAG AA on its background. */
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-weight: 400; font-display: swap; src: url("/fonts/work-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-weight: 500; font-display: swap; src: url("/fonts/work-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-weight: 600; font-display: swap; src: url("/fonts/work-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #f8f3e8;
  --card: #fdfaf3;
  --soft: #ebe4d6;
  --ink: #15110d;
  --muted: #5e534a;
  --line: rgb(21 17 13 / 18%);
  --brand: #e62e1e;
  --brand-ink: #c21b0d;
  --radius: 4px;
  /* Colour emoji fonts last, so ❤ and ☀ draw in colour instead of borrowing a text font's black glyph */
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol";
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif, var(--emoji);
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif, var(--emoji);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
a:hover { color: var(--brand-ink); }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; text-wrap: balance; }
em { font-style: italic; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: var(--ink); color: var(--bg); z-index: 10; }
.skip:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.bleed { margin-inline: calc(50% - 50vw); }
.eyebrow { margin: 0; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { text-decoration: none; }
.meta { margin: 0; font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.chip { display: inline-flex; margin: 0; color: var(--brand-ink); font: 500 0.75rem/1.5 var(--sans); letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none; }
.chip a { text-decoration: none; color: inherit; }

/* Masthead */
.masthead { position: sticky; top: 0; z-index: 5; background: rgb(248 243 232 / 94%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ink); }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem; padding-top: 14px; padding-bottom: 14px; }
.wordmark { font: 2rem/1 var(--serif); text-decoration: none; }
.wordmark em, .footer .wordmark em { color: var(--brand); }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; gap: 0.25rem 2rem; margin-left: auto; overflow-x: auto; font-size: 0.8125rem; letter-spacing: 0.15em; text-transform: uppercase; }
.nav a { padding: 0.5rem 0; text-decoration: none; white-space: nowrap; }
.nav a[aria-current] { color: var(--brand-ink); box-shadow: inset 0 -2px var(--brand); }
@media (max-width: 1023px) { .nav { order: 3; width: 100%; margin-left: 0; } }

/* Search box (masthead, home hero, search page) */
.site-search { display: flex; flex: 1 1 220px; max-width: 340px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--card); }
.site-search:focus-within { border-color: var(--brand-ink); box-shadow: 0 0 0 2px var(--brand); }
.site-search input { flex: 1; min-width: 0; padding: 0.55rem 0 0.55rem 0.9rem; border: 0; background: none; font: inherit; font-size: 0.875rem; color: inherit; }
.site-search input:focus { outline: none; }
.site-search button { padding: 0 1rem; border: 0; border-left: 1px solid var(--ink); background: var(--ink); color: var(--bg); font: 500 0.75rem var(--sans); letter-spacing: 0.15em; text-transform: uppercase; cursor: pointer; }
.site-search button:hover { background: var(--brand-ink); }
.site-search.big { max-width: 620px; margin-top: 2rem; }
.site-search.big input { padding: 1rem 0 1rem 1.25rem; font-size: 1.0625rem; }
.site-search.big button { padding: 0 1.75rem; }
@media (max-width: 639px) { .site-search.compact { order: 2; max-width: none; flex-basis: 100%; } }

/* Home hero, archive headers */
.hero { padding: 56px 0 32px; border-bottom: 1px solid var(--ink); margin-bottom: 48px; }
.hero h1 { margin: 1rem 0 0; font-size: clamp(2.6rem, 6vw, 4.5rem); max-width: 18ch; }
.hero h1 em, .section-head h2 em { color: var(--brand); }
.hero p:not(.eyebrow, .meta) { max-width: 60ch; margin: 1.25rem 0 0; color: var(--muted); font-size: 1.125rem; }
.hero .meta { margin-top: 1rem; }
.hero.home { border: 0; margin-bottom: 0; padding: 80px 0 64px; }
.hero.home h1 { font-size: clamp(3.4rem, 9vw, 6.5rem); line-height: 0.95; max-width: 14ch; }

/* Ticker of brands the site has written about. Decorative (aria-hidden); still under reduced motion. */
.marquee { overflow: hidden; padding: 16px 0; border-block: 1px solid var(--ink); background: var(--ink); color: var(--bg); }
.marquee div { display: flex; width: max-content; gap: 3rem; font: italic 1.9rem/1.2 var(--serif); white-space: nowrap; animation: marquee 40s linear infinite; }
.marquee:hover div { animation-play-state: paused; }
.marquee span::after { content: "✺"; margin-left: 3rem; color: var(--brand); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Section headings */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.5rem 1rem; margin: 72px 0 40px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.section-head h2 { margin: 0; font-size: clamp(2rem, 4vw, 2.75rem); }

/* Cards */
.grid { display: grid; gap: 48px 32px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 20px; }
.card > div { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--ink); background: var(--card); }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms; }
.card:hover .card-img img { transform: scale(1.05); }
.card:hover h2 a { color: var(--brand-ink); }
.glyph-card { display: grid; place-items: center; background: var(--soft); font: 3.5rem/1 var(--emoji); text-decoration: none; }
.card h2 { margin: 0.1rem 0 0; font-size: 1.75rem; line-height: 1.1; }
.card h2 a { text-decoration: none; }
.card p.excerpt { margin: 0; color: var(--muted); font-size: 0.9375rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; padding-top: 0.25rem; }
.feature h2 { font-size: clamp(2.2rem, 4vw, 3.25rem); }
.feature p.excerpt { -webkit-line-clamp: 4; font-size: 1.0625rem; max-width: 60ch; }

/* Home: lead story beside a column of smaller ones */
.stories { display: grid; gap: 48px; margin-bottom: 72px; }
.stories .side { display: flex; flex-direction: column; gap: 32px; }
.stories .side .card { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.stories .side .card:last-child { padding-bottom: 0; border: 0; }
.stories .side .card-img { aspect-ratio: 1; }
.stories .side h2 { font-size: 1.5rem; }
.stories .side .excerpt { -webkit-line-clamp: 2; font-size: 0.875rem; }
@media (min-width: 1024px) { .stories { grid-template-columns: 3fr 2fr; } }

/* Home: numbered category strip */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); border-block: 1px solid var(--ink); background: var(--soft); }
.pillars a { display: flex; flex-direction: column; gap: 0.75rem; padding: 48px 24px; border-right: 1px solid var(--ink); text-decoration: none; }
.pillars a:last-child { border-right: 0; }
.pillars a:hover { background: var(--bg); color: var(--ink); }
.pillar-n { font: italic 3.75rem/1 var(--serif); color: var(--brand-ink); }
.pillar-t { font: 2rem/1.05 var(--serif); }
.pillar-d { font-size: 0.875rem; color: var(--muted); }
@media (max-width: 639px) { .pillars a { border-right: 0; border-bottom: 1px solid var(--ink); padding: 32px 24px; } .pillars a:last-child { border-bottom: 0; } }

/* Home: call to action */
.cta { margin-top: 96px; margin-bottom: -80px; background: var(--brand-ink); color: var(--bg); }
.cta .wrap { display: grid; gap: 40px; align-items: center; padding-block: 96px; }
@media (min-width: 860px) { .cta .wrap { grid-template-columns: 1fr 1fr; } }
.cta h2 { margin: 0; font-size: clamp(2.8rem, 6vw, 4.5rem); line-height: 1; }
.cta p { margin: 0; font-size: 1.125rem; }
.button { display: inline-block; margin-top: 2rem; padding: 1rem 2rem; border: 1px solid var(--bg); background: var(--bg); color: var(--brand-ink); font-size: 0.8125rem; letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none; transition: background 200ms, color 200ms; }
.button:hover { background: transparent; color: var(--bg); }
.cta :focus-visible { outline-color: var(--bg); }

/* Pagination */
.pager { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 64px 0 0; font-size: 0.875rem; }
.pager a, .pager span { min-width: 2.75rem; padding: 0.6rem 0.9rem; text-align: center; border: 1px solid var(--ink); border-radius: var(--radius); text-decoration: none; }
.pager a:hover { background: var(--card); }
.pager [aria-current] { background: var(--ink); color: var(--bg); }

/* Articles */
.article { max-width: 760px; margin: 0 auto; padding: 48px 0 0; }
.crumbs { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs .chip { font-size: inherit; }
.article > h1 { margin: 1rem 0 1.25rem; font-size: clamp(2.6rem, 6vw, 4rem); }
.byline { margin: 0 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--ink); font-size: 0.875rem; color: var(--muted); }
.byline a { color: var(--ink); font-weight: 600; text-decoration: none; }
.lead-img { margin: 0 0 40px; }
.lead-img img { display: block; width: 100%; border: 1px solid var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--ink); }
.tags a { padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.tags a:hover { border-color: var(--brand-ink); }
.author-box { display: flex; gap: 20px; align-items: flex-start; margin-top: 40px; padding: 24px; border: 1px solid var(--ink); background: var(--soft); }
.author-box p { margin: 0.15rem 0 0; font-size: 0.9375rem; }
.author-box a { color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.author-box .eyebrow { margin-bottom: 0.25rem; }
.author-name { font: 1.75rem/1.1 var(--serif); }
.author-name a { color: var(--ink); font-weight: 400; }
.avatar { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--ink); background: var(--bg); color: var(--brand-ink); font: italic 1.5rem var(--serif); }
.related > h2 { margin: 0; }

/* WordPress content */
.prose { font-size: 1.125rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin-bottom: 0; }
.prose h1, .prose h2 { margin-top: 1.6em; font-size: 2.4rem; }
.prose h3 { margin-top: 1.5em; font-size: 1.85rem; }
.prose h4 { font-size: 1.4rem; }
.prose a { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { margin-left: 0; padding: 0.25em 0 0.25em 1.25em; border-left: 3px solid var(--brand); font: italic 1.6rem/1.3 var(--serif); }
.prose hr, .prose .wp-block-separator { border: 0; border-top: 1px solid var(--ink); margin: 2.5em auto; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose img { border: 1px solid var(--line); }
.prose figcaption, .prose .wp-caption-text { margin-top: 0.5rem; font: 0.8125rem/1.5 var(--sans); color: var(--muted); text-align: center; }
.prose .wp-caption { max-width: 100%; }
.prose table { width: 100%; border-collapse: collapse; font: 0.9375rem/1.5 var(--sans); }
.prose th, .prose td { padding: 0.6rem 0.75rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--soft); }
.prose .wp-block-table { overflow-x: auto; }
.prose .wp-block-gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.prose .wp-block-gallery figure { margin: 0; }
.prose .wp-block-gallery.is-cropped img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.prose .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }

/* Emoji pages */
.emoji-page { padding-top: 40px; }
.emoji-hero { max-width: 760px; margin: 1rem 0 32px; }
.emoji-hero h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 4.5rem); }
.hero-glyph { font-family: var(--emoji); }
.emoji-hero p { margin: 1rem 0 0; color: var(--muted); font-size: 1.0625rem; }
.emoji-bar { position: sticky; top: 61px; z-index: 4; display: flex; flex-direction: column; gap: 10px; margin: 0 -24px 24px; padding: 12px 24px; background: rgb(248 243 232 / 94%); backdrop-filter: blur(8px); border-block: 1px solid var(--ink); }
@media (max-width: 1023px) { .emoji-bar { position: static; } }
.filter input { width: 100%; max-width: 520px; padding: 0.7rem 1rem; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--card); font: inherit; color: inherit; }
.filter input:focus { outline: none; border-color: var(--brand-ink); box-shadow: 0 0 0 2px var(--brand); }
.filter.big input { max-width: 620px; margin-top: 2rem; padding: 1rem 1.25rem; font-size: 1.0625rem; }
.chips, .jump { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.chips a, .jump a { flex: none; padding: 0.4rem 0.85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font-size: 0.8125rem; text-decoration: none; white-space: nowrap; }
.chips a:hover, .jump a:hover { border-color: var(--ink); }
.chips a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips span { font-family: var(--emoji); }
.jump { flex-wrap: wrap; overflow: visible; margin-bottom: 8px; }
.jump a { background: var(--soft); }
.emoji-section { padding: 16px 0 24px; }
.emoji-section h2 { margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); font-size: 2.25rem; }
.emoji-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.emo { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: transform 150ms, border-color 150ms; }
.emo:hover { border-color: var(--ink); transform: translateY(-2px); }
.emo:active { transform: scale(0.96); }
.glyph { font: 2.4rem/1.1 var(--emoji); }
.emo-name { font-size: 0.75rem; line-height: 1.3; color: var(--muted); text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.emoji-about { max-width: 70ch; margin-top: 20px; color: var(--muted); font-size: 0.9375rem; }
.emoji-about p { margin: 0 0 0.75em; }
.emoji-about.wide { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--ink); }
.emoji-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.etile { display: flex; flex-direction: column; gap: 4px; padding: 24px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); text-decoration: none; }
.etile:hover { background: var(--soft); color: var(--ink); }
.etile-glyphs { margin-bottom: 12px; font: 1.9rem/1 var(--emoji); letter-spacing: 0.05em; }
.etile-t { font: 1.75rem/1.1 var(--serif); }
.etile-n { font-size: 0.8125rem; color: var(--muted); }
.empty { margin: 24px 0; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; margin: 0; padding: 0.75rem 1.25rem; background: var(--ink); color: var(--bg); font-size: 0.875rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0; transform: translate(-50%, 12px); transition: opacity 200ms, transform 200ms; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Footer */
.footer { margin-top: 80px; padding: 40px 0; border-top: 1px solid var(--ink); font-size: 0.875rem; color: var(--muted); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer .wordmark { font-size: 1.5rem; color: var(--ink); }
.footer p { margin: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer nav a { color: var(--ink); text-decoration: none; }
.footer nav a:hover { color: var(--brand-ink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
