/* TSSFAB Holiday Ornaments — scoped to .tss-orn so it never touches the rest of the theme.
   Colors and type follow the live tssfab.us theme. */
.tss-orn {
  --orn-navy: #0d1926;      /* site body background */
  --orn-navy-2: #162536;    /* site panels */
  --orn-steel: #27425f;     /* site borders */
  --orn-blue: #3c72c3;      /* TSS blue */
  --orn-sky: #61a3ff;       /* site primary button */
  --orn-ink: #0b1414;       /* site dark text */
  --orn-text: #f2f2f2;
  --orn-muted: #b9c6d6;
  --orn-orange: #ff8a2a;
  --orn-focus: #ffb36b;
  --orn-gutter: 25px;       /* same side gutter as the site header + hero */

  color: var(--orn-text);
  font-family: inherit;
  padding: 0 var(--orn-gutter) 3rem;
  box-sizing: border-box;
}
@media (max-width: 700px) { .tss-orn { --orn-gutter: 16px; } }
.tss-orn *, .tss-orn *::before, .tss-orn *::after { box-sizing: border-box; }
.tss-orn [hidden] { display: none !important; }
.tss-orn :focus-visible { outline: 3px solid var(--orn-focus); outline-offset: 3px; }
.tss-orn-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tss-orn__notice {
  border: 1px dashed var(--orn-orange); background: rgba(255, 138, 42, .08);
  padding: .6rem .9rem; margin: 1rem 0 0; font-size: .9rem;
}

/* ---------- Hero: headline over the scene (like the site's home hero) ---------- */
.tss-orn__hero { position: relative; }
.tss-orn__scene {
  position: relative;
  height: clamp(440px, 44vw, 700px);
  overflow: hidden;
  background: #0f1f36;
}
.tss-orn-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  cursor: grab; touch-action: pan-y;           /* horizontal drags spin, vertical drags scroll */
  -webkit-user-select: none; user-select: none;
}
.tss-orn-canvas.is-dragging { cursor: grabbing; }
/* page-wide snow: fixed to the viewport, clipped (in JS) to this section, never takes clicks */
.tss-orn-snowlayer {
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 6;
}

