/* ==========================================================================
   InsaneDMA — Design System
   iOS-inspired dark UI. Black canvas, system-red accent, glass surfaces.
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(255, 69, 58, 0.32); color: #fff; }

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Code",
    "JetBrains Mono", Menlo, Consolas, monospace;

  /* Canvas */
  --bg: #000000;
  --bg-elevated: #0d0d0f;
  --surface: #141417;
  --surface-2: #1c1c20;
  --surface-3: #26262b;

  /* iOS dark-mode label colors */
  --label: #ffffff;
  --label-2: rgba(235, 235, 245, 0.62);
  --label-3: rgba(235, 235, 245, 0.32);
  --label-4: rgba(235, 235, 245, 0.18);

  /* Accent — iOS system red (dark variant) */
  --red: #ff453a;
  --red-bright: #ff6a60;
  --red-deep: #d70015;
  --red-ink: #3d0705;

  --green: #30d158;
  --amber: #ff9f0a;

  /* Lines & glass */
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --separator: rgba(84, 84, 88, 0.5);
  --glass: rgba(20, 20, 23, 0.72);
  --glass-blur: saturate(180%) blur(22px);

  /* Radii — iOS continuous-corner feel */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 28px 64px -20px rgba(0, 0, 0, 0.85);
  --glow-red: 0 0 0 1px rgba(255, 69, 58, 0.28), 0 12px 44px -12px rgba(255, 69, 58, 0.55);

  /* Motion — iOS spring-ish easing */
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.42s;

  /* Layout */
  --nav-h: 60px;
  --gutter: clamp(20px, 5vw, 40px);
  --maxw: 1200px;
}

/* --- Utilities ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow { max-width: 760px; }

.section { padding-block: clamp(64px, 10vw, 128px); }
.section-tight { padding-block: clamp(48px, 7vw, 88px); }

.stack > * + * { margin-top: var(--gap, 16px); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Typography ----------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 640;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

h1, .h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.045em;
}

h2, .h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h3, .h3 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.022em;
}

h4, .h4 {
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
  color: var(--label-2);
  letter-spacing: -0.018em;
}

.muted { color: var(--label-2); }
.dim { color: var(--label-3); }
.mono { font-family: var(--font-mono); font-size: 0.875em; letter-spacing: 0; }

.grad-red {
  background: linear-gradient(150deg, #fff 8%, #ffb3ad 42%, var(--red) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--label);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.012em;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-spring), filter 0.2s ease,
    background 0.2s ease, box-shadow 0.28s ease, opacity 0.2s ease;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { filter: brightness(1.14); }
.btn:active { transform: scale(0.955); filter: brightness(0.94); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.42;
  pointer-events: none;
}

.btn-primary {
  --btn-bg: linear-gradient(180deg, var(--red-bright), var(--red) 55%, var(--red-deep));
  --btn-fg: #fff;
  box-shadow: 0 10px 30px -10px rgba(255, 69, 58, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 14px 40px -10px rgba(255, 69, 58, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  --btn-bg: rgba(255, 255, 255, 0.09);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--label-2);
  padding-inline: 14px;
}

.btn-ghost:hover { --btn-fg: var(--label); }

.btn-lg { padding: 16px 32px; font-size: 16.5px; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* --- Surfaces ------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-md);
  overflow: hidden;
}

.glass {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

/* Ambient red bloom used behind hero + section anchors */
.bloom {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

/* --- Navigation ----------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s ease, box-shadow 0.35s ease,
    backdrop-filter 0.35s ease;
}

.nav.is-stuck {
  background: rgba(10, 10, 12, 0.74);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 0.5px 0 var(--hairline);
}

.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

/* No flex `gap` here: "Insane" and <span>DMA</span> are separate flex items,
   so a gap would split the wordmark. Space the logo with a margin instead. */
.brand-mark {
  width: 28px;
  height: 28px;
  margin-right: 10px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(255, 69, 58, 0.55));
}

