/* ==========================================================================
   R.E.P. — base: fonte, tokens, reset, botões e utilidades compartilhadas
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations"),
       url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta */
  --ink: #151618;
  --paper: #F5F3ED;
  --gray: #777874;
  --blue: #405CC3;

  /* Derivados com contraste AA para texto pequeno */
  --muted-on-paper: #5B5C58;   /* 6.1:1 sobre papel */
  --muted-on-ink: #A3A49F;     /* 7.4:1 sobre tinta  */
  --dim-on-ink: #6E6F6B;       /* texto “ainda não lido” (grande) */
  --blue-on-ink: #8EA2EA;      /* azul legível sobre fundo escuro */

  /* Tema corrente (trocado por [data-theme]) */
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: var(--muted-on-paper);
  --line: rgba(21, 22, 24, .14);
  --line-strong: rgba(21, 22, 24, .9);
  --accent: var(--blue);

  /* Layout */
  --margin: clamp(20px, 4.4vw, 88px);
  --gutter: clamp(14px, 1.6vw, 28px);
  --nav-h: 76px;
  --max: 1720px;

  /* Movimento */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.77, 0, .18, 1);
  --ease-snap: cubic-bezier(.2, 1.4, .35, 1);

  /* Tipografia: um único sistema variável, com a largura como voz */
  --font: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --t-body: clamp(16px, .32vw + 14.8px, 19px);
  --t-small: clamp(13px, .18vw + 12.4px, 15px);
}

[data-theme="ink"] {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: var(--muted-on-ink);
  --line: rgba(245, 243, 237, .14);
  --line-strong: rgba(245, 243, 237, .9);
  --accent: var(--blue-on-ink);
}

/* ---------- Reset enxuto ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
em { font-style: normal; }
[hidden] { display: none !important; }

section[data-theme], footer[data-theme] {
  background: var(--bg);
  color: var(--fg);
  position: relative;
}

::selection { background: var(--blue); color: var(--paper); }

/* ---------- Foco visível ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}
[data-theme="ink"] :focus-visible { outline-color: var(--blue-on-ink); }

.skip-link {
  position: fixed;
  left: 12px; top: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
  transition: transform .3s var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

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

/* ---------- Wordmark R.E.P. ----------
   Letras em largura expandida e pontos quadrados.
   O último ponto é o símbolo do catavento. */
.wm {
  display: inline-flex;
  align-items: baseline;
  font-weight: 900;
  font-variation-settings: "wdth" 112;
  letter-spacing: -.035em;
  line-height: .8;
  white-space: nowrap;
}
.wm__l { display: inline-block; }
.wm__mask { display: inline-block; overflow: hidden; padding-bottom: .02em; margin-bottom: -.02em; }
.wm__d {
  display: inline-block;
  width: .17em; height: .17em;
  margin: 0 .045em 0 .035em;
  background: currentColor;
  flex: none;
}
.wm__d--pw {
  width: .24em; height: .24em;
  background: none;
  overflow: visible;
  margin-right: 0;
}

/* ---------- Títulos com máscara ---------- */
.mline { display: block; overflow: hidden; padding: .34em 0 .06em; margin: -.34em 0 -.06em; }
.mline > span { display: block; will-change: transform; }

.display {
  font-weight: 860;
  font-variation-settings: "wdth" 72;
  letter-spacing: -.01em;
  line-height: .86;
  text-transform: uppercase;
}

/* ---------- Botões ---------- */
.btn {
  --h: 56px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: var(--h);
  padding: 0 22px 0 24px;
  font-size: 15px;
  font-weight: 640;
  font-variation-settings: "wdth" 104;
  letter-spacing: .005em;
  white-space: nowrap;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .5s var(--ease-out);
}
.btn:active { transform: scale(.97); transition-duration: .12s; }

/* Sólido: o texto rola por baixo de si mesmo e o símbolo dá um quarto de volta */
.btn--solid { background: var(--fg); color: var(--bg); }
.btn__roll { position: relative; display: block; overflow: hidden; height: 1.3em; line-height: 1.3; }
.btn__roll .btn__text { display: block; transition: transform .55s var(--ease-out); }
.btn__roll .btn__text::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 100%;
}
.btn__pw { width: 18px; height: 18px; color: var(--bg); transition: transform .7s var(--ease-out); }
.btn--solid:hover .btn__roll .btn__text,
.btn--solid:focus-visible .btn__roll .btn__text { transform: translateY(-100%); }
.btn--solid:hover .btn__pw,
.btn--solid:focus-visible .btn__pw { transform: rotate(90deg); }

/* Contorno: o preenchimento sobe como uma maré e a seta desce um passo */
.btn--line { box-shadow: inset 0 0 0 1.5px var(--fg); color: var(--fg); overflow: hidden; }
.btn__fill {
  position: absolute; inset: 0; z-index: -1;
  background: var(--fg);
  transform: translateY(101%);
  transition: transform .6s var(--ease-out);
}
.btn--line .btn__text { transition: color .35s; }
.btn__arrow { width: 20px; height: 20px; transition: transform .6s var(--ease-out); }
.btn--line:hover .btn__fill, .btn--line:focus-visible .btn__fill { transform: translateY(0); }
.btn--line:hover, .btn--line:focus-visible { color: var(--bg); }
.btn--line:hover .btn__arrow, .btn--line:focus-visible .btn__arrow { transform: translateY(4px); }

/* Botão redondo das setas do carrossel */
.round-btn {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background-color .35s, color .35s, transform .5s var(--ease-out), opacity .3s;
}
.round-btn svg { width: 22px; height: 22px; transition: transform .45s var(--ease-out); }
.round-btn:hover { background: var(--fg); color: var(--bg); }
[data-team-prev]:hover svg { transform: translateX(-4px); }
[data-team-next]:hover svg { transform: translateX(4px); }
.round-btn:active { transform: scale(.92); transition-duration: .1s; }
.round-btn[disabled] { opacity: .3; pointer-events: none; }

.btn-text {
  font-size: 15px;
  font-weight: 560;
  padding: 10px 2px;
  background: linear-gradient(currentColor, currentColor) left 85% / 100% 1px no-repeat;
  transition: background-size .45s var(--ease-out), color .3s;
}
.btn-text:hover { background-size: 0% 1px; background-position: right 85%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 620;
  padding-block: 6px;
  border-bottom: 1.5px solid currentColor;
}
.link-arrow svg { width: 20px; height: 20px; transition: transform .5s var(--ease-out); }
.link-arrow:hover svg { transform: translateY(4px); }

/* ---------- Seções ---------- */
.section-pad {
  padding: clamp(96px, 14vh, 180px) var(--margin);
}

/* Estados iniciais só quando o JS está ativo e o movimento é permitido */
.js:not(.reduced-motion):not(.is-ready) [data-nav-wm],
.js:not(.reduced-motion):not(.is-ready) .nav__tag,
.js:not(.reduced-motion):not(.is-ready) [data-hero-title],
.js:not(.reduced-motion):not(.is-ready) [data-hero-id],
.js:not(.reduced-motion):not(.is-ready) [data-hero-copy],
.js:not(.reduced-motion):not(.is-ready) [data-hero-actions],
.js:not(.reduced-motion):not(.is-ready) [data-hero-orbit],
.js:not(.reduced-motion):not(.is-ready) [data-hero-more] { opacity: 0; }

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