/* StayShifted Design System — mobile-first, dark base */
:root {
  /* Palette: dark base, electric-blue + gold (Golden King / wordmark palette) */
  --bg: #0a0a0c;
  --bg-alt: #111115;
  --panel: #141418;
  --blue: #3b82f6;
  --gold: #e8b23a;
  --text: #f5f5f5;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  /* Typography */
  --font-display: 'Anton', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  touch-action: manipulation;
  cursor: pointer;
  font-family: inherit;
}

/* Focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Display type: Anton */
.wordmark,
.kicker,
.headline,
section h2,
.countdown {
  font-family: var(--font-display);
  font-weight: 400;
}

/* Visually hidden utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==================== HEADER ==================== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(10, 10, 12, 0.7), transparent);
}

.site-header picture {
  display: flex;
}

.wordmark {
  height: 32px;
  width: auto;
}

.socials {
  display: flex;
  gap: 1rem;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--text);
  letter-spacing: 0.05em;
  transition: color 200ms;
}

.socials a:hover {
  color: var(--gold);
  text-decoration: none;
}

.socials a svg {
  display: block;
}

.socials-footer {
  justify-content: center;
  margin-bottom: 1rem;
}

.socials-footer a {
  color: var(--text-muted);
}

.hero-trust {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  /* 82svh, not 100: the first product card's top edge must peek into the fold
     so a buyer from IG knows there is a drop below without scrolling blind. */
  min-height: 86svh;
  max-height: 960px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--bg);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  z-index: 0;
}

/* Mobile: the art occupies the top ~58% untouched; the scrim only starts where the copy does,
   so the car is never under the headline. Desktop overrides to a side-by-side split. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 12, 1) 0%, rgba(10, 10, 12, 1) 34%, rgba(10, 10, 12, 0.55) 46%, transparent 60%);
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 1.25rem 2.25rem;
  max-width: 640px;
}

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.headline {
  font-size: clamp(2.75rem, 11vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 480px;
}

.cta {
  display: inline-block;
  min-height: 48px;
  padding: 0.875rem 2rem;
  background: var(--gold);
  color: #151310;
  font-weight: 600;
  border-radius: 6px;
  transition: transform 200ms, box-shadow 200ms;
}

.cta:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(232, 178, 58, 0.35);
}

/* ==================== STORY ==================== */
.story {
  position: relative;
  padding: 4rem 1.25rem;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Screenprint grain overlay — feTurbulence, 3% opacity, on .story ONLY */
.story::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  z-index: 1;
}

.story-img {
  width: 100%;
  border-radius: 8px;
  position: relative;
  z-index: 2;
  display: block;
  overflow: hidden;
}

.story-img img {
  width: 100%;
  height: auto;
  display: block;
}

.story-copy {
  position: relative;
  z-index: 2;
}

.story-copy h2 {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.75rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.story-copy p {
  color: var(--text-muted);
  margin: 0;
  max-width: 520px;
}

/* ==================== DROP ==================== */
.drop {
  padding: 4rem 1.25rem;
  text-align: center;
  background: var(--bg);
}

.drop h2 {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.drop-copy {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.countdown {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 12vw, 5rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.drop-expired {
  color: var(--text-muted);
  margin: 0;
}

/* ==================== PRODUCTS ==================== */
.products {
  padding: 4rem 1.25rem;
  background: var(--bg);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.catalog-error {
  color: var(--gold);
  text-align: center;
  padding: 2rem;
}

/* ==================== PRODUCT CARD ==================== */
.product-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 200ms, border-color 200ms, box-shadow 200ms;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(232, 178, 58, 0.15);
}

/* The figure is a "framed product photo": a small inset on the darkest tone
   with the 8px box radius. Shopify first-listed images span black -> white
   studio backdrops, so the frame makes light and dark mockups both read as a
   consistent photo instead of one popping out of the borderless grid.
   (Fix B, stayshifted.md / taste audit 2026-09-21.) */
.product-figure {
  margin: 8px 8px 0;
  padding: 10px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg);
  border-radius: 8px;
}

.product-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 300ms;
}

.product-card:hover .product-figure img {
  display: block;
  transform: scale(1.03);
}

.product-info {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* The whole title is the tap target into the product page, so it carries the
   44px floor rather than the h3 inside it (which measures 29px on mobile). */
.product-title-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}
.product-title-link:hover .product-title { color: var(--gold); }

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  transition: color 200ms;
}

.blurb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ==================== OPTIONS ==================== */
.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  padding: 0.5rem 0.875rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text);
  font-size: 0.8125rem;
  transition: background 200ms, border-color 200ms, color 200ms;
}

.option-chip:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.option-chip:active {
  transform: scale(0.96);
}

.option-chip.is-selected {
  background: var(--text);
  border-color: var(--text);
  color: #0a0a0c;
  font-weight: 600;
}

/* Color swatch for color chips */
.option-chip[style*="--swatch"]::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--swatch);
  flex-shrink: 0;
}

/* ==================== BUY ROW ==================== */
.buy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.buy-btn {
  flex: 1;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: #151310;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  border-radius: 6px;
  transition: transform 100ms, opacity 200ms;
}

