/*
 * tokens.css — v1.2 (Fase 2, revisão da Aprovação A)
 * Design system da Arenna adaptado à Norte Dados. Fonte única: DESIGN.md.
 *
 * Origem de cada token no comentário ao lado:
 *   DS/…   = ARENNA_DIR/composeApp/src/commonMain/kotlin/br/app/arenna/designsystem/…
 *   [ext]  = extensão de marketing da Norte (Fase 2), derivada da escala da Arenna
 *   [marca]= marca Norte Dados (logo em assets/brand/, cor confirmada pelo Higor)
 *   nd-*   = paleta "Rosa dos ventos", escolhida pelo Higor no /impeccable (substitui as cores da Arenna)
 * Conversão: 1 dp = 1 sp = 1 px. Scale.dynamicScreenRatio (DS/theme/Theme.kt) não se aplica na web.
 *
 * Camadas:
 *   1. Paleta Rosa dos ventos + semânticas da Arenna; estruturais da Arenna (tipo, espaço, raio, tamanhos)
 *   2. Extensão de marketing (nova, só o que o app não tem)
 *   3. Marca
 *   4. Papéis: aliases que dizem qual token usar para quê (regras de contraste AA)
 */

/* --- Lato, self-hosted (Google Fonts via impeccable font-fetch). A Arenna usa Lato 400, 400 itálico e 700
       · DS/theme/typography/font/FontFamily.kt ------------------------------------------------------------ */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/lato-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/lato-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/lato-400-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/lato-400-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("assets/fonts/lato-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("assets/fonts/lato-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* --- B612 700, fonte de display (escolha do Higor na Aprovação A, 27/11/2026; Google Fonts via impeccable font-fetch) */
@font-face { font-family: "B612"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("assets/fonts/b612-700-latin.woff2") format("woff2"); }

:root {
  color-scheme: light;

  /* ======================================================================
   * 1a. PALETA — direção "Rosa dos ventos" (escolhida pelo Higor no /impeccable,
   * 27/11/2026). Substitui os neutros da Arenna: mostrador de bússola esmaltado,
   * tinta azul-marinho, agulha âmbar, rótulos em latão. Contraste no §3 do DESIGN.md.
   * ==================================================================== */
  --nd-enamel:     #F1F3F4; /* mostrador: fundo da página */
  --nd-white:      #FFFFFF; /* superfície de card */
  --nd-hairline:   #C5CDD3; /* borda e divisor (separador) */
  --nd-graduation: #9AA8B4; /* marcas de grau, só decoração */
  --nd-navy:       #102A43; /* tinta principal · 13,2:1 no mostrador */
  --nd-navy-2:     #3B5266; /* tinta secundária · 7,3:1 */
  --nd-navy-3:     #52667A; /* tinta terciária e borda de controle · 5,3:1 */
  --nd-brass:      #7A5A1E; /* latão: rótulos e graduação escrita · 5,7:1 */

  /* 1b. Semânticas · DS/theme/color/ArennaColor.kt (Arenna) */
  --color-error:          #E35D5D; /* redErrorLight  · 3,2:1 no mostrador: só sobre a dobra azul-marinho (4,2:1, texto grande) */
  --color-destructive:    #C62828; /* redDestructive · 5,1:1 no mostrador: vermelho de erro */
  --color-warning:        #EFB400; /* yellowRating   · quase igual ao âmbar: fora da landing */
  --color-warning-on:     #3A2E00; /* yellowRatingOn */

  /* Opacidades de tint */
  --alpha-tint-weak:    0.04; /* DS/components/card/ArennaCard.kt */
  --alpha-tint-neutral: 0.08; /* DS/components/pill/LabelPill.kt */
  --alpha-tint:         0.12; /* DS/components/card/ArennaCard.kt */
  --alpha-tint-error:   0.14; /* DS/components/pill/LabelPill.kt */
  --alpha-tint-icon:    0.15; /* DS/components/card/SectionCard.kt */
  --alpha-tint-pill:    0.16; /* DS/components/pill/LabelPill.kt */
  --alpha-tint-strong:  0.20; /* DS/components/card/ArennaCard.kt */
  --alpha-disabled:     0.5;  /* DS/components/card/SectionCard.kt */

  /* Família de texto · DS/theme/typography/font/FontFamily.kt (só 400 e 700 existem) */
  --font-body: "Lato", system-ui, sans-serif;
  --weight-regular: 400;
  --weight-bold:    700;

  /* Escala tipográfica · DS/theme/typography/Type.kt */
  --text-h1-size: 64px;        --text-h1-lh: 72px;        --text-h1-ls: -1.5px;
  --text-h2-size: 48px;        --text-h2-lh: 56px;        --text-h2-ls: -0.5px;
  --text-h3-size: 40px;        --text-h3-lh: 48px;        --text-h3-ls: 0px;
  --text-h4-size: 32px;        --text-h4-lh: 40px;        --text-h4-ls: 0px;
  --text-h5-size: 24px;        --text-h5-lh: 28px;        --text-h5-ls: 0.18px;
  --text-h6-size: 20px;        --text-h6-lh: 24px;        --text-h6-ls: 0.15px;
  --text-h7-size: 18px;        --text-h7-lh: 22px;        --text-h7-ls: 0.12px;
  --text-subtitle1-size: 16px; --text-subtitle1-lh: 24px; --text-subtitle1-ls: 0.15px;
  --text-subtitle2-size: 14px; --text-subtitle2-lh: 18px; --text-subtitle2-ls: 0.10px;
  --text-body1-size: 16px;     --text-body1-lh: 24px;     --text-body1-ls: 0.5px;
  --text-body2-size: 14px;     --text-body2-lh: 20px;     --text-body2-ls: 0.25px;
  --text-button-size: 14px;    --text-button-lh: 16px;    --text-button-ls: 0px;
  --text-caption-size: 12px;   --text-caption-lh: 16px;   --text-caption-ls: 0.40px;
  --text-overline-size: 10px;  --text-overline-lh: 16px;  --text-overline-ls: 0.5px;

  /* Espaçamento · DS/theme/dimens/paddings/Paddings.kt */
  --space-0: 0px;  --space-1px: 1px; --space-4: 4px;   --space-8: 8px;   --space-12: 12px;
  --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-32: 32px; --space-40: 40px;
  --space-48: 48px; --space-56: 56px; --space-64: 64px;

  /* Raios · DS/theme/dimens/shape/Shape.kt */
  --radius-0: 0px;  --radius-4: 4px;   --radius-8: 8px;   --radius-12: 12px; --radius-16: 16px;
  --radius-24: 24px; --radius-32: 32px; --radius-48: 48px; --radius-64: 64px; --radius-full: 9999px;
  --radius-button: 10px; /* DS/components/button/PrimaryButton.kt */
  --radius-input:  8px;  /* DS/components/textfield/TextField.kt */

  /* Elevação (dp) · DS/theme/dimens/elevation/Elevations.kt. Na web: sem sombra; superfícies se separam por borda (ver DESIGN.md §6) */
  --elevation-0: 0px; --elevation-xs: 1px; --elevation-s: 4px; --elevation-m: 8px; --elevation-l: 16px; --elevation-xl: 24px;

  /* Tamanhos · DS/theme/dimens/size/custom/CustomSize.kt e DS/theme/dimens/size/Size.kt */
  --border-width:        1px;  /* borderWidth */
  --border-width-strong: 2px;  /* strokeWidthProgressLoadingDialog */
  --size-button-h:       50px; /* buttonHeight */
  --size-action-h:       48px; /* actionButtonHeight */
  --size-chip-min-h:     40px; /* Size.xLarge */
  --size-icon:           24px; /* Size.medium */
  --size-icon-sm:        20px; /* Size.small */
  --size-icon-inline:    14px; /* inlineIconSize */
  --size-icon-box:       38px; /* sectionCardIconBox */
  --size-dot:            12px; /* Size.x2Small */


  /* ======================================================================
   * 2. EXTENSÃO DE MARKETING [ext]
   * O app é mobile e para no h1 = 64. A landing precisa de display, ritmo
   * de seção, grid e larguras. Os mínimos são passos da escala da Arenna.
   * ==================================================================== */

  /* Display: mínimo = passo da Arenna em 390 px, máximo ≤ 6rem (piso do craft) */
  --text-display-1-size: clamp(40px, calc(24px + 4.4vw), 88px); /* min = h3 (40) */
  --text-display-1-lh:   1.05;
  --text-display-1-ls:   -0.02em;  /* ≈ tracking do h1 (-1.5 / 64) */
  --text-display-hero-size: clamp(40px, calc(22px + 3.6vw), 76px); /* [ext] hero dividido (meia tela): mesmo mínimo do display-1, teto menor para caber com a faixa de prova */
  --text-display-2-size: clamp(32px, calc(24px + 2.2vw), 56px); /* min = h4 (32), max entre h2 e h1 */
  --text-display-2-lh:   1.1;
  --text-display-2-ls:   -0.01em;  /* ≈ tracking do h2 (-0.5 / 48) */
  --text-lead-size:      clamp(18px, calc(16px + 0.4vw), 20px); /* h7 → h6 */
  --text-lead-lh:        1.55;
  --measure:             68ch;     /* largura de leitura (65–75ch) */
  --measure-lead:        56ch;

  /* Espaçamento de seção: múltiplos da escala (64 → 128) */
  --space-section:       clamp(64px, calc(32px + 6vw), 128px);
  --space-section-tight: clamp(48px, calc(32px + 3vw), 80px);

  /* Grid de 12 colunas */
  --grid-columns: 12;
  --grid-gutter:  clamp(16px, calc(8px + 1.6vw), 24px); /* 16 (mobile) → 24 (medium) */
  --grid-margin:  clamp(16px, calc(-8px + 5vw), 64px);  /* 16 em 390 · 32 em 768 · 64 em 1440 */

  /* Larguras máximas */
  --container-max:    1200px;
  --container-narrow: 760px;

  /* Breakpoints (não viram var em media query; ficam como referência): 768 · 1024 · 1440 */


  /* ======================================================================
   * 3. MARCA [marca] — os únicos que trocaram em relação à Arenna
   * ==================================================================== */

  --brand-primary:       #F0B429; /* âmbar da seta do logo (assets/brand/*.svg), confirmado pelo Higor */
  --brand-on-primary:    var(--nd-navy);       /* texto sobre âmbar: azul-marinho (7,9:1). Branco reprova (1,9:1) */
  --font-display:        "B612", var(--font-body); /* [marca] display: títulos e números grandes. Feita para instrumentos de cockpit (Airbus); escolhida pelo Higor na Aprovação A. Ocupa o papel da College Football Sans no app */
  --weight-display:      700;


  /* ======================================================================
   * 5. MOVIMENTO (Fase 7)
   * Durações: as do app (DESIGN.md §10: 200 ms CheckoutBar, 400 ms CountdownRing/SuccessBurst,
   * 1000 ms StepTimeline) + 160 ms de press. Curvas: emil-design-eng (ease-out forte, ease-in-out forte).
   * ==================================================================== */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press:   160ms;  /* botão: feedback de toque */
  --dur-ui:      200ms;  /* hover, cor, sublinhado · DS CheckoutBar COUNTER_MS */
  --dur-state:   400ms;  /* troca de rótulos da sequência · DS CountdownRing TICK_ANIMATION_MS */
  --dur-enter:   1000ms; /* entrada do hero (uma vez) · DS StepTimeline PULSE_MS */

  /* ======================================================================
   * 4. PAPÉIS — tema claro, direção Rosa dos ventos
   * Contraste sobre --role-page-bg (#F1F3F4); sobre o card branco é sempre maior.
   * ==================================================================== */

  --role-page-bg:        var(--nd-enamel);
  --role-surface:        var(--nd-white);
  --role-surface-2:      var(--nd-hairline);   /* chip inativo, botão desabilitado */
  --role-border:         var(--nd-hairline);   /* separador, não é limite de controle */
  --role-control-border: var(--nd-navy-3);     /* 5,3:1 (mínimo 3:1) */
  --role-decor:          var(--nd-graduation); /* marcas de grau: nunca texto */
  --role-text:           var(--nd-navy);       /* 13,2:1 */
  --role-text-2:         var(--nd-navy-2);     /* 7,3:1 */
  --role-text-3:         var(--nd-navy-3);     /* 5,3:1 (3,7:1 sobre a hairline: não usar lá) */
  --role-label:          var(--nd-brass);      /* rótulo em caixa alta, graduação escrita · 5,7:1 */
  --role-error:          var(--color-destructive);
  --role-accent-fill:    var(--brand-primary); /* agulha e botão: só preenchimento no claro (1,7:1 como texto) */
  --role-on-accent:      var(--brand-on-primary);
  --role-link:           var(--role-text);
  --role-focus:          var(--role-text);

  /* Dobra invertida (fechamento): uma cor dona da tela inteira */
  --role-inverse-bg:     var(--nd-navy);
  --role-inverse-text:   var(--nd-enamel);     /* 13,2:1 */
  --role-inverse-text-2: var(--nd-hairline);   /* 9,1:1 */
  --role-inverse-accent: var(--brand-primary); /* âmbar sobre azul-marinho: 7,9:1, pode ser texto aqui */
}
