/* ==========================================================================
   Lights On Copper Oaks — style.css
   Single-column, dark, seasonal (Halloween / Christmas) with seasonal theme switch.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "bolota_normal_bold";
  src: url("../assets/fonts/bolota_normal_bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --white: #ffffff;
  --black: #000000;
  --darkPurple: #383750;
  --lightPurple: #c65add;
  --beige: #ffe7d4;
  --orange: #f75800;
  --dullOrange: #d9785d;
  --green: #096b4a;
  --lightBlue: #d2e3f6;

  --font-display: "bolota_normal_bold", "Open Sans", sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-theme: 900ms;

  --primaryColor: var(--white);
  --backgroundColor: var(--black);
  --buttonTextColor: var(--white);
  --paragraphColor: var(--white);
  --secondaryHeadlineColor: var(--white);
}

[data-theme="halloween"] {
  --headlineColor: var(--dullOrange);
  --textColor: var(--white);
  --accent: var(--orange);
  --accent-2: #a64dff;
  --accent-3: #39ff88;
  --glow: rgba(247, 88, 0, 0.45);
  --glow-2: rgba(166, 77, 255, 0.35);
}

[data-theme="christmas"] {
  --headlineColor: var(--white);
  --textColor: var(--white);
  --accent: #ff3fd1;
  --accent-2: #3b6bff;
  --accent-3: #ffffff;
  --glow: rgba(255, 63, 209, 0.4);
  --glow-2: rgba(59, 107, 255, 0.4);
}

/* ---------- Base ---------- */
html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--backgroundColor);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: var(--font-body);
  color: var(--textColor);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--headlineColor);
  margin: 0;
  line-height: 1.1;
  transition: color var(--dur-theme) var(--ease-in-out), text-shadow var(--dur-theme) var(--ease-in-out);
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.25rem);
  letter-spacing: 0.01em;
  text-shadow: 0 0 24px var(--glow);
}

h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--secondaryHeadlineColor);
  margin-bottom: 0.4rem;
}

p {
  margin: 0;
  color: var(--paragraphColor);
  line-height: 1.6;
}

/* ---------- Layout ---------- */
.banner {
  padding: 3rem 1rem 5rem;
  text-align: center;
  max-width: 1500px;
  margin: 0 auto;
}

.group {
  margin-top: 2rem;
}

.logo-group {
  margin-top: 0;
}

.logo {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 50px;
  filter: drop-shadow(0 0 18px var(--glow));
  transition: filter var(--dur-theme) var(--ease-in-out);
}

/* ---------- Bulb string (CSS-only twinkle) ---------- */
.bulb-string {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2.2vw, 22px);
  margin: 1.25rem auto 0;
  max-width: 520px;
  position: relative;
  padding-top: 6px;
}

.bulb-string::before {
  /* the wire */
  content: "";
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-top: 0;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

.bulb-string i {
  width: 9px;
  height: 13px;
  border-radius: 50% 50% 55% 55%;
  background: var(--bulb, var(--accent));
  box-shadow: 0 0 8px 1px var(--bulb, var(--accent));
  animation: twinkle 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.33s);
  transition: background var(--dur-theme), box-shadow var(--dur-theme);
}

.bulb-string i:nth-child(3n + 1) { --bulb: var(--accent);   --i: 1; }
.bulb-string i:nth-child(3n + 2) { --bulb: var(--accent-2); --i: 2; }
.bulb-string i:nth-child(3n)     { --bulb: var(--accent-3); --i: 3; }
.bulb-string i:nth-child(4n)     { animation-duration: 3.4s; }
.bulb-string i:nth-child(5n)     { animation-duration: 2.1s; }

@keyframes twinkle {
  0%, 100% { opacity: 1;   transform: scaleY(1); }
  50%      { opacity: 0.35; transform: scaleY(0.92); }
}

/* ---------- Theme switch ---------- */
.theme-switch {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 0;
}

.theme-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.theme-switch label {
  --w: 150px;
  --h: 44px;
  --knob: 34px;
  position: relative;
  display: block;
  width: var(--w);
  height: var(--h);
  cursor: pointer;
  border: 2px solid var(--primaryColor);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 0 var(--glow);
  transition: box-shadow 500ms var(--ease-out), background 300ms, transform 300ms var(--ease-out);
  user-select: none;
}

