/* Haiku Journal — style system
   Palette, type scale, spacing, components.
*/

:root {
  /* Color — earthy green palette
     Warm olive-cream backgrounds, deep forest accents,
     terracotta grace notes. Drop-in replacement — no class
     name changes, so every page that uses these vars re-tones
     automatically. */
  --bg: #EFEBDC;           /* pale olive cream */
  --bg-alt: #E5E1CE;       /* muted sage */
  --bg-card: #F5F2E4;      /* lighter olive cream */
  --ink: #1B221C;          /* forest-black */
  --ink-soft: #39443A;     /* deep forest soft */
  --muted: #6B7163;        /* sage muted */
  --rule: #C9C3AB;         /* olive rule */
  --rule-soft: #D9D4BB;    /* olive rule soft */
  --moss: #4F6B48;         /* deeper forest */
  --moss-deep: #35492F;    /* dark pine */
  --persimmon: #A05B3B;    /* terracotta — earthier than the old red-orange */
  --persimmon-soft: #BE7A5A; /* lighter terracotta */

  /* Type */
  --serif: "Cormorant Garamond", "EB Garamond", Garamond, "Apple Garamond", Georgia, serif;
  --serif-body: "Source Serif Pro", "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1.05rem;
  --fs-md: 1.2rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2.1rem;
  --fs-2xl: 3rem;
  --fs-3xl: 4.2rem;

  /* Spacing */
  --space-1: 0.4rem;
  --space-2: 0.8rem;
  --space-3: 1.2rem;
  --space-4: 1.8rem;
  --space-5: 2.6rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 9rem;

  --max-w: 1180px;
  --reading-w: 640px;

  --radius: 2px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--moss-deep); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--persimmon); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.005em;
  line-height: 1.15;
  margin: 0 0 var(--space-3);
}

h1 { font-size: var(--fs-3xl); font-weight: 400; }
h2 { font-size: var(--fs-2xl); font-weight: 400; }
h3 { font-size: var(--fs-xl); font-weight: 500; }
h4 { font-size: var(--fs-lg); font-weight: 500; }

p { margin: 0 0 var(--space-3); }

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container--narrow {
  max-width: calc(var(--reading-w) + var(--space-6));
}

section { padding: var(--space-7) 0; }

/* Section eyebrow */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--moss);
  margin-bottom: var(--space-3);
  display: inline-block;
}

.divider {
  width: 48px;
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: var(--space-3) 0 var(--space-4);
}
.divider--center { margin-left: auto; margin-right: auto; }

/* ---------- Utility bar ---------- */
.utility-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--sans);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.utility-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem var(--space-4);
  max-width: var(--max-w);
  margin: 0 auto;
  letter-spacing: 0.05em;
}
.utility-bar a { color: var(--muted); }
.utility-bar a:hover { color: var(--ink); }
.utility-bar__social { display: flex; gap: var(--space-3); }

/* Anniversary line in the utility bar — quietly proud. */
.hj-anniversary {
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}
.hj-anniversary strong {
  color: var(--moss-deep);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--rule-soft);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  position: relative;          /* anchor the mobile .primary-nav.is-open dropdown */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4);
  max-width: var(--max-w);
  margin: 0 auto;
  gap: var(--space-4);
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}
.brand__mark {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand__tag {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--moss);
  margin-top: 0.4rem;
}

.primary-nav ul {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  margin: 0;
}
.primary-nav a {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.5rem 0;
  position: relative;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%;
  bottom: 0;
  height: 1px;
  background: var(--persimmon);
  transition: left .3s var(--ease), right .3s var(--ease);
}
.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after {
  left: 0; right: 0;
}
.primary-nav a:hover { color: var(--ink); }

.nav-cta {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moss-deep);
  border: 1px solid var(--moss);
  padding: 0.6rem 1.2rem;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav-cta:hover { background: var(--moss); color: var(--bg); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  /* Bigger tap target on mobile (min 44x44 per WCAG) */
  padding: 0.75rem;
  margin: -0.35rem;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  margin: 6px 0;
  transform-origin: center;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
/* Hamburger → X when the nav is open */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-8) 0 var(--space-7);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(79,107,72,0.09), transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(160,91,59,0.06), transparent 55%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, var(--fs-3xl));
  font-style: italic;
  font-weight: 300;
  margin-bottom: var(--space-3);
}
.hero__lede {
  font-family: var(--serif-body);
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto var(--space-5);
  line-height: 1.65;
}

