/*
Theme Name: Trunk or Treat America
Theme URI: https://trunkortreatamerica.org
Author: Trunk or Treat America
Description: Community-first fall events directory theme. Fall Radar homepage, event listings, DIY guides, and community stories in the Trunk or Treat America brand system (Fredoka + Inter, cream/orange/gold/sage/plum palette).
Version: 1.3.3
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: trunk-or-treat-america
*/
/* Trunk or Treat America — shared brand tokens & base */
:root {
  --cream: #FFF7E8;
  --cream-deep: #FBEED6;
  --orange: #C65320;
  --orange-soft: #E08A54;
  --plum: #39243F;
  --plum-deep: #2A182F;
  --gold: #F2BD50;
  --forest: #315B46;
  --sage: #7FA05B;
  --ink: #39243F;
  --ink-soft: #6B5570;

  --font-display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(57, 36, 63, 0.08);
  --shadow-md: 0 6px 18px rgba(57, 36, 63, 0.10);
  --shadow-lg: 0 16px 40px rgba(57, 36, 63, 0.14);

  --content-wide: 1200px;
  --content-default: 960px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--cream);
}

img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { cursor: pointer; font: inherit; color: inherit; background: none; border: none; }
input, select { font: inherit; color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 500;
  border-radius: var(--radius-full);
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: #A9431A; transform: translateY(-2px); }
.btn-plum { background: var(--plum); color: var(--cream); }
.btn-plum:hover { background: var(--plum-deep); transform: translateY(-2px); }
.btn-ghost { border: 2px solid var(--plum); color: var(--plum); }
.btn-ghost:hover { background: var(--plum); color: var(--cream); }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; font-weight: 600;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.7rem;
}
.chip-free { background: var(--gold); color: var(--plum); }
.chip-public { background: rgba(127, 160, 91, 0.18); color: var(--forest); }

.dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; display: inline-block; flex: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--plum); color: var(--cream);
  padding: 0.75rem 1.25rem; border-radius: 0 0 var(--radius-md) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

.container { width: min(var(--content-wide), 100% - 3rem); margin-inline: auto; }

footer.site-footer { background: var(--plum); color: #E9DCC8; }
footer.site-footer a { color: #F2BD50; text-decoration: none; }
footer.site-footer a:hover { text-decoration: underline; }

/* ===== Theme overrides for dynamic elements ===== */
.dot-confirmed { background: #2E7D32; }
.dot-checked { background: #1565C0; }
.dot-awaiting { background: #C9A227; }

/* Single event & archive */
.entry-header { padding: clamp(2rem, 4vw, 3rem) 0 0; }
.entry-content, .entry-header { width: min(72ch, 100% - 2rem); margin-inline: auto; }
.page-title, .entry-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.75rem; }
.entry-content { padding-bottom: 3rem; }
.tot-event-list { list-style: none; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); width: min(var(--content-wide), 100% - 2rem); margin-inline: auto; padding-bottom: 3rem; }
@media (max-width: 900px) { .tot-event-list { grid-template-columns: 1fr; } }
.tot-event-list .event-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; display: flex; flex-direction: column; }
.tot-event-list .event-card img { width: 100%; height: 160px; object-fit: cover; }
.tot-event-list .event-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }

/* Blog index */
.tot-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; width: min(var(--content-wide), 100% - 2rem); margin-inline: auto; padding-bottom: 3rem; }
@media (max-width: 900px) { .tot-posts-grid { grid-template-columns: 1fr; } }
.tot-post-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; display: flex; flex-direction: column; }
.tot-post-card img { width: 100%; height: 180px; object-fit: cover; }
.tot-post-card .event-body { flex: 1; }
.tot-post-card h2 { font-size: 1.15rem; }

/* Search results / notice */
.tot-notice { width: min(72ch, 100% - 2rem); margin: 2rem auto; background: rgba(242,189,80,0.18); border-left: 5px solid var(--gold); padding: 1rem 1.25rem; border-radius: var(--radius-md); }

