/* ==========================================================================
   Anniversary Drop v2 — component CSS
   --------------------------------------------------------------------------
   Layout and spacing live in Tailwind utilities (index.html). This file holds
   shared components, pseudo-elements, keyframes and motion.
   Rule of thumb: `display` of components is wrapped in :where() so Tailwind
   utilities like `hidden` / `sm:inline-flex` can always override it.
   ========================================================================== */

/* ---------- Tokens (keep in sync with tailwind.config.js) ---------- */
:root {
  --red: #DA291C;
  --red-dark: #B51F15;
  --ink: #111111;
  --black: #000000;
  --mist: #F4F4F4;
  --well: #EAEAEC;
  --line: #E3E3E3;
  --gold: #C9A23F;
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --header-h: 4rem;
}
@media (min-width: 1024px) { :root { --header-h: 5rem; } }

/* ---------- Base ---------- */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem); /* sticky header offset for anchors */
  -webkit-text-size-adjust: 100%;
}

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: #fff; }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1.25rem;
  background: var(--ink); color: #fff; font-weight: 600; border-radius: 4px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Type ---------- */
.label {
  font-size: .75rem; font-weight: 600; line-height: 1.2;
  letter-spacing: .14em; text-transform: uppercase;
}
.h-section {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  line-height: .92; letter-spacing: -.005em; font-size: clamp(2.25rem, 6vw, 4rem);
}
.link-u {
  font-size: .875rem; font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: color .2s;
}
.link-u:hover { color: var(--red); }

/* ---------- Logo slot (placeholder wordmark) ---------- */
:where(.logo-slot) { display: inline-flex; }
.logo-slot { align-items: center; gap: .6rem; flex-shrink: 0; color: inherit; }
.logo-word {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.55rem;
  letter-spacing: .06em; line-height: .9; text-transform: uppercase;
}
.logo-sub {
  display: block; margin-top: .2rem; font-size: .58rem; font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase; opacity: .6;
}

/* ---------- Buttons ---------- */
:where(.btn) { display: inline-flex; }
.btn {
  align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .7rem 1.5rem; border: 1.5px solid transparent; border-radius: 4px;
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700;
  letter-spacing: .08em; line-height: 1; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.btn[disabled] { opacity: .4; cursor: not-allowed; }

.btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn--primary:not([disabled]):hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn--outline-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--outline-light:hover { background: #fff; border-color: #fff; color: var(--black); }

.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:not([disabled]):hover { background: var(--red); border-color: var(--red); color: #fff; }

.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--dark:not([disabled]):hover { background: var(--red); border-color: var(--red); }

/* ---------- Icon buttons ---------- */
:where(.icon-btn) { display: inline-flex; }
.icon-btn {
  position: relative; align-items: center; justify-content: center; flex: none;
  width: 2.75rem; height: 2.75rem; border-radius: 9999px; color: inherit;
  transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: var(--mist); }
.icon-btn svg { width: 1.375rem; height: 1.375rem; }
.icon-btn--outline { border: 1px solid #CFCFCF; }
.icon-btn--outline:hover { border-color: var(--ink); background: transparent; }

.cart-count {
  position: absolute; top: .3rem; right: .25rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem;
  border-radius: 9999px; background: var(--red); color: #fff;
  font-size: .65rem; font-weight: 700; line-height: 1.1rem; text-align: center;
}

/* ---------- Header nav ---------- */
.nav-link {
  position: relative; display: flex; align-items: center; height: 100%;
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; transition: color .2s;
}
.nav-link::after { /* red bar on the header's bottom edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-link:hover { color: var(--red); }
.nav-link:hover::after, .nav-link[aria-current="true"]::after { transform: scaleX(1); }

.nav-badge {
  position: absolute; top: .55rem; left: 50%; transform: translateX(-50%);
  padding: .15rem .4rem; border-radius: 3px; background: var(--gold); color: var(--black);
  font-size: .6rem; font-weight: 700; letter-spacing: .12em; line-height: 1.1;
  text-transform: uppercase; pointer-events: none;
}

/* ---------- Hero ---------- */
/* .hero__media is used only when a hero photo is added (see IMAGE SLOT comment in index.html) */
.hero__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
@media (min-width: 640px) { .hero__media { aspect-ratio: 16 / 9; } }
.hero__media::after { /* blend photo into black */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 72%, #000 100%);
}
@media (min-width: 1024px) {
  .hero__media { position: absolute; inset: 0 0 0 auto; z-index: -1; width: 66%; aspect-ratio: auto; }
  .hero__media::after {
    background:
      linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .75) 18%, rgba(0, 0, 0, 0) 55%),
      linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, 0) 40%);
  }
}

/* Red diagonal slash between copy and photo (desktop) */
.hero__stripe { display: none; }
@media (min-width: 1024px) {
  .hero__stripe {
    display: block; position: absolute; top: 0; bottom: 0; z-index: 0; width: 14px; /* above photo, below copy */
    left: calc(max(2rem, (100% - 80rem) / 2 + 2rem) + 39rem); /* right after the copy column */
    background: var(--red); transform: skewX(-14deg);
  }
  .hero__stripe::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 30px; width: 4px; background: var(--red);
  }
}
/* Diagonal red cut on the hero's bottom-left edge (all breakpoints) */
.hero::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 46%; height: 8px; background: var(--red);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.live-dot {
  width: .5rem; height: .5rem; flex: none; border-radius: 9999px; background: var(--red);
  animation: pulse 1.8s infinite;
}

