/* ==========================================================================
   StarOil – festive season theme (loaded only while the theme is active)
   Brand: blue #1274BB · navy #0a2540 · yellow #FDCD21 · Instrument Sans
   Look: editorial / photographic – real tree photo, warm LED string lights,
   soft depth-of-field snow. No cartoon shapes.
   ========================================================================== */

/* ---------- Warm-white LED string lights (hang under the sticky header) ---------- */
.so-lights {
  position: absolute; left: 0; right: 0; top: 100%; height: 26px; overflow: hidden;
  pointer-events: none; z-index: 2;
}
.so-lights__strand {
  display: flex; width: max-content; height: 100%;
  /* thin dark-green copper wire, gently drooping between hooks */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='26'%3E%3Cpath d='M0 2.5 C18 14, 50 14, 68 2.5' fill='none' stroke='%231c2a22' stroke-opacity='.75' stroke-width='1.1'/%3E%3C/svg%3E") repeat-x 0 0 / 68px 26px;
}
.so-lights__strand i { position: relative; width: 34px; flex: none; }
.so-lights__strand i::before { /* LED */
  content: ''; position: absolute; left: 15px; top: 8.5px; width: 4px; height: 4px; border-radius: 50%;
  background: #fff6df;
  box-shadow: 0 0 3px 1px rgba(255,226,160,.95), 0 0 10px 3px rgba(255,186,84,.45), 0 0 22px 6px rgba(255,170,60,.12);
  animation: so-led 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); animation-duration: var(--t, 3.2s);
}
.so-lights__strand i:nth-child(2n)  { --t: 2.6s; --d: -1.1s; }
.so-lights__strand i:nth-child(3n)  { --t: 4.1s; --d: -2.3s; }
.so-lights__strand i:nth-child(5n)  { --t: 3.6s; --d: -0.4s; }
.so-lights__strand i:nth-child(7n)  { --t: 2.2s; --d: -1.7s; }
.so-lights__strand i:nth-child(11n) { --t: 4.8s; --d: -3.1s; }
@keyframes so-led {
  0%, 100% { opacity: 1; transform: scale(1); }
  45% { opacity: .38; transform: scale(.8); }
  60% { opacity: .9; transform: scale(1); }
}
body.nav-open .so-lights { opacity: 0; }

/* ---------- Festive logo: Santa hat + "O" → tree → balloons → "O" ---------- */
.so-logo { position: relative; display: block; height: 44px; }
.so-logo > img { display: block; height: 100%; width: auto; }
.so-logo-fx { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.so-logo-fx g { transform-box: view-box; }

/* the three states share the O's centre (134.5, 24.5) */
.so-logo-fx__o, .so-logo-fx__tree, .so-logo-fx__balloons { transform-origin: 134.5px 24.5px; animation: 12s cubic-bezier(.65,0,.35,1) infinite both; }
.so-logo-fx__o        { animation-name: so-fx-o; }
.so-logo-fx__tree     { animation-name: so-fx-tree; opacity: 0; }
.so-logo-fx__balloons { animation-name: so-fx-balloons; opacity: 0; }
/*   0–30 %  O  ·  30–36 % O→tree  ·  36–62 % tree  ·  62–69 % tree→balloons  ·  69–88 % balloons  ·  88–96 % balloons→O */
@keyframes so-fx-o {
  0%, 29%   { opacity: 1; transform: none; }
  34%       { opacity: 0; transform: scale(.35) rotate(-90deg); }
  91%       { opacity: 0; transform: scale(.35) rotate(90deg); }
  97%, 100% { opacity: 1; transform: none; }
}
@keyframes so-fx-tree {
  0%, 30%   { opacity: 0; transform: translateY(5px) scale(.55); }
  37%, 61%  { opacity: 1; transform: none; }
  67%, 100% { opacity: 0; transform: translateY(-2px) scale(.7); }
}
@keyframes so-fx-balloons {
  0%, 63%   { opacity: 0; transform: translateY(12px) scale(.8); }
  71%       { opacity: 1; transform: translateY(-.6px); }
  78%       { opacity: 1; transform: translateY(.6px); }
  85%       { opacity: 1; transform: translateY(-.4px); }
  95%, 100% { opacity: 0; transform: translateY(-16px) scale(.9); }
}
/* details inside the states */
.so-logo-fx__star { transform-box: fill-box; transform-origin: center; animation: so-fx-star 2.4s ease-in-out infinite; }
@keyframes so-fx-star { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(18deg) scale(1.15); } }
.so-logo-fx__lights circle { animation: so-fx-light 1.8s ease-in-out infinite; }
.so-logo-fx__lights circle:nth-child(2n) { animation-delay: -.6s; }
.so-logo-fx__lights circle:nth-child(3n) { animation-delay: -1.2s; }
@keyframes so-fx-light { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.so-logo-fx__b { transform-box: fill-box; transform-origin: 50% 100%; animation: so-fx-bob 3s ease-in-out infinite; }
.so-logo-fx__b--2 { animation-delay: -1s; animation-duration: 3.4s; }
.so-logo-fx__b--3 { animation-delay: -2s; animation-duration: 2.8s; }
@keyframes so-fx-bob { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-.8px); } }

