/* INFOHAS v2 — Design Tokens (Fase A.0)
 * Wave 2.7B: warm ivory atmosphere. --ih-bg sai de #fff puro para off-white
 * quase impercetivel (~1.5% warmth). --ih-bg-alt nudged warmer. O utilizador
 * NAO ve a mudanca como "cor" — apenas sente menos esterilidade. */
:root{
  --ih-bg-ivory:#fbfaf7;
  --ih-bg-paper:#f7f5f0;
  --ih-bg:#fbfaf7; --ih-bg-alt:#f5f4f1; --ih-ink:#1d1d1f; --ih-ink-soft:#6e6e73;
  --ih-line:rgba(0,0,0,.10); --ih-accent:#0071e3; --ih-accent-ink:#fff;
  --ih-radius:18px; --ih-radius-sm:12px;
  --ih-shadow:0 8px 30px rgba(0,0,0,.08); --ih-shadow-lg:0 20px 60px rgba(0,0,0,.16);
  --ih-blur:saturate(180%) blur(20px);
  --ih-nav-h:54px;
  --ih-maxw:1180px;
  --ih-space:clamp(16px,4vw,40px);
  --ih-font:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --ih-ease:cubic-bezier(.22,1,.36,1);
}
@media (prefers-color-scheme:dark){
  :root{--ih-bg-ivory:#0a0a0c;--ih-bg-paper:#0d0d10;
        --ih-bg:#0a0a0c;--ih-bg-alt:#0e0e11;--ih-ink:#f5f5f7;--ih-ink-soft:#a1a1a6;
        --ih-line:rgba(255,255,255,.14);--ih-shadow:0 8px 30px rgba(0,0,0,.5)}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ===========================================================
 * Programa Visual Premium — V1 Fase A (ADR-0025, additive)
 * Tokens novos. NÃO consumidos em Fase A (só definição).
 * Aplicação em Fase B (typography, hero, device cards premium).
 * Detalhe: docs/05-ux/visual-system-v1.md
 * =========================================================== */
:root{
  /* Layered shadows (Linear/Stripe style): ambient + key */
  --ih-shadow-card-ambient: 0 24px 48px -16px rgba(0,0,0,.06);
  --ih-shadow-card-key:     0 2px 6px rgba(0,0,0,.08);
  --ih-shadow-card-hover-ambient: 0 32px 64px -16px rgba(0,0,0,.09);
  --ih-shadow-card-hover-key:     0 4px 10px rgba(0,0,0,.10);

  /* Accent layering (sem novas cores; só alphas do --ih-accent) */
  --ih-accent-soft: color-mix(in srgb, var(--ih-accent) 10%, transparent);
  --ih-accent-edge: color-mix(in srgb, var(--ih-accent) 35%, transparent);

  /* Hairline ink (border subtil sem cinzentos opacos) */
  --ih-hairline: color-mix(in srgb, var(--ih-ink) 8%, transparent);

  /* Hero geometry (mais respiro) */
  --ih-radius-hero: 28px;
  --ih-space-hero:  clamp(4rem, 10vw, 8rem);

  /* Type scale explícita (px) */
  --ih-type-xs:   12px;
  --ih-type-sm:   14px;
  --ih-type-md:   16px;
  --ih-type-lg:   20px;
  --ih-type-xl:   28px;
  --ih-type-2xl:  40px;
  --ih-type-3xl:  56px;
  --ih-type-4xl:  72px;

  /* Leading / tracking */
  --ih-leading-tight:   1.15;
  --ih-leading-normal:  1.5;
  --ih-leading-relaxed: 1.7;
  --ih-tracking-tight:  -0.02em;
  --ih-tracking-normal: 0;

  /* Fonte display oficial (Inter Variable, introduzida em Fase B) */
  --ih-font-display: "Inter Variable", -apple-system, BlinkMacSystemFont,
                     "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Grain subtil (SVG noise inline, ~2% opacity em hero/header amplos) */
  --ih-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ===========================================================
 * Wave Design System 1.0 — additive token layer (Step 1/7).
 * PURELY DEFINITIONAL: nothing consumes these yet, so this
 * commit produces ZERO visual change. Consumed from Step 2 on.
 * Consolidates the audited ad-hoc values into one coherent set.
 * =========================================================== */
:root{
  /* Spacing scale — base 4. Fixed steps; --ih-space stays the
   * responsive page gutter clamp. Replaces the 20+ ad-hoc values. */
  --ih-sp-1:4px;  --ih-sp-2:8px;  --ih-sp-3:12px; --ih-sp-4:16px;
  --ih-sp-5:24px; --ih-sp-6:32px; --ih-sp-7:48px; --ih-sp-8:64px;
  --ih-sp-9:80px;

  /* Semantic gap aliases (snap grids/stacks to the scale). */
  --ih-gap-sm:var(--ih-sp-4);  /* 16 */
  --ih-gap-md:var(--ih-sp-5);  /* 24 */
  --ih-gap-lg:var(--ih-sp-6);  /* 32 */

  /* Radius family — --ih-radius(18) & --ih-radius-sm(12) exist; add lg. */
  --ih-radius-lg:24px;

  /* Shadow family — add sm; --ih-shadow(md) & --ih-shadow-lg already exist. */
  --ih-shadow-sm:0 1px 2px rgba(16,24,40,.05);

  /* Body leading — names the de-facto 1.55 used across body copy
   * (sits between --ih-leading-normal 1.5 and --ih-leading-relaxed 1.7). */
  --ih-leading-body:1.55;

  /* Raised surface — crisp white panels (combobox, elevated cards) that
   * sit above the ivory page. Flips in dark mode so they stay raised. */
  --ih-surface:#ffffff;

  /* Reading measures — line-length caps for text columns. */
  --ih-measure:640px;
  --ih-measure-wide:820px;

  /* Container — single official width (Wave DS 1.0). Applied in Step 4;
   * defined here for reference. Home stays 1180 (FREEZE exception). */
  --ih-maxw-ds:1280px;

  /* Semantic status colours (separate from --ih-accent) — match the SLA
   * hexes currently hardcoded across ops.css/components.css. */
  --ih-st-ok:#0a7d3f;   --ih-st-ok-bg:color-mix(in srgb,#0a7d3f 9%,transparent);
  --ih-st-warn:#b85c1f; --ih-st-warn-bg:color-mix(in srgb,#b85c1f 9%,transparent);
  --ih-st-crit:#b62121; --ih-st-crit-bg:color-mix(in srgb,#b62121 8%,transparent);
}
@media (prefers-color-scheme:dark){
  :root{
    --ih-surface:#1c1c1e;
    --ih-shadow-card-ambient: 0 24px 48px -16px rgba(0,0,0,.45);
    --ih-shadow-card-key:     0 2px 6px rgba(0,0,0,.50);
    --ih-shadow-card-hover-ambient: 0 32px 64px -16px rgba(0,0,0,.55);
    --ih-shadow-card-hover-key:     0 4px 10px rgba(0,0,0,.55);
    --ih-hairline: color-mix(in srgb, var(--ih-ink) 12%, transparent);
  }
}
