/* Swiss Farms — Thanksgiving theme
   Only loaded while src/data/theme.json says "thanksgiving". Everything here is either
   a tg- class of the theme's own pieces (src/themes/thanksgiving/) or sits under
   .theme-thanksgiving, so the rest of the site's styles are untouched.
   The drawings come from tools/thanksgiving-cartoons.py. */

.theme-thanksgiving {
  --tg-cream: #fbf3e4;
  --tg-text: #4c463c;      /* the grey sentences, a touch warmer and darker to read on cream */
}

/* ---------- Leaves falling across the homepage's first screen ---------- */
/* Each leaf rides a strip as tall as the section: the strip slides down its own height,
   so the leaf travels from just above the section to just below it, while the leaf
   itself sways and turns. They pass behind the words, over the video. */
.tg-leaves { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.tg-leaves span {
  position: absolute;
  top: -70px;
  left: var(--x);
  width: var(--s);
  height: calc(100% + 140px);
  animation: tg-fall var(--t) linear var(--d) infinite;
  will-change: transform;
}
.tg-leaves img { width: 100%; height: auto; animation: tg-sway var(--w) ease-in-out var(--d) infinite alternate; }
@keyframes tg-fall { from { transform: translateY(0); } to { transform: translateY(100%); } }
@keyframes tg-sway { from { transform: translateX(-24px) rotate(-30deg); } to { transform: translateX(24px) rotate(34deg); } }
.tg-leaves span:nth-child(1)  { --x: 3%;  --s: 49px; --t: 15s; --d: -3s;  --w: 3.6s; --y: 30%; }
.tg-leaves span:nth-child(2)  { --x: 13%; --s: 36px; --t: 19s; --d: -11s; --w: 4.4s; --y: 62%; }
.tg-leaves span:nth-child(3)  { --x: 23%; --s: 44px; --t: 13s; --d: -7s;  --w: 3.1s; --y: 18%; }
.tg-leaves span:nth-child(4)  { --x: 34%; --s: 57px; --t: 17s; --d: -14s; --w: 4s;   --y: 44%; }
.tg-leaves span:nth-child(5)  { --x: 46%; --s: 39px; --t: 21s; --d: -5s;  --w: 4.8s; --y: 24%; }
.tg-leaves span:nth-child(6)  { --x: 57%; --s: 52px; --t: 14s; --d: -9s;  --w: 3.4s; --y: 70%; }
.tg-leaves span:nth-child(7)  { --x: 67%; --s: 42px; --t: 18s; --d: -1s;  --w: 4.2s; --y: 36%; }
.tg-leaves span:nth-child(8)  { --x: 77%; --s: 60px; --t: 16s; --d: -12s; --w: 3.8s; --y: 20%; }
.tg-leaves span:nth-child(9)  { --x: 87%; --s: 39px; --t: 20s; --d: -6s;  --w: 4.6s; --y: 56%; }
.tg-leaves span:nth-child(10) { --x: 95%; --s: 47px; --t: 14s; --d: -10s; --w: 3.2s; --y: 40%; }
/* A phone gets six, a little smaller */
@media (max-width: 640px) {
  .tg-leaves span { width: calc(var(--s) * .8); }
  .tg-leaves span:nth-child(n + 7) { display: none; }
  .tg-leaves span:nth-child(1) { --x: 4%; }
  .tg-leaves span:nth-child(2) { --x: 22%; }
  .tg-leaves span:nth-child(3) { --x: 40%; }
  .tg-leaves span:nth-child(4) { --x: 58%; }
  .tg-leaves span:nth-child(5) { --x: 74%; }
  .tg-leaves span:nth-child(6) { --x: 88%; }
}
/* People who ask for less motion get the leaves scattered and still */
@media (prefers-reduced-motion: reduce) {
  .tg-leaves span { top: var(--y); height: auto; }
  .tg-leaves span:nth-child(odd) img { transform: rotate(-24deg); }
  .tg-leaves span:nth-child(even) img { transform: rotate(30deg); }
}

/* ---------- The greeting on the homepage's first screen ---------- */
/* A sticker: a label above the headline on a phone, a round one at the right on a
   wide screen. */
.tg-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 7px 20px 7px 10px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--tg-cream);
  color: var(--ink);
  box-shadow: 4px 5px 0 rgba(5, 7, 8, .5);
  transform: rotate(-2deg);
}
.tg-badge img { flex: none; width: 54px; height: auto; margin: -16px 0 -4px; }
.tg-badge-text { font: 800 1.0625rem/1.15 var(--font-head); letter-spacing: -0.01em; }
.tg-badge-text strong { font-weight: 800; }
@media (min-width: 901px) {
  .hero-inner { position: relative; }
  .tg-badge {
    position: absolute;
    right: 20px; bottom: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    width: 206px; height: 206px;
    margin: 0;
    padding: 0 0 10px;
    border-radius: 50%;
    text-align: center;
    box-shadow: 6px 8px 0 rgba(5, 7, 8, .5);
    transform: rotate(7deg);
  }
  .tg-badge::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 2px dashed var(--red);
    border-radius: 50%;
  }
  .tg-badge img { width: 100px; margin: 0 0 2px; }
  .tg-badge-text { display: grid; gap: 1px; }
  .tg-badge-text span { font: 800 .75rem/1.3 var(--font-head); letter-spacing: .22em; text-transform: uppercase; color: var(--red-ui); }
  .tg-badge-text strong { font: 900 1.5rem/1.08 "Playfair Display", Georgia, "Times New Roman", serif; letter-spacing: -0.01em; }
}