.featured-haiku {
  margin: var(--space-6) auto;
  padding: var(--space-5) var(--space-4);
  max-width: 480px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.featured-haiku .poem {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-style: italic;
  color: var(--ink);
  line-height: 2;
  white-space: pre-line;
  margin: 0 0 var(--space-4);
}
.featured-haiku cite {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}

.hero__ctas {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

/* ---------- 5/7/5 form note (expandable) ---------- */
.hero__form-note {
  max-width: 620px;
  margin: var(--space-5) auto 0;
  background: rgba(255, 252, 245, 0.65);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  transition: background 180ms ease;
}
.hero__form-note[open] {
  background: rgba(255, 252, 245, 0.9);
}
.hero__form-note > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--serif);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2);
  text-align: center;
}
.hero__form-note > summary::-webkit-details-marker { display: none; }

.form-note-lines {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 1.05rem;
  line-height: 1.5;
}
.form-note-line {
  display: block;
}
.form-note-line:nth-child(1) { font-style: italic; }
.form-note-line:nth-child(2),
.form-note-line:nth-child(3) {
  font-size: 0.92rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hero__form-note > summary::before {
  content: "▾";
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: rgba(255, 252, 245, 0.8);
  font-size: 0.85rem;
  color: var(--ink);
  transition: transform 240ms ease, background 240ms ease, border-color 240ms ease;
  animation: form-note-pulse 2.4s ease-in-out infinite;
}
.hero__form-note[open] > summary::before {
  transform: rotate(180deg);
  animation: none;
  background: rgba(255, 252, 245, 1);
}
.hero__form-note > summary::after {
  content: "tap to read more";
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.hero__form-note[open] > summary::after { content: "close"; }

.hero__form-note > summary:hover,
.hero__form-note > summary:focus-visible { outline: none; }
.hero__form-note > summary:hover::before,
.hero__form-note > summary:focus-visible::before {
  border-color: var(--ink);
  background: rgba(255, 252, 245, 1);
}

@keyframes form-note-pulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(120, 95, 60, 0.0);
  }
  50% {
    transform: translateY(2px);
    box-shadow: 0 0 0 6px rgba(120, 95, 60, 0.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero__form-note > summary::before { animation: none; }
}

.hero__form-note__body {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule);
}
.hero__form-note__body p {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--ink);
  margin: 0 0 var(--space-3);
}
.hero__form-note__body p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.95rem 1.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .3s var(--ease);
  background: transparent;
}
.btn--primary {
  background: var(--moss);
  color: var(--bg);
  border-color: var(--moss);
}
.btn--primary:hover {
  background: var(--moss-deep);
  border-color: var(--moss-deep);
  color: var(--bg);
}
.btn--ghost {
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn--link {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--persimmon);
  border-bottom: 1px solid var(--persimmon);
  padding-bottom: 3px;
}
.btn--link:hover { color: var(--moss-deep); border-color: var(--moss-deep); }

/* ---------- Stats band ---------- */
.stats {
  background: var(--bg-alt);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  padding: var(--space-6) 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  text-align: center;
}
.stat__number {
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  color: var(--moss-deep);
  line-height: 1;
  margin-bottom: var(--space-2);
  font-weight: 400;
}
.stat__label {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat + .stat { border-left: 1px solid var(--rule); }

/* ---------- Section headers ---------- */
.section-head {
  text-align: center;
  margin-bottom: var(--space-6);
}
.section-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-style: italic;
  font-weight: 300;
}
.section-head p {
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
}

/* ---------- Recent poems grid ---------- */
.poems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.poem-card {
  background: var(--bg-card);
  border: 1px solid var(--rule-soft);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  transition: transform .4s var(--ease), border-color .3s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
}
.poem-card:hover {
  transform: translateY(-3px);
  border-color: var(--moss);
}
.poem-card .poem {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.95;
  white-space: pre-line;
  margin: 0 0 var(--space-4);
}
.poem-card__author {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.poem-card__author::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--persimmon-soft);
  margin: 0 auto var(--space-2);
}

/* ---------- About block ---------- */
.about-block {
  text-align: center;
  max-width: var(--reading-w);
  margin: 0 auto;
}
.about-block p {
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.85;
}
.about-block .signature {
  font-family: var(--serif);
  font-style: italic;
  color: var(--moss-deep);
  margin-top: var(--space-4);
}

/* ---------- Pathways ---------- */
.pathways {
  background: var(--bg-card);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.pathways__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.pathway {
  padding: var(--space-5) var(--space-4);
  text-align: center;
  border-right: 1px solid var(--rule-soft);
  transition: background .3s var(--ease);
}
.pathway:last-child { border-right: 0; }
.pathway:hover { background: var(--bg-alt); }
.pathway__num {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--persimmon);
  margin-bottom: var(--space-2);
  display: block;
}
.pathway h3 {
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 400;
  margin-bottom: var(--space-2);
}
.pathway p {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 260px;
  margin: 0 auto var(--space-4);
}

