/* ==========================================================================
   zine.css — warm editorial "zine" skin for Good Morning Pinner / GMP Local
   --------------------------------------------------------------------------
   Loaded AFTER main.css, directory.css and events.css so every rule here
   layers on top of the existing system. COPY IS FROZEN: this file changes
   presentation only (palette, type, buttons, cards, bands, dividers, motion).
   ========================================================================== */

:root {
  /* ---- palette (design-system tokens) ---- */
  --cream: #F3EDE3;      /* page background / light text on dark bands / wave fill */
  --ink: #2A2A28;        /* body text, 2px borders, offset shadows */
  --terracotta: #A85A3B; /* links, kickers, full-bleed footer band */
  --mustard: #E2B83A;    /* primary CTA background (ink text on it) */
  --teal: #7E9DAB;       /* data / condition accents */
  --sand: #D4C4A8;       /* hairline rules */
  --forest: #3A3D3B;     /* dark bands */

  /* ---- supporting tokens ---- */
  --mustard-hover: #C9A12B;
  --white: #FFFFFF;
  --muted: #6B655B;
  --line: var(--sand);
  --radius: 6px;
  --zine-measure: 960px;
  --zine-gap: 2.5rem;
  --zine-shadow: 4px 4px 0 var(--ink);

  /* ---- type stacks ---- */
  --font-body: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* --------------------------------------------------------------------------
   1. Base / typography — mono body, cream page, display serif headings
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--terracotta); }
a:hover { color: var(--forest); }

::selection { background: var(--mustard); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); }

/* Masthead: heavy uppercase display serif, clamped exactly per teardown. */
.zine-masthead,
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
}
@media (max-width: 600px) {
  .zine-masthead,
  .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
}

/* Section headers: ~17px, 800, wide-tracked uppercase, 2px sand bottom rule. */
.section-header,
.zine-section-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--sand);
  font-family: var(--font-display);
  font-size: 1.0625rem; /* ~17px */
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.section-header--teal { border-bottom-color: var(--teal); }
.section-header--terracotta { border-bottom-color: var(--terracotta); }

/* Kickers / eyebrows: 12–12.5px, 600, uppercase, 0.1–0.12em tracking. */
.kicker,
.zine-kicker,
.eyebrow,
.section-kicker {
  font-family: var(--font-body);
  font-size: 0.78rem; /* 12.5px */
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.kicker--mustard,
.zine-kicker--mustard { color: var(--mustard); }
.kicker--teal,
.zine-kicker--teal { color: var(--teal); }

/* Editorial reading rhythm */
.zine-content { max-width: var(--zine-measure); margin-inline: auto; }
.zine-prose { max-width: 34rem; line-height: 1.7; }

/* --------------------------------------------------------------------------
   2. Navigation — cream bar, wordmark left, mono links, mustard CTA
   -------------------------------------------------------------------------- */
header,
header.zine-header {
  position: sticky;
  background: var(--cream);
  border-bottom: 2px solid var(--sand);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
header .container { min-height: 72px; }

.logo,
.zine-wordmark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.logo span,
.zine-wordmark span { color: var(--terracotta); }

.zine-nav a,
nav a {
  padding: 8px 11px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
.zine-nav a:hover,
nav a:hover { color: var(--terracotta); background: transparent; }

@media (max-width: 760px) {
  header .container { flex-wrap: wrap; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
  .zine-nav,
  nav { flex-wrap: wrap; white-space: normal; }
}

/* --------------------------------------------------------------------------
   3. Tactile buttons — mustard, 2px ink border, hard offset shadow
   -------------------------------------------------------------------------- */
.zine-btn,
.cta-button,
.newsletter-link,
.claim-button,
nav a.nav-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 11px 18px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--mustard);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.8125rem; /* 13px */
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--zine-shadow);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease,
              box-shadow .2s ease, transform .2s ease;
}
.zine-btn:hover,
.cta-button:hover,
.newsletter-link:hover,
.claim-button:hover,
nav a.nav-submit:hover {
  background: var(--mustard-hover);
  color: var(--ink);
}
.zine-btn:active,
.cta-button:active,
.newsletter-link:active,
.claim-button:active,
nav a.nav-submit:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
}

