/* Harmony Acres: a printed farm journal. Warm paper, deep forest, ochre accents. */

@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces-latin-opsz-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }

:root {
  --paper: #f6f1e7;
  --paper-2: #efe6d4;
  --card: #fffdf8;
  --ink: #231d17;
  --soil: #3a2a1d;
  --forest: #24321f;
  --forest-2: #2f4228;
  --leaf: #5b7a45;
  --ochre: #c4862f;
  --muted: #776b5d;
  --line: #e0d5bf;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.01em; font-variation-settings: "opsz" 144; }
p { margin: 0 0 1em; }
::selection { background: var(--ochre); color: #fff; }

.eyebrow { font: 600 0.74rem/1.2 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ochre); margin: 0 0 14px; }
.eyebrow.light { color: rgba(255, 248, 235, 0.9); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font: 600 0.92rem/1 var(--sans);
  letter-spacing: 0.02em; text-decoration: none; background: var(--forest); color: #fff; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s; }
.btn:hover { transform: translateY(-2px); }
.btn-light { background: var(--paper); color: var(--forest); }
.btn-light:hover { background: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px, 4vw, 48px); background: rgba(246, 241, 231, 0.88); backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid rgba(224, 213, 191, 0.7);
  transition: background 0.35s, border-color 0.35s, color 0.35s, padding 0.35s; }
.top.over-hero { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; color: #fff;
  backdrop-filter: none; -webkit-backdrop-filter: none; }
.top.over-hero.scrolled { background: rgba(246, 241, 231, 0.92); color: var(--ink); border-color: rgba(224, 213, 191, 0.7);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 500 1.25rem/1 var(--serif); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: currentColor; opacity: 0.9; transform: rotate(-45deg);
  -webkit-mask: radial-gradient(circle at 70% 30%, transparent 3px, #000 3.5px); mask: radial-gradient(circle at 70% 30%, transparent 3px, #000 3.5px); }
.top nav { display: flex; gap: clamp(14px, 3vw, 32px); font: 500 0.88rem/1 var(--sans); letter-spacing: 0.02em; }
.top nav a { text-decoration: none; opacity: 0.85; position: relative; padding: 6px 0; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.top nav a:hover { opacity: 1; }
.top nav a:hover::after { transform: scaleX(1); }
.brand, .top nav a { white-space: nowrap; }
@media (max-width: 520px) { .top { padding-left: 16px; padding-right: 16px; } .brand { font-size: 1.05rem; gap: 8px; } .brand-mark { width: 18px; height: 18px; } .top nav { gap: 12px; font-size: 0.8rem; } }
@media (max-width: 350px) { .top nav a[href="/#about"] { display: none; } }

/* ---------- heroes ---------- */
.hero { position: relative; overflow: hidden; background: var(--forest); color: #fff; display: flex; align-items: flex-end; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: settle 2.4s var(--ease) both; }
@keyframes settle { from { transform: scale(1.06); opacity: 0.6; } to { transform: scale(1); opacity: 1; } }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(20, 26, 16, 0.45) 0%, rgba(20, 26, 16, 0) 28%, rgba(20, 26, 16, 0) 45%, rgba(20, 26, 16, 0.78) 100%); }
.hero-content { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) clamp(48px, 9vh, 96px);
  animation: rise 1.2s 0.2s var(--ease) both; }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.hero h1 { font-size: clamp(3rem, 10vw, 7.5rem); font-weight: 350; line-height: 0.95; letter-spacing: -0.03em; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25); }
.hero-home { min-height: 100svh; }
.hero-home .hero-content { padding-bottom: clamp(110px, 16vh, 170px); }
.hero-tagline { font: italic 300 clamp(1.15rem, 2.4vw, 1.6rem)/1.35 var(--serif); margin: 18px 0 30px; max-width: 30ch; color: rgba(255, 250, 240, 0.92); }
.scroll-cue { display: none; position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(255, 255, 255, 0.6); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: cue 1.8s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 700px) { .scroll-cue { display: none; } }
.hero-story { min-height: 78svh; }
.hero-story h1 { font-size: clamp(2.6rem, 8vw, 6rem); }
.hero-meta { margin: 16px 0 0; font: 500 0.88rem/1 var(--sans); letter-spacing: 0.06em; color: rgba(255, 250, 240, 0.8); }
.hero:not(:has(> img)) { min-height: 50svh; background: radial-gradient(ellipse at 30% 20%, var(--forest-2), var(--forest)); }

/* ---------- facts ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px);
  position: relative; z-index: 2; transform: translateY(-50%); }
.fact { background: var(--card); padding: 26px 22px; border: 1px solid var(--line); border-right-width: 0; text-align: center; }
.fact:first-child { border-radius: 14px 0 0 14px; }
.fact:last-child { border-right-width: 1px; border-radius: 0 14px 14px 0; }
.fact strong { display: block; font: 400 clamp(1.8rem, 3.5vw, 2.6rem)/1 var(--serif); color: var(--forest); margin-bottom: 8px; }
.fact span { font-size: 0.82rem; color: var(--muted); line-height: 1.35; display: block; }
@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, 1fr); transform: none; margin-top: -40px; gap: 0; }
  .fact { border-right-width: 1px; border-radius: 0 !important; border-top-width: 0; }
  .fact:nth-child(odd) { border-right-width: 0; }
  .fact:nth-child(1) { border-radius: 14px 0 0 0 !important; border-top-width: 1px; }
  .fact:nth-child(2) { border-radius: 0 14px 0 0 !important; border-top-width: 1px; }
  .fact:nth-last-child(2):nth-child(odd) { border-radius: 0 0 0 14px !important; }
  .fact:last-child:nth-child(even) { border-radius: 0 0 14px 0 !important; }
}

/* ---------- intro ---------- */
.intro { padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 48px) clamp(64px, 10vw, 120px); }
.intro-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.intro-inner p { font: 300 clamp(1.35rem, 2.8vw, 2.05rem)/1.45 var(--serif); color: var(--soil); letter-spacing: -0.005em; }
.intro-inner p:first-child::before { content: ""; display: block; width: 48px; height: 2px; background: var(--ochre); margin: 0 auto 36px; }

