/* ═══════════════════════════════════════════════════
   Palline di Natale: campaign page (template-palline-natale.php)
   Loaded only on that template. The configurator itself is styled by the
   xmas-baubles plugin through the --xb-* tokens in main.css (no overrides of
   its internals here).

   Festive by composition, not by palette: baubles hang on black strings into
   a blue-violet "night" next to a lime field. Text is always black.
   Contrast notes: black on blue-violet is 3.9:1, so only large titles or
   white boxes sit on it; lime/orange are never used as text colours.
   ═══════════════════════════════════════════════════ */

.xmas {
  --xmas-gutter: clamp(16px, 4vw, 2rem);
}

.xmas-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--xmas-gutter);
}

.xmas-section {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.xmas-h2 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  max-width: 22ch;
}

.xmas-intro {
  font-size: 1.15rem;
  line-height: 1.45;
  max-width: 62ch;
  margin: 0 0 2.5rem;
}

.xmas a:not(.btn-pill):not(.share-bar__btn) {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ── Hero ── */
.xmas-hero {
  display: grid;
  background: var(--rf-lime);
}

.xmas-hero__text {
  padding: clamp(2.5rem, 6vw, 5rem) var(--xmas-gutter) clamp(2rem, 5vw, 4rem);
  align-self: center;
  max-width: 680px;
}

.xmas-hero__title {
  font-family: var(--font-heading);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.9;
  font-size: clamp(2.3rem, 8.5vw, 4.6rem);
  margin: 1.5rem 0 1.25rem;
  overflow-wrap: break-word;
}

.xmas-hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.4;
  margin: 0 0 1.75rem;
  max-width: 52ch;
}

.xmas-facts {
  display: grid;
  gap: 0;
  margin: 0 0 2rem;
  border-top: 2px solid var(--rf-black);
}

.xmas-facts > div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 2px solid var(--rf-black);
}

.xmas-facts dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  line-height: 1.3;
  padding-top: 0.15rem;
}

.xmas-facts dd {
  margin: 0;
  line-height: 1.3;
}

.xmas-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.xmas-hero__ctas .btn-pill svg {
  flex: none;
}

.xmas-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* The night: blue-violet panel the baubles hang into. */
.xmas-hero__night {
  position: relative;
  background: var(--rf-blue-violet);
  min-height: 380px;
  overflow: hidden;
  border-top: 2px solid var(--rf-black);
}

.xmas-hang {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 0;
  animation: xmas-swing 4.4s ease-in-out 1 both; /* one swing on load, under 5 s (WCAG 2.2.2) */
}

/* The string: a black graphic line from the top edge to the loop. */
.xmas-hang::before {
  content: "";
  width: 2px;
  height: var(--drop);
  background: var(--rf-black);
  margin-bottom: -4%;
}

.xmas-hang svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.xmas-hang--1 { left: 4%;  width: 33%; --drop: 24px;  animation-delay: 0s; }
.xmas-hang--2 { left: 36%; width: 30%; --drop: 120px; animation-delay: .25s; }
.xmas-hang--3 { left: 65%; width: 31%; --drop: 56px;  animation-delay: .5s; }

@keyframes xmas-swing {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(2.5deg); }
  60% { transform: rotate(-1.5deg); }
  85% { transform: rotate(.5deg); }
}

.xmas-hero__caption {
  position: absolute;
  left: var(--xmas-gutter);
  right: var(--xmas-gutter);
  bottom: 1rem;
  margin: 0;
  padding: 0.6rem 0.8rem;
  background: var(--rf-white);
  border: 2px solid var(--rf-black);
  font-size: 0.85rem;
  line-height: 1.35;
}