/* Hero category shortcuts */
.hero-cat {
  display: flex; align-items: center; gap: 1rem; height: 100%;
  padding: .75rem 1.25rem .75rem .75rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px;
  background: #141414; color: #fff; transition: border-color .2s, background-color .2s;
}
.hero-cat:hover { border-color: rgba(255, 255, 255, .5); background: #1b1b1b; }
.hero-cat__thumb { width: 3.5rem; height: 3.5rem; flex: none; border-radius: 9999px; overflow: hidden; background: var(--well); }
.hero-cat__arrow { transition: transform .25s var(--ease); }
.hero-cat:hover .hero-cat__arrow { transform: translateX(4px); }

/* ---------- Drop band ---------- */
.step-num {
  display: block; font-family: var(--font-display); font-weight: 800; line-height: .8;
  font-size: clamp(4rem, 9vw, 6.5rem); color: var(--red);
}
.cd-cell {
  padding: .7rem .25rem; text-align: center; border-radius: 4px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14);
}
.cd-num {
  display: block; font-family: var(--font-display); font-size: 2.25rem; font-weight: 800;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.cd-label {
  display: block; margin-top: .3rem; font-size: .65rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .6);
}

/* ---------- Catalog ---------- */
:where(.chip) { display: inline-flex; }
.chip {
  align-items: center; flex: none; min-height: 2.75rem; padding: .45rem 1.15rem;
  border: 1px solid #CFCFCF; border-radius: 9999px; background: #fff; color: var(--ink);
  font-size: .8125rem; font-weight: 600; letter-spacing: .04em; white-space: nowrap;
  cursor: pointer; transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.badge {
  padding: .32rem .5rem; border-radius: 3px; font-size: .6875rem; font-weight: 700;
  letter-spacing: .1em; line-height: 1; text-transform: uppercase;
}
.badge--red { background: var(--red); color: #fff; }
.badge--gold { background: var(--gold); color: var(--black); }

.product-card__name { /* underline grows on hover */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px;
  transition: background-size .35s var(--ease);
}
.product-card:hover .product-card__name,
.product-card:focus-within .product-card__name { background-size: 100% 1px; }
.product-card:hover .btn--outline:not([disabled]) { background: var(--red); border-color: var(--red); color: #fff; }
.product-card .btn { padding-inline: .75rem; font-size: 1rem; }
.product-card[data-sold-out="true"] img { opacity: .5; filter: grayscale(1); }

/* ---------- FAQ accordion ---------- */
.acc-trigger {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.35rem 0; text-align: left; cursor: pointer;
  font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; line-height: 1.1;
  letter-spacing: .02em; text-transform: uppercase; transition: color .2s;
}
.acc-trigger:hover { color: var(--red); }
.acc-trigger::after { /* plus → minus */
  content: ""; flex: 0 0 1rem; height: 1rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform .35s var(--ease);
}
.acc-trigger[aria-expanded="true"]::after {
  transform: rotate(180deg);
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.acc-panel > div { overflow: hidden; visibility: hidden; transition: visibility 0s linear .35s; }
.acc-panel[data-open="true"] { grid-template-rows: 1fr; }
.acc-panel[data-open="true"] > div { visibility: visible; transition-delay: 0s; }

/* ---------- Footer ---------- */
.footer-title {
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
:where(.social) { display: inline-flex; }
.social {
  align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
  border-radius: 9999px; background: var(--ink); color: #fff; transition: background-color .2s;
}
.social:hover { background: var(--red); }
.social svg { width: 1.15rem; height: 1.15rem; }
@media (min-width: 1024px) { .social { width: 2.5rem; height: 2.5rem; } }

/* ---------- Order dialog ---------- */
html:has(.order-dialog[open]) { overflow: hidden; } /* lock page scroll while open */
.order-dialog {
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 0; border: 0;
  border-radius: 8px 8px 0 0; background: #fff; color: var(--ink); overflow: auto;
}
.order-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.order-dialog[open] { animation: sheet-in .35s var(--ease); }
@media (min-width: 768px) {
  .order-dialog {
    width: calc(100% - 3rem); max-width: 56rem; max-height: calc(100dvh - 3rem);
    margin: auto; border-radius: 8px;
  }
  .order-dialog[open] { animation: dialog-in .3s var(--ease); }
}

.size-opt { position: relative; }
.size-opt input { position: absolute; opacity: 0; pointer-events: none; }
.size-opt span {
  display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 .5rem;
  border: 1px solid #CFCFCF; border-radius: 4px; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: border-color .2s, background-color .2s, color .2s;
}
.size-opt:hover span { border-color: var(--ink); }
.size-opt input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.size-opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.size-opt input:disabled + span {
  color: #A3A3A3; border-color: var(--line); cursor: not-allowed; text-decoration: line-through;
}
.size-opt--wide { grid-column: 1 / -1; }
fieldset[data-invalid="true"] .size-opt span { border-color: var(--red); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 90; max-width: calc(100vw - 2rem);
  padding: .9rem 1.25rem; border-radius: 4px; background: var(--ink); color: #fff;
  border-left: 4px solid var(--red);
  opacity: 0; pointer-events: none; transform: translate(-50%, 1rem);
  transition: opacity .3s, transform .3s var(--ease);
}
.toast[data-show="true"] { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scroll reveal (only when JS runs) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { --delay: 90ms; }
.reveal-d2 { --delay: 180ms; }
.reveal-d3 { --delay: 270ms; }

/* ---------- Utilities ---------- */
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- Keyframes ---------- */
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(218, 41, 28, .7); }
  70%  { box-shadow: 0 0 0 8px rgba(218, 41, 28, 0); }
  100% { box-shadow: 0 0 0 0 rgba(218, 41, 28, 0); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}