/* ---------- journey ---------- */
.journey { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) clamp(64px, 10vw, 120px); }
.section-head { text-align: center; margin-bottom: clamp(40px, 7vw, 80px); }
.section-head h2 { font-size: clamp(2.6rem, 6vw, 4.5rem); color: var(--forest); }
.section-sub { color: var(--muted); margin: 14px 0 0; font-size: 1.02rem; }
.empty { text-align: center; color: var(--muted); }
.chapter { padding-top: clamp(32px, 5vw, 56px); margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); }
.chapter:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.chapter-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.chapter-num { font: 600 0.74rem/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ochre); }
.chapter-head h3 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--soil); }

.cards { display: grid; gap: clamp(14px, 2vw, 24px); grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-1 { grid-template-columns: 1fr; }
@media (max-width: 960px) { .cards, .cards-2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards, .cards-2 { grid-template-columns: 1fr; } }
.cards.cards-1 { grid-template-columns: 1fr; }
.card { position: relative; display: block; border-radius: 16px; overflow: hidden; text-decoration: none; color: #fff; background: var(--forest);
  aspect-ratio: 4 / 5; box-shadow: 0 1px 2px rgba(35, 29, 23, 0.06), 0 12px 32px -18px rgba(35, 29, 23, 0.45); isolation: isolate; }
.card-wide { aspect-ratio: 21 / 9; }
@media (max-width: 560px) { .card { aspect-ratio: 4 / 3; } .card-wide { aspect-ratio: 4 / 3; } }
.card-img, .card-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-img img { object-fit: cover; transition: transform 1.2s var(--ease); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 26, 16, 0) 40%, rgba(20, 26, 16, 0.82) 100%); z-index: 0; transition: opacity 0.4s; }
.card-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 22px 20px; z-index: 1; }
.card h4 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.1; }
.card-wide h4 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
.card p { margin: 8px 0 0; font-size: 0.8rem; letter-spacing: 0.06em; color: rgba(255, 250, 240, 0.8); }
.card-cta { display: inline-block; margin-top: 12px; font: 600 0.8rem/1 var(--sans); letter-spacing: 0.04em; opacity: 0; transform: translateY(6px); transition: all 0.4s var(--ease); }
.card:hover .card-img img { transform: scale(1.05); }
.card:hover .card-cta, .card:focus-visible .card-cta { opacity: 1; transform: none; }
@media (hover: none) { .card-cta { opacity: 0.9; transform: none; } }

