/* Trunk or Treat America v1.2.0 — logo, announcement bar, tagline strip, stat cards. */

/* ----- Announcement bar ----- */
.announce-bar { background: var(--plum-deep); color: var(--cream); font-size: 0.875rem; }
.announce-inner { display: flex; align-items: center; justify-content: center; gap: 1rem; min-height: 38px; padding-block: 0.4rem; position: relative; }
.announce-text { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; font-weight: 600; text-align: center; }
.announce-text a { color: inherit; text-underline-offset: 0.2rem; }
.announce-leaf { width: 16px; height: 16px; color: var(--orange-soft); flex: none; }
.announce-link { position: absolute; right: 0; color: var(--gold); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; text-decoration: none; }
.announce-link:hover { text-decoration: underline; }
@media (max-width: 1180px) { .announce-link { display: none; } }
@media (max-width: 620px) { .announce-bar { font-size: 0.78rem; } .announce-leaf { display: none; } }

/* ----- Logo ----- */
.brand { flex: none; }
.brand .brand-logo { display: block; height: 56px; width: auto; max-width: none; }
.brand .brand-logo-custom { max-height: 60px; width: auto; }
@media (max-width: 620px) { .brand { flex: 1; } .brand .brand-logo { height: 40px; } }

/* ----- Parents link ----- */
.parents-link { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font-weight: 600; font-size: 0.82rem; white-space: nowrap; }
.parents-link > span:first-child { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8'%3E%3Cpath d='M2 5c18-4 34-4 52 0s34 4 64-1' stroke='%235B7FB8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") bottom / 100% 6px no-repeat; padding-bottom: 6px; }
.parents-ico { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(57, 36, 63, 0.35); display: grid; place-items: center; background: var(--cream); }
.parents-ico svg { width: 24px; height: 24px; }
.parents-link:hover { color: var(--orange); }
@media (max-width: 1100px) { .parents-link { display: none; } }

/* ----- Tagline + stat strip ----- */
.tagline-strip { background: var(--cream); padding: clamp(1rem, 2vw, 1.5rem) 0; border-bottom: 1px solid rgba(57, 36, 63, 0.08); }
.tagline-grid { display: grid; grid-template-columns: minmax(215px, 1fr) minmax(0, 2.1fr) minmax(215px, 1fr) minmax(215px, 1fr); gap: clamp(0.75rem, 1.5vw, 1.25rem); align-items: stretch; }
.tagline { position: relative; display: flex; flex-direction: column; justify-content: center; padding-inline: 0.5rem; }
.tagline-text { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 0.85rem + 1.15vw, 1.85rem); line-height: 1.3; color: var(--plum); margin: 0; text-wrap: balance; }
.tagline-squiggle { width: min(340px, 80%); height: 12px; margin-top: 0.35rem; }

/* Rotating words: each slot sized to its current word; words slide up and out. */
.rw-unit { white-space: nowrap; }
.rw { display: inline-grid; vertical-align: bottom; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1); }
.rw-word { grid-area: 1 / 1; justify-self: start; white-space: nowrap; transform: translateY(105%); opacity: 0; transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease; }
.rw-word.is-active { transform: none; opacity: 1; }
.rw-word.is-leaving { transform: translateY(-105%); opacity: 0; }
.rw-1, .rw-3 { color: var(--orange); }
.rw-2 { color: var(--forest); }
.tagline-foot { display: flex; align-items: center; gap: 0.5rem; width: 100%; }
.tagline .tagline-foot { justify-content: inherit; }
.rw-toggle { flex: none; width: 28px; height: 28px; margin-top: 0.3rem; border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); opacity: 0.55; }
.rw-toggle:hover, .rw-toggle:focus-visible { opacity: 1; background: var(--cream-deep); }
.rw-toggle svg { width: 12px; height: 12px; }
.rw-toggle .ic-play, .rw-toggle[aria-pressed="true"] .ic-pause { display: none; }
.rw-toggle[aria-pressed="true"] .ic-play { display: inline; }

.strip-stat { display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 1rem; border-radius: var(--radius-lg); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform 160ms ease, box-shadow 160ms ease; min-width: 0; }
.strip-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.strip-stat:active { transform: translateY(0); }
.strip-ico { width: 64px; height: 64px; flex: none; display: grid; place-items: center; }
.strip-ico svg, .strip-ico-img { width: 64px; height: 64px; }
.strip-ico-img { object-fit: contain; display: block; }
.strip-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.strip-copy b { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.05; }
.strip-copy > span:last-child { font-size: 0.85rem; font-weight: 600; }
.goal-chip { align-self: flex-start; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.1rem 0.5rem; border-radius: var(--radius-full); margin-bottom: 0.2rem; background: rgba(255, 255, 255, 0.7); color: var(--plum); }
.s-sage { background: #C9D9B4; color: var(--plum); }
.s-gold { background: var(--gold); color: var(--plum); }
.s-wine { background: #8E2A2E; color: #FFF7E8; }

/* Desktop: stat 1 | tagline | stat 2 | stat 3 */
.strip-stats { display: contents; }
.strip-stat-1 { order: 1; } .tagline { order: 2; } .strip-stat-2 { order: 3; } .strip-stat-3 { order: 4; }

@media (max-width: 1100px) {
  .tagline-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tagline { grid-column: 1 / -1; order: 0; text-align: center; align-items: center; padding-inline: 2.5rem; }
  .tagline-foot { justify-content: center; }
}
@media (max-width: 720px) {
  /* Phones: search hero first, then the welcome strip. */
  .home main { display: flex; flex-direction: column; }
  .home main > * { order: 2; }
  .home main > .hero { order: 0; }
  .home main > .tagline-strip { order: 1; }
  .tagline-strip { padding: 1.1rem 0 0.9rem; }
  .tagline-squiggle { height: 10px; margin-top: 0.15rem; }
  .tagline-grid { display: block; }
  .tagline { padding-inline: 0; text-align: left; align-items: flex-start; margin-bottom: 0.85rem; }
  .tagline-foot { justify-content: flex-start; }
  .tagline-text { font-size: 1.3rem; }
  .strip-stats { display: flex; gap: 0.65rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -1.5rem; padding: 0.15rem 1.5rem 0.35rem; }
  .strip-stats::-webkit-scrollbar { display: none; }
  .strip-stat { flex: 0 0 min(250px, 74vw); scroll-snap-align: start; padding: 0.65rem 0.85rem; }
  .strip-ico, .strip-ico svg, .strip-ico-img { width: 48px; height: 48px; }
  .strip-copy b { font-size: 1.3rem; }
}

/* Hero note replacing the old pills */
.hero-free { margin-top: 0.85rem; font-size: 0.9rem; font-weight: 600; color: var(--cream); opacity: 0.95; }
.hero-free span { color: var(--gold); }

/* Footer full logo */
.footer-brand { display: inline-block; background: #FFFDF8; border-radius: var(--radius-lg); padding: 0.4rem; line-height: 0; }
.footer-brand img { width: 120px; height: 120px; border-radius: calc(var(--radius-lg) - 0.4rem); }

@media (prefers-reduced-motion: reduce) {
  .rw, .rw-word { transition: none; }
  .rw-toggle { display: none; }
}
