/*
 * The Fone Shop — Design System
 * ------------------------------
 * Cinematic, tungsten-warm, black-on-black with Apple Dynamic Orange (#FF6B1A).
 * Source of truth: anvul-platform/packages/core/styles/tokens.css +
 *                  anvul-platform/apps/fone-shop/app/globals.css
 *
 * Non-negotiables (CLAUDE §4 + CINEMATIC):
 *   - Pure black #000 backdrop. Tungsten-warm crush. NO light/dark alternation.
 *   - Accent: Apple Dynamic Orange #FF6B1A. Black text on orange (AAA 8.12:1).
 *     NEVER white-on-orange (fails AA 2.93:1).
 *   - Display type: Inter Display Variable (Inter upgrade path if Migra licensed).
 *   - Body: Inter Variable. Handwritten: Caveat. Mono: Geist Mono / JetBrains Mono.
 *   - All tracking negative — Apple philosophy scales beyond hero.
 */

/* Fonts — Google Fonts CDN (Inter Display is not on Google Fonts yet; Inter Variable
   is the free stand-in per CLAUDE §4.5 and DESIGN.md deviation #2). Caveat and
   JetBrains Mono are exact. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Caveat:wght@400..700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* ─────────── Surface (cinematic black stack) ─────────── */
  --color-bg: #000000;
  --color-surface: #0a0a0a;
  --color-surface-raised: #1d1d1f;
  --color-surface-1: #242426;
  --color-surface-2: #262628;
  --color-surface-3: #272729;
  --color-surface-4: #28282a;
  --color-surface-5: #2a2a2d;
  --color-border: #2c2c2e;

  /* ─────────── Text ─────────── */
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.80);
  --color-text-tertiary: rgba(255, 255, 255, 0.48);
  --color-text-muted: #86868b;

  /* ─────────── Accent — Apple Dynamic Orange ─────────── */
  --color-accent: #FF6B1A;           /* default fill */
  --color-accent-hover: #E55A10;     /* hover */
  --color-accent-pressed: #B8450C;   /* active; allows white text */
  --color-accent-muted: #FFA366;     /* focus ring, inline links on black */
  --color-accent-text: #000000;      /* AAA 8.12:1 on orange-500 */

  /* Platform blue — only kept for legacy link colour, NOT used as Fone Shop fill */
  --color-link-dark-bg: #2997ff;
  --color-link-light-bg: #0066cc;

  /* ─────────── Semantic ─────────── */
  --color-success: #30d158;
  --color-warning: #ff9f0a;
  --color-danger: #ff453a;

  /* Review cards — paper + ink stamp. Fixed across tenants. */
  --color-paper: #f5f2ea;
  --color-stamp-red: #a8332f;
  --color-google-star: #f5c518;

  /* ─────────── Typography ─────────── */
  --font-display: "Inter", "Inter Display", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-hand: "Caveat", cursive;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, monospace;

  /* Tracking — negative at every size (Apple philosophy) */
  --tracking-hero: -0.005em;       /* ≈ -0.28px at 56px */
  --tracking-heading: -0.011em;
  --tracking-body: -0.022em;       /* ≈ -0.374px at 17px */
  --tracking-caption: -0.016em;    /* ≈ -0.224px at 14px */
  --tracking-micro: -0.010em;      /* ≈ -0.12px at 12px */
  --tracking-eyebrow: 0.20em;      /* all-caps eyebrows only */

  /* Line-heights — hero famously tight */
  --leading-hero: 1.07;
  --leading-heading: 1.10;
  --leading-tile: 1.14;
  --leading-body: 1.47;

  /* Kinetic weight range (scroll velocity maps here) */
  --wght-base: 550;
  --wght-min: 500;
  --wght-max: 650;

  /* ─────────── Motion ─────────── */
  --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur-fast: 150ms;
  --dur-base: 300ms;
  --dur-slow: 800ms;
  --dur-view-transition: 280ms;

  /* ─────────── Elevation ─────────── */
  /* One shadow — soft, wide, photography-lit */
  --shadow-card: 3px 5px 30px 0 rgba(0, 0, 0, 0.22);
  --shadow-sheet: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 64px rgba(0, 0, 0, 0.60);
  --shadow-accent-glow: 0 0 48px rgba(255, 107, 26, 0.25);

  /* ─────────── Radii ─────────── */
  --radius-micro: 5px;
  --radius-standard: 8px;         /* filled CTAs (NOT pill) */
  --radius-comfortable: 11px;
  --radius-large: 12px;
  --radius-card: 16px;            /* service cards */
  --radius-pill: 980px;           /* inline "Learn more" links, badges */

  /* ─────────── Layout ─────────── */
  --content-max: 980px;
  --content-wide: 1200px;

  /* Spacing scale — 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
}

/* ─────────── Semantic type roles ─────────── */

html, body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  letter-spacing: var(--tracking-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
}

.h-interstitial {
  /* The one number — "Same day." */
  font-family: var(--font-display);
  font-size: clamp(100px, 18vw, 220px);
  font-weight: 700;
  letter-spacing: var(--tracking-hero);
  line-height: 0.95;
}

.h-hero {
  /* "Drop it off. Grab a coffee. Collect it fixed." */
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 600;
  letter-spacing: var(--tracking-hero);
  line-height: var(--leading-hero);
}

.h1, h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 600;
  letter-spacing: var(--tracking-hero);
  line-height: var(--leading-hero);
}

.h2, h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-heading);
}

.h3, h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-tile);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.p, p, .body {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
}

.p-lg {
  font-size: 20px;
  line-height: 1.5;
}

.p-sm, .caption {
  font-size: 14px;
  letter-spacing: var(--tracking-caption);
  line-height: 1.5;
}

.micro {
  font-size: 12px;
  letter-spacing: var(--tracking-micro);
  line-height: 1.4;
  color: var(--color-text-muted);
}

.hand {
  /* Review card author names */
  font-family: var(--font-hand);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
}

.mono {
  /* Booking refs, prices in tables, stamps */
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0;
}

/* ─────────── Buttons (two radii model) ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: var(--tracking-body);
  transition: background-color 200ms var(--ease-apple), color 200ms var(--ease-apple);
  cursor: pointer;
  border: none;
  user-select: none;
  white-space: nowrap;
}
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-md { height: 44px; padding: 0 20px; font-size: 16px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 18px; }

/* Filled — 8px radius, orange fill, BLACK text */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-radius: var(--radius-standard);
}
.btn-primary:hover  { background: var(--color-accent-hover); }
.btn-primary:active { background: var(--color-accent-pressed); color: #fff; }

/* Pill — 980px radius, ring-outline, accent text. The "Learn more →" style */
.btn-pill {
  background: transparent;
  color: var(--color-accent-muted);
  border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 1px var(--color-accent-muted);
}
.btn-pill:hover { background: color-mix(in oklab, var(--color-accent-muted) 10%, transparent); }

/* Secondary — dark ring, white text, 8px */
.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border-radius: var(--radius-standard);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
}
.btn-secondary:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.50); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  border-radius: var(--radius-standard);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }

/* ─────────── Focus ring ─────────── */
*:focus-visible {
  outline: 2px solid var(--color-accent-muted);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─────────── Nav glass ─────────── */
.nav-glass {
  background: rgba(0, 0, 0, 0.80);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

/* ─────────── Utility ─────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}
.card-paper {
  background: var(--color-paper);
  color: #111;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  font-size: 14px;
}

/* Reduced motion — Cinematic §11.1 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
