/* Formhouse Connected: design tokens. The one place to restyle the product.
   Brand source: formhouse-deck (near-black, electric blue, Plus Jakarta Sans). */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Colour */
  --ink-0: #050505;
  --ink-1: #0a0a0a;
  --ink-2: #111214;
  --ink-3: #1a1b1e;
  --ink-4: #26282c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.5);
  --text-4: rgba(255, 255, 255, 0.4);

  --blue: #00a8ff;
  --blue-hi: #00d4ff;
  --blue-deep: #0064d2;
  --blue-dim: rgba(0, 168, 255, 0.12);
  --blue-line: rgba(0, 168, 255, 0.35);
  --blue-glow: rgba(0, 168, 255, 0.45);

  --gold: #e9c46a;
  --violet: #8b7bff;
  --success: #3ddc97;
  --danger: #ff5a6a;

  /* Per-option accent; each prototype overrides these three */
  --accent: var(--blue);
  --accent-hi: var(--blue-hi);
  --accent-dim: var(--blue-dim);

  /* Type */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Page scale (outside the phone) */
  --fs-page-xs: clamp(0.72rem, 0.68rem + 0.2vw, 0.8rem);
  --fs-page-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
  --fs-page-md: clamp(1rem, 0.92rem + 0.4vw, 1.15rem);
  --fs-page-lg: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --fs-page-xl: clamp(2rem, 1.2rem + 3.2vw, 4.25rem);
  --fs-page-xxl: clamp(2.6rem, 1.2rem + 5.6vw, 6.5rem);

  --space-page-1: clamp(0.5rem, 0.4rem + 0.4vw, 0.75rem);
  --space-page-2: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  --space-page-3: clamp(1.5rem, 1rem + 2vw, 3rem);
  --space-page-4: clamp(2.5rem, 1.5rem + 4vw, 6rem);
  --space-page-5: clamp(4rem, 2rem + 8vw, 10rem);
  --page-gutter: clamp(1rem, 0.5rem + 3vw, 4rem);
  --page-max: 1320px;

  /* Phone scale: container units, so the app looks identical in the frame and full screen */
  --fs-2xs: clamp(10.5px, 2.6cqw, 11.5px);
  --fs-xs: clamp(11.5px, 3cqw, 12.5px);
  --fs-sm: clamp(12.5px, 3.4cqw, 14px);
  --fs-md: clamp(13px, 3.9cqw, 16px);
  --fs-lg: clamp(16px, 4.8cqw, 20px);
  --fs-xl: clamp(20px, 6.2cqw, 26px);
  --fs-2xl: clamp(26px, 8.4cqw, 36px);
  --fs-3xl: clamp(34px, 11.5cqw, 50px);
  --fs-hero: clamp(44px, 15cqw, 66px);

  --sp-1: clamp(3px, 1cqw, 4px);
  --sp-2: clamp(6px, 2cqw, 8px);
  --sp-3: clamp(9px, 3cqw, 12px);
  --sp-4: clamp(12px, 4cqw, 16px);
  --sp-5: clamp(16px, 5.2cqw, 22px);
  --sp-6: clamp(22px, 7cqw, 30px);
  --sp-7: clamp(30px, 9.5cqw, 42px);

  --r-sm: clamp(8px, 2.4cqw, 10px);
  --r-md: clamp(12px, 3.6cqw, 16px);
  --r-lg: clamp(18px, 5.4cqw, 24px);
  --r-xl: clamp(24px, 7.2cqw, 32px);
  --r-pill: 999px;

  --tap-min: 44px;

  /* Phone frame */
  --phone-w: 390;
  --phone-h: 844;
  --phone-bezel: clamp(8px, 1.1vh, 12px);
  --phone-radius: clamp(44px, 6.4vh, 58px);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 160ms;
  --t-med: 380ms;
  --t-slow: 700ms;
  --t-xslow: 1200ms;

  --shadow-phone: 0 60px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-card: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  --glow-accent: 0 0 40px -6px var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast: 1ms;
    --t-med: 1ms;
    --t-slow: 1ms;
    --t-xslow: 1ms;
  }
}
