/* =========================================================
   THE LADYBUG — Design Tokens
   Cream tabloid/zine aesthetic, pastel pink + ladybug red
   ========================================================= */
:root {
  --cream: #FFF6F1;
  --paper: #FFFDFB;
  --red: #E4572E;
  --red-deep: #C4441E;
  --pink: #F6C6D0;
  --pink-soft: #FDEEF1;
  --yellow: #F6D186;
  --ink: #201A18;
  --ink-soft: #6B5F5A;
  --line: #EBD9CE;

  --display: 'DM Serif Display', Georgia, serif;
  --script: 'Caveat', cursive;
  --body: 'Nunito', -apple-system, sans-serif;

  --max-w: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Inline links inside body text (e.g. affiliate links) — buttons and nav keep their own look */
.lede a, .pillar-card p a, .about-body p a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}
.lede a:hover, .pillar-card p a:hover, .about-body p a:hover {
  color: var(--red-deep);
}
/* Follow band has a dark background, so links need a lighter color to stay readable */
.follow-band p a {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}
.follow-band p a:hover { color: var(--pink); }
img, svg { display: block; max-width: 100%; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 246, 241, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--script);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}
.brand svg { width: 40px; height: 40px; margin-right: 4px; }
.wm-red { color: var(--red); }

nav#site-nav {
  display: flex;
  gap: 28px;
  font-weight: 700;
  font-size: 15px;
}
nav#site-nav a {
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
nav#site-nav a:hover { color: var(--red); }
nav#site-nav a.active { border-color: var(--red); color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--ink);
}

.follow-btn {
  background: var(--red);
  color: var(--paper);
  padding: 9px 18px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}
.follow-btn:hover { background: var(--red-deep); }

@media (max-width: 720px) {
  .brand { font-size: 22px; }
  .brand svg { width: 30px; height: 30px; }
  nav#site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
  }
  nav#site-nav.open { display: flex; }
  nav#site-nav a { padding: 14px 28px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .header-actions { display: flex; align-items: center; gap: 14px; }
}

/* ---------- Hero (tabloid masthead) ---------- */
.hero {
  position: relative;
  padding: 64px 0 40px;
  overflow: hidden;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  border: 1.5px dashed var(--red);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 22px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 20px;
  color: var(--ink);
}
.hero h1 .accent { color: var(--red); }
.hero p.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 460px;
  margin: 0 0 28px;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 15px;
  border: 2px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--red); border-color: var(--red); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--pink-soft); }

.hero-mascot { position: relative; }
.hero-mascot svg { width: 100%; height: auto; max-width: 320px; margin: 0 auto; }

/* ---------- Flight trail (signature element) ---------- */
.flight-trail {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-1px);
  pointer-events: none;
  z-index: 0;
}
.trail-column {
  position: relative;
}
.trail-line {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 0;
  border-left: 3px dotted var(--pink);
  transform: translateX(-1.5px);
}
.trail-bug {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 30px;
}
@media (max-width: 900px) {
  .trail-line, .trail-bug { display: none; }
}

/* ---------- Section shell ---------- */
.section { padding: 64px 0; position: relative; z-index: 1; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
}
.section-head p { color: var(--ink-soft); font-size: 16px; margin: 0; }

