/* =============================================================
   SEASONAL: THANKSGIVING 2026
   Loaded on every page view; everything here is inert until
   thanksgiving.js adds body.season-thanksgiving (Nov 8-29, 2026,
   or ?thanksgiving=1 to preview, ?thanksgiving=0 to hide).
   To retire the theme, remove the two tags in <head>, the canvas
   and ribbon in the hero, and the #leafModal block.
   ============================================================= */

:root {
  --tg-rust: #b5451b;
  --tg-amber: #d9822b;
  --tg-amber-light: #f0a04b;
  --tg-wine: #7a1f2b;
  --tg-cream: #f3d9a4;
}

/* ---- Falling leaves canvas (hero only) ---- */
.tg-leaves { position: absolute; inset: 0; z-index: 3; pointer-events: none; display: none; }
body.season-thanksgiving .tg-leaves { display: block; }

/* ---- A touch of warmth on the hero backdrop ---- */
body.season-thanksgiving .hero__bg { filter: blur(28px) brightness(0.55) saturate(1.05) sepia(0.18); }
body.season-thanksgiving .hero__bg::after {
  background:
    radial-gradient(ellipse 70% 60% at 50% 35%, rgba(217, 130, 43, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(122, 31, 43, 0.22) 0%, transparent 70%),
    linear-gradient(180deg, rgba(17,17,17,0.55) 0%, rgba(17,17,17,0.25) 40%, #111111 100%);
}
body.season-thanksgiving .hero__scroll-line { background: linear-gradient(180deg, var(--tg-amber), transparent); }
/* The ribbon makes the hero a little taller; on shorter screens drop the decorative scroll hint so it never sits on the buttons. */
@media (max-height: 920px) { body.season-thanksgiving .hero__scroll { display: none; } }

/* ---- Ribbon above the logo ---- */
.tg-ribbon {
  display: inline-flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: center;
  margin: 0 auto 1.4rem; padding: 0.4rem 0.45rem 0.4rem 0.95rem; border-radius: 999px;
  border: 1px solid rgba(217, 130, 43, 0.45);
  background: linear-gradient(90deg, rgba(122, 31, 43, 0.38), rgba(217, 130, 43, 0.18));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tg-cream);
  opacity: 0; animation: fadeSlideUp 0.8s 0.1s forwards;
}
.tg-ribbon[hidden] { display: none; }
.tg-ribbon__leaf { width: 16px; height: 16px; flex: none; fill: var(--tg-amber); transform-origin: 50% 100%; animation: tgSway 3.2s ease-in-out infinite; }
@keyframes tgSway { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
.tg-ribbon__text { white-space: nowrap; }
.tg-ribbon__sep { width: 1px; height: 14px; background: rgba(243, 217, 164, 0.35); }
.tg-ribbon__btn {
  background: var(--tg-amber); color: #1a0f08; border: none; border-radius: 999px; padding: 0.5rem 0.95rem;
  font: inherit; letter-spacing: inherit; text-transform: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.tg-ribbon__btn:hover, .tg-ribbon__btn:focus-visible { background: var(--tg-amber-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(217, 130, 43, 0.3); }
.tg-ribbon.is-thanked .tg-ribbon__btn { background: transparent; color: var(--tg-cream); border: 1px solid rgba(243, 217, 164, 0.4); cursor: default; }
@media (max-width: 480px) {
  .tg-ribbon { font-size: 0.66rem; gap: 0.45rem; padding: 0.3rem 0.3rem 0.3rem 0.75rem; letter-spacing: 0.06em; }
  .tg-ribbon__sep { display: none; }
  .tg-ribbon__btn { padding: 0.45rem 0.75rem; }
}

/* ---- "Leave a leaf" modal ---- */
.tg-modal .modal__box { width: min(520px, 100%); }
.tg-card {
  position: relative; overflow: hidden; background: var(--color-bg-card);
  border: 1px solid rgba(217, 130, 43, 0.35); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.tg-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(217, 130, 43, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(122, 31, 43, 0.25), transparent 65%);
}
.tg-card > * { position: relative; }
.tg-card .section-label { color: var(--tg-amber); margin-bottom: 0.6rem; }
.tg-card h3 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; margin-bottom: 0.5rem; }
.tg-card p { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: 1.25rem; }
.tg-form { display: flex; gap: 0.6rem; }
.tg-form input {
  flex: 1; min-width: 0; padding: 0.875rem 1rem; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  color: var(--color-text); font-family: var(--font-body); font-size: var(--text-sm); transition: border-color var(--transition-fast);
}
.tg-form input:focus { outline: none; border-color: var(--tg-amber); }
.tg-form .btn--primary { background: var(--tg-amber); white-space: nowrap; }
.tg-form .btn--primary:hover { background: var(--tg-amber-light); box-shadow: 0 8px 30px rgba(217, 130, 43, 0.3); }
.tg-card__note { font-size: var(--text-xs) !important; color: var(--color-text-faint) !important; margin: 0.9rem 0 0 !important; }
.tg-card__count { font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .tg-form { flex-direction: column; } }

@media (prefers-reduced-motion: reduce) {
  .tg-ribbon__leaf { animation: none; }
}