.theme-switch label:hover {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 22px 0 var(--glow);
}

.theme-switch label:active {
  transform: scale(0.97);
}

.theme-switch input:focus-visible + label {
  outline: 2px solid var(--lightPurple);
  outline-offset: 4px;
}

.theme-switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: var(--knob);
  height: var(--knob);
  border-radius: 50%;
  background: var(--primaryColor);
  display: grid;
  place-items: center;
  transition: transform 550ms var(--ease-out), background 300ms;
  will-change: transform;
}

.theme-switch .icon {
  position: absolute;
  width: 22px;
  height: 22px;
  transition: opacity 300ms var(--ease-in-out), transform 550ms var(--ease-out);
}

.theme-switch .icon-pumpkin { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.theme-switch .icon-tree    { opacity: 1; transform: rotate(0deg) scale(1); }

.theme-switch .label-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  transition: opacity 250ms var(--ease-in-out), transform 450ms var(--ease-out);
}

.theme-switch .label-christmas { right: 14px; opacity: 1; }
.theme-switch .label-halloween { left: 14px;  opacity: 0; transform: translate(-6px, -50%); }

/* checked = halloween */
.theme-switch input:checked + label .knob {
  transform: translateX(calc(var(--w) - var(--knob) - 10px));
}
.theme-switch input:checked + label .icon-pumpkin { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-switch input:checked + label .icon-tree    { opacity: 0; transform: rotate(90deg) scale(0.6); }
.theme-switch input:checked + label .label-christmas { opacity: 0; transform: translate(6px, -50%); }
.theme-switch input:checked + label .label-halloween { opacity: 1; transform: translate(0, -50%); }

/* ---------- Seasonal content swap ---------- */
.date-swap {
  display: grid;
  place-items: center;
}

.date-swap > * {
  grid-area: 1 / 1;
  transition: opacity 450ms var(--ease-in-out), transform 600ms var(--ease-out), filter 450ms;
}

[data-theme="halloween"] .date-swap .christmas,
[data-theme="christmas"] .date-swap .halloween {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(4px);
  pointer-events: none;
}

.dates p {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

/* Anything else tagged with a season that isn't a swap pair */
[data-theme="halloween"] .christmas:not(.illustration):not(.date-swap > *),
[data-theme="christmas"] .halloween:not(.illustration):not(.date-swap > *) {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  width: 100%;
}

.hero-frame {
  position: relative;
  margin: 0 auto;
  max-width: 1500px;
  aspect-ratio: 1500 / 705; /* tallest of the two images so nothing jumps */
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.hero-frame .illustration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--dur-theme) var(--ease-in-out), transform 1600ms var(--ease-out), filter var(--dur-theme) var(--ease-in-out);
}

/* crossfade with a soft "power-on" scale */
[data-theme="halloween"] .hero-frame .christmas,
[data-theme="christmas"] .hero-frame .halloween {
  opacity: 0;
  transform: scale(1.04);
  filter: brightness(0.4);
}

[data-theme="halloween"] .hero-frame .halloween,
[data-theme="christmas"] .hero-frame .christmas {
  opacity: 1;
  transform: scale(1);
  filter: brightness(1);
}

.hero-glow {
  display: none;
}

/* ---------- Radio ---------- */
.radio h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.radio-wave {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  flex: none;
  transition: background var(--dur-theme), box-shadow var(--dur-theme);
}

.radio-wave::before,
.radio-wave::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ping 2.4s var(--ease-out) infinite;
  transition: border-color var(--dur-theme);
}

.radio-wave::after {
  animation-delay: 1.2s;
}

@keyframes ping {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* ---------- Address + buttons ---------- */
.links {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.25rem;
  gap: 1rem;
}

.button {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 400px;
  padding: 1rem 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--buttonTextColor);
  background: transparent;
  border: 2px solid var(--primaryColor);
  border-radius: 4px;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition:
    color 300ms var(--ease-out),
    transform 300ms var(--ease-out),
    box-shadow 400ms var(--ease-out),
    border-color 300ms;
}

.button > span {
  position: relative;
  z-index: 1;
}

/* fill that rises from the bottom */
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primaryColor);
  transform: translateY(101%);
  transition: transform 380ms var(--ease-out);
  z-index: 0;
}

