/**
 * Cloudsurfers Design Tokens — FASE 2 LOCK (Concept C — Partner Clarity)
 * Source: official logo color extraction (BRAND_COLOR_ANALYSIS.md)
 * Canonical copy for Frontend: src/styles/tokens.css (keep in sync)
 * Do not invent new brand hues. Brand raw ≠ CTA fill with white text.
 */

:root {
  /* ——— Brand raw (logo · tutti e 4) ——— */
  --brand-lime: #8cc63e;
  --brand-cyan: #00badc;
  --brand-gold: #fcb530;
  --brand-coral: #f27464;
  --brand-charcoal: #444446;

  --brand-lime-rgb: 140, 198, 62;
  --brand-cyan-rgb: 0, 186, 220;
  --brand-gold-rgb: 252, 181, 48;
  --brand-coral-rgb: 242, 116, 100;
  --brand-charcoal-rgb: 68, 68, 70;

  /* Brand-signal order (Concept C): coral → cyan → gold → lime */
  --brand-signal-1: var(--brand-coral);
  --brand-signal-2: var(--brand-cyan);
  --brand-signal-3: var(--brand-gold);
  --brand-signal-4: var(--brand-lime);

  /* ——— Accessible actions (AA) ——— */
  --action-green: #4e821c;
  --action-green-hover: #3f6b14;
  --action-cyan: #007a92;
  --action-cyan-hover: #006b80;
  --action-coral: #c44538;
  --action-coral-hover: #b83a2e;
  --action-gold: #8a5a00; /* testo / outline gold su chiaro (Concept C) */
  --action-gold-hover: #6e4800;

  /* ——— Soft accents ——— */
  --accent-lime-soft: #e8f5d4;
  --accent-cyan-soft: #d6f4fa;
  --accent-gold-soft: #fff3d6;
  --accent-coral-soft: #fde4e0;

  /* ——— Neutrals ——— */
  --neutral-0: #ffffff;
  --neutral-50: #f7f8f6;
  --neutral-100: #eef0ec;
  --neutral-200: #e5e7e3;
  --neutral-400: #9a9b9e;
  --neutral-600: #5c5c60;
  --neutral-800: #2c2c2e;
  --neutral-900: #1a1a1c;

  /* ——— Semantic ——— */
  --semantic-success: #4e821c;
  --semantic-info: #007a92;
  --semantic-warning: #a06a00;
  --semantic-danger: #c44538;
  --semantic-focus: #007a92;

  /* ——— Surfaces ——— */
  --surface-page: var(--neutral-0);
  --surface-muted: var(--neutral-50);
  --surface-elevated: var(--neutral-0);
  --surface-border: var(--neutral-200);
  --surface-overlay: rgba(26, 26, 28, 0.48);

  /* ——— Text ——— */
  --text-primary: var(--neutral-800);
  --text-heading: var(--neutral-900);
  --text-secondary: var(--neutral-600);
  --text-inverse: var(--neutral-0);
  --text-link: var(--action-cyan);
  --text-link-hover: var(--action-cyan-hover);
  --text-brand: var(--brand-charcoal);

  /* ——— Typography ———
   * Design target: Space Grotesk (display) + DM Sans (body).
   * Production: self-host WOFF2 OR drop webfont names and use system stack only.
   * Do NOT hard-depend on Google Fonts CDN in production.
   */
  --font-sans: "DM Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "DM Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;
  --font-sans-system: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display-system: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --text-xs: 0.75rem; /* 12 */
  --text-sm: 0.875rem; /* 14 */
  --text-base: 1rem; /* 16 */
  --text-lg: 1.125rem; /* 18 */
  --text-xl: 1.25rem; /* 20 */
  --text-2xl: 1.5rem; /* 24 */
  --text-3xl: 1.875rem; /* 30 */
  --text-4xl: 2.25rem; /* 36 */
  --text-5xl: 3rem; /* 48 */
  --text-6xl: 3.75rem; /* 60 */

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-eyebrow: 0.07em;

  /* ——— Spacing (4px base) ——— */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ——— Layout ——— */
  --container-max: 72rem; /* 1152px */
  --container-c: 68.75rem; /* 1100px — Concept C wrap */
  --container-content: var(--container-c);
  --container-narrow: 42rem;
  --gutter: clamp(1rem, 3.5vw, 1.75rem);
  --section-y: clamp(3rem, 6vw, 5rem);
  --hero-signal-min: 17.5rem; /* 280px */
  --display-h1: clamp(2rem, 4vw, 2.85rem);

  /* ——— Radius ——— */
  --radius-sm: 0.25rem;
  --radius-md: 0.45rem; /* Concept C buttons/cards */
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-pill: 999px; /* use sparingly */

  /* ——— Elevation (subtle, light theme) ——— */
  --shadow-sm: 0 1px 2px rgba(26, 26, 28, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 26, 28, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 26, 28, 0.1);

  /* ——— Borders / motif ——— */
  --border-width: 1px;
  --brand-signal-height: 5px;
  --motif-angle: -28deg;
  --motif-opacity: 0.12;
  --motif-stroke: 1.5px;

  /* ——— Motion ——— */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* ——— Focus ——— */
  --focus-ring: 0 0 0 3px rgba(0, 122, 146, 0.35);

  /* ——— CTA aliases (Concept C hierarchy) ——— */
  --cta-primary-bg: var(--action-green);
  --cta-primary-bg-hover: var(--action-green-hover);
  --cta-primary-fg: var(--text-inverse);

  --cta-products-bg: var(--action-cyan);
  --cta-products-bg-hover: var(--action-cyan-hover);
  --cta-products-fg: var(--text-inverse);

  --cta-contact-bg: var(--action-coral);
  --cta-contact-bg-hover: var(--action-coral-hover);
  --cta-contact-fg: var(--text-inverse);

  --cta-callback-border: var(--action-gold);
  --cta-callback-fg: var(--action-gold);
  --cta-callback-fg-hover: var(--action-gold-hover);
  --cta-callback-bg-hover: var(--accent-gold-soft);

  --cta-ghost-border: var(--action-cyan);
  --cta-ghost-fg: var(--action-cyan);

  /* Legacy aliases (pre-C naming) */
  --cta-secondary-bg: var(--action-coral);
  --cta-secondary-bg-hover: var(--action-coral-hover);
  --cta-secondary-fg: var(--text-inverse);
}

/* Optional dark surfaces (footer only — not site default; needs logo white) */
[data-surface="inverse"] {
  --surface-page: var(--neutral-900);
  --text-primary: var(--neutral-100);
  --text-heading: var(--neutral-0);
  --text-secondary: var(--neutral-400);
  --surface-border: #2e2e32;
}
