/*
 * Ordex design contract
 * Sources, in strict priority order:
 *   1. /DESIGN-Principal.md
 *   2. /DESIGN-Complementar para ajudar.md (compatible additions only)
 * Do not introduce visual tokens outside /docs/DESIGN_SYSTEM_ORDEX.md.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2?v=3100e775e8616cd2") format("woff2-variations");
  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;
}

:root {
  color-scheme: light;

  --ordex-primary: #0075de;
  --ordex-primary-active: #005bab;
  --ordex-primary-focus: #0071e3;
  --ordex-link-on-dark: #2997ff;
  --ordex-night: #213183;

  --ordex-canvas: #f6f5f4;
  --ordex-canvas-white: #ffffff;
  --ordex-surface: #ffffff;
  --ordex-surface-pearl: #fafafc;
  --ordex-ink: #000000;
  --ordex-ink-secondary: #31302e;
  --ordex-ink-muted: #615d59;
  --ordex-ink-faint: #a39e98;
  --ordex-hairline: #e6e6e6;

  --ordex-sky: #62aef0;
  --ordex-purple: #d6b6f6;
  --ordex-purple-deep: #391c57;
  --ordex-pink: #ff64c8;
  --ordex-orange: #dd5b00;
  --ordex-orange-deep: #793400;
  --ordex-teal: #2a9d99;
  --ordex-green: #1aae39;
  --ordex-brown: #523410;

  --ordex-radius-field: 4px;
  --ordex-radius-row: 5px;
  --ordex-radius-utility: 8px;
  --ordex-radius-card: 12px;
  --ordex-radius-large: 16px;
  --ordex-radius-pill: 9999px;

  --ordex-space-1: 4px;
  --ordex-space-2: 8px;
  --ordex-space-3: 12px;
  --ordex-space-4: 16px;
  --ordex-space-6: 24px;
  --ordex-space-7: 28px;
  --ordex-space-8: 32px;
  --ordex-space-12: 48px;
  --ordex-space-section: 80px;

  --ordex-font: Inter, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --ordex-shadow-soft:
    rgb(0 0 0 / 1%) 0 0.175px 1.041px,
    rgb(0 0 0 / 2%) 0 0.8px 2.925px,
    rgb(0 0 0 / 2.7%) 0 2.025px 7.847px,
    rgb(0 0 0 / 4%) 0 4px 18px;
  --ordex-shadow-elevated:
    rgb(0 0 0 / 1%) 0 0.175px 1.041px,
    rgb(0 0 0 / 2%) 0 0.8px 2.925px,
    rgb(0 0 0 / 2.7%) 0 2.025px 7.847px,
    rgb(0 0 0 / 4%) 0 8px 24px,
    rgb(0 0 0 / 5%) 0 23px 52px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
  background: var(--ordex-canvas);
  font-family: var(--ordex-font);
  font-feature-settings: "lnum" 1, "locl" 1;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--ordex-canvas);
  color: var(--ordex-ink);
  font-family: var(--ordex-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
summary,
label[for],
select {
  touch-action: manipulation;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:active:not(:disabled),
[role="button"]:active:not([aria-disabled="true"]) {
  transform: scale(0.95);
}

.marketing-action:active:not(:disabled),
.primary-action:active:not(:disabled) {
  transform: scale(0.9);
}

a {
  color: var(--ordex-primary);
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-block-start: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b {
  color: var(--ordex-ink);
}

h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
}

h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.625px;
  line-height: 1.23;
}

h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.25px;
  line-height: 1.27;
}

h4,
h5,
h6 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.125px;
  line-height: 1.4;
}

small {
  font-size: 14px;
  line-height: 1.43;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ordex-primary-focus);
  outline-offset: 3px;
}

::selection {
  background: rgb(0 117 222 / 18%);
  color: var(--ordex-ink);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #dddddd;
  border-radius: var(--ordex-radius-field);
  outline: 0;
  background: var(--ordex-surface);
  color: var(--ordex-ink);
}

input::placeholder,
textarea::placeholder {
  /* Keep placeholder copy readable in bright outdoor use while staying on the
     Principal's approved neutral scale. Ash remains reserved for metadata. */
  color: var(--ordex-ink-muted);
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ordex-primary-focus);
  box-shadow: var(--ordex-shadow-soft);
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--ordex-primary);
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.125px;
  line-height: 1.33;
}

td {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.33;
}

.skip-link {
  position: fixed;
  top: var(--ordex-space-2);
  left: var(--ordex-space-2);
  z-index: 10000;
  min-height: 44px;
  padding: 10px 14px;
  transform: translateY(-180%);
  border-radius: var(--ordex-radius-utility);
  background: var(--ordex-primary);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ordex-card {
  border: 1px solid var(--ordex-hairline);
  border-radius: var(--ordex-radius-card);
  background: var(--ordex-surface);
}

.ordex-elevated {
  box-shadow: var(--ordex-shadow-soft);
}

.ordex-eyebrow,
.eyebrow {
  color: var(--ordex-ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.125px;
  line-height: 1.33;
}

.ordex-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--ordex-hairline);
  border-radius: var(--ordex-radius-pill);
  background: var(--ordex-surface);
  color: var(--ordex-primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.125px;
  line-height: 1.33;
}

.ordex-button-primary,
.primary-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--ordex-radius-pill);
  background: var(--ordex-primary);
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.ordex-button-primary:active:not(:disabled),
.primary-action:active:not(:disabled) {
  background: var(--ordex-primary-active);
}

.ordex-button-secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ordex-hairline);
  border-radius: var(--ordex-radius-pill);
  background: var(--ordex-surface);
  color: var(--ordex-ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.ordex-button-utility {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border: 1px solid var(--ordex-hairline);
  border-radius: var(--ordex-radius-utility);
  background: var(--ordex-surface);
  color: var(--ordex-ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.ordex-container {
  width: min(100% - 48px, 1300px);
  margin-inline: auto;
}

@media (max-width: 600px) {
  .ordex-container {
    width: min(100% - 32px, 1300px);
  }

  h1 {
    font-size: 34px;
    letter-spacing: -0.85px;
  }

  h2 {
    font-size: 26px;
  }
}

@media (max-width: 419px) {
  h1 {
    font-size: 28px;
    letter-spacing: -0.7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* A marca mantém a proporção do arquivo e não inicia arraste ao tocar. */
img[src^="/brand/"] {
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

@media (forced-colors: active) {
  button,
  input,
  select,
  textarea,
  .ordex-card {
    border: 1px solid CanvasText;
  }
}