/* ---------- A string of leaves along the top edge of the theme's bands ---------- */
.tg-run, .tg-thanks { position: relative; background: var(--tg-cream); }
.tg-run::before, .tg-thanks::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: url("/assets/img/thanksgiving/garland.svg") center -7px / 240px 62px repeat-x;
  pointer-events: none;
}

/* ---------- Homepage: the Thanksgiving run ---------- */
.tg-run { padding-top: calc(clamp(56px, 8vw, 96px) + 30px); }
.tg-run-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.tg-run h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.tg-run h2 span { display: inline-block; }   /* each sentence keeps to its own line where it fits */
.tg-run .lede { margin-bottom: 0; color: var(--tg-text); }
.tg-run .lede strong { color: var(--ink); }
.tg-run .eyebrow { color: var(--red-deep); }
/* The holiday hours (src/data/theme.json). In the Thanksgiving section they are a little
   sign; beside the everyday hours and on the Locations page they are a plain line. */
.theme-note { margin: 6px 0 0; font-weight: 600; }
.theme-note strong { font-weight: 800; }
.hours-note + .theme-note span::after { content: "."; }   /* a sentence there, like the line above it */
.tg-run .theme-note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin: 24px 0 0;
  padding: 12px 20px 13px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 5px 5px 0 #d9d9d6;
}
.tg-run .theme-note strong { font: 800 .8125rem/1.4 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--red-deep); }
.tg-run .theme-note span { font: 800 1.3125rem/1.25 var(--font-head); letter-spacing: -0.01em; }
.page-head .theme-note { margin: 14px 0 0; color: #fff; font-size: 1.0625rem; }
.page-head .theme-note strong { color: var(--brass-soft); }
.tg-run-art img { width: 100%; height: auto; }
.tg-list {
  margin-top: clamp(28px, 4vw, 44px);
  padding: 24px 26px 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
}
.tg-list h3 { margin: 0 0 14px; font-size: 1.375rem; }
.tg-list .check-list { margin: 0; grid-template-columns: repeat(4, 1fr); gap: 12px 26px; }
.tg-list .check-list li { line-height: 1.4; }
.tg-list a { font-weight: 700; white-space: nowrap; }
.tg-run-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
@media (max-width: 1000px) {
  .tg-list .check-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .tg-run-top { grid-template-columns: 1fr; gap: 14px; }
  .tg-run-art { order: -1; width: min(100%, 400px); margin-inline: auto; }
}
@media (max-width: 640px) {
  .tg-run { padding-top: 84px; }
  .tg-list { padding: 20px 20px 22px; }
  .tg-list .check-list { grid-template-columns: 1fr; gap: 10px; }
  .tg-run-foot .btn { width: 100%; }
}

/* ---------- The thank-you: above Swiss Deals on the homepage, above the footer elsewhere ---------- */
.tg-thanks { padding: 78px 0 44px; text-align: center; }
.tg-thanks p { margin: 0; }
.tg-thanks-title { font: 900 clamp(1.7rem, 4.6vw, 2.5rem)/1.1 "Playfair Display", Georgia, "Times New Roman", serif; letter-spacing: -0.01em; text-wrap: balance; }
.tg-run:has(+ .tg-thanks) { padding-bottom: clamp(36px, 5vw, 52px); }   /* the two belong together */
.tg-thanks-text { max-width: 46ch; margin: 10px auto 0 !important; color: var(--tg-text); font-size: 1.0625rem; text-wrap: balance; }

/* ---------- Every other page: a few leaves in the corner of the dark banner ---------- */
/* On a wide screen the words never reach the right-hand end of the banner, so the leaves
   sit beside them. On a narrower one the banner is given a little more room at the
   bottom and the leaves go there, under the words, so they never cover any. */
.theme-thanksgiving .page-head { position: relative; }
.theme-thanksgiving .page-head::after {
  content: "";
  position: absolute;
  right: max(20px, calc(50% - 570px));
  bottom: 14px;
  width: 190px; height: 104px;
  background: url("/assets/img/thanksgiving/leaves-corner.svg") center / contain no-repeat;
  pointer-events: none;
}
.theme-thanksgiving .page-head-compact::after { width: 130px; height: 72px; bottom: 8px; }
@media (max-width: 1023px) {
  .theme-thanksgiving .page-head { padding-bottom: 82px; }
  .theme-thanksgiving .page-head::after { right: 14px; bottom: 10px; width: 110px; height: 60px; }
  .theme-thanksgiving .page-head-compact { padding-bottom: 70px; }
  .theme-thanksgiving .page-head-compact::after { width: 92px; height: 50px; }
}