.brand span { color: var(--red); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 540;
  color: var(--label-2);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover { color: var(--label); background: rgba(255, 255, 255, 0.06); }
.nav-link[aria-current="page"] { color: var(--label); font-weight: 620; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Cart button + badge */
.cart-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--label);
  transition: transform 0.2s var(--ease-spring), background 0.2s ease;
}

.cart-btn:hover { background: rgba(255, 255, 255, 0.14); }
.cart-btn:active { transform: scale(0.9); }

.cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding-inline: 5px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 0 0 2.5px var(--bg);
  transform: scale(0);
  transition: transform 0.32s var(--ease-spring);
}

.cart-count.is-on { transform: scale(1); }

.cart-btn.bump { animation: bump 0.45s var(--ease-spring); }

@keyframes bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}

/* Mobile tab bar — iOS style */
.tabbar {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 89;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 -0.5px 0 var(--hairline);
}

.tabbar ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 0;
  border-radius: var(--r-md);
  font-size: 10.5px;
  font-weight: 560;
  letter-spacing: 0;
  color: var(--label-3);
  transition: color 0.2s ease, transform 0.18s var(--ease-spring);
}

.tab svg { width: 23px; height: 23px; }
.tab:active { transform: scale(0.92); }
.tab[aria-current="page"] { color: var(--red); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(56px, 11vw, 128px));
  padding-bottom: clamp(56px, 9vw, 112px);
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  /* subtle scanline/grid texture */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 32%, #000 5%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 32%, #000 5%, transparent 72%);
  opacity: 0.55;
}

.hero-bloom-a {
  top: -18%; left: 50%;
  width: min(900px, 120vw); height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 69, 58, 0.34), transparent 66%);
  z-index: -1;
}

.hero-bloom-b {
  top: 22%; right: -12%;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(215, 0, 21, 0.28), transparent 68%);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy { max-width: 620px; }
.hero-copy .lede { margin-top: 22px; max-width: 52ch; }
.hero-copy .btn-row { margin-top: 34px; }

/* Trust strip under hero CTAs */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 30px;
  font-size: 13.5px;
  color: var(--label-3);
}

.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { width: 15px; height: 15px; color: var(--green); flex-shrink: 0; }

/* Floating hero product render */
.hero-art {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-art-glow {
  position: absolute;
  inset: 12%;
  background: radial-gradient(circle, rgba(255, 69, 58, 0.4), transparent 68%);
  filter: blur(58px);
  animation: pulse 5.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.94); }
  50%      { opacity: 1;   transform: scale(1.06); }
}

.hero-art img {
  position: relative;
  width: min(100%, 520px);
  animation: float 7s ease-in-out infinite;
  filter: drop-shadow(0 34px 56px rgba(0, 0, 0, 0.75));
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-16px) rotate(-0.6deg); }
}

/* --- Stat band ------------------------------------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.stat {
  background: var(--bg-elevated);
  padding: 26px 22px;
  text-align: center;
}

.stat dt {
  font-size: 12.5px;
  color: var(--label-3);
  letter-spacing: 0.02em;
  margin-top: 6px;
}

.stat dd {
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--label);
}

.stat dd em {
  font-style: normal;
  color: var(--red);
}

/* --- Section headers ------------------------------------------------------ */
.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head.center { margin-inline: auto; }
.section-head h2 { margin-top: 16px; }
.section-head .lede { margin-top: 16px; }

/* --- Feature grid --------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.feature {
  padding: 30px 28px 32px;
  background: linear-gradient(170deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px var(--hairline-strong), var(--shadow-md);
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, rgba(255, 69, 58, 0.2), rgba(255, 69, 58, 0.05));
  box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.24);
  color: var(--red);
  margin-bottom: 20px;
}

.feature-icon svg { width: 23px; height: 23px; }
.feature h3 { margin-bottom: 9px; }
.feature p { color: var(--label-2); font-size: 15px; line-height: 1.55; }

/* Wide feature card (bento accent) */
.feature-wide { grid-column: span 2; }