/* light sweep */
.button::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

@media (hover: hover) {
  .button:hover,
  .button:focus-visible {
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -12px rgba(255, 255, 255, 0.35);
  }
  .button:hover::before,
  .button:focus-visible::before {
    transform: translateY(0);
  }
  .button:hover::after {
    opacity: 1;
    animation: sweep 700ms var(--ease-out) 120ms 1;
  }
  .button:active {
    transform: translateY(0) scale(0.985);
  }
}

@keyframes sweep {
  from { left: -60%; }
  to   { left: 130%; }
}

.button.purple {
  border-color: var(--lightPurple);
}
.button.purple::before {
  background: var(--lightPurple);
}
@media (hover: hover) {
  .button.purple:hover,
  .button.purple:focus-visible {
    color: var(--white);
    box-shadow: 0 14px 34px -12px rgba(198, 90, 221, 0.7);
  }
}

/* ---------- Donation ---------- */
.donation {
  margin: 8rem auto;
  max-width: 800px;
  padding: 0 1rem;
}

.donation img {
  margin: 0 auto;
  width: 100%;
  max-width: 320px;
  transition: transform 500ms var(--ease-out), filter 500ms var(--ease-out);
}

@media (hover: hover) {
  .donation img:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 18px rgba(198, 90, 221, 0.45));
  }
}

.donation p {
  margin-top: 2rem;
}

.donation .button {
  margin-top: 2rem;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 800ms var(--ease-out),
    transform 900ms var(--ease-out);
  transition-delay: calc(var(--reveal-delay, 0) * 110ms);
  will-change: opacity, transform;
}

.reveal[data-reveal-delay="1"] { --reveal-delay: 1; }
.reveal[data-reveal-delay="2"] { --reveal-delay: 2; }
.reveal[data-reveal-delay="3"] { --reveal-delay: 3; }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* keep layout transforms from fighting hover lifts once revealed */
.reveal.is-visible.hero {
  will-change: auto;
}

/* ---------- Theme flash (brief bloom on switch) ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, var(--glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
}

body.is-switching::after {
  opacity: 1;
  transition: opacity 120ms var(--ease-out);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .banner { padding: 2rem 1rem 4rem; }
  .logo { padding: 0 24px; }
  .hero-frame { border-radius: 10px; }
  .donation { margin: 5rem auto; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .bulb-string i { animation: none; }
  .radio-wave::before, .radio-wave::after { display: none; }
}

/* ---------- SEO content: intro, radio sub, FAQ, footer ---------- */
.intro {
  max-width: 62ch;
  margin: 1.5rem auto 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--paragraphColor);
}

.intro strong {
  color: var(--headlineColor);
  transition: color var(--dur-theme) var(--ease-in-out);
}

.radio .sub {
  margin-top: 0.6rem;
  color: rgba(255, 255, 255, 0.75);
}

address {
  font-style: normal;
  color: var(--paragraphColor);
  line-height: 1.6;
}

.faq {
  max-width: 760px;
  margin: 0 auto 4rem;
  padding: 0 1rem;
  text-align: left;
}

.faq h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 24px var(--glow);
}

.faq-list {
  display: grid;
  gap: 0.6rem;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 300ms var(--ease-out), background 300ms var(--ease-out);
}

.faq-item[open] {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--headlineColor);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--lightPurple);
  outline-offset: -2px;
  border-radius: 10px;
}

.faq-item .chev {
  flex: none;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.6);
  transition: transform 350ms var(--ease-out), color 300ms;
}

.faq-item[open] .chev {
  transform: rotate(180deg);
  color: var(--headlineColor);
}

.faq-body {
  padding: 0 1.1rem 1.1rem;
}

.faq-body p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  animation: faq-in 350ms var(--ease-out);
}

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.site-footer {
  padding: 2rem 1rem 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer p {
  color: inherit;
  margin: 0.4rem 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--lightPurple);
}

/* ---------- Hero videos ---------- */
.hero-frame video.illustration {
  object-fit: cover;
  background: #000;
}

@media (prefers-reduced-motion: reduce) {
  /* poster only; main.js also pauses playback */
  .hero-frame video.illustration { pointer-events: none; }
}