.buy-btn:hover {
  transform: translateY(-1px);
}

.buy-btn:active {
  transform: scale(0.98);
}

.buy-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.buy-btn:disabled:hover {
  transform: none;
}

/* ==================== FOOTER ==================== */
.site-footer {
  padding: 3rem 1.25rem;
  text-align: center;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer .legal {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin: 0;
}

/* ==================== PRODUCT DETAIL (own page) ==================== */
.product-mount { margin: 0; }
.home-section[hidden] { display: none; }

.product-detail {
  padding: 5.5rem 1.25rem 4rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--bg);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  width: fit-content;
}
.back-link:hover { color: var(--gold); text-decoration: none; }

.product-detail-layout {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.product-gallery { margin: 0; }
.product-gallery-main {
  display: block; width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.product-gallery-thumbs {
  display: grid; grid-auto-flow: column; gap: 0.5rem;
  margin-top: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  width: 100%;
}
.product-gallery-thumbs[hidden] { display: none; }
.product-gallery-thumbs .thumb {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 72px; height: 72px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.product-gallery-thumbs .thumb img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.product-gallery-thumbs .thumb.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.product-gallery-thumbs .thumb:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}

.product-detail-title {
  font-size: clamp(1.9rem, 7vw, 2.75rem);
  margin: 0 0 0.5rem;
  line-height: 1.05;
}
.product-detail-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin: 0 0 1rem;
}
.product-detail-desc {
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.62;
  margin: 0 0 0.25rem;
  white-space: pre-line;
}
.product-detail-note {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0.75rem 0 0;
}
.product-detail .options { margin-top: 1.25rem; }
.product-detail .buy-row {
  margin-top: 1.5rem;
  align-items: center;
}
.product-detail .buy-btn {
  min-height: 56px;
  font-size: 1rem;
}
.shopify-fallback {
  display: inline-block;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.shopify-fallback:hover { color: var(--blue); }

/* Detail page participates in scroll reveal (starts hidden, revealed on mount) */
.product-detail {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
.product-detail.is-revealed { opacity: 1; transform: translateY(0); }

/* ==================== SCROLL REVEAL ==================== */
/* Initial hidden state for reveal targets */
section.story,
section.drop,
section.products,
.product-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

/* Revealed state */
section.story.is-revealed,
section.drop.is-revealed,
section.products.is-revealed,
.product-card.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger product cards */
.product-card:nth-child(1) { transition-delay: 0ms; }
.product-card:nth-child(2) { transition-delay: 50ms; }
.product-card:nth-child(3) { transition-delay: 100ms; }
.product-card:nth-child(4) { transition-delay: 150ms; }
.product-card:nth-child(5) { transition-delay: 200ms; }
.product-card:nth-child(6) { transition-delay: 250ms; }
.product-card:nth-child(7) { transition-delay: 300ms; }
.product-card:nth-child(8) { transition-delay: 350ms; }

/* ==================== DESKTOP BREAKPOINTS ==================== */
@media (min-width: 720px) {
  .site-header {
    padding: 1.25rem 2rem;
  }

  .wordmark {
    height: 40px;
  }

  .hero-copy {
    padding: 3rem 2rem 4rem;
  }

  .story {
    flex-direction: row;
    align-items: center;
    padding: 5rem 2rem;
    gap: 3rem;
  }

  .story-img {
    width: 55%;
    flex-shrink: 0;
  }

  .story-copy {
    flex: 1;
  }

  .story-copy h2 {
    font-size: 2rem;
  }

  .drop {
    padding: 5rem 2rem;
  }

  .countdown {
    font-size: 40px;
  }

  .products {
    padding: 5rem 2rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .site-footer {
    padding: 4rem 2rem;
  }
}

@media (min-width: 1100px) {
  .hero {
    min-height: 78vh;
    max-height: 820px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start; /* base is flex-end (copy at the bottom); in a row that would push copy onto the car */
  }

  .hero picture {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  .hero-img {
    left: 36%;
    width: 64%;
    object-position: 50% 40%;
  }

  /* Solid through the copy column, then a long feather across the image's left edge — no hard seam. */
  .hero::after {
    background: linear-gradient(to right, var(--bg) 0%, var(--bg) 36%, rgba(10, 10, 12, 0.85) 44%, rgba(10, 10, 12, 0.3) 56%, transparent 68%);
  }

  .hero-copy {
    flex: 0 0 48%;
    max-width: 620px;
  }

  .hero-copy {
    padding: 4rem 3rem 5rem;
  }

  .story {
    padding: 6rem 3rem;
  }

  .drop {
    padding: 6rem 3rem;
  }

  .products {
    padding: 6rem 3rem;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-detail { padding: 7rem 3rem 5rem; }
  .product-detail-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }
  .product-gallery {
    width: 52%;
    flex-shrink: 0;
    position: sticky;
    top: 1.5rem;
  }
  .product-detail-main { flex: 1; min-width: 0; }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  /* Ensure reveal targets are visible immediately */
  section.story,
  section.drop,
  section.products,
  .product-card,
  .product-detail {
    opacity: 1;
    transform: none;
  }
}