.tss-orn__intro { position: relative; z-index: 3; padding: 1.5rem 0 1.25rem; }
.tss-orn__eyebrow {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 .9rem;
  color: var(--orn-sky); font-size: .95rem; letter-spacing: .14em;
}
.tss-orn__eyebrow::before { content: ""; width: 55px; height: 3px; background: var(--orn-blue); flex: none; }
.tss-orn__title {
  margin: 0 0 .75rem;
  font-weight: 900; line-height: 1.02; letter-spacing: -.01em;
  font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.2rem);
  color: #fff; text-transform: none;
}
.tss-orn__lede { margin: 0 0 1.5rem; color: #dbe5f1; font-size: 1.15rem; line-height: 1.5; max-width: 30ch; }
.tss-orn__cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: .9rem 2.6rem;
  border-radius: 10px; background: var(--orn-sky); color: var(--orn-ink);
  font-weight: 900; font-size: 1rem; text-transform: uppercase; letter-spacing: .03em; text-decoration: none;
}
.tss-orn__cta:hover { background: #8cbcff; color: var(--orn-ink); }

@media (min-width: 701px) {
  .tss-orn__intro {
    position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
    width: min(38%, 560px); padding: 0;
    pointer-events: none;                       /* drags pass through to the tree... */
  }
  .tss-orn__intro a { pointer-events: auto; }   /* ...but the button still works */
  .tss-orn__scene::after {                      /* scrim keeps the headline readable over the scene */
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(90deg, rgba(10,20,34,.88) 0%, rgba(10,20,34,.62) 28%, rgba(10,20,34,0) 46%);
  }
}
@media (max-width: 700px) {
  .tss-orn__scene { height: clamp(380px, 112vw, 520px); }
}

.tss-orn__pause {
  position: absolute; right: .6rem; bottom: .6rem; z-index: 4;
  font: inherit; font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em;
  color: var(--orn-text); background: rgba(13, 25, 38, .85);
  border: 1px solid var(--orn-steel); padding: .45rem .7rem; min-height: 36px; cursor: pointer;
}

/* ---------- Picker + details ---------- */
.tss-orn__shop {
  display: grid; gap: 1.5rem 2.5rem; margin-top: 2rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) { .tss-orn__shop { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }
.tss-orn__picker { min-width: 0; scroll-margin-top: 1rem; }
.tss-orn__details { min-width: 0; }
@media (min-width: 960px) { .tss-orn__details { position: sticky; top: 1rem; } }
.tss-orn__h2 {
  margin: 0 0 .75rem; font-size: 1.15rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: .06em; color: var(--orn-text);
  scroll-margin-top: 1rem;
}
.tss-orn__h2:focus { outline: none; }
.tss-orn__h3 { margin: 0 0 .5rem; font-size: .85rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--orn-muted); }

.tss-orn__search label { display: block; margin: 0 0 .35rem; font-size: .9rem; color: var(--orn-muted); font-weight: 700; }
.tss-orn__search input {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  font: inherit; font-size: 1rem; color: var(--orn-ink); background: #f2f2f2;
  border: 2px solid var(--orn-steel); border-radius: 0;
}
.tss-orn__search input:focus-visible { border-color: var(--orn-sky); }

.tss-orn__tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: .9rem; }
@media (min-width: 560px) { .tss-orn__tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tss-orn-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: .3rem;
  width: 100%; min-height: 60px; padding: .6rem .75rem;
  font: inherit; text-align: left; cursor: pointer;
  color: var(--orn-text); background: var(--orn-navy-2);
  border: 2px solid var(--orn-steel); border-radius: 0;
}
.tss-orn-tile:hover { border-color: var(--orn-sky); }
.tss-orn-tile[aria-pressed="true"] { border-color: var(--orn-orange); background: #1d3150; box-shadow: inset 4px 0 0 var(--orn-orange); }
.tss-orn-tile__name { font-weight: 900; font-size: .92rem; line-height: 1.2; }
.tss-orn-tile__meta { font-size: .76rem; color: var(--orn-muted); }
.tss-orn-tile--all .tss-orn-tile__name { color: var(--orn-sky); }

.tss-orn__gens-wrap { margin-top: 1.1rem; }
.tss-orn__gens {
  display: grid; gap: .4rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  max-height: 22rem; overflow-y: auto; padding: 3px;
}
.tss-orn-gen {
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
  min-height: 52px; padding: .5rem .65rem;
  font: inherit; text-align: left; cursor: pointer;
  color: var(--orn-text); background: var(--orn-navy); border: 2px solid var(--orn-steel); border-radius: 0;
}
.tss-orn-gen:hover { border-color: var(--orn-sky); }
.tss-orn-gen[aria-pressed="true"] { border-color: var(--orn-orange); background: #1d3150; box-shadow: inset 4px 0 0 var(--orn-orange); }
.tss-orn-gen__name { font-weight: 900; font-size: .88rem; line-height: 1.2; }
.tss-orn-gen__meta { font-size: .76rem; color: var(--orn-muted); line-height: 1.25; }
.tss-orn__status { margin: .6rem 0 0; min-height: 1.4em; font-size: .9rem; color: var(--orn-muted); }

/* ---------- Details card ---------- */
.tss-orn-card {
  background: var(--orn-navy-2); border: 1px solid var(--orn-steel); border-top: 4px solid var(--orn-blue);
  padding: 1.1rem; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr);
}
.tss-orn-card__media {
  position: relative; width: 100%; aspect-ratio: 2 / 1; padding: 5%;
  min-height: 0; overflow: hidden;            /* the picture never stretches its box (tall designs letterbox) */
  background: radial-gradient(70% 90% at 50% 40%, #1d3150, #0f1e2e);
  border: 1px solid var(--orn-steel); display: grid; place-items: center;
}
.tss-orn-card__media img { position: absolute; inset: 5%; width: 90%; height: 90%; object-fit: contain; display: block; }   /* fits inside the box whatever its shape */
.tss-orn-card__media svg.tss-orn-art { position: absolute; inset: 5%; width: 90%; height: 90%; display: block; }   /* car + fitted wheels */   /* no CSS filter: it made every card re-paint while scrolling */
.tss-orn-missing { font-size: .8rem; color: var(--orn-muted); }
.tss-orn-card__title { margin: 0; font-size: 1.35rem; font-weight: 900; line-height: 1.15; }
.tss-orn-card__vehicle { margin: .2rem 0 0; color: var(--orn-muted); font-size: .9rem; }
.tss-orn-card__sku { margin: .15rem 0 0; color: var(--orn-muted); font-size: .75rem; letter-spacing: .03em; opacity: .85; }
.tss-orn-card__sku span { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.tss-orn-card__price { margin: .4rem 0 0; font-weight: 900; font-size: 1.1rem; }
.tss-orn-card p { line-height: 1.5; }
.tss-orn-badge {
  display: inline-block; margin-left: .4rem; vertical-align: middle;
  font-size: .65rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  color: var(--orn-ink); background: var(--orn-orange); padding: .15rem .4rem;
}

.tss-orn-swatches { border: 0; padding: 0; margin: .8rem 0 0; min-width: 0; }
.tss-orn-swatches legend { padding: 0; margin-bottom: .45rem; font-weight: 900; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.tss-orn-swatches__list { display: flex; flex-wrap: wrap; gap: .4rem; }
.tss-orn-chip { position: relative; display: inline-flex; }
.tss-orn-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tss-orn-chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .8rem;
  border: 2px solid var(--orn-steel); background: var(--orn-navy);
  font-size: .88rem; font-weight: 700; cursor: pointer;
}
.tss-orn-chip span:hover { border-color: var(--orn-sky); }
.tss-orn-chip input:checked + span { border-color: var(--orn-orange); background: #1d3150; }
.tss-orn-chip input:focus-visible + span { outline: 3px solid var(--orn-focus); outline-offset: 2px; }

/* ---------- Wheel picker ----------
   Tabs (Factory, Street & track, Rally & gravel, Off-road, Subaru OEM) show one group of
   wheels at a time; each wheel is a radio with its flat-face drawing. */
.tss-orn-wheels { border: 0; padding: 0; margin: .9rem 0 0; min-width: 0; }
.tss-orn-wheels legend { padding: 0; margin-bottom: .5rem; font-weight: 900; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.tss-orn-wheels legend strong { color: var(--orn-orange); text-transform: none; letter-spacing: .01em; font-size: .95rem; }
.tss-orn-wheels__tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.tss-orn-wheels__tab {
  font: inherit; font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em;
  min-height: 40px; padding: .4rem .75rem; border-radius: 999px; cursor: pointer;
  color: var(--orn-text); background: transparent; border: 2px solid var(--orn-steel);
}
.tss-orn-wheels__tab:hover { border-color: var(--orn-sky); }
.tss-orn-wheels__tab[aria-pressed="true"] { border-color: var(--orn-orange); background: #1d3150; }
.tss-orn-wheels__count { color: var(--orn-muted); font-weight: 700; margin-left: .15rem; }
.tss-orn-wheels__list {
  display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 108px), 1fr));
  max-height: 19rem; overflow-y: auto; padding: 3px;
}
.tss-orn-wheel { position: relative; display: block; cursor: pointer; }
.tss-orn-wheel input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tss-orn-wheel__face {
  display: grid; place-items: center; aspect-ratio: 1; padding: 8px; border-radius: 10px;
  background: radial-gradient(circle at 50% 40%, #1f3550, #13202f 70%); border: 2px solid var(--orn-steel);
}
.tss-orn-wheel__face img { width: 100%; height: 100%; display: block; }
.tss-orn-wheel__name { display: block; margin-top: .25rem; font-size: .72rem; line-height: 1.25; color: var(--orn-muted); text-align: center; }
.tss-orn-wheel:hover .tss-orn-wheel__face { border-color: var(--orn-sky); }
.tss-orn-wheel input:checked ~ .tss-orn-wheel__face { border-color: var(--orn-orange); box-shadow: 0 0 0 2px rgba(255, 138, 42, .35); }
.tss-orn-wheel input:checked ~ .tss-orn-wheel__name { color: var(--orn-text); font-weight: 700; }
.tss-orn-wheel input:focus-visible ~ .tss-orn-wheel__face { outline: 3px solid var(--orn-focus); outline-offset: 2px; }
@media (max-width: 700px) {
  .tss-orn-wheels__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tss-orn-wheel__face { padding: 5px; }
  .tss-orn-wheels__tab { min-height: 36px; padding: .3rem .6rem; font-size: .72rem; }
}

.tss-orn-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; align-items: center; }
.tss-orn-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.4rem;
  font: inherit; font-size: .95rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; border-radius: 10px; cursor: pointer;
  color: var(--orn-ink); background: var(--orn-sky); border: 2px solid var(--orn-sky);
}
.tss-orn-btn:hover { background: #8cbcff; border-color: #8cbcff; color: var(--orn-ink); }
.tss-orn-btn--ghost { background: transparent; color: var(--orn-text); border-color: var(--orn-steel); }
.tss-orn-btn--ghost:hover { background: transparent; border-color: var(--orn-sky); color: var(--orn-text); }
.tss-orn-btn[aria-disabled="true"] { cursor: not-allowed; background: transparent; color: var(--orn-muted); border: 2px dashed var(--orn-steel); }
.tss-orn-hint { margin: .5rem 0 0; font-size: .82rem; color: var(--orn-muted); }

/* ---------- Grid of all ornaments ---------- */
.tss-orn__all { margin-top: 3rem; scroll-margin-top: 1rem; }
.tss-orn-group { margin-top: 1.75rem; }
.tss-orn-group__head {
  display: flex; align-items: center; gap: .35rem .75rem; flex-wrap: wrap;
  margin: 0 0 .7rem; padding-bottom: .4rem; border-bottom: 2px solid var(--orn-steel);
}
.tss-orn-group__title {
  margin: 0; font-size: 1rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--orn-sky);
}
.tss-orn-group__count { color: var(--orn-muted); font-size: .82rem; }
.tss-orn-rail__nav { margin-left: auto; display: inline-flex; gap: .4rem; }
.tss-orn-rail__btn {
  width: 40px; height: 40px; padding: 0 0 3px; border-radius: 50%; cursor: pointer;
  display: inline-grid; place-items: center;
  border: 2px solid var(--orn-steel); background: var(--orn-navy-2); color: var(--orn-text);
  font: inherit; font-size: 1.6rem; font-weight: 700; line-height: 1;
}
.tss-orn-rail__btn:hover:not(:disabled) { border-color: var(--orn-sky); color: var(--orn-sky); }
.tss-orn-rail__btn:disabled { opacity: .3; cursor: default; }

/* The carousel row. Cards keep their size; the last one is cut by the edge so it's clear
   there's more, and a soft fade marks whichever side has more to see. */
.tss-orn-rail { position: relative; }
.tss-orn-rail::before, .tss-orn-rail::after {
  content: ""; position: absolute; top: 0; bottom: 10px; width: 56px; z-index: 1;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.tss-orn-rail::before { left: 0; background: linear-gradient(90deg, var(--orn-rail-fade, var(--orn-navy)), transparent); }
.tss-orn-rail::after { right: 0; background: linear-gradient(270deg, var(--orn-rail-fade, var(--orn-navy)), transparent); }
.tss-orn-rail.has-less::before, .tss-orn-rail.has-more::after { opacity: 1; }
.tss-orn__grid {
  list-style: none; margin: 0; padding: 3px 3px 10px; display: grid; gap: .75rem;
  grid-auto-flow: column;
  grid-auto-columns: clamp(210px, calc((100% - 6 * .75rem) / 6.4), 270px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 3px;
  scrollbar-width: none; min-width: 0;
  contain: inline-size;                           /* a long row never widens the page */
}
.tss-orn__grid::-webkit-scrollbar { display: none; }
/* position: relative keeps each card's hidden screen-reader text inside the row */
.tss-orn__grid > li { scroll-snap-align: start; position: relative; min-width: 0; }
.tss-orn-gcard {
  height: 100%; display: flex; flex-direction: column; gap: .45rem;
  background: var(--orn-navy-2); border: 1px solid var(--orn-steel); padding: .8rem;
}
.tss-orn-gcard h4 { margin: .2rem 0 0; font-size: 1rem; font-weight: 900; line-height: 1.2; }
.tss-orn-gcard__meta { margin: 0; font-size: .82rem; color: var(--orn-muted); line-height: 1.4; }
.tss-orn-gcard__row { margin-top: auto; display: flex; gap: .4rem; flex-wrap: wrap; }
.tss-orn-gcard .tss-orn-btn { min-height: 44px; padding: .55rem .9rem; font-size: .8rem; flex: 1 1 auto; }

.tss-orn__noscript { color: var(--orn-text); }
.tss-orn__noscript a { color: var(--orn-sky); }

@media (prefers-reduced-motion: reduce) {
  .tss-orn *, .tss-orn *::before, .tss-orn *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Phones: swipe carousels instead of long stacks ----------
   Each model's ornaments, the model tiles and the generation tiles become sideways
   swipe rows that snap into place, with the next item peeking in so it's obvious there's
   more. Plain scrollable lists (no auto-advance), so they also work with a keyboard. */
@media (max-width: 700px) {
  .tss-orn__tiles,
  .tss-orn__gens {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-right: calc(var(--orn-gutter) * -1);      /* run off the right edge so the next card peeks */
    padding: 3px var(--orn-gutter) 8px 3px;
    max-height: none;
    min-width: 0;
    contain: inline-size;                         /* the row never widens its container */
  }
  .tss-orn__tiles::-webkit-scrollbar, .tss-orn__gens::-webkit-scrollbar { display: none; }
  /* sized against the screen, not the row, so a long row can never stretch the page */
  .tss-orn__grid { grid-auto-columns: 74vw; margin-right: calc(var(--orn-gutter) * -1); padding-right: var(--orn-gutter); }
  .tss-orn__tiles { grid-auto-columns: 40vw; }
  .tss-orn__gens { grid-auto-columns: 44vw; }
  .tss-orn-tile, .tss-orn-gen { scroll-snap-align: start; position: relative; }
  .tss-orn-rail__btn { width: 36px; height: 36px; font-size: 1.4rem; }
}

/* ---------- Gravel Co. showcase (first in "All ornaments") ----------
   A panel wrapped in a pine garland with poinsettias on the corners and a string of
   chasing lights. The lights are still SVG layers drawn once; only their opacity and
   the two racing sparks animate, so it stays cheap. Steady and lit when motion is off. */
.tss-orn__gravel { margin: .5rem 0 1.5rem; padding: 42px 40px; overflow: hidden; scroll-margin-top: 1rem; }
.tss-orn-gc {
  position: relative; border-radius: 22px; isolation: isolate;
  background:
    radial-gradient(110% 85% at 50% 0%, rgba(196, 26, 52, .30), transparent 62%),
    radial-gradient(70% 70% at 100% 100%, rgba(40, 140, 80, .20), transparent 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(255, 196, 96, .10), transparent 60%),
    linear-gradient(180deg, #1b1527, #0f1b2b);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 120, .22), 0 0 70px rgba(255, 170, 80, .14);
}
.tss-orn-gc__inner { position: relative; z-index: 1; margin-top: 0; padding: 2.6rem clamp(2.6rem, 7vw, 6.5rem) 1.9rem; text-align: center; --orn-rail-fade: #161a2b; }
.tss-orn-gc .tss-orn-gcard { text-align: left; }
.tss-orn-gc__eyebrow {
  margin: 0 0 .3rem; font-size: .78rem; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: #ff9aa6;
}
.tss-orn-gc .tss-orn-group__head { justify-content: center; border-bottom-color: rgba(246, 227, 176, .3); }
.tss-orn-gc .tss-orn-group__title {
  font-size: clamp(1.45rem, 2.6vw, 2.2rem); letter-spacing: .03em; text-transform: none;
  color: #f6e3b0; text-shadow: 0 0 18px rgba(255, 196, 96, .5);
}
.tss-orn-gravel__note { margin: 0 0 1rem; color: var(--orn-muted); }
.tss-orn-gravel__grid { gap: 2rem; padding: 30px 34px; scroll-padding-inline: 34px; justify-content: safe center; grid-auto-columns: clamp(220px, calc((100% - 4rem - 68px) / 3), 380px); }

.tss-orn-gc__lights { position: absolute; left: -34px; top: -34px; right: -34px; bottom: -34px; z-index: 2; pointer-events: none; }
.tss-orn-gc__lights svg { position: absolute; left: 0; top: 0; overflow: visible; }
.tss-orn-gc__chase, .tss-orn-gc__flash { will-change: opacity; }
/* three strings take turns (0 -> 1 -> 2), so the light runs clockwise round the panel */
.tss-orn-gc__chase { animation: tss-gc-chase .6s step-end infinite; }
.tss-orn-gc__chase--1 { animation-delay: -.4s; }
.tss-orn-gc__chase--2 { animation-delay: -.2s; }
@keyframes tss-gc-chase { 0% { opacity: 1; } 33.33% { opacity: 0; } 100% { opacity: 0; } }
/* every 7 s the whole string flashes together a few times */
.tss-orn-gc__flash { opacity: 0; animation: tss-gc-flash 7s step-end infinite; }
@keyframes tss-gc-flash {
  0%, 78% { opacity: 0; } 80% { opacity: 1; } 82% { opacity: 0; } 84% { opacity: 1; } 86% { opacity: 0; }
  88% { opacity: 1; } 90% { opacity: 0; } 92% { opacity: 1; } 97% { opacity: 0; } 100% { opacity: 0; }
}
/* two sparks race round in opposite directions */
.tss-orn-gc__spark {
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  offset-anchor: center; offset-rotate: 0deg; will-change: transform;
  background: radial-gradient(circle, #fff 0 16%, rgba(255, 236, 170, .9) 28%, rgba(255, 190, 90, .35) 52%, transparent 70%);
  animation: tss-gc-spark 5.5s linear infinite;
}
.tss-orn-gc__spark--rev {
  animation-duration: 8s; animation-direction: reverse;
  background: radial-gradient(circle, #fff 0 16%, rgba(190, 228, 255, .9) 28%, rgba(80, 160, 255, .35) 52%, transparent 70%);
}
@keyframes tss-gc-spark { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.tss-orn.is-still .tss-orn-gc__chase { animation: none; opacity: 1; }
.tss-orn.is-still .tss-orn-gc__flash, .tss-orn.is-still .tss-orn-gc__spark { animation: none; display: none; }
@media (prefers-reduced-motion: reduce) { .tss-orn-gc__flash, .tss-orn-gc__spark { display: none; } }

.tss-orn-gc__flower {
  position: absolute; z-index: 3; width: clamp(86px, 10vw, 140px); aspect-ratio: 1; pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
}
.tss-orn-gc__flower svg { width: 100%; height: 100%; display: block; }
.tss-orn-gc__flower--tl { left: -38px; top: -40px; transform: rotate(-12deg); }
.tss-orn-gc__flower--tr { right: -38px; top: -40px; transform: rotate(20deg); }
.tss-orn-gc__flower--bl { left: -30px; bottom: -34px; width: clamp(66px, 7.5vw, 104px); transform: rotate(32deg); }
.tss-orn-gc__flower--br { right: -30px; bottom: -34px; width: clamp(66px, 7.5vw, 104px); transform: rotate(-26deg); }

@media (max-width: 700px) {
  .tss-orn__gravel { margin-left: calc(var(--orn-gutter) * -1); margin-right: calc(var(--orn-gutter) * -1); padding: 40px 30px; }
  .tss-orn-gc__inner { padding: 3.6rem .6rem 1.2rem; }
  .tss-orn-gc__flower--tl, .tss-orn-gc__flower--tr { width: 80px; }
  .tss-orn-gc__flower--bl, .tss-orn-gc__flower--br { width: 60px; }
  .tss-orn-gc__flower--tl { left: -26px; top: -34px; }
  .tss-orn-gc__flower--tr { right: -26px; top: -34px; }
  .tss-orn-gc__flower--bl { left: -22px; bottom: -28px; }
  .tss-orn-gc__flower--br { right: -22px; bottom: -28px; }
  .tss-orn-gravel__grid { grid-auto-columns: 60vw; margin-right: 0; padding: 24px 16px; scroll-padding-inline: 16px; gap: 1.4rem; }
  .tss-orn-gc__eyebrow { font-size: .68rem; letter-spacing: .14em; }
}

/* Each Gravel Co. card is a wrapped present: a peppermint candy-cane ribbon round the
   edge, a bow on top (red, gold or TSS blue) and, until the design is ready, a kraft gift
   tag swinging inside that says "Coming soon". */
.tss-orn-gift {
  --stripe: #d6203a; --pin: #d6203a; --glow: rgba(255, 196, 96, .38);
  position: relative; isolation: isolate; border-radius: 14px; border-color: transparent;
  background: linear-gradient(180deg, #182b42, #121f2e);
}
.tss-orn-gift--1 { --pin: #2f8f55; --glow: rgba(255, 214, 120, .42); }
.tss-orn-gift--2 { --stripe: #c81d36; --pin: #3c72c3; --glow: rgba(120, 175, 255, .36); }
.tss-orn-gift::before {                                     /* the candy-cane ribbon */
  content: ""; position: absolute; inset: -7px; z-index: -1; border-radius: 20px; padding: 7px;
  background: repeating-linear-gradient(-45deg,
    #fbf7f0 0 9px, var(--stripe) 9px 16px, #fbf7f0 16px 19px, var(--pin) 19px 21px, #fbf7f0 21px 30px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.tss-orn-gift::after {                                      /* soft warm glow behind the present */
  content: ""; position: absolute; inset: -9px; z-index: -2; border-radius: 22px;
  box-shadow: 0 0 26px 4px var(--glow), 0 10px 24px rgba(0, 0, 0, .45);
  animation: tss-orn-gift-glow 3.4s ease-in-out infinite; will-change: opacity;
}
.tss-orn-gift--1::after { animation-delay: -1.1s; }
.tss-orn-gift--2::after { animation-delay: -2.2s; }
@keyframes tss-orn-gift-glow { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.tss-orn-gift__bow {
  position: absolute; z-index: 2; top: -30px; left: 50%; width: 86px; margin-left: -43px; pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45));
}
.tss-orn-gift__bow svg { display: block; width: 100%; height: auto; }
.tss-orn-gift .tss-orn-card__media { position: relative; min-height: 170px; overflow: hidden; place-items: start center; }
.tss-orn-gift .tss-orn-card__media:has(img) { place-items: center; }
.tss-orn-gift__tag {                                         /* kraft-paper gift tag on a string */
  position: relative; margin-top: 30px; padding: 26px 16px 14px; min-width: 52%;
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  color: #6b1220; background: linear-gradient(160deg, #f6ead0, #e7d3a8);
  clip-path: polygon(0 16%, 22% 0, 78% 0, 100% 16%, 100% 100%, 0 100%);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35));
  transform-origin: 50% -30px;
  animation: tss-orn-tag-swing 4.2s ease-in-out infinite;
}
.tss-orn-gift--1 .tss-orn-gift__tag { animation-delay: -1.4s; }
.tss-orn-gift--2 .tss-orn-gift__tag { animation-delay: -2.8s; }
.tss-orn-gift__tag::before {                                 /* the punched hole */
  content: ""; position: absolute; top: 9px; left: 50%; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: #13233a; box-shadow: inset 0 0 0 2px #c9a86a;
}
.tss-orn-gift__tag strong { font-size: 1rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #a3172a; }
.tss-orn-gift__line { font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: #7a5a2a; font-style: italic; }
.tss-orn-gift .tss-orn-card__media::before {                 /* the string the tag hangs from */
  content: ""; position: absolute; left: 50%; top: 0; height: 40px; width: 2px; margin-left: -1px;
  background: linear-gradient(#e9dcc0, #c9a86a);
}
.tss-orn-gift .tss-orn-card__media:has(img)::before { display: none; }
@keyframes tss-orn-tag-swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(4deg); } }
.tss-orn.is-still .tss-orn-gift__tag, .tss-orn.is-still .tss-orn-gift::after { animation: none; }

