/* Project Dynasty seasonal window themes (owner-specified 2026-10-10).
   Loaded last so :root[data-season] token shifts win over the base layers.
   Everything here is additive: accents, a page wash, one tiny motif per
   season, and the home greeting. No layout rules, no external assets, no
   webfonts. Dark values are explicit because the dark token block ties on
   specificity otherwise. */

/* ---------- Halloween (Oct 24-31) ---------- */

:root[data-season="halloween"] {
  --pd-accent: #b4440a;
  --pd-accent-strong: #8f3407;
  --pd-accent-soft: #f5e2d5;
  --pd-page: #f7f3ef;
  --pd-shell-accent: #b4440a;
  --pd-season-pin: #c2500f;
  --pd-season-greeting-ink: #ffc08a;
  --pd-season-motif: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20fill-rule='evenodd'%20d='M12%203a6.2%206.2%200%200%201%206.2%206.2v9.4l-2.3-1.9-1.8%201.9-2.1-2-2.1%202-1.8-1.9-2.3%201.9V9.2A6.2%206.2%200%200%201%2012%203Zm-2.2%206.6a1.15%201.15%200%201%200%200%202.3%201.15%201.15%200%200%200%200-2.3Zm4.4%200a1.15%201.15%200%201%200%200%202.3%201.15%201.15%200%200%200%200-2.3Z'/%3E%3C/svg%3E");
}

:root[data-theme="dark"][data-season="halloween"] {
  --pd-accent: #ffb27a;
  --pd-accent-strong: #ffd0aa;
  --pd-accent-soft: #38271d;
  --pd-page: #0e0b0a;
  --pd-shell-accent: #ffb27a;
  --pd-season-pin: #ffb27a;
}

/* ---------- Thanksgiving (Monday before Thanksgiving through Sunday after) ---------- */

:root[data-season="thanksgiving"] {
  --pd-accent: #8a5a00;
  --pd-accent-strong: #6d4700;
  --pd-accent-soft: #f4e8d3;
  --pd-page: #f8f4ec;
  --pd-shell-accent: #8a5a00;
  --pd-season-pin: #a06a08;
  --pd-season-greeting-ink: #f3cd85;
  --pd-season-motif: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='white'%20fill-rule='evenodd'%20d='M12%2021.2c-4.8-4.1-7.2-7.7-7.2-11.1C4.8%206.6%207.7%204%2011.4%204c.2%200%20.4%200%20.6.1%203.9.3%206.8%203.4%206.8%207.1%200%203.3-2.3%206.8-6.8%2010Zm-.6-.9V8.9h1.2v11.4Z'/%3E%3C/svg%3E");
}

:root[data-theme="dark"][data-season="thanksgiving"] {
  --pd-accent: #f0c780;
  --pd-accent-strong: #f7dca8;
  --pd-accent-soft: #322819;
  --pd-page: #0e0c09;
  --pd-shell-accent: #f0c780;
  --pd-season-pin: #f0c780;
}

/* ---------- Christmas (Dec 11-25) ---------- */

:root[data-season="christmas"] {
  --pd-accent: #b3272d;
  --pd-accent-strong: #8f1c22;
  --pd-accent-soft: #f6dedf;
  --pd-page: #f7f2f2;
  --pd-shell-accent: #a32127;
  --pd-season-pin: #c02f35;
  --pd-season-greeting-ink: #ffa9ad;
  --pd-season-motif: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='white'%20stroke-width='1.7'%20stroke-linecap='round'%3E%3Cpath%20d='M12%203.2v17.6M4.5%207.5l15%209M19.5%207.5l-15%209'/%3E%3C/svg%3E");
}

:root[data-theme="dark"][data-season="christmas"] {
  --pd-accent: #ff9aa0;
  --pd-accent-strong: #ffc3c7;
  --pd-accent-soft: #382326;
  --pd-page: #0e0a0b;
  --pd-shell-accent: #ff9aa0;
  --pd-season-pin: #ff9aa0;
}

/* ---------- Shared seasonal touches (no layout impact) ---------- */

/* Tiny crest pin on the top-bar wordmark, absolutely placed so nothing
   reflows at any width. */
:root[data-season] .pd-brand {
  position: relative;
}

:root[data-season] .pd-brand::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: 0;
  width: 13px;
  height: 13px;
  background: var(--pd-season-pin, var(--pd-accent));
  -webkit-mask: var(--pd-season-motif) center / contain no-repeat;
  mask: var(--pd-season-motif) center / contain no-repeat;
  filter: drop-shadow(0 0 1px rgba(9, 9, 11, 0.55));
  pointer-events: none;
}

/* Barely-there seasonal hairline where the command bar meets the page. */
:root[data-season] .pd-topbar {
  border-bottom-color: color-mix(in srgb, var(--pd-season-pin, var(--pd-accent)) 38%, var(--pd-shell-line));
}

/* Hero panel hue shift; the panel is always dark, so the tints stay dark. */
:root[data-season="halloween"] .m27-home .m27-hero-copy {
  background: radial-gradient(130% 150% at 10% -10%, #3b2a1e 0%, #241a13 55%, #171210 100%);
}

:root[data-season="thanksgiving"] .m27-home .m27-hero-copy {
  background: radial-gradient(130% 150% at 10% -10%, #3a2f1c 0%, #251e12 55%, #16130d 100%);
}

:root[data-season="christmas"] .m27-home .m27-hero-copy {
  background: radial-gradient(130% 150% at 10% -10%, #352427 0%, #22171a 55%, #150f10 100%);
}

/* One-line themed greeting on the home hero. It seats absolutely inside the
   hero's existing top padding, so the seasonal line never shifts content. */
:root[data-season] .m27-home .m27-hero-copy {
  position: relative;
}

.m27-home .m27-hero-copy .pd-season-greeting {
  position: absolute;
  top: 10px;
  left: 34px;
  display: inline-block;
  width: max-content;
  max-width: none;
  margin: 0;
  color: var(--pd-season-greeting-ink, var(--pd-accent));
  font: 800 11px/1.2 var(--pd-shell-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .m27-home .m27-hero-copy .pd-season-greeting {
    top: 4px;
    left: 20px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }
}

.m27-home .m27-hero-copy .pd-season-greeting::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  vertical-align: -2px;
  background: currentColor;
  -webkit-mask: var(--pd-season-motif) center / contain no-repeat;
  mask: var(--pd-season-motif) center / contain no-repeat;
}