.secondary-button,
.zine-btn--secondary {
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: var(--zine-shadow);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.secondary-button:hover,
.zine-btn--secondary:hover { background: var(--white); color: var(--ink); }
.secondary-button:active,
.zine-btn--secondary:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

/* --------------------------------------------------------------------------
   4. Cards — cream/white, 2px sand or ink borders, small radii
   -------------------------------------------------------------------------- */
.card,
.zine-card,
.category-card,
.business-card,
.details-card,
.event-card,
.media-pillar,
.empty-state,
.claim-cta {
  border: 2px solid var(--sand);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 2px 0 rgba(42, 42, 40, 0.06);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.zine-card--ink,
.card--ink { border-color: var(--ink); box-shadow: var(--zine-shadow); }
.zine-card--cream,
.card--cream { background: var(--cream); }

.card:hover,
.zine-card:hover,
.category-card:hover,
.business-card:hover,
.details-card:hover,
.event-card:hover,
.media-pillar:hover {
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}

/* --------------------------------------------------------------------------
   5. Full-bleed bands + footer (terracotta band, cream display wordmark)
   -------------------------------------------------------------------------- */
.newsletter-cta,
.zine-band--forest {
  background: var(--forest);
  color: var(--cream);
}
.newsletter-cta h2 { color: var(--cream); font-family: var(--font-display); }
.newsletter-cta p { color: var(--sand); }

footer,
.zine-footer {
  display: block;
  width: 100%;
  margin: 0;
  background: var(--terracotta);
  color: var(--cream);
  text-align: center;
  font-family: var(--font-body);
  padding: clamp(3rem, 7vw, 4.5rem) 1.5rem;
}
footer a,
.zine-footer a { color: var(--cream); opacity: 0.85; transition: opacity .2s ease; }
footer a:hover,
.zine-footer a:hover { color: var(--cream); opacity: 1; }

/* Cream display wordmark treatment for the footer band. */
.footer-wordmark,
.zine-footer .footer-wordmark {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   6. Wave divider — 35px layout hook for the SVG wave partial
   -------------------------------------------------------------------------- */
.wave-divider {
  display: block;
  width: 100%;
  height: 35px;
  margin-top: 5rem;
  border: 0;
  fill: var(--cream);
}

/* --------------------------------------------------------------------------
   7. Image treatment — 6px radius, optional cream "mat" for overlaps
   -------------------------------------------------------------------------- */
img,
.zine-img {
  border-radius: 6px;
}

.photo-mat,
.zine-img--mat,
img.mat {
  border: 6px solid var(--cream);
  border-radius: 6px;
}

.photo-stack,
.zine-photo-stack { position: relative; display: inline-block; }
.photo-stack .photo-mat,
.zine-photo-stack .zine-img--mat {
  position: absolute;
  z-index: 2;
  right: -9%;
  bottom: -9%;
}

/* --------------------------------------------------------------------------
   8. Motion — subtle 0.2s transitions, reduced-motion respected
   -------------------------------------------------------------------------- */
a,
button,
.zine-btn,
.cta-button,
.card,
.zine-card,
nav a,
img {
  transition: color .2s ease, background-color .2s ease,
              border-color .2s ease, box-shadow .2s ease,
              transform .2s ease, opacity .2s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- full-bleed hero (photo layer + inner) ---- */
.hero { background: #3A3D3B; padding: 0; position: relative; }
.hero-photo {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 32%;
}
.hero-inner {
  position: relative; z-index: 1;
  padding: 128px 0 116px;
}
.kicker {
  color: #E2B83A; font: 600 0.8rem/1.4 var(--font-body);
  letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 12px;
}
.hero .masthead,
.masthead {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 1.03;
  color: #F3EDE3; margin: 0 0 14px; max-width: 760px;
  letter-spacing: -0.01em;
}
.hero .tagline,
.tagline {
  color: rgba(243,237,227,0.85); font-size: 0.95rem; max-width: 580px; margin: 0;
}
.signup-row { display: flex; max-width: 470px; margin: 24px 0 10px; }
.signup-row input {
  flex: 1; min-width: 0; border: 2px solid #2A2A28; background: #F3EDE3;
  padding: 12px 14px; font: 500 0.85rem var(--font-body); color: #2A2A28;
  border-radius: 6px 0 0 6px;
}
.signup-row .btn-zine { border-radius: 0 6px 6px 0; margin: 0; }
.hero-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.hero-links a {
  color: #D4C4A8; font: 600 0.8rem var(--font-body);
  text-decoration: none; letter-spacing: 0.02em;
}
.hero-links a:hover { color: #E2B83A; }
.hero-credit {
  position: absolute; right: 16px; bottom: 10px; z-index: 1; margin: 0;
  color: rgba(243,237,227,0.45); font: 400 0.62rem var(--font-body);
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .hero-inner { padding: 88px 0 84px; }
  .signup-row { max-width: 100%; }
}

/* --------------------------------------------------------------------------
   9. Homepage layout repair.
   The homepage markup uses a second set of hooks (.zine container, .grid-2col,
   .event-rows, .section-rule, .text-link, .sr-only …). main.css leaks into them
   through .hero p, .hero h1, nav and .event-date, so every one is overridden
   here with a scoped, higher-specificity selector. Presentation only — copy and
   hrefs are frozen. Breakpoints checked across 360px–1440px.
   -------------------------------------------------------------------------- */

/* Container hook: main.css only defines .container, so without this the whole
   homepage rendered flush against the left viewport edge. 1440 -> 1120px
   (160px gutters); 640 -> 604px (18px gutters); 360 -> 324px (18px gutters). */
.zine {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* The label was marked .sr-only but the class did not exist, so "Email address"
   rendered as a visible flex item and squeezed the input to 74px. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Hero: one padding source. .hero-inner owns the vertical rhythm; the old
   main.css .hero padding (92/100px, 68/76px at <=800px) is neutralised. */
.hero { padding: 0; background: var(--forest); }
.zine.hero-inner { padding: 132px 0 124px; }

/* (0,2,0) beats main.css .hero p (0,1,1), which otherwise forced every hero
   paragraph to muted 1.18rem with a 32px bottom margin. */
.hero .kicker {
  max-width: none; margin: 0 0 12px; color: #E2B83A;
  font: 600 0.8rem/1.4 var(--font-body);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.hero .masthead {
  max-width: 760px; margin: 0 0 14px;
  font-family: var(--font-display); font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 900; line-height: 1.05; letter-spacing: 0;
  text-transform: uppercase; color: #F3EDE3;
}
.hero .tagline {
  max-width: 580px; margin: 0; color: rgba(243, 237, 227, 0.9);
  font: 400 0.95rem/1.65 var(--font-body);
}

/* Fused signup row: both controls are exactly 48px tall, share one 2px ink
   border, and never wrap while there is room (<=520px row + ~256px button). */
.hero .signup-row {
  display: flex; flex-wrap: nowrap; align-items: stretch;
  width: 100%; max-width: 520px; margin: 26px 0 12px;
}
.hero .signup-row input {
  flex: 1 1 auto; width: 0; min-width: 0; height: 48px; margin: 0;
  padding: 0 14px; border: 2px solid var(--ink); border-right: 0;
  border-radius: 6px 0 0 6px; background: var(--cream);
  color: var(--ink); font: 500 0.85rem/44px var(--font-body);
}
.hero .signup-row .btn-zine {
  flex: 0 0 auto; height: 48px; margin: 0; padding: 0 18px;
  border: 2px solid var(--ink); border-radius: 0 6px 6px 0;
  background: var(--mustard); color: var(--ink);
  font: 600 0.78rem/1.2 var(--font-body); letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap; box-shadow: var(--zine-shadow);
}

/* .hero-links is a <nav>, so main.css nav (incl. the <=800px
   max-width:calc(100% - 120px) / flex-end / overflow-x:auto rule) leaked in. */
.hero .hero-links {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: flex-start; gap: 8px 24px;
  max-width: none; margin: 12px 0 0; overflow: visible;
}
.hero .hero-links a {
  display: inline-block; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: #D4C4A8;
  font: 600 0.8rem/1.4 var(--font-body);
  letter-spacing: 0.02em; text-decoration: none;
}
.hero .hero-links a:hover { color: #E2B83A; }

/* bottom:52px keeps the credit above the 35px cream wave divider. */
.hero > .hero-credit {
  position: absolute; right: 24px; bottom: 52px; z-index: 2;
  margin: 0; max-width: none; color: rgba(243, 237, 227, 0.72);
  font: 400 0.68rem/1.5 var(--font-body);
  letter-spacing: 0.02em; text-align: right; white-space: nowrap;
}
.hero > .hero-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.hero > .hero-credit a:hover { color: #E2B83A; }

/* ---- shared section furniture ------------------------------------------ */
.section-rule {
  margin: 0 0 18px; padding: 0 0 12px;
  border: 0; border-bottom: 2px solid var(--sand);
  font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 800; line-height: 1.15; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink);
}
.text-link {
  display: inline-block; color: var(--terracotta); text-decoration: none;
  font: 600 0.8rem/1.5 var(--font-body);
}
.text-link:hover { color: var(--forest); text-decoration: underline; }

/* ---- "This week in Pinner": tactile event rows ------------------------- */
.week-section { padding: clamp(64px, 8vw, 104px) 0; background: var(--cream); }
.week-subhead { margin: 0 0 6px; color: var(--ink); font: 600 0.95rem/1.5 var(--font-body); }
.week-intro { margin: 0 0 18px; max-width: 44rem; color: var(--muted); font: 400 0.85rem/1.7 var(--font-body); }
.event-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sand); }
.event-row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto;
  column-gap: 20px; align-items: center;
  min-height: 68px; padding: 14px 4px 14px 2px;
  border-bottom: 1px solid var(--sand);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.event-row:hover {
  transform: translate(-2px, -2px);
  background: #FBF6EC; box-shadow: 3px 3px 0 var(--sand);
}
/* Mustard date pill: weekday + date straight from the event date, uppercased
   mono. Uses fresh child hooks so main.css .event-date__* cannot leak in. */
.event-rows .event-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 46px; padding: 4px 5px;
  background: var(--mustard); border: 2px solid var(--ink); border-radius: 6px;
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--font-body); font-weight: 700; line-height: 1.15;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
}
.event-rows .event-date__dow { font-size: 0.62rem; }
.event-rows .event-date__num { font-size: 0.82rem; }
.event-row__body { min-width: 0; }
.event-title {
  margin: 0 0 4px; color: var(--ink); font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700; line-height: 1.25;
}
.event-title a { color: var(--ink); text-decoration: none; }
.event-title a::after {
  content: "\2192"; display: inline-block; margin-left: 0.4em;
  font-family: var(--font-body); font-size: 0.8em; color: var(--terracotta);
  opacity: 0; transform: translateX(-4px);
  transition: opacity .18s ease, transform .18s ease;
}
.event-row:hover .event-title a,
.event-title a:focus-visible { color: var(--terracotta); }
.event-row:hover .event-title a::after,
.event-title a:focus-visible::after { opacity: 1; transform: translateX(0); }
.event-meta { display: block; color: var(--muted); font: 400 0.75rem/1.5 var(--font-body); }
.event-category {
  justify-self: end; white-space: nowrap; padding: 4px 9px;
  border: 1px solid var(--sand); border-radius: 999px;
  background: transparent; color: var(--terracotta);
  font: 600 0.62rem/1.3 var(--font-body);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ---- "What we do" / "Recent editions" ---------------------------------- */
section.band-sand { padding: clamp(64px, 8vw, 104px) 0; background: #EFE8DA; }
.grid-2col {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px); align-items: start;
}
.what-intro { margin: 0 0 26px; color: var(--ink); font-family: var(--font-display); font-size: 1.15rem; }
.what-item { padding: 18px 0; border-top: 1px solid var(--sand); }
.what-item h3 {
  margin: 6px 0 8px; color: var(--ink); font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 800; line-height: 1.25;
}
.what-item p { margin: 0 0 10px; color: var(--ink); font: 400 0.83rem/1.7 var(--font-body); }
.editions-list { list-style: none; margin: 0; padding: 0; }
.editions-list li { padding: 12px 0; border-bottom: 1px solid var(--sand); }
.editions-list a { color: var(--terracotta); font: 500 0.8rem/1.6 var(--font-body); }

/* ---- submit band ------------------------------------------------------- */
section.band-terracotta { padding: 24px 0; }
.submit-band {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 14px 32px;
}
.submit-band .submit-band__title {
  flex: 1 1 100%; margin: 0; color: var(--cream); font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900;
}
.submit-band__actions {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 14px 24px; flex: 1 1 100%;
}
.submit-band .btn-zine { flex: 0 0 auto; }

/* ---- breakpoints (checked at 360/400/480/640/760/960/1024/1440) -------- */
@media (max-width: 760px) {
  /* 760 -> 712px container; one column, so no 280px slivers. */
  .grid-2col { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 640px) {
  .zine { width: calc(100% - 36px); }              /* 604px at 640, 324px at 360 */
  .zine.hero-inner { padding: 96px 0 100px; }
  .hero .signup-row { max-width: 100%; }
  .hero > .hero-credit {
    right: 18px; left: 18px; bottom: 50px;
    text-align: left; white-space: normal; font-size: 0.62rem;
  }
  .event-row { grid-template-columns: 60px minmax(0, 1fr) auto; column-gap: 12px; }
}
@media (max-width: 480px) {
  /* At 360px the container is 324px and the fused button needs ~256px,
     leaving 68px for the field. Stack both full-width controls instead. */
  .hero .signup-row { flex-wrap: wrap; gap: 10px 0; }
  .hero .signup-row input {
    flex: 1 1 100%; width: 100%; height: 46px;
    border-right: 2px solid var(--ink); border-radius: 6px;
    font-size: 0.8rem; line-height: 42px;
  }
  .hero .signup-row .btn-zine {
    flex: 1 1 100%; width: 100%; height: 46px; border-radius: 6px;
  }
  /* Band keeps only its title and submit button; no email row here. */
  .submit-band__actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .submit-band .btn-zine { flex: 1 1 100%; width: 100%; }
  /* Narrow: mustard date pill stacks above the title. */
  .event-row { grid-template-columns: 1fr; gap: 8px; padding: 14px 2px; }
  .event-rows .event-date {
    flex-direction: row; gap: 8px; min-height: 0; align-self: start;
    justify-self: start; padding: 4px 10px;
  }
  .event-category { grid-column: 1; justify-self: start; }
}