@media (max-width: 720px) {
  .feature-wide { grid-column: span 1; }
}

/* --- Segmented control (iOS) --------------------------------------------- */
.segmented {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(118, 118, 128, 0.22);
  box-shadow: inset 0 0 0 1px var(--hairline);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar { display: none; }

.segmented-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--red-bright), var(--red-deep));
  box-shadow: 0 2px 10px rgba(255, 69, 58, 0.45), inset 0 1px 0 rgba(255,255,255,0.22);
  transition: transform 0.42s var(--ease-out), width 0.42s var(--ease-out);
  pointer-events: none;
}

.seg {
  position: relative;
  z-index: 1;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 580;
  color: var(--label-2);
  white-space: nowrap;
  transition: color 0.28s ease;
}

.seg[aria-selected="true"] { color: #fff; font-weight: 640; }

/* --- Product grid --------------------------------------------------------- */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(172deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border-radius: var(--r-xl);
  box-shadow: inset 0 0 0 1px var(--hairline);
  overflow: hidden;
  transition: transform 0.42s var(--ease-out), box-shadow 0.42s var(--ease-out),
    opacity 0.3s ease;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.3),
    0 24px 50px -22px rgba(255, 69, 58, 0.42), var(--shadow-md);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 62% 52% at 50% 58%, rgba(255, 69, 58, 0.15), transparent 70%),
    #0a0a0c;
  padding: 20px;
  overflow: hidden;
}

.product-media img {
  width: 82%;
  transition: transform 0.55s var(--ease-out);
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.7));
}

.product:hover .product-media img { transform: scale(1.07) rotate(-1.2deg); }

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 20px 22px;
  gap: 8px;
}

.product-cat {
  font-size: 11.5px;
  font-weight: 640;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--label-3);
}

.product h3 { font-size: 1.125rem; }

.product p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--label-2);
  flex: 1;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.chip {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 11.5px;
  font-weight: 540;
  color: var(--label-2);
  letter-spacing: 0;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.price {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.price small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--label-3);
  margin-top: 1px;
}

/* Badges pinned to product art */
.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(255, 69, 58, 0.16);
  color: var(--red-bright);
  box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.badge-soon {
  background: rgba(255, 159, 10, 0.15);
  color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.32);
}

.product.is-soon .product-media img { filter: grayscale(0.55) brightness(0.7); }

/* Empty filter state */
.empty {
  grid-column: 1 / -1;
  padding: 64px 24px;
  text-align: center;
  color: var(--label-3);
}

/* --- iOS grouped list (specs, FAQ, order summary) ------------------------- */
.group {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--hairline);
  overflow: hidden;
}

.group-title {
  padding: 0 4px 9px;
  font-size: 12.5px;
  font-weight: 620;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--label-3);
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  font-size: 15.5px;
}

.row + .row { box-shadow: inset 0 0.5px 0 var(--separator); }
.row-label { color: var(--label-2); }
.row-value { margin-left: auto; font-weight: 560; text-align: right; }

/* --- Accordion (FAQ) ------------------------------------------------------ */
.faq-item { position: relative; }
.faq-item + .faq-item { box-shadow: inset 0 0.5px 0 var(--separator); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  text-align: left;
  font-size: 15.5px;
  font-weight: 580;
  letter-spacing: -0.012em;
  transition: background 0.2s ease;
}

.faq-q:hover { background: rgba(255, 255, 255, 0.03); }

.faq-q::after {
  content: "";
  flex-shrink: 0;
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--label-3);
  border-bottom: 2px solid var(--label-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.36s var(--ease-out), border-color 0.2s ease;
}

.faq-q[aria-expanded="true"]::after {
  transform: rotate(-135deg) translateY(-2px);
  border-color: var(--red);
}

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s var(--ease-out);
}