/* hat: gentle sway from the brim, pom-pom swings a little more */
.so-logo-fx__hat { transform-origin: 31px 9px; animation: so-fx-hat 5s ease-in-out infinite; }
@keyframes so-fx-hat { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg); } }
.so-logo-fx__pom { transform-box: fill-box; transform-origin: 0 0; animation: so-fx-pom 2.5s ease-in-out infinite; }
@keyframes so-fx-pom { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }

@media (prefers-reduced-motion: reduce) {
  .so-logo-fx *, .so-logo-fx { animation: none !important; }
  .so-logo-fx__tree, .so-logo-fx__balloons { display: none; }
  .so-logo-fx__o { opacity: 1; transform: none; }
}

/* ---------- Photographic greeting slide ---------- */
.so-xmas {
  position: relative; height: 100%; overflow: hidden; isolation: isolate; color: #fff;
  background:
    radial-gradient(60% 80% at 70% 45%, rgba(255,176,72,.10) 0%, transparent 60%),
    linear-gradient(120deg, #061626 0%, #0a2540 55%, #0d2d4c 100%);
}
.so-xmas__photo {
  position: absolute; top: 0; right: 0; bottom: 0; width: 56%; z-index: -2; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 16%, #000 38%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 16%, #000 38%);
}
.so-xmas__photo picture, .so-xmas__photo img { display: block; width: 100%; height: 100%; }
.so-xmas__photo img {
  object-fit: cover; object-position: 50% 30%;
  transform-origin: 58% 38%; animation: so-kenburns 24s ease-in-out infinite alternate;
  filter: saturate(1.05) contrast(1.04);
}
.so-xmas__photo--left img { object-position: 20% 30%; }
.so-xmas__photo--right img { object-position: 80% 30%; }
@keyframes so-kenburns { from { transform: scale(1.03); } to { transform: scale(1.11) translate(-1%, 1%); } }

/* camera-style star glints on the tree lights */
.so-xmas__glints i {
  position: absolute; left: var(--x); top: var(--y); width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none;
  background:
    radial-gradient(circle, rgba(255,250,235,1) 0 6%, rgba(255,214,140,.55) 12%, transparent 40%),
    linear-gradient(90deg, transparent 47%, rgba(255,236,190,.85) 50%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(255,236,190,.85) 50%, transparent 53%);
  mix-blend-mode: screen; opacity: 0;
  animation: so-flare 5.5s ease-in-out infinite; animation-delay: var(--d);
}
@keyframes so-flare { 0%, 70%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 80% { opacity: 1; transform: scale(1) rotate(20deg); } 90% { opacity: .5; transform: scale(.7) rotate(35deg); } }

/* reading haze over the left side + soft vignette */
.so-xmas__haze {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6,22,38,.96) 0%, rgba(8,28,48,.82) 30%, rgba(10,37,64,.18) 58%, rgba(10,37,64,0) 72%),
    linear-gradient(0deg, rgba(6,22,38,.55) 0%, transparent 28%),
    radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(4,14,26,.45) 100%);
}