/* ---------- Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pillar-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 26px;
  position: relative;
}
.pillar-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.tag-feels { background: var(--pink-soft); color: var(--red-deep); }
.tag-overheard { background: #FDF3D9; color: #8A6A17; }
.tag-vibes { background: #EAF3E4; color: #4C7A3A; }
.pillar-card h3 { font-family: var(--display); font-style: italic; font-size: 22px; margin: 0 0 10px; }
.pillar-card p { color: var(--ink-soft); font-size: 15px; margin: 0; }

@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mascot { order: -1; max-width: 220px; margin: 0 auto; }
}

/* ---------- Follow / social band ---------- */
.follow-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: 28px;
  padding: 52px 40px;
  text-align: center;
}
.follow-band h2 { font-family: var(--display); font-style: italic; font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; }
.follow-band p { color: #D9CFC9; margin: 0 0 26px; }
.social-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.social-pill {
  border: 1.5px solid #4A413D;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
}
.social-pill:hover { border-color: var(--red); color: var(--red); }

/* ---------- Generic page header (Blog / About) ---------- */
.page-hero { padding: 56px 0 20px; text-align: center; }
.page-hero .eyebrow { margin: 0 auto 18px; }
.page-hero h1 { font-family: var(--display); font-style: italic; font-size: clamp(34px, 5vw, 50px); margin: 0 0 14px; }
.page-hero p { color: var(--ink-soft); max-width: 520px; margin: 0 auto; }

/* ---------- Brand badge (circular seal logo) ---------- */
.brand-badge { display: flex; justify-content: center; margin: 8px 0 20px; }
.brand-badge svg { width: 220px; height: 220px; }
.brand-badge img { width: 280px; height: 280px; max-width: 70vw; }
@media (max-width: 720px) { .brand-badge img { width: 220px; height: 220px; } }

/* ---------- Empty state ---------- */
.empty-state {
  border: 1.5px dashed var(--pink);
  border-radius: 24px;
  padding: 60px 30px;
  text-align: center;
  max-width: 560px;
  margin: 30px auto 0;
  background: var(--paper);
}
.empty-state svg { width: 56px; height: 56px; margin: 0 auto 18px; }
.empty-state h3 { font-family: var(--display); font-style: italic; font-size: 24px; margin: 0 0 10px; }
.empty-state p { color: var(--ink-soft); margin: 0 0 22px; }

/* ---------- Blog list (for later posts) ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 10px;
}
.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.post-card .pillar-tag { margin-bottom: 12px; }
.post-card h3 { font-family: var(--display); font-style: italic; font-size: 19px; margin: 0 0 8px; }
.post-card p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ---------- About page ---------- */
.about-body { max-width: 680px; margin: 0 auto; }
.about-body p { font-size: 17px; margin: 0 0 18px; }
.about-body .signoff { font-family: var(--display); font-style: italic; font-size: 20px; margin-top: 30px; }
.essay-lead {
  font-family: var(--display);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 10px;
}

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 30px;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--script); font-weight: 700; font-size: 24px; }
.footer-brand svg { width: 30px; height: 30px; }
.footer-nav { display: flex; gap: 20px; font-weight: 700; font-size: 14px; }
.footer-nav:last-of-type a { color: var(--ink-soft); font-weight: 700; }
.footer-nav:last-of-type a:hover { color: var(--red); }
.footer-copy { width: 100%; text-align: center; color: var(--ink-soft); font-size: 13px; margin-top: 10px; }

/* ---------- Next-essay navigation ---------- */
.essay-next { margin-top: 44px; }
.essay-next-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.essay-next-btn:hover { border-color: var(--red); transform: translateY(-2px); }
.essay-next-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}
.essay-next-title {
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.3;
}

/* ---------- Clickable pillar cards ---------- */
.pillar-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.pillar-card-link:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -14px rgba(0,0,0,0.25);
}
.pillar-card-cta {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 800;
  color: var(--red);
}
.pillar-card-link:hover .pillar-card-cta { color: var(--red-deep); }
/* On touch devices, show a subtle always-on affordance since there is no hover */
@media (hover: none) {
  .pillar-card-link { border-color: var(--pink); }
}

/* ---------- Flying ladybug that follows the cursor / finger ---------- */
/* Position is driven by JS (transform), so no CSS drift keyframes here.
   pointer-events:none guarantees it never blocks a click, tap, or covers
   text you are trying to read. */
.flying-bug {
  position: fixed;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  z-index: 40;
  pointer-events: none;
  opacity: 0.85;
  will-change: transform;
}
.flying-bug .bug-wing {
  transform-origin: 50% 40%;
  animation: bug-buzz 0.18s ease-in-out infinite;
}
@keyframes bug-buzz {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(8deg); }
}
/* Smaller and a touch more transparent on phones so it stays subtle */
@media (max-width: 720px) {
  .flying-bug { width: 22px; height: 22px; opacity: 0.7; }
}
/* Respect users who prefer no motion — bug rests quietly in a corner,
   and the JS skips all follow behaviour too. */