.faq-q[aria-expanded="true"] + .faq-a { grid-template-rows: 1fr; }

.faq-a > div { overflow: hidden; }

.faq-a p {
  padding: 0 18px 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--label-2);
}

/* --- Steps (setup guide) -------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 14px; }

.step {
  position: relative;
  padding: 22px 24px 22px 68px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 22px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--red-bright), var(--red-deep));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px -4px rgba(255, 69, 58, 0.8);
}

.step h4 { margin-bottom: 5px; }
.step p { font-size: 14.5px; color: var(--label-2); line-height: 1.55; }

/* --- Cart sheet ----------------------------------------------------------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

.scrim.is-open { opacity: 1; visibility: visible; }

.sheet {
  position: fixed;
  z-index: 101;
  display: flex;
  flex-direction: column;
  background: rgba(22, 22, 26, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-lg);
  transition: transform 0.52s var(--ease-out);
  /* Desktop: right-hand drawer */
  top: 0; right: 0; bottom: 0;
  width: min(430px, 100vw);
  border-radius: var(--r-2xl) 0 0 var(--r-2xl);
  transform: translateX(101%);
}

.sheet.is-open { transform: translateX(0); }

.sheet-grabber { display: none; }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}

.sheet-head h2 { font-size: 1.3rem; }

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--label-2);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-spring), background 0.2s ease, color 0.2s ease;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.18); color: var(--label); }
.icon-btn:active { transform: scale(0.88); }
.icon-btn svg { width: 15px; height: 15px; }

.sheet-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
}

.sheet-foot {
  flex-shrink: 0;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
  background: rgba(16, 16, 19, 0.6);
}

/* Cart line items */
.cart-line {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
}

.cart-line + .cart-line { border-top: 1px solid var(--hairline); }

.cart-thumb {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: radial-gradient(circle at 50% 60%, rgba(255,69,58,0.16), #0a0a0c 70%);
  box-shadow: inset 0 0 0 1px var(--hairline);
  padding: 7px;
}

.cart-line-title { font-size: 14.5px; font-weight: 590; letter-spacing: -0.012em; }
.cart-line-price { font-size: 13px; color: var(--label-3); margin-top: 2px; }

.cart-line-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Quantity stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  background: rgba(118, 118, 128, 0.24);
  box-shadow: inset 0 0 0 1px var(--hairline);
  overflow: hidden;
}

.stepper button {
  width: 30px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--label-2);
  font-size: 16px;
  line-height: 1;
  transition: background 0.16s ease, color 0.16s ease;
}

.stepper button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.stepper button:active { background: rgba(255, 69, 58, 0.3); }

.stepper output {
  min-width: 26px;
  text-align: center;
  font-size: 14px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.cart-empty {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 340px;
  text-align: center;
  padding: 20px;
}

.cart-empty svg { width: 52px; height: 52px; color: var(--label-4); }
.cart-empty p { color: var(--label-3); font-size: 15px; max-width: 26ch; }

.totals { display: grid; gap: 9px; margin-bottom: 16px; }

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14.5px;
  color: var(--label-2);
}

.total-row.grand {
  padding-top: 11px;
  border-top: 1px solid var(--hairline);
  font-size: 19px;
  font-weight: 700;
  color: var(--label);
  letter-spacing: -0.028em;
}

.total-row.grand span:last-child { font-variant-numeric: tabular-nums; }

.checkout-note {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--label-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.checkout-note svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Spinner shown on the checkout button */
.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Toast ---------------------------------------------------------------- */
.toast-host {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  gap: 10px;
  width: min(400px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  border-radius: var(--r-pill);
  background: rgba(30, 30, 34, 0.88);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--hairline-strong), var(--shadow-lg);
  font-size: 14.5px;
  font-weight: 550;
  animation: toast-in 0.5s var(--ease-spring) both;
}

.toast.is-out { animation: toast-out 0.34s var(--ease-out) both; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--green); }
.toast.error svg { color: var(--red); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(24px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(14px) scale(0.94); }
}