/* ---------- about ---------- */
.about { max-width: var(--wrap); margin: 0 auto; padding: clamp(64px, 10vw, 120px) clamp(16px, 4vw, 48px); display: grid; gap: clamp(32px, 6vw, 88px);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; border-top: 1px solid var(--line); }
.about-photo .frame { position: relative; max-width: 420px; }
.about-photo .frame::before { content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 1.5px solid var(--ochre); border-radius: 18px; z-index: 0; }
.about-photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; box-shadow: 0 24px 60px -30px rgba(35, 29, 23, 0.5); }
.about-text h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); color: var(--forest); margin-bottom: 22px; }
.about-text p:not(.eyebrow) { font-size: 1.08rem; color: #3d342b; max-width: 52ch; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about-photo .frame { max-width: 78%; } }

/* ---------- visit ---------- */
.visit { background: var(--forest); color: #fff; position: relative; overflow: hidden; }
.visit::before { content: ""; position: absolute; width: 640px; height: 640px; right: -180px; top: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 134, 47, 0.22), transparent 65%); }
.visit-inner { position: relative; max-width: var(--wrap); margin: 0 auto; padding: clamp(72px, 11vw, 132px) clamp(16px, 4vw, 48px); }
.visit h2 { font-size: clamp(2.6rem, 6vw, 4.5rem); margin-bottom: 18px; }
.visit-location { font: italic 300 clamp(1.2rem, 2.4vw, 1.6rem)/1.4 var(--serif); color: rgba(255, 250, 240, 0.9); max-width: 34ch; }
.visit-directions { max-width: 60ch; color: rgba(255, 250, 240, 0.8); }
.visit-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- footer ---------- */
.foot { background: #1b2617; color: rgba(255, 250, 240, 0.78); padding: 56px clamp(16px, 4vw, 48px) 96px; font-size: 0.92rem; }
.foot-inner { max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.foot-brand { font: 400 1.6rem/1 var(--serif); color: #fff; margin-bottom: 12px; }
.foot-muted { color: rgba(255, 250, 240, 0.5); }
.foot-nav { display: flex; flex-direction: column; gap: 10px; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: #fff; }
.foot-small { max-width: var(--wrap); margin: 40px auto 0; font-size: 0.8rem; }

/* ---------- story ---------- */
.draft-banner { background: #fff3cd; padding: 10px 16px; text-align: center; font-size: 0.92rem; position: relative; z-index: 30; }
.story-lede { max-width: 760px; margin: 0 auto; padding: clamp(48px, 8vw, 88px) clamp(16px, 4vw, 48px) 0; }
.story-lede p { font: 300 clamp(1.3rem, 2.6vw, 1.85rem)/1.5 var(--serif); color: var(--soil); }
.essay { max-width: var(--wrap); margin: 0 auto; padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 48px) clamp(48px, 8vw, 96px); }
.essay-text { max-width: 680px; margin: 0 auto clamp(32px, 5vw, 56px); font-size: 1.1rem; color: #3d342b; }
.essay-text p:first-child::first-letter { float: left; font: 400 4.4em/0.8 var(--serif); color: var(--forest); margin: 0.08em 0.12em 0 0; }
.year-marker { display: flex; align-items: center; gap: 20px; margin: clamp(40px, 7vw, 80px) 0 clamp(24px, 4vw, 40px); color: var(--ochre); }
.year-marker::before, .year-marker::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.year-marker span { font: 300 clamp(2.4rem, 6vw, 4.2rem)/1 var(--serif); letter-spacing: -0.02em; color: var(--forest); }
.essay > .year-marker:first-child { margin-top: 0; }
.row-wide, .row-pair, .row-single { margin: 0 auto clamp(20px, 3vw, 36px); }
.row-wide { max-width: 1100px; }
.row-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 2vw, 24px); max-width: 1040px; }
.row-single { max-width: 560px; }
.photo { margin: 0; }
.photo a { display: block; border-radius: 10px; overflow: hidden; background: var(--paper-2); cursor: zoom-in; }
.photo img { width: 100%; transition: transform 0.9s var(--ease), opacity 0.6s; }
.photo a:hover img { transform: scale(1.015); }
.row-single .photo img { aspect-ratio: 3 / 4; object-fit: cover; }
.pair-tall .photo img { aspect-ratio: 3 / 4; object-fit: cover; }
.pair-flat .photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.row-wide .photo img { max-height: 82vh; object-fit: cover; }
figcaption { display: flex; justify-content: space-between; gap: 16px; padding: 10px 2px 0; font-size: 0.84rem; color: var(--muted); }
figcaption time { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; white-space: nowrap; margin-left: auto; }
.video { margin: 0 auto clamp(24px, 4vw, 44px); max-width: 900px; }
.video .frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.video.is-vertical { max-width: 380px; }
.video.is-vertical .frame { aspect-ratio: 9 / 16; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video video { object-fit: contain; background: #000; }

.next-story { position: relative; display: flex; align-items: flex-end; min-height: 56svh; overflow: hidden; color: #fff; text-decoration: none; background: var(--forest); }
.next-story > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.next-story:hover > img { transform: scale(1.04); }
.next-text { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) clamp(40px, 7vw, 72px); }
.next-text h2 { font-size: clamp(2.2rem, 6vw, 4.5rem); }
.next-text h2 span { display: inline-block; transition: transform 0.4s var(--ease); }
.next-story:hover .next-text h2 span { transform: translateX(10px); }
.back-link { text-align: center; padding: 28px 16px 8px; font-size: 0.9rem; }
.back-link a { color: var(--muted); }
.notfound { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 16px; padding: 120px 16px; }
.notfound h1 { font-size: 3rem; color: var(--forest); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(14, 18, 11, 0.96); display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 94vw; max-height: 90vh; display: grid; gap: 10px; justify-items: center; }
.lightbox img { max-width: 94vw; max-height: 82vh; width: auto; height: auto; border-radius: 6px; }
.lightbox figcaption { color: rgba(255, 250, 240, 0.75); justify-content: center; padding: 0; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, 0.08); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%;
  font: 300 2rem/1 var(--sans); cursor: pointer; transition: background 0.2s; }
.lightbox button:hover { background: rgba(255, 255, 255, 0.18); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; margin-top: -26px; }
.lb-next { right: 18px; top: 50%; margin-top: -26px; }
@media (max-width: 700px) { .lb-prev, .lb-next { top: auto; bottom: 18px; margin: 0; } }

/* ---------- WhatsApp ---------- */
.wa { position: fixed; right: 18px; bottom: 18px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px;
  border-radius: 999px; background: #1f8f4e; color: #fff; text-decoration: none; font: 600 0.9rem/1 var(--sans);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); transition: transform 0.25s var(--ease); }
.wa:hover { transform: translateY(-2px); }

/* Fade content in as it scrolls into view (set up by site.js). */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- logo ---------- */
/* --logo-h comes from /theme.css (Site details → Logo size). Phones and the footer scale from it. */
:root { --logo-h: 40px; }
.brand.has-logo { gap: calc(var(--logo-h) * 0.3); }
.brand .logo { height: var(--logo-h); width: auto; max-width: min(46vw, calc(var(--logo-h) * 6)); object-fit: contain; display: block; transition: height 0.35s; }
.brand.has-logo .brand-text { font-size: clamp(1rem, calc(var(--logo-h) * 0.45), 2.2rem); }
.top.scrolled .brand .logo, .top:not(.over-hero) .brand .logo { height: calc(var(--logo-h) * 0.85); }
.brand .logo-light { display: none; }
/* Over the hero photo: the light logo if there is one, otherwise the main logo with a soft shadow for contrast. */
.top.over-hero:not(.scrolled) .brand.has-light .logo-main { display: none; }
.top.over-hero:not(.scrolled) .brand.has-light .logo-light { display: block; }
.top.over-hero:not(.scrolled) .brand.has-logo:not(.has-light) .logo-main { filter: drop-shadow(0 1px 10px rgba(0, 0, 0, 0.45)); }
@media (max-width: 520px) {
  .brand .logo { height: calc(var(--logo-h) * 0.75); max-width: 52vw; }
  .top.scrolled .brand .logo, .top:not(.over-hero) .brand .logo { height: calc(var(--logo-h) * 0.68); }
  .brand.has-logo .brand-text { font-size: clamp(0.95rem, calc(var(--logo-h) * 0.36), 1.4rem); }
}
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand .logo { height: calc(var(--logo-h) * 1.3); width: auto; max-width: 260px; object-fit: contain; }
.logo-badge { display: inline-flex; background: var(--paper); border-radius: 12px; padding: 8px 12px; }
.logo-badge .logo { height: var(--logo-h); }

/* ---------- logo window ---------- */
.brand[data-logo-modal] { cursor: zoom-in; }
.logo-modal { width: 80vw; height: 80vh; max-width: 1400px; padding: 0; border: 0; border-radius: 22px; overflow: hidden;
  background: var(--paper); color: var(--ink); display: none; grid-template-rows: minmax(0, 1fr) auto;
  box-shadow: 0 40px 120px -20px rgba(10, 14, 8, 0.6); }
.logo-modal[open] { display: grid; animation: lm-in 0.45s var(--ease) both; }
.logo-modal::backdrop { background: rgba(18, 24, 14, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: lm-fade 0.4s ease both; }
@keyframes lm-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes lm-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 700px) { .logo-modal { width: 92vw; height: 88vh; border-radius: 18px; } }

.lm-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9); color: var(--soil); font: 300 1.8rem/1 var(--sans); cursor: pointer; transition: transform 0.2s, background 0.2s; }
.lm-close:hover { transform: rotate(90deg); background: #fff; }

.lm-stage { min-height: 0; display: grid; place-items: center; padding: clamp(28px, 6vh, 64px) clamp(24px, 6vw, 80px);
  background: radial-gradient(ellipse at 50% 45%, #fffdf8 0%, var(--paper) 55%, var(--paper-2) 100%); }
/* The logo fills the stage (minus its padding), whatever the uploaded file's pixel size. */
.lm-stage { position: relative; }
.lm-stage img { position: absolute; inset: clamp(28px, 7vh, 76px) clamp(20px, 5vw, 64px); width: calc(100% - 2 * clamp(20px, 5vw, 64px));
  height: calc(100% - 2 * clamp(28px, 7vh, 76px)); object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(35, 29, 23, 0.12)); animation: lm-logo 0.8s 0.1s var(--ease) both; }
@keyframes lm-logo { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.logo-modal.on-dark .lm-stage { background: radial-gradient(ellipse at 50% 45%, var(--forest-2), var(--forest)); }

/* The caption: a soft band with an ornament rule, a small label, the name, and the story in italic serif. */
.lm-caption { position: relative; text-align: center; padding: 34px clamp(20px, 6vw, 72px) 30px; max-height: 46vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--paper-2), #e9dfca); border-top: 1px solid var(--line); }
.lm-ornament { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); color: var(--leaf); }
.lm-ornament::before, .lm-ornament::after { content: ""; position: absolute; top: 50%; width: min(28vw, 220px); height: 1px; }
.lm-ornament::before { right: calc(100% + 10px); background: linear-gradient(90deg, transparent, var(--ochre)); }
.lm-ornament::after { left: calc(100% + 10px); background: linear-gradient(90deg, var(--ochre), transparent); }
.lm-blurb { position: relative; margin: 0 auto 22px; max-width: 62ch; padding: 0 clamp(8px, 3vw, 36px); }
.lm-blurb::before { content: "\201C"; position: absolute; left: -6px; top: -22px; font: 400 4.6rem/1 var(--serif); color: var(--ochre); opacity: 0.45; }
.lm-blurb p { font: italic 300 clamp(1.1rem, 1.9vw, 1.45rem)/1.6 var(--serif); color: var(--soil); margin: 0 0 0.6em; }
.lm-tagline { font: italic 300 1.2rem/1.5 var(--serif); color: var(--muted); }
@media (max-width: 700px) { .lm-blurb::before { display: none; } .lm-caption { max-height: 52vh; } }

/* Keep the header on one line at any width: the menu never moves; the logo text shrinks with the
   screen and, as a last resort, is trimmed with an ellipsis instead of pushing the menu away. */
.top { flex-wrap: nowrap; }
.top nav { flex: none; }
.brand { min-width: 0; flex: 0 1 auto; }
.brand .logo { flex: none; }
.brand .brand-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brand.has-logo .brand-text { font-size: clamp(0.95rem, min(calc(var(--logo-h) * 0.45), 3.6vw), 2.2rem); }
@media (max-width: 900px) { .brand .logo { height: min(var(--logo-h), 11vw); } .top.scrolled .brand .logo, .top:not(.over-hero) .brand .logo { height: min(calc(var(--logo-h) * 0.85), 10vw); } }
@media (max-width: 520px) {
  /* On phones, let the logo text stack onto two lines rather than be trimmed. */
  .brand.has-logo .brand-text { white-space: normal; line-height: 1.05; font-size: 1rem; text-overflow: clip;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* The logo text box must be tall enough for letters with tails (the "y" in Harmony): an
   overflow-trimmed box with line-height 1 cut 4px off them. Keep the line box roomy. */
.brand .brand-text { line-height: 1.3; padding-block: 0.05em; }
@media (max-width: 520px) {
  .brand.has-logo .brand-text { line-height: 1.22; font-size: clamp(0.82rem, 4.2vw, 1rem); }
}
.foot-brand .brand-text { line-height: 1.3; padding-block: 0.05em; }

/* ---------- logo window layout: logo + title above the line, story below ----------
   Rows: [logo + title, sharing the paper background] / [the line, with its leaf] / [story + button].
   The title sits close under the logo; the line has equal space above (to the title) and below
   (to the story), so it reads as the hinge between "who" and "why". */
.logo-modal { grid-template-rows: minmax(0, 1fr) auto; }
.lm-top { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto;
  background: radial-gradient(ellipse at 50% 40%, #fffdf8 0%, var(--paper) 55%, var(--paper-2) 100%); }
.logo-modal.on-dark .lm-top { background: radial-gradient(ellipse at 50% 40%, var(--forest-2), var(--forest)); color: #fff; }
.lm-top .lm-stage { background: none; }
.lm-stage img { inset: clamp(28px, 6vh, 64px) clamp(20px, 5vw, 64px) clamp(8px, 2vh, 18px);
  height: calc(100% - clamp(28px, 6vh, 64px) - clamp(8px, 2vh, 18px)); }
.lm-head { text-align: center; padding: 0 clamp(20px, 6vw, 72px) clamp(26px, 4.2vh, 40px); }
.lm-head .eyebrow { margin: 0 0 8px; }
.lm-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.15; color: var(--forest); margin: 0; }
.logo-modal.on-dark .lm-head h2 { color: #fff; }
.lm-caption { padding-top: clamp(30px, 4.6vh, 44px); }
.lm-caption .lm-blurb { margin-top: 0; }
@media (max-width: 700px) { .lm-head { padding-bottom: 22px; } .lm-caption { padding-top: 30px; } }
/* One spacing value above and below the line (the story's own line-height adds ~0.35em of leading
   above its letters, so the caption's padding is reduced by that much to look equal). */
.logo-modal { --lm-gap: clamp(24px, 4vh, 38px); }
.lm-head { padding-bottom: var(--lm-gap); }
.lm-caption { padding-top: calc(var(--lm-gap) - 0.35em); }
/* Keep the opening quote mark beside the words, however short the story is. */
.lm-blurb { display: inline-block; max-width: min(62ch, 100%); text-align: center; }
.lm-caption > .btn { display: table; margin: 0 auto; }
@media (max-width: 700px) { .logo-modal { --lm-gap: 22px; } }
.lm-blurb::before { top: -0.12em; left: -0.18em; font-size: 3.6rem; }
.lm-blurb { margin-bottom: 18px; }
