/* ─────────────────────────────────────────────────────────────────────
   SURGE — India-D2C electronics storefront
   Dark canvas + accent-red. Spec-loud, stat-forward, tabular-numeral.
   For TVs, appliances, laptops, mini PCs, audio, smartwatches, mobile
   accessories. Dual-tone: light sections sit on #FFFFFF, dark sections
   (hero, stat callout, exploded view, tech-edu) on canvas-dark #0A0A0A.
   Space Grotesk display, Inter body. Mobile responsive.
   ───────────────────────────────────────────────────────────────────── */

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

:root {
  /* ── Palette — overridden by settings_schema → CSS vars in theme.liquid */

  /* Light canvas tokens (default) */
  --color-bg:           #FFFFFF;
  --color-surface:      #FAFAFA;          /* near-white panel */
  --color-surface-2:    #F4F4F5;          /* light grey strip */
  --color-text:         #0A0A0A;          /* ink */
  --color-text-muted:   #6B7280;          /* zinc 500 */
  --color-text-soft:    #9CA3AF;          /* gray 400 */
  --color-border:       #E4E4E7;          /* zinc 200 */
  --color-border-soft:  #EEEEEE;
  --color-primary:      #0A0A0A;
  --color-primary-text: #FFFFFF;

  /* Accents (prototype-locked) */
  --color-accent:       #FF3B30;          /* electric red — primary action + sale + bestseller */
  --color-accent-2:     #0066FF;          /* electric blue — "new launch" + ribbon */
  --color-success:      #16A34A;          /* in-stock / discount % */
  --color-warning:      #F59E0B;
  --color-star:         #FACC15;          /* ★ rating */

  /* Dark canvas tokens (hero, stat callout, exploded view, tech edu) */
  --canvas-dark:        #0A0A0A;
  --ink-dark-1:         #FFFFFF;
  --ink-dark-2:         #A1A1AA;          /* zinc 400 */
  --hairline-dark:      rgba(255,255,255,0.08);
  --hairline-light:     rgba(10,10,10,0.08);

  --color-overlay:      rgba(10,10,10,0.45);
  --color-overlay-dark: rgba(10,10,10,0.72);

  /* ── Typography ──────────────────────────────────────────────────── */
  --font-heading:   'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;

  --text-xs:    0.6875rem;   /* 11px */
  --text-sm:    0.8125rem;   /* 13px */
  --text-base:  0.875rem;    /* 14px */
  --text-md:    1rem;        /* 16px */
  --text-lg:    1.125rem;    /* 18px */
  --text-xl:    1.375rem;    /* 22px */
  --text-2xl:   1.75rem;     /* 28px */
  --text-3xl:   2.25rem;     /* 36px */
  --text-4xl:   clamp(2.25rem, 4.4vw, 3.5rem);
  --text-5xl:   clamp(3rem, 6vw, 4.5rem);
  --text-6xl:   clamp(3.5rem, 8vw, 6.5rem);

  --leading-tight: 1.05;
  --leading-snug:  1.2;
  --leading-base:  1.5;
  --leading-loose: 1.65;

  --tracking-tight:   -0.02em;
  --tracking-display: -0.03em;
  --tracking-eyebrow:  0.12em;
  --tracking-wide:     0.06em;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4.5rem;
  --space-10: 6rem;
  --space-12: 8rem;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 15, 15, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 15, 15, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 15, 15, 0.08);

  --header-height-desktop: 64px;
  --header-height-mobile:  56px;

  --container-max: 1440px;
  --container-pad-desktop: 32px;
  --container-pad-mobile:  16px;

  --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { margin: 0; padding: 0; }

body.surge-body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Typography defaults ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-tight);
  margin: 0;
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); letter-spacing: var(--tracking-tight); }
h5 { font-size: var(--text-xl);  letter-spacing: var(--tracking-tight); }
h6 { font-size: var(--text-md);  font-family: var(--font-body); font-weight: 600; letter-spacing: 0; margin: 0; }

p { margin: 0 0 var(--space-4) 0; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-text); }

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Visually-hidden — accessibility skip-link + screen-reader-only labels */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.visually-hidden:focus {
  position: static; width: auto; height: auto; margin: 0;
  overflow: visible; clip: auto; white-space: normal;
  background: var(--color-primary); color: var(--color-primary-text);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  z-index: 9999;
}

/* ── Font-display helper (Space Grotesk + tight tracking) ────────────── */
.font-display {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* ── Tabular numerals helper (prices, specs, counts) ─────────────────── */
.tnum, .num-tab, .price, .stat-num {
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  font-variant-numeric: tabular-nums;
}

/* ── Eyebrow / kicker labels (all-caps Inter) ────────────────────────── */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: inline-block;
}

/* ── Layout container ────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad-desktop);
}
@media (max-width: 768px) {
  .container { padding: 0 var(--container-pad-mobile); }
}

/* ── Section padding ─────────────────────────────────────────────────── */
.section-pad   { padding-block: var(--space-8); }
.section-pad-sm { padding-block: var(--space-6); }
@media (max-width: 768px) {
  .section-pad   { padding-block: var(--space-7); }
  .section-pad-sm { padding-block: var(--space-5); }
}

/* ── Reveal animation (toggled by scroll-reveal IO in layout) ────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ── Selection ───────────────────────────────────────────────────────── */
::selection {
  background: var(--color-primary);
  color: var(--color-primary-text);
}

/* ── Focus visible (a11y) ────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Common section title pattern (used by many home sections) ───────── */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.section-head__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}
.section-head__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
@media (max-width: 640px) {
  .section-head { align-items: flex-start; flex-direction: row; }
  .section-head__title { font-size: var(--text-xl); }
}

/* tabular numerals helper consolidated near top with .font-display + .tnum */
