/* AIDEV-NOTE: Site promotion — price tags, homepage hero tag, top bar and popup.
   Loaded globally on every v4 page via sharedCss.globalV4; all of it is driven by
   web-src/v4/promo.js from GET /api/v2/promotion. Also loaded by the base layout
   (v4/promo-body.njk) and by backroad's SSR pages, which lack v4 variables.css: every token has its
   fallback here. Layout follows the approved prototype (claude.ai artifact "$49 Design Promo
   Prototype", v2). Phone below 640px. */

/* ---------- 1. Price tags ({designFee} in copy) ---------- */
.wm-price {
  white-space: nowrap;
}
.wm-price[aria-busy="true"] .wm-price-skeleton {
  display: inline-block;
  width: 2.4em;
  height: 0.85em;
  vertical-align: -0.05em;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(15, 23, 41, 0.08), rgba(15, 23, 41, 0.16), rgba(15, 23, 41, 0.08));
  background-size: 200% 100%;
  /* Shown only after a short grace so fast networks never flash it (CLAUDE.md busy states). */
  opacity: 0;
  animation: wm-skeleton-in 0.01s 0.2s forwards, wm-skeleton-shimmer 1.2s linear infinite;
}
@keyframes wm-skeleton-in {
  to {
    opacity: 1;
  }
}
@keyframes wm-skeleton-shimmer {
  to {
    background-position: -200% 0;
  }
}
.wm-price-was,
.wm-promo-was {
  color: var(--muted-foreground, hsl(0, 0%, 45%));
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: var(--promo-deal, #e11d48);
  text-decoration-thickness: 2px;
}
.wm-price--promo .wm-price-now {
  font-weight: 900;
  font-size: 1.2em;
  color: inherit;
}

/* Shared pieces */
.wm-promo-eyebrow {
  justify-self: start;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--brand-orange, #eb9610);
  color: var(--promo-night, #0b1120);
  padding: 0.25rem 0.5625rem;
  border-radius: 4px;
  white-space: nowrap;
}
.wm-promo-save {
  display: inline-block;
  background: var(--promo-deal, #e11d48);
  color: #fff;
  font-weight: 800;
  font-size: 0.8125rem;
  padding: 0.375rem 0.625rem;
  border-radius: 9999px;
  transform: rotate(-3deg);
  white-space: nowrap;
}
.wm-promo-prices {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
}

/* ---------- 2. Homepage hero tag ---------- */
/* AIDEV-NOTE: The card is one <a> into the design flow (index.njk). It looks like a button on purpose:
   orange "Claim offer" pill (no arrow glyph), hover lift + orange border, focus ring. Desktop (≥1024) is much bigger;
   phones (<640) fold it into one row (below). */
.wm-promo-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.875rem 1.125rem;
  margin: -0.5rem auto 2rem;
  padding: 0.75rem 0.75rem 0.75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 41, 0.14);
  backdrop-filter: blur(6px);
  color: #0f1729;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  /* backwards, not both: a held end frame would pin transform and block the hover lift. */
  animation: wm-promo-pop 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) backwards;
}
.wm-promo-hero[hidden] {
  display: none;
}
.wm-promo-hero:focus-visible {
  outline: 3px solid var(--brand-orange, #eb9610);
  outline-offset: 3px;
}
@media (hover: hover) {
  .wm-promo-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 41, 0.24);
    border-color: var(--brand-orange, #eb9610);
  }
  .wm-promo-hero:hover .wm-promo-hero-go {
    background: var(--brand-orange-hover, #d4860e);
  }
}
.wm-promo-hero-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  background: var(--brand-orange, #eb9610);
  color: #0f1729;
  font-size: 0.9375rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.wm-promo-hero-label {
  display: grid;
  text-align: left;
  line-height: 1.2;
}
.wm-promo-hero-label b {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-orange-hover, #d4860e);
}
.wm-promo-hero-label span {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0f1729;
}
.wm-promo-hero .wm-promo-was {
  position: relative;
  font-size: 1.5rem;
  font-weight: 700;
  /* The red bar (::after) draws in on top; the plain strike underneath is there from the first frame. */
}
.wm-promo-hero .wm-promo-was::after,
.wm-promo-modal-price .wm-promo-was::after {
  /* The strike, drawn in. */
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  top: 52%;
  height: 3px;
  border-radius: 2px;
  background: var(--promo-deal, #e11d48);
  transform: rotate(-9deg);
  transform-origin: left;
  animation: wm-promo-strike 0.3s cubic-bezier(0.6, 0, 0.3, 1) both;
}
.wm-promo-hero .wm-promo-now {
  font-size: 3.25rem;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f1729;
}
@keyframes wm-promo-strike {
  from {
    transform: rotate(-9deg) scaleX(0);
  }
}
/* AIDEV-NOTE: Entrance motion only MOVES things; nothing starts hidden or delayed. The promo is
   baked into the HTML so it is complete on the first frame, and an opacity-0 start (or a delay)
   would hide it again for the length of the animation. */
@keyframes wm-promo-pop {
  from {
    transform: translateY(6px) scale(0.97);
  }
}
/* AIDEV-NOTE: Phones: ONE row (label | $199 over $49 | pill) so the card stays short and the hero's two
   CTAs keep their place above the van (homepage.css). The event name is small orange text in the label;
   the struck price already shows the saving, so the "Save" pill is left out here. */
@media (max-width: 639px) {
  .wm-promo-hero {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 0.75rem 0.75rem 1rem;
    margin: 0 auto 1rem;
    text-align: left;
  }
  .wm-promo-hero-label b {
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
  }
  .wm-promo-hero-label span {
    font-size: 0.9375rem;
  }
  .wm-promo-hero .wm-promo-prices {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
  }
  .wm-promo-hero .wm-promo-was {
    font-size: 0.9375rem;
    line-height: 1;
  }
  .wm-promo-hero .wm-promo-now {
    font-size: 2.125rem;
  }
  .wm-promo-hero .wm-promo-save {
    display: none;
  }
  .wm-promo-hero-go {
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
  }
}
@media (min-width: 1024px) {
  .wm-promo-hero {
    gap: 1.75rem;
    margin: 0 auto 2rem;
    padding: 1.125rem 1.125rem 1.125rem 2rem;
    border-radius: 1.125rem;
  }
  .wm-promo-hero-label b {
    font-size: 0.9375rem;
  }
  .wm-promo-hero-label span {
    font-size: 1.5rem;
  }
  .wm-promo-hero .wm-promo-was {
    font-size: 2.25rem;
  }
  .wm-promo-hero .wm-promo-now {
    font-size: 5.5rem;
  }
  .wm-promo-hero .wm-promo-save {
    font-size: 1.0625rem;
    padding: 0.5rem 0.8125rem;
  }
  .wm-promo-hero-go {
    font-size: 1.1875rem;
    padding: 1rem 1.5rem;
  }
}

/* ---------- 3. Top bar (same slot as the returning-user banner) ---------- */
.wm-promo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--promo-night, #0b1120) 0%, #1b2236 50%, var(--promo-night, #0b1120) 100%);
  color: #fff;
  padding: 0.5rem 1rem;
  overflow: hidden;
}
.wm-promo-bar[hidden] {
  display: none;
}
.wm-promo-bar::after {
  /* One slow shine across the bar. */
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(235, 150, 16, 0.25), transparent);
  animation: wm-promo-shine 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes wm-promo-shine {
  0%,
  55% {
    left: -40%;
  }
  100% {
    left: 120%;
  }
}
.wm-promo-bar-inner {
  position: relative;
  z-index: 1;
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.wm-promo-bar-text {
  font-size: 0.9375rem;
  font-weight: 600;
  min-width: 0;
}
.wm-promo-bar .wm-promo-was {
  color: #94a3b8;
  margin: 0 0.25rem;
}
.wm-promo-bar .wm-promo-now {
  color: var(--brand-orange, #eb9610);
  font-weight: 900;
  font-size: 1.125rem;
}
.wm-promo-bar-cta {
  background: #fff;
  color: var(--promo-night, #0b1120);
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
}
.wm-promo-bar-cta:hover {
  background: var(--brand-orange-light, #fef3e2);
}
.wm-promo-bar-dismiss {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: #cbd5e1;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 639px) {
  .wm-promo-bar {
    padding: 0.375rem 0.5rem 0.375rem 0.75rem;
  }
  .wm-promo-bar-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.5rem;
  }
  .wm-promo-bar .wm-promo-eyebrow {
    display: none;
  }
  /* Wraps to a second line rather than cut a price off. */
  .wm-promo-bar-text {
    font-size: 0.8125rem;
    line-height: 1.3;
  }
}

/* ---------- 4. First-visit popup ---------- */
html.wm-promo-modal-open {
  overflow: hidden;
}
.wm-promo-modal-layer {
  /* Own type: base-layout pages set no usable font on <body> (Inter where loaded, else system). */
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-align: left;
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(11, 17, 32, 0.55);
  backdrop-filter: blur(3px);
}
/* The baked popup is a <dialog open> (promo-popup.njk): reset the UA dialog box so it is the same
   full-screen layer, and let a method="dialog" close (no script needed) hide it. */
dialog.wm-promo-modal-layer {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  color: inherit;
}
dialog.wm-promo-modal-layer:not([open]) {
  display: none;
}
/* Not for this page, or seen in the last 5 days (html class set before paint by promo-head.js): never paints. */
.wm-promo-popup-off [data-wm-promo-popup] {
  display: none !important;
}
.wm-promo-modal-close-form,
.wm-promo-modal-later-form {
  display: contents;
}
.wm-promo-modal {
  position: relative;
  width: min(860px, 100%);
  max-height: 100%;
  overflow: auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff;
  color: #0f1729;
  border-radius: 1.25rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: wm-promo-pop 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
.wm-promo-modal--text {
  grid-template-columns: 1fr;
  width: min(460px, 100%);
}
.wm-promo-modal-media {
  position: relative;
  min-height: 340px;
  background: var(--promo-night, #0b1120);
  overflow: hidden;
}
.wm-promo-modal-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The popup opens at once; its picture loads inside this same-size skeleton (promo.js sets
   aria-busy="false" when the image has loaded, or removes the area if there is none). */
.wm-promo-modal-media[aria-busy="true"] {
  background: linear-gradient(90deg, #e5e7eb, #f3f4f6, #e5e7eb);
  background-size: 200% 100%;
  animation: wm-skeleton-shimmer 1.2s linear infinite;
}
.wm-promo-modal-media[aria-busy="true"] img {
  opacity: 0;
}
.wm-promo-modal-media img {
  transition: opacity 0.2s ease;
}
.wm-promo-modal-media--own {
  background: #eceef1;
}
.wm-promo-modal-media--own::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: var(--wm-promo-own) center / cover;
  filter: blur(28px) saturate(0.8);
  opacity: 0.55;
}
.wm-promo-modal-media--own img {
  object-fit: contain;
}
.wm-promo-modal-caption {
  position: absolute;
  left: 0.875rem;
  bottom: 0.875rem;
  z-index: 1;
  background: rgba(11, 17, 32, 0.82);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
}
.wm-promo-modal-body {
  padding: 2.125rem 1.875rem 1.625rem;
  display: grid;
  gap: 1rem;
  align-content: center;
}
.wm-promo-modal-close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0f1729;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.wm-promo-modal-title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
/* What the design fee buys: green checks, the same style as the concepts checkout's list. */
.wm-promo-modal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5625rem;
}
.wm-promo-modal-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  color: #1f2937;
}
.wm-promo-check {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.0625rem;
  border-radius: 9999px;
  background: #dcfce7;
  color: #15803d;
}
.wm-promo-check svg {
  width: 0.75rem;
  height: 0.75rem;
}
.wm-promo-modal-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.875rem;
}
.wm-promo-modal-price .wm-promo-was {
  position: relative;
  font-size: 1.75rem;
  font-weight: 700;
  /* The red bar (::after) draws in on top; the plain strike underneath is there from the first frame. */
}
.wm-promo-modal-price .wm-promo-now {
  font-size: 4.75rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.85;
  animation: wm-promo-slam 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.wm-promo-modal-price .wm-promo-save {
  animation: wm-promo-slam 0.4s 0.1s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes wm-promo-slam {
  from {
    transform: scale(1.25);
  }
}
.wm-promo-modal-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  border-radius: 0.625rem;
  background: var(--brand-orange, #eb9610);
  color: #0f1729;
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
}
.wm-promo-modal-cta:hover {
  background: var(--brand-orange-hover, #d4860e);
}
.wm-promo-modal-later {
  justify-self: center;
  padding: 0.25rem;
  border: 0;
  background: none;
  color: var(--muted-foreground, hsl(0, 0%, 45%));
  font-weight: 600;
  cursor: pointer;
}
@media (max-width: 639px) {
  .wm-promo-modal-layer {
    align-items: end;
    padding: 0.75rem;
  }
  .wm-promo-modal {
    grid-template-columns: 1fr;
  }
  .wm-promo-modal-media {
    min-height: 0;
    /* 150, not 200: the check list below takes the room back. */
    height: 150px;
  }
  .wm-promo-modal-list {
    gap: 0.4375rem;
  }
  .wm-promo-modal-list li {
    font-size: 0.875rem;
  }
  .wm-promo-modal-body {
    padding: 1.25rem 1.125rem 1rem;
    gap: 0.75rem;
  }
  .wm-promo-modal-title {
    font-size: 1.4375rem;
  }
  .wm-promo-modal-price .wm-promo-now {
    font-size: 3.75rem;
  }
  .wm-promo-modal-price .wm-promo-was {
    font-size: 1.375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wm-promo-hero,
  .wm-promo-hero * {
    transition: none !important;
  }
  .wm-price-skeleton,
  .wm-promo-hero,
  .wm-promo-hero *,
  .wm-promo-hero *::after,
  .wm-promo-bar::after,
  .wm-promo-modal-layer,
  .wm-promo-modal,
  .wm-promo-modal *,
  .wm-promo-modal *::after {
    animation: none !important;
  }
}