@media (prefers-reduced-motion: reduce) {
  .flying-bug { top: auto; bottom: 16px; left: 16px; opacity: 0.5; transform: none !important; }
  .flying-bug .bug-wing { animation: none; }
}

/* ---------- Footer legal links ---------- */
.footer-legal {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
}
.footer-legal a { color: var(--ink-soft); }
.footer-legal a:hover { color: var(--red); }

/* Fallback spacing for footer nav links (guarantees gaps even in older browsers) */
.footer-nav a, .footer-legal a { padding: 2px 4px; }

/* ---------- Refined pillar cards (editorial, calmer) ---------- */
.pillar-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.pillar-card-cta-muted { color: var(--ink-soft); }


/* ---------- About page section headings ---------- */
.about-subhead {
  font-family: var(--display);
  font-style: italic;
  font-size: 24px;
  color: var(--ink);
  margin: 38px 0 16px;
}
.about-series-name {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--red);
}
.about-series-name strong { font-weight: 400; }


/* ---------- Story page: series labels, closing, navigation ---------- */
.story-secondary {
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin: 10px 0 0;
}
.before-you-go {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.before-you-go h2 {
  font-family: var(--display);
  font-style: italic;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 16px;
}
.before-you-go p {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 16px;
  line-height: 1.7;
}
.story-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 36px;
}
.story-nav-link {
  display: block;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.story-nav-link:hover { border-color: var(--red); transform: translateY(-2px); }
.story-nav-dir {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 4px;
}
.story-nav-title {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.3;
}
.story-nav-series {
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.story-nav-series:hover { color: var(--red); }
/* On wider screens, place prev / series / next in a row */
@media (min-width: 720px) {
  .story-nav { flex-direction: row; align-items: stretch; }
  .story-nav-prev, .story-nav-next { flex: 1; }
  .story-nav-series { display: flex; align-items: center; justify-content: center; white-space: nowrap; padding: 16px 22px; }
}


/* ---------- Stories page: series intro + story grid ---------- */
.series-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
  padding: 36px 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.series-intro-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.series-intro-title {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(30px, 5vw, 40px);
  margin: 0 0 14px;
}
.series-intro p { color: var(--ink-soft); font-size: 17px; margin: 0 0 24px; }

/* Two cards per row on desktop, one on mobile */
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) {
  .story-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
.story-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.story-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,0.22);
}
.story-card-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.story-card h3 {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--ink);
}
.story-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin: 0 0 16px; }
.story-card-cta { font-size: 14px; font-weight: 800; color: var(--red); }
.series-note { text-align: center; color: var(--ink-soft); font-size: 15px; margin-top: 40px; }


/* ---------- Small Note (After Hours) page ---------- */
.note-subtitle {
  font-family: var(--display);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 6px auto 0;
}
.note-section { padding-top: 30px; }  /* tighter gap between subtitle and body */


/* ---------- Scheduled story: coming-soon locked state ---------- */
.locked-bug { font-size: 44px; margin-bottom: 12px; }
.locked-title {
  font-family: var(--display);
  font-style: italic;
  font-size: 26px;
  color: var(--ink);
  margin: 0 0 12px;
}
.story-locked .about-body p { color: var(--ink-soft); font-size: 17px; }


/* Keep the brand wordmark tight and on one line (never wraps awkwardly) */
.brand { white-space: nowrap; }
.brand .wm-black, .brand .wm-red { white-space: nowrap; }


/* ---------- After Hours (2am Small Note on homepage) ---------- */
.after-hours {
  max-width: 640px;
  margin: 8px auto 0;
  padding: 40px 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.after-hours-label {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.after-hours-title {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(26px, 5vw, 34px);
  margin: 0 0 10px;
}
.after-hours-subtitle {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 460px;
  margin: 0 auto 28px;
}
.after-hours-body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 16px;
}
.after-hours-closing {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
  font-style: italic;
}
@media (max-width: 720px) {
  .after-hours { padding: 30px 22px; border-radius: 20px; }
}


/* Footer credit line */
.footer-credit {
  width: 100%;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}
.footer-credit a { color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.footer-credit a:hover { color: var(--red); text-decoration: underline; }