@media (min-width: 900px) {
  .xmas-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: min(88vh, 820px);
  }
  .xmas-hero__text {
    justify-self: end;
    padding-right: clamp(2rem, 4vw, 4rem);
  }
  .xmas-hero__night {
    min-height: 0;
    border-top: 0;
    border-left: 2px solid var(--rf-black);
  }
  .xmas-hang--1 { --drop: 90px; }
  .xmas-hang--2 { --drop: 300px; }
  .xmas-hang--3 { --drop: 170px; }
  .xmas-hero__caption {
    left: auto;
    max-width: 320px;
    bottom: 1.5rem;
  }
}

/* ── How it works ── */
.xmas-steps {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  counter-reset: xmas-step;
}

.xmas-steps li {
  counter-increment: xmas-step;
  border-top: 2px solid var(--rf-black);
  padding-top: 1rem;
}

.xmas-steps li::before {
  content: counter(xmas-step);
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--rf-black);
  color: var(--rf-white);
  font-family: var(--font-mono);
  margin-bottom: 0.9rem;
}

.xmas-steps h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

.xmas-steps p {
  margin: 0;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .xmas-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .xmas-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.xmas-table {
  border-collapse: collapse;
  min-width: min(100%, 360px);
  font-variant-numeric: tabular-nums;
  background: var(--rf-lime);
  border: 2px solid var(--rf-black);
}

.xmas-table caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  padding-bottom: 0.6rem;
}

.xmas-table th,
.xmas-table td {
  text-align: left;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--rf-black);
}

.xmas-table th {
  font-weight: 700;
}

.xmas-table td:last-child,
.xmas-table th:last-child {
  text-align: right;
}

/* ── Photos ── */
.xmas-gallery {
  padding-top: 0;
}

.xmas-gallery__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.xmas-gallery__img,
.xmas-artisan__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--rf-black);
}

.xmas-artisan__img {
  aspect-ratio: 4 / 5;
}

/* Editor-only placeholder for a photo that has not arrived yet. */
.xmas-slot {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.5rem;
  border: 2px dashed var(--rf-black);
  background: repeating-linear-gradient(-45deg, #fff 0 12px, #f0f0f0 12px 24px);
  font-size: 0.95rem;
}

.xmas-slot span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.xmas-todo {
  border: 2px dashed var(--rf-black);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ── Configurator ── */
.xmas-config,
#trasparenza {
  border-top: 2px solid var(--rf-black);
  border-bottom: 2px solid var(--rf-black);
  scroll-margin-top: 90px;
}

/* ── What it supports ── */
.xmas-support {
  background: var(--rf-deep-orange);
}

.xmas-support__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.xmas-support__list li {
  background: var(--rf-white);
  border: 2px solid var(--rf-black);
  padding: 1.25rem;
}

.xmas-support__list svg {
  display: block;
  margin-bottom: 0.75rem;
}

.xmas-support__list h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.15;
  margin: 0 0 0.4rem;
}

.xmas-support__list p {
  margin: 0;
  line-height: 1.4;
}

@media (min-width: 640px) {
  .xmas-support__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .xmas-support__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Artisan ── */
.xmas-artisan__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.xmas-artisan__grid p {
  font-size: 1.15rem;
  line-height: 1.45;
  max-width: 52ch;
}

@media (min-width: 800px) {
  .xmas-artisan__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* ── Transparency ── */
.xmas-transparency {
  background: var(--rf-silver);
}

.xmas-tr {
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 2px solid var(--rf-black);
}

.xmas-tr > div {
  display: grid;
  gap: 0.3rem 2rem;
  padding: 1rem 0;
  border-bottom: 2px solid var(--rf-black);
}

.xmas-tr dt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.xmas-tr dd {
  margin: 0;
  line-height: 1.45;
  max-width: 64ch;
}

@media (min-width: 760px) {
  .xmas-tr > div { grid-template-columns: 16rem 1fr; }
}

/* ── Footer notes ── */
.xmas-notes {
  padding: 2rem 0 3rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.xmas-notes p {
  max-width: 80ch;
  margin: 0;
}

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