/* Black Friday offer strip. Loaded only while PROMO["enabled"] is true in scripts/build.py,
   after styles.css, so removing the link removes every rule here without touching the base
   stylesheet or its cache key. */

/* == black-friday:start == */

/* The build adds .has-promo to <body> only while the campaign renders. One variable keeps the
   page offset, hero padding, article headers and in-page scroll margins in step with the taller
   fixed header: 58px header + 42px strip on desktop, 62px + 64px on phones. */
body.has-promo { --header-height: 100px; }

.promo-bar {
  height: 42px;
  background:
    repeating-linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.05) 0 10px, transparent 10px 20px),
    linear-gradient(90deg, rgba(var(--color-accent-rgb), 0.14), rgba(var(--color-accent-rgb), 0.05) 45%, rgba(var(--color-accent-rgb), 0.14));
  border-bottom: 1px solid rgba(var(--color-accent-rgb), 0.24);
}
.promo-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  font-size: 0.8rem;
  line-height: 1.3;
  white-space: nowrap;
}
.promo-bar-label {
  padding: 0.12rem 0.45rem;
  border: 1px solid rgba(var(--color-accent-rgb), 0.45);
  border-radius: 999px;
  color: var(--color-accent);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.promo-bar-offer { color: var(--color-text-primary); }
.promo-bar-offer strong { font-weight: 700; }
.promo-bar-code { color: var(--color-text-secondary); }
.promo-code {
  display: inline-block;
  margin-left: 0.28rem;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #081018;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}
.promo-bar-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  align-self: stretch;
  padding: 0 0.2rem;
  color: var(--color-text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(var(--color-accent-rgb), 0.55);
  text-underline-offset: 3px;
}
.promo-bar-cta:hover { color: var(--color-accent-hover); text-decoration-color: currentColor; }

/* The hidden skip link ended 2px above the header at its old -50px; over the offer strip that
   showed as a stray teal line at the very top of the page. */
body.has-promo .skip-link { top: -80px; }

/* The seven nav links need about 557px. Between the 768px mobile switch and roughly 800px they
   are squeezed below that, their text wraps inside the bar, and the fixed header grows taller
   than --header-height. A tighter gap holds the row on one line until the normal gap fits. */
@media (min-width: 769px) and (max-width: 820px) {
  .nav { gap: 0.75rem; }
}

/* Two lines at phone widths rather than dropping the campaign name: row one is the label and
   the offer, row two the code and the action. The strip is 64px, so the header stays a known
   height (62 + 64) instead of growing by however the sentence happens to wrap. */
@media (max-width: 768px) {
  body.has-promo { --header-height: 126px; }
  .promo-bar { height: 64px; }
  .promo-bar-inner {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-content: center;
    gap: 0.15rem 0.6rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.74rem;
    line-height: 1.35;
  }
  .promo-bar-label { grid-column: 1; grid-row: 1; justify-self: end; }
  .promo-bar-offer { grid-column: 2; grid-row: 1; justify-self: start; }
  .promo-bar-code { grid-column: 1; grid-row: 2; justify-self: end; align-self: center; }
  .promo-bar-cta { grid-column: 2; grid-row: 2; justify-self: start; align-self: center; min-height: 32px; }
  .promo-bar-use { display: none; }
}
@media (max-width: 600px) {
  .promo-bar-brand { display: none; }
}

/* == black-friday:end == */