/* --- CTA banner ----------------------------------------------------------- */
.cta {
  position: relative;
  padding: clamp(44px, 7vw, 76px) clamp(28px, 5vw, 64px);
  border-radius: var(--r-2xl);
  background: linear-gradient(150deg, #1a0806 0%, #120406 48%, #0a0a0c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.22);
  overflow: hidden;
  text-align: center;
}

.cta::before {
  content: "";
  position: absolute;
  top: -55%;
  left: 50%;
  width: 640px;
  height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 69, 58, 0.3), transparent 66%);
  filter: blur(56px);
  pointer-events: none;
}

.cta > * { position: relative; }
.cta .lede { margin: 16px auto 0; max-width: 46ch; }
.cta .btn-row { justify-content: center; margin-top: 30px; }

/* --- Footer --------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding-block: 56px 40px;
  margin-top: clamp(56px, 8vw, 104px);
  background: var(--bg-elevated);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px 32px;
}

.footer-brand p {
  margin-top: 14px;
  font-size: 14px;
  color: var(--label-3);
  max-width: 34ch;
  line-height: 1.6;
}

.footer h4 {
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--label-3);
  margin-bottom: 14px;
}

.footer li + li { margin-top: 9px; }

.footer a {
  font-size: 14.5px;
  color: var(--label-2);
  transition: color 0.18s ease;
}

.footer a:hover { color: var(--red); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--label-3);
}

/* --- Status pages (success / cancel) -------------------------------------- */
.status {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 40px) var(--gutter) 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.status-card {
  position: relative;
  max-width: 520px;
  width: 100%;
  padding: clamp(36px, 6vw, 56px) clamp(26px, 5vw, 44px);
  border-radius: var(--r-2xl);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-lg);
}

.status-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  animation: pop 0.6s var(--ease-spring) both;
}

.status-icon svg { width: 38px; height: 38px; }

.status-icon.ok {
  background: rgba(48, 209, 88, 0.14);
  box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.35), 0 0 44px -8px rgba(48, 209, 88, 0.5);
  color: var(--green);
}

.status-icon.warn {
  background: rgba(255, 159, 10, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.35), 0 0 44px -8px rgba(255, 159, 10, 0.5);
  color: var(--amber);
}

@keyframes pop {
  0%   { opacity: 0; transform: scale(0.4); }
  100% { opacity: 1; transform: scale(1); }
}

.status-card h1 { font-size: clamp(1.9rem, 4.5vw, 2.5rem); }
.status-card p { margin-top: 14px; color: var(--label-2); font-size: 16px; }
.status-card .btn-row { justify-content: center; margin-top: 30px; }

/* --- Scroll reveal -------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal.in { opacity: 1; transform: none; }

/* --- Scrollbar ------------------------------------------------------------ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover { background: rgba(255, 69, 58, 0.55); background-clip: padding-box; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { margin-inline: auto; }
  .hero-copy .lede { margin-inline: auto; }
  .hero-copy .btn-row, .trust { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art img { width: min(78%, 400px); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { padding-bottom: 74px; }          /* clear the tab bar */
  .nav-links { display: none; }
  /* .nav-links carried the auto margin that pushes the actions right; once it
     is hidden the actions need to claim that space themselves. */
  .nav-actions { margin-left: auto; }
  .tabbar { display: block; }
  .sheet {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(88dvh, 760px);
    border-radius: var(--r-2xl) var(--r-2xl) 0 0;
    transform: translateY(101%);
  }
  .sheet.is-open { transform: translateY(0); }
  .sheet-grabber {
    display: block;
    width: 38px;
    height: 5px;
    margin: 9px auto 0;
    border-radius: var(--r-pill);
    background: var(--label-4);
    flex-shrink: 0;
  }
  .sheet-head { padding-top: 14px; }
  .toast-host { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .products { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 460px) {
  .products { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* --- Motion & contrast preferences ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
