/* ==========================================================
   KL Moda — base: tokens, reset, tipografia, botões, utilitários
   ========================================================== */

:root {
  /* cores fixas */
  --gold: #d9b45a;
  --gold-hi: #f7e7b4;
  --gold-lo: #9a7230;
  --on-gold: #15130f;      /* texto sobre botões e faixas douradas */
  --grad-gold: linear-gradient(105deg, #7a5a22 0%, #b88a35 16%, #f7e7b4 34%, #d9b45a 48%, #8e6522 66%, #e9cb7b 84%, #a77c2c 100%);

  /* tema claro (padrão): branco quente e bege */
  --bg: #fbf8f3;
  --bg-rgb: 251, 248, 243;
  --surface: #ffffff;
  --surface-2: #f2ebdf;    /* bege claro */
  --fg: #1b1814;
  --fg-rgb: 27, 24, 20;
  --fg-dim: #6d6457;
  --rule: rgba(27, 24, 20, .12);
  --rule-gold: rgba(154, 114, 48, .38);
  --accent: #8a6a2c;       /* dourado escuro: legível no claro */
  --accent-hi: #6b5020;
  --stroke-gold: rgba(138, 106, 44, .7);
  --spark: #c9a24d;
  --spark-glow: rgba(201, 162, 77, .3);
  --shadow-card: 0 30px 50px -26px rgba(70, 50, 20, .38);
  --grad-gold-text: linear-gradient(105deg, #7a5a22 0%, #a8823a 30%, #8a6a2c 55%, #b8924a 78%, #7a5a22 100%);

  /* tipografia */
  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-text: "Archivo", "Helvetica Neue", Arial, sans-serif;

  /* movimento */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  /* layout */
  --wrap: 1240px;
  --gutter: clamp(16px, 4.5vw, 40px);
  --nav-h: 68px;
  --section-y: clamp(88px, 12vw, 168px);
}

/* faixas escuras: as mesmas variáveis com os valores do tema escuro */
.manifesto, .finale, .footer, .lightbox, .ticker__band--ink {
  --bg: #0c0b09;
  --bg-rgb: 12, 11, 9;
  --surface: #13110e;
  --surface-2: #1c1915;
  --fg: #f1ebe0;
  --fg-rgb: 241, 235, 224;
  --fg-dim: #a9a091;
  --rule: rgba(241, 235, 224, .12);
  --rule-gold: rgba(217, 180, 90, .35);
  --accent: #d9b45a;
  --accent-hi: #f7e7b4;
  --stroke-gold: rgba(217, 180, 90, .7);
  --spark: #f7e7b4;
  --spark-glow: rgba(247, 231, 180, .45);
  --shadow-card: 0 34px 60px -28px rgba(0, 0, 0, .95);
  --grad-gold-text: linear-gradient(105deg, #c79a48 0%, #f7e7b4 30%, #ddb965 55%, #f3dc9c 78%, #c99c47 100%);
  color: var(--fg); /* senão o texto herda a cor escura do corpo da página */
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  /* Bodoni Moda no tamanho óptico de texto: no óptico máximo os traços finos somem ("quem" vira "qucm") */
  font-variation-settings: "opsz" 11;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-text);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--on-gold); }

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

/* grão de filme sobre a página inteira */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- layout ---------- */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.section {
  position: relative;
  padding-block: var(--section-y);
}

/* ---------- tipografia ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .9em;
  font-family: var(--f-text);
  font-weight: 500;
  font-size: .75rem;
  line-height: 1;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow .num {
  display: inline-flex;
  align-items: center;
  gap: .9em;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: .02em;
  text-transform: none;
}
.eyebrow .num::after {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.h2 {
  margin-top: 1.1rem;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.35rem, 6vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.h2 em,
.final__title em {
  font-style: italic;
  font-weight: 400;
}

.section-head { max-width: 780px; margin-bottom: clamp(48px, 7vw, 88px); }
.section-head > .h2:first-child { margin-top: 0; }
.section-head__lead {
  margin-top: 1.25rem;
  max-width: 52ch;
  color: var(--fg-dim);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  font-weight: 300;
}

/* texto em dourado metálico */
.gold-text,
.gold-shine,
.h2 em,
.final__title em {
  background-image: var(--grad-gold-text);
  background-size: 250% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-right: .06em; /* evita corte do itálico */
}
.gold-shine { animation: gold-shine 5.5s var(--ease-io) infinite alternate; }
@keyframes gold-shine {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

/* ---------- botões ---------- */
.btn {
  --h: 54px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7em;
  min-height: var(--h);
  padding: 0 1.75em;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--f-text);
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .5s var(--ease-out), background-position .9s var(--ease-out),
              border-color .3s, color .3s, background-color .3s, box-shadow .5s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn__icon { width: 1.25em; height: 1.25em; flex: none; }

.btn--gold {
  color: var(--on-gold);
  background-image: var(--grad-gold);
  background-size: 220% 100%;
  background-position: 10% 50%;
  box-shadow: 0 14px 34px -16px rgba(217, 180, 90, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn--gold::after { /* reflexo que atravessa o botão */
  content: "";
  position: absolute;
  inset: -20% auto -20% -40%;
  width: 30%;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg) translateX(0);
  transition: transform 1s var(--ease-out);
}
@media (hover: hover) {
  .btn--gold:hover { background-position: 90% 50%; box-shadow: 0 18px 44px -14px rgba(217, 180, 90, .85), inset 0 1px 0 rgba(255, 255, 255, .35); }
  .btn--gold:hover::after { transform: skewX(-20deg) translateX(560%); }
}

.btn--ghost {
  color: var(--accent-hi);
  border-color: var(--rule-gold);
  background: rgba(var(--bg-rgb), .25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@media (hover: hover) {
  .btn--ghost:hover { border-color: var(--accent); background-color: rgba(217, 180, 90, .09); }
}

.btn--sm { --h: 40px; padding: 0 1.1em; font-size: .72rem; letter-spacing: .16em; }
.btn--lg { --h: 62px; padding: 0 2.2em; font-size: .9rem; }

/* link com seta */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  padding-bottom: .35em;
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-hi);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size .5s var(--ease-out), color .3s;
}
.link-arrow svg { width: 1.2em; height: 1.2em; transition: transform .5s var(--ease-out); }
@media (hover: hover) {
  .link-arrow:hover { color: var(--accent); }
  .link-arrow:hover svg { transform: translateX(5px); }
}

/* botão só com ícone */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--fg);
  transition: color .3s;
}
.icon-btn svg { width: 22px; height: 22px; }
@media (hover: hover) { .icon-btn:hover { color: var(--accent); } }

/* ---------- utilitários ---------- */
.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: .8em 1.2em;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform .3s;
}
.skip:focus { transform: none; }

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

/* revelar ao rolar (a classe .is-in é adicionada pelo main.js) */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* placeholders: abra o site com ?ph para destacar o que falta trocar */
.show-ph .ph {
  outline: 1.5px dashed #ff6b5c;
  outline-offset: 3px;
  background-color: rgba(255, 107, 92, .1);
}

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