/* ---------- Issues teaser ---------- */
.issues-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
}
.issue-card {
  background: var(--bg-card);
  border: 1px solid var(--rule-soft);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .3s var(--ease), transform .4s var(--ease);
  min-height: 320px;
}
.issue-card:hover { border-color: var(--moss); transform: translateY(-2px); }
.issue-card--feature {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-alt));
  border-color: var(--moss);
}
.issue-card__meta {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: var(--space-3);
}
.issue-card__title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  margin-bottom: var(--space-3);
  line-height: 1.2;
}
.issue-card--feature .issue-card__title { font-size: 2.4rem; }
.issue-card__desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-4);
}
.issue-card__link {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--persimmon);
}

/* ---------- Paperbacks ---------- */
.paperbacks {
  background: var(--bg-alt);
  border-top: 1px solid var(--rule-soft);
}
.paperbacks__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-6);
  align-items: center;
}
.paperbacks__copy h2 {
  font-size: 2.4rem;
  font-style: italic;
  font-weight: 300;
}
.paperbacks__copy p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.paperbacks__stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.book {
  aspect-ratio: 2/3;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform .4s var(--ease);
  box-shadow: 0 1px 0 var(--rule), 3px 3px 0 -1px var(--rule-soft);
}
.book:hover { transform: translateY(-4px) rotate(-0.4deg); }
.book__year {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
}
.book__title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.3;
}
.book__spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--persimmon);
  opacity: 0.7;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #C6C9C4;
  padding: var(--space-6) 0 var(--space-4);
  font-family: var(--sans);
  font-size: 0.85rem;
}
.site-footer a { color: #C6C9C4; }
.site-footer a:hover { color: var(--persimmon-soft); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer__brand .brand__mark { color: var(--bg); }
.footer__brand .brand__tag { color: var(--persimmon-soft); }
.footer__brand p {
  max-width: 320px;
  margin-top: var(--space-3);
  color: #9A9D97;
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.7;
}
.footer__col h4 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--persimmon-soft);
  margin-bottom: var(--space-3);
}
.footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  color: #7C8079;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}
.footer__meta a { color: #7C8079; }

/* ---------- Inner pages ---------- */
.page-header {
  padding: var(--space-7) 0 var(--space-5);
  text-align: center;
  border-bottom: 1px solid var(--rule-soft);
}
.page-header h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-style: italic;
  font-weight: 300;
}
.page-header p {
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
}