/* ===== Homepage (Fall Radar) layout ===== */

  /* ===== Header (kitchn-style) ===== */
  .top-bar { background: #fff; border-bottom: 1px solid rgba(57, 36, 63, 0.1); position: sticky; top: 0; z-index: 60; }
  .top-bar-inner { display: flex; align-items: center; gap: 1.25rem; padding: 0.7rem 0; }
  .menu-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-md); color: var(--plum); }
  .menu-btn:hover { background: var(--cream); }
  .menu-btn svg { width: 22px; height: 22px; }
  .brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--plum); }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.05; }
  .brand-name small { display: block; font-size: 0.6rem; letter-spacing: 0.16em; color: var(--orange); font-family: var(--font-body); font-weight: 600; }
  .top-search input { flex: 1; border: 2px solid rgba(57, 36, 63, 0.18); border-radius: var(--radius-full); padding: 0.5rem 1rem; background: var(--cream); min-width: 0; font-size: 0.9rem; }
  .top-search { flex: 1 1 320px; max-width: 480px; display: flex; gap: 0.4rem; }
  .top-search button { background: var(--plum); color: var(--cream); border-radius: var(--radius-full); width: 40px; height: 40px; display: grid; place-items: center; flex: none; }
  .top-search button:hover { background: var(--plum-deep); }
  .top-actions { display: flex; align-items: center; gap: 1rem; }
  .pill-cta { background: var(--orange); color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 0.85rem; padding: 0.55rem 1.1rem; border-radius: var(--radius-full); text-decoration: none; white-space: nowrap; }
  .pill-cta:hover { background: #A9431A; }
  .top-link { text-decoration: none; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.05em; white-space: nowrap; }
  .top-link:hover { color: var(--orange); }
  @media (max-width: 900px) { .top-search, .top-link { display: none; } }
  .sub-nav { background: var(--cream); border-bottom: 1px solid rgba(57, 36, 63, 0.08); }
  .sub-nav-inner { display: flex; gap: 1.5rem; padding: 0.55rem 0; overflow-x: auto; scrollbar-width: none; }
  .sub-nav a { text-decoration: none; font-weight: 500; font-size: 0.88rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.45rem; color: var(--plum); }
  .sub-nav a:hover { color: var(--orange); }
  .live-badge { background: var(--orange); color: #fff; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; padding: 0.15rem 0.5rem; border-radius: var(--radius-full); }

  /* ===== Hero (Layout C full-bleed) ===== */
  .hero { position: relative; min-height: var(--tot-hero-height, 460px); padding: 0; display: grid; align-items: center; color: var(--cream); overflow: hidden; }
  .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
  .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(42, 24, 47, 0.5), transparent 80%), linear-gradient(180deg, rgba(42, 24, 47, 0.45) 0%, rgba(42, 24, 47, 0.12) 40%, rgba(42, 24, 47, 0.78) 100%); }
  .hero-inner { position: relative; z-index: 1; padding: clamp(1.75rem, 3vw, 2.5rem) 0; }
  .hero h1 { font-size: clamp(2.25rem, 1.25rem + 3vw, 3.5rem); max-width: 16ch; margin-bottom: 0.75rem; text-shadow: 0 2px 18px rgba(42, 24, 47, 0.45); }
  .hero h1 em { font-style: normal; color: var(--gold); }
  .squiggle { display: block; margin: -0.4rem 0 0.9rem; }
  .hero .sub { font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 48ch; margin-bottom: 1rem; opacity: 0.95; }
  .hero-search { background: rgba(255, 247, 232, 0.97); border-radius: var(--radius-lg); padding: 0.7rem; display: flex; gap: 0.55rem; max-width: 700px; box-shadow: var(--shadow-lg); }
  .hero-search input { flex: 2; border: 2px solid rgba(57, 36, 63, 0.12); border-radius: var(--radius-md); padding: 0.65rem 0.9rem; background: var(--cream); min-width: 0; color: var(--plum); }
  .hero-search select { flex: 1; border: 2px solid rgba(57, 36, 63, 0.12); border-radius: var(--radius-md); padding: 0.65rem 0.5rem; background: var(--cream); color: var(--plum); }
  @media (max-width: 620px) { .hero-search { flex-direction: column; } .hero-search .btn { width: 100%; } }
  .stat-pills { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }
  .stat-pill { display: inline-flex; align-items: center; gap: 0.7rem; background: rgba(255, 247, 232, 0.95); color: var(--plum); border-radius: var(--radius-full); padding: 0.5rem 1.1rem 0.5rem 0.6rem; text-decoration: none; transition: transform 160ms ease; }
  .stat-pill:hover { transform: translateY(-3px); }
  .stat-pill .ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; flex: none; }
  .stat-pill b { font-family: var(--font-display); font-size: 1.02rem; display: block; line-height: 1.1; }
  .stat-pill span { font-size: 0.72rem; font-weight: 500; opacity: 0.75; display: block; }
  .p-orange .ico { background: var(--orange); } .p-gold .ico { background: var(--gold); } .p-sage .ico { background: var(--sage); }

  /* ===== Sections ===== */
  section { padding: clamp(2.75rem, 5.5vw, 4.25rem) 0; }
  .section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
  .section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
  .see-more { border: 2px solid var(--plum); color: var(--plum); font-family: var(--font-display); font-weight: 500; font-size: 0.85rem; padding: 0.5rem 1.1rem; border-radius: var(--radius-full); text-decoration: none; white-space: nowrap; }
  .see-more:hover { background: var(--plum); color: var(--cream); }

  /* ===== Start Here carousel ===== */
  .start-here { background: var(--cream-deep); }
  .carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(280px, 74vw); gap: 1.1rem; overflow-x: auto; padding-bottom: 0.75rem; scroll-snap-type: x mandatory; align-items: stretch; }
  .carousel > * { scroll-snap-align: start; }
  .anchor-card { background: var(--gold); color: var(--plum); border-radius: var(--radius-lg); padding: 1.5rem; display: flex; flex-direction: column; min-height: 300px; }
  .anchor-card h2 { font-size: 1.75rem; margin-bottom: 0.3rem; }
  .anchor-card p { font-size: 0.9rem; font-weight: 500; opacity: 0.85; }
  .anchor-arrows { margin-top: auto; display: flex; gap: 0.6rem; }
  .anchor-arrows button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; border: 2px solid var(--plum); }
  .anchor-arrows .prev { background: rgba(255, 247, 232, 0.55); }
  .anchor-arrows .next { background: #fff; }
  .guide-card { border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); text-decoration: none; display: flex; flex-direction: column; transition: transform 160ms ease; }
  .guide-card:hover { transform: translateY(-4px); }
  .guide-card img { width: 100%; height: 175px; object-fit: cover; }
  .guide-bar { padding: 0.9rem 1.1rem 1.1rem; flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }
  .guide-bar h3 { font-size: 1.02rem; }
  .guide-bar p { font-size: 0.8rem; color: var(--ink-soft); }
  .guide-tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; align-self: flex-start; margin-top: auto; padding-top: 0.4rem; }
  .bar-orange .guide-bar { background: rgba(198, 83, 32, 0.08); } .bar-orange .guide-tag { color: var(--orange); }
  .bar-gold .guide-bar { background: rgba(242, 189, 80, 0.14); } .bar-gold .guide-tag { color: #A9791C; }
  .bar-sage .guide-bar { background: rgba(127, 160, 91, 0.14); } .bar-sage .guide-tag { color: var(--forest); }
  .bar-forest .guide-bar { background: rgba(49, 91, 70, 0.08); } .bar-forest .guide-tag { color: var(--forest); }
  .bar-plum .guide-bar { background: rgba(57, 36, 63, 0.06); } .bar-plum .guide-tag { color: var(--plum); }

  /* ===== Explore grid ===== */
  .explore { background: #fff; }
  .explore-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
  @media (max-width: 1000px) { .explore-grid { grid-template-columns: repeat(4, 1fr); } }
  @media (max-width: 640px) { .explore-grid { grid-template-columns: repeat(3, 1fr); } }
  .tile { text-decoration: none; display: flex; flex-direction: column; gap: 0.55rem; }
  .tile .box { aspect-ratio: 1; border-radius: var(--radius-md); display: grid; place-items: center; font-size: 1.7rem; transition: transform 160ms ease; }
  .tile:hover .box { transform: translateY(-4px) rotate(-2deg); }
  .tile span { text-align: center; font-weight: 600; font-size: 0.82rem; }
  .t-orange { background: var(--orange); } .t-gold { background: var(--gold); } .t-sage { background: var(--sage); }
  .t-plum { background: var(--plum); } .t-soft { background: #E08A54; } .t-moss { background: #97B87A; }
  .t-pale { background: #F6DCA0; } .t-wine { background: #6B4A5E; }
  .tile.route .box { outline: 3px dashed var(--orange); outline-offset: -10px; position: relative; }

  /* ===== Fall Radar rail ===== */
  .radar { background: var(--cream-deep); }
  .radar-title { display: flex; align-items: center; gap: 0.6rem; font-size: clamp(1.6rem, 3vw, 2.3rem); }
  .rail { display: grid; grid-auto-flow: column; grid-auto-columns: 300px; gap: 1.1rem; overflow-x: auto; padding-bottom: 0.75rem; scroll-snap-type: x mandatory; }
  .rail > * { scroll-snap-align: start; }
  .event-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; transition: transform 160ms ease; }
  .event-card:hover { transform: translateY(-4px); }
  .event-card img { width: 100%; height: 130px; object-fit: cover; }
  .event-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: 0.4rem; }
  .event-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; }
  .event-body h3 { font-size: 1.02rem; }
  .event-when { font-size: 0.82rem; font-weight: 600; color: var(--orange); }
  .event-where { font-size: 0.82rem; color: var(--ink-soft); }
  .verify { display: flex; align-items: center; gap: 0.4rem; font-size: 0.76rem; font-weight: 600; margin-top: 0.35rem; padding-top: 0.5rem; border-top: 1px dashed rgba(57,36,63,0.15); }
  .disclaimer { font-size: 0.82rem; color: var(--ink-soft); margin-top: 1.25rem; }
  .disclaimer a { color: var(--plum); font-weight: 600; }

  /* ===== Organizer band ===== */
  .organizer-band { background: var(--plum); color: var(--cream); border-radius: var(--radius-xl); padding: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
  @media (max-width: 820px) { .organizer-band { grid-template-columns: 1fr; } }
  .organizer-band h2 { color: var(--gold); font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.5rem; }
  .organizer-band p { opacity: 0.85; max-width: 56ch; }
  .organizer-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
  .btn-gold { background: var(--gold); color: var(--plum); }
  .btn-gold:hover { background: #E5A935; }
  .btn-outline-light { border: 2px solid var(--cream); color: var(--cream); }
  .btn-outline-light:hover { background: var(--cream); color: var(--plum); }

  /* ===== Latest Stories ===== */
  .stories { background: #fff; }
  .story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
  @media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; gap: 2rem; } }
  .story { padding: 0 1.75rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.6rem; }
  .story + .story { border-left: 1px solid rgba(57, 36, 63, 0.12); }
  @media (max-width: 900px) { .story + .story { border-left: none; } .story { padding: 0; } }
  .story .cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); }
  .story img { width: 100%; height: 190px; object-fit: cover; border-radius: var(--radius-sm); }
  .story h3 { font-size: 1.15rem; line-height: 1.3; }
  .story:hover h3 { color: var(--orange); }
  .story .byline { font-size: 0.8rem; color: var(--ink-soft); }

  /* ===== Mission ===== */
  .mission { background: var(--forest); color: var(--cream); }
  .mission-inner { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem; align-items: center; }
  @media (max-width: 820px) { .mission-inner { grid-template-columns: 1fr; } }
  .mission h2 { color: var(--gold); font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.6rem; }
  .mission p { opacity: 0.85; max-width: 62ch; }
  .mission blockquote { font-family: var(--font-display); font-size: clamp(1.2rem, 2.5vw, 1.6rem); color: var(--gold); text-align: right; }
  @media (max-width: 820px) { .mission blockquote { text-align: left; } }

  /* ===== Footer ===== */
  .site-footer { padding: 2.5rem 0 2rem; }
  .footer-grid { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: flex-start; }
  .footer-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; }
  .footer-brand img { width: 40px; height: 40px; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; font-size: 0.88rem; margin-left: auto; }
  .footer-note { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 247, 232, 0.15); font-size: 0.8rem; color: rgba(255, 247, 232, 0.6); display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