.so-xmas__inner {
  position: relative; z-index: 2; height: 100%;
  display: flex; align-items: center;
  padding-top: 2.5rem; padding-bottom: 104px;           /* clear the lights and the overlapping price board */
}
.so-xmas__copy { max-width: 590px; }
.so-xmas__eyebrow {
  display: inline-flex; align-items: center; gap: .85rem; color: #f3d77a;
  font-size: .78rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
}
.so-xmas__eyebrow::before { content: ''; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, #f3d77a); }
.so-xmas__title {
  margin: 1.1rem 0 1rem; color: #fff; font-weight: 600; letter-spacing: -.032em; line-height: 1.04;
  font-size: clamp(1.7rem, .95rem + 3.1vw, 4rem); max-width: 15ch; text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.so-xmas__gold {
  background: linear-gradient(100deg, #ffe9a6 0%, #FDCD21 30%, #e8a915 55%, #ffe39a 75%, #FDCD21 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #FDCD21;
  animation: so-shimmer 7s ease-in-out infinite;
  text-shadow: none; filter: drop-shadow(0 2px 18px rgba(253,205,33,.25));
}
@keyframes so-shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.so-xmas__text { margin: 0; max-width: 44ch; color: rgba(226,236,248,.8); font-size: clamp(.95rem, .82rem + .38vw, 1.125rem); line-height: 1.65; }
.so-xmas__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.9rem; }
.so-xmas__cta { box-shadow: 0 12px 34px -10px rgba(253,205,33,.6); }
.so-xmas__cta .so-icon { transition: transform .25s ease; }
.so-xmas__cta:hover .so-icon { transform: translateX(3px); }

/* live countdown */
.so-xmas__count {
  display: inline-flex; align-items: center; gap: .9rem; padding: .5rem .95rem; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.so-xmas__count[hidden] { display: none; }
.so-xmas__count-label { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(226,236,248,.7); max-width: 7.5em; line-height: 1.3; }
.so-xmas__count-units { display: flex; gap: .75rem; }
.so-xmas__count-units span { display: flex; flex-direction: column; align-items: center; min-width: 2.1rem; }
.so-xmas__count-units b { font-size: 1.2rem; font-weight: 600; color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums; }
.so-xmas__count-units small { font-size: .625rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(226,236,248,.55); }
.so-xmas__count-units span + span { position: relative; }
.so-xmas__count-units span + span::before { content: ''; position: absolute; left: -.4rem; top: .3rem; height: 1rem; width: 1px; background: rgba(255,255,255,.14); }
.so-xmas__count.is-today .so-xmas__count-units { display: none; }
.so-xmas__count.is-today .so-xmas__count-label { max-width: none; color: #f3d77a; font-size: .8rem; }

/* entrance when the slide becomes active */
.swiper-slide-active .so-xmas__copy > * { animation: so-rise 1s cubic-bezier(.22,1,.36,1) both; }
.swiper-slide-active .so-xmas__copy > :nth-child(2) { animation-delay: .1s; }
.swiper-slide-active .so-xmas__copy > :nth-child(3) { animation-delay: .2s; }
.swiper-slide-active .so-xmas__copy > :nth-child(4) { animation-delay: .3s; }
@keyframes so-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 1199.98px) {
  .so-xmas__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 991.98px) {
  .so-xmas__photo { width: 60%; }
  .so-xmas__inner { padding-bottom: 84px; padding-top: 2.1rem; }
  .so-xmas__title { margin: .75rem 0 .2rem; }
  .so-xmas__text { display: none; }
  .so-xmas__actions { margin-top: 1.2rem; gap: .75rem 1rem; }
  .so-xmas__count { padding: .4rem .75rem; gap: .65rem; }
  .so-xmas__count-units b { font-size: 1rem; }
}
@media (max-width: 767.98px) {
  .so-xmas__photo { width: 66%; -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 22%, #000 50%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 22%, #000 50%); }
  .so-xmas__haze { background: linear-gradient(90deg, rgba(6,22,38,.95) 0%, rgba(8,28,48,.78) 40%, rgba(10,37,64,.1) 75%), linear-gradient(0deg, rgba(6,22,38,.5) 0%, transparent 30%); }
  .so-xmas__inner { padding-bottom: 54px; padding-top: 1.8rem; }
  .so-xmas__copy { max-width: 68%; }
  .so-xmas__eyebrow { font-size: .65rem; letter-spacing: .18em; gap: .55rem; }
  .so-xmas__eyebrow::before { width: 22px; }
  .so-xmas__title { max-width: 12ch; }
  .so-xmas__cta { padding: .6rem 1rem; font-size: .875rem; }
  .so-xmas__count { display: none !important; }
  .so-xmas__glints { display: none; }
}

/* ---------- Snow ---------- */
.so-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1035; }
.so-snow.is-paused { display: none; }
.so-snow-toggle {
  position: fixed; left: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 1020;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.88); color: #1274BB; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px -10px rgba(15,23,42,.35);
  transition: transform .2s ease, color .2s ease, background .2s ease;
}
.so-snow-toggle svg { width: 19px; height: 19px; }
.so-snow-toggle:hover { transform: translateY(-2px); background: #fff; }
.so-snow-toggle:focus-visible { outline: 3px solid rgba(18,116,187,.35); outline-offset: 2px; }
.so-snow-toggle[aria-pressed="false"] { color: #94a3b8; }
.so-snow-toggle[aria-pressed="false"]::after { content: ''; position: absolute; width: 22px; height: 2px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }

/* ---------- Admin preview notice ---------- */
.so-festive-preview {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1040;
  background: #0a2540; color: #FDCD21; padding: .55rem 1rem; border-radius: 999px; font-size: .8125rem; font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(10,37,64,.6); white-space: nowrap; max-width: calc(100vw - 7rem); overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Accessibility: respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .so-lights__strand i::before, .so-xmas__photo img, .so-xmas__glints i,
  .so-xmas__gold, .swiper-slide-active .so-xmas__copy > * { animation: none !important; }
  .so-snow, .so-snow-toggle { display: none !important; }
}
@media print { .so-lights, .so-snow, .so-snow-toggle, .so-festive-preview { display: none !important; } }