.prose {
  max-width: var(--reading-w);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.prose h2 {
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 400;
  margin-top: var(--space-5);
  color: var(--ink);
}
.prose h3 {
  font-size: 1.3rem;
  margin-top: var(--space-4);
  color: var(--ink);
}
.prose blockquote {
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--moss);
  font-style: italic;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  white-space: pre-line;
  background: var(--bg-card);
}
.prose ul { padding-left: var(--space-4); }
.prose li { margin-bottom: 0.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --fs-3xl: 3rem; --fs-2xl: 2.2rem; }
  section { padding: var(--space-6) 0; }
  .hero { padding: var(--space-6) 0; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-5) 0; }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(odd) { border-right: 1px solid var(--rule); }
  .poems-grid { grid-template-columns: 1fr; }
  .pathways__grid { grid-template-columns: 1fr; }
  .pathway { border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .pathway:last-child { border-bottom: 0; }
  .issues-grid { grid-template-columns: 1fr; }
  .paperbacks__inner { grid-template-columns: 1fr; gap: var(--space-5); }
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-5); }

  .nav-toggle { display: block; }

  /* Hide the desktop nav; the .is-open override below shows it. */
  .primary-nav,
  .nav-cta { display: none; }

  /* Mobile dropdown — a simple panel anchored to the viewport top-right,
     sitting just under the site header. Plain block layout: the <ul> is
     a vertical list, each <a> is a full-width link. No flex-column trick,
     no full-screen overlay, no z-index gymnastics. */
  .primary-nav.is-open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #EFEBDC;
    border-bottom: 1px solid #C9C3AB;
    box-shadow: 0 10px 28px rgba(27, 34, 28, 0.18);
    padding: 5rem 0 0.5rem; /* top-pad leaves room for the fixed hamburger */
    animation: slideDown .35s var(--ease);
    z-index: 9999;
    max-height: 100vh;
    overflow-y: auto;
    opacity: 1;
  }
  .primary-nav.is-open ul {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: #EFEBDC;
  }
  .primary-nav.is-open li {
    display: block;
    margin: 0;
    padding: 0;
    border-top: 1px solid #D9D4BB;
    background-color: #EFEBDC;
  }
  .primary-nav.is-open li:first-child { border-top: 0; }
  .primary-nav.is-open a {
    display: block;
    width: 100%;
    padding: 1.1rem 1.5rem;
    text-align: center;
    font-family: var(--sans);
    font-size: 1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1B221C;
    background-color: #EFEBDC;
    text-decoration: none;
  }
  /* Kill the underline hover marker the desktop nav uses */
  .primary-nav.is-open a::after { display: none; }
  .primary-nav.is-open a:active { background-color: #E5E1CE; }
  .primary-nav.is-open a[aria-current="page"] { color: #A05B3B; }

  /* Keep the hamburger above the menu panel so X stays tappable */
  .nav-toggle {
    position: relative;
    z-index: 10000;
  }

  .utility-bar__inner { font-size: 0.68rem; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 2.4rem; }
  .featured-haiku .poem { font-size: 1.3rem; }
  .hero__ctas { flex-direction: column; align-items: center; }
  .btn { width: 80%; text-align: center; }
  .utility-bar__inner { flex-direction: column; gap: 0.3rem; padding: 0.6rem; }

  /* Brand can get very wide on small screens — scale it down */
  .brand__mark { font-size: 1.4rem; }
  .brand__tag  { font-size: 0.6rem; letter-spacing: 0.2em; }
  .site-header__inner { padding: var(--space-3) var(--space-3); }

  /* Page-header hero on inner pages */
  .page-header { padding: var(--space-5) 0 var(--space-4); }
  .page-header h1 { font-size: 2rem; }

  /* Prose columns — pad the edges so text doesn't hit the viewport */
  .prose { padding: var(--space-4) var(--space-3); font-size: 1rem; line-height: 1.8; }
  .prose h2 { font-size: 1.5rem; }
  .prose h3 { font-size: 1.15rem; }
  .prose blockquote { font-size: 1.1rem; padding: var(--space-3); }

  /* Guidelines page — tighten the at-a-glance grid and form block */
  .g-wrap { padding: var(--space-5) var(--space-3) var(--space-6); }
  .g-glance { grid-template-columns: repeat(2, 1fr); }
  .g-glance__cell:nth-child(2) { border-right: 0; }
  .g-glance__cell:nth-child(1),
  .g-glance__cell:nth-child(2) { border-bottom: 1px solid var(--rule-soft); }
  .g-form-block { padding: var(--space-4) var(--space-3); }
  .g-form-count { font-size: 2.6rem; }
  .g-form-sep   { font-size: 1.6rem; }
  .g-section-head h2 { font-size: 1.6rem; }
  .g-rule { padding: var(--space-3) var(--space-3); }
  .g-rule__title { font-size: 1.1rem; }
  .g-rule__text { font-size: 0.95rem; }
  .g-rule__num { width: 34px; height: 34px; font-size: 1.15rem; }
  .g-pc { gap: var(--space-3); }
  .g-notes ul { columns: 1; }
  .g-cta { padding: var(--space-5) var(--space-3); }
  .g-cta h2 { font-size: 1.6rem; }

  /* About / What-is-haiku / Editor — their scoped panels */
  .ab-hero h1, .wh-hero h1, .ed-hero h1 { font-size: 2.2rem; }
  .ab-beliefs__grid, .ed-pillars__grid { grid-template-columns: 1fr; gap: var(--space-5); padding: 0 var(--space-3); }
  .ab-intro, .ab-editorial, .ed-prose, .wh-prose { padding-left: var(--space-3); padding-right: var(--space-3); }
  .wh-form-display { padding: var(--space-4) var(--space-3); }
  .wh-form-num { font-size: 2.8rem; }
  .wh-glossary { grid-template-columns: 1fr; padding: 0 var(--space-3); }
  .wh-example, .wh-verdict { padding-left: var(--space-3); padding-right: var(--space-3); }
  .ed-haiku-grid { grid-template-columns: 1fr; padding: 0 var(--space-3); }

  /* Site footer columns collapse cleanly */
  .site-footer { padding: var(--space-5) var(--space-3); }
  .footer__grid { gap: var(--space-4); }
  .footer__meta { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   FLOURISHES
   Quiet little things that most sites don't do.
   Each effect degrades gracefully and respects reduced-motion.
   ============================================================ */

/* ---- 1. Washi paper grain (site-wide) -------------------- */
/* SVG noise applied as a fixed overlay on top of everything,
   then multiply-blended into the rice-paper background.      */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.12  0 0 0 0 0.14  0 0 0 0 0.13  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
/* Make sure all real content sits above the grain layer */
.utility-bar, main, .site-footer { position: relative; z-index: 2; }
/* .site-header intentionally NOT included — it needs its own z-index: 50
   (from line 166) to stay above .main content, otherwise the sticky header
   and especially the mobile dropdown menu get layered under the page. */

/* ---- 2. Scroll progress ink line (top of viewport) ------- */
.hj-scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg,
    var(--moss) 0%,
    var(--moss) 40%,
    var(--persimmon) 100%);
  z-index: 100;
  pointer-events: none;
  transition: width 0.12s linear;
}

/* ---- 3. Drifting leaves (site-wide decoration) ----------- */
.hj-leaves {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.hj-leaf {
  position: absolute;
  top: -40px;
  opacity: 0;
  color: var(--moss);
  filter: blur(0.2px);
  transform: translate3d(0, 0, 0) rotate(0deg);
  will-change: transform, opacity;
}
.hj-leaf svg { display: block; width: 22px; height: 30px; }

.hj-leaf--1 { left:  8%;  color: var(--moss-deep);    animation: hj-drift-a 38s linear infinite; animation-delay:  0s; }
.hj-leaf--2 { left: 28%;  color: var(--persimmon-soft);animation: hj-drift-b 52s linear infinite; animation-delay:  9s; }
.hj-leaf--3 { left: 52%;  color: var(--moss);          animation: hj-drift-a 46s linear infinite; animation-delay: 18s; }
.hj-leaf--4 { left: 73%;  color: var(--persimmon);     animation: hj-drift-b 60s linear infinite; animation-delay:  4s; }
.hj-leaf--5 { left: 91%;  color: var(--moss-deep);     animation: hj-drift-a 44s linear infinite; animation-delay: 25s; }

@keyframes hj-drift-a {
  0%   { transform: translate3d(0,   -4vh,  0) rotate(0deg);    opacity: 0;   }
  10%  { opacity: 0.22; }
  50%  { transform: translate3d(40px, 55vh, 0) rotate(180deg);                }
  90%  { opacity: 0.22; }
  100% { transform: translate3d(-20px,112vh, 0) rotate(360deg); opacity: 0;   }
}
@keyframes hj-drift-b {
  0%   { transform: translate3d(0,    -4vh, 0) rotate(10deg);   opacity: 0;   }
  15%  { opacity: 0.18; }
  50%  { transform: translate3d(-50px, 55vh,0) rotate(-160deg);               }
  85%  { opacity: 0.18; }
  100% { transform: translate3d(30px, 112vh, 0) rotate(-330deg);opacity: 0;   }
}

@media (max-width: 640px) { .hj-leaves { display: none; } }

/* ---- 4. Cursor spotlight on cards ------------------------ */
/* Soft moss glow that tracks the cursor over any card that
   opts in with the .glow class. JS sets --x and --y. */
.glow {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle 380px at var(--x, -200%) var(--y, -200%),
    rgba(79, 107, 72, 0.20),
    rgba(160, 91, 59, 0.06) 30%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
  z-index: 0;
}
.glow:hover::before { opacity: 1; }
.glow > * { position: relative; z-index: 1; }

/* ---- 5. Hero sumi-e brush strokes ------------------------ */
/* Decorative SVG curves drawn behind the hero haiku.        */
.hero { position: relative; isolation: isolate; }
.hero-ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.075;
  mix-blend-mode: multiply;
}
.hero-ink__curve {
  fill: none;
  stroke: var(--moss-deep);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-ink__curve--b {
  stroke: var(--persimmon);
  stroke-width: 9;
}
/* Slow, nearly-imperceptible drift for the brush strokes */
@keyframes hj-ink-breathe {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-8px, 4px, 0); }
}
.hero-ink__curve {
  animation: hj-ink-breathe 18s ease-in-out infinite;
  transform-origin: 50% 50%;
}
.hero-ink__curve--b { animation-duration: 24s; animation-direction: reverse; }

.hero__inner { position: relative; z-index: 1; }

/* Respect reduced motion — kill all flourish animations */
@media (prefers-reduced-motion: reduce) {
  .hj-leaves { display: none; }
  .hero-ink__curve { animation: none !important; }
  .hj-scroll-bar { transition: none !important; }
  .glow::before { transition: none !important; }
}


