/* =========================================================================
   AVENTUR ECO TURISMO — base.css
   Tokens, reset, tipografia e utilitários.
   ========================================================================= */

/* --------------------------------------------------------------- TOKENS  */
:root {
  /* Marca (extraídos do logotipo oficial) */
  --brand-red: #ed2d2f;
  --brand-green: #009245;
  --brand-ink: #221f1f;

  /* Variantes acessíveis da marca. O vermelho do logotipo (#ed2d2f) rende
     4,18:1 com texto branco e 4,02:1 como texto sobre areia — os dois abaixo
     do mínimo AA de 4,5:1. Estes dois tons carregam a mesma identidade e
     passam: --deep para fundo com texto branco, --ink para texto em fundo
     claro. O vermelho original segue nos elementos gráficos (traços, pontos,
     barras), onde não há texto em cima. */
  --brand-red-deep: #d92628;
  --brand-red-ink: #c81f21;
  --whats: #10864a;

  /* Paleta orgânica do Delta */
  --night: #070a09;
  --mangue-900: #0b1f17;
  --mangue-800: #10291f;
  --mangue-700: #16352a;
  --mangue-600: #1b4735;
  --mangue-500: #1f5b43;
  --mangue-400: #2f7d5c;

  --agua-700: #10444f;
  --agua-600: #17596a;
  --agua-500: #1e6e7e;
  --agua-400: #35909f;
  --agua-300: #6cc2ce;

  --sol-600: #d9822b;
  --sol-500: #f2a03d;
  --sol-400: #ffb95c;
  --sol-300: #ffd08a;

  --clay-600: #a8623c;
  --clay-500: #c9855b;

  --sand-50: #fdfaf5;
  --sand-100: #f6efe3;
  --sand-200: #eadfcb;
  --sand-300: #d8c8ab;
  --sand-400: #b9a486;

  /* Papéis semânticos */
  --bg: var(--sand-50);
  --bg-alt: var(--sand-100);
  --bg-deep: var(--night);
  --fg: var(--brand-ink);
  --fg-soft: #5a5352;
  /* Era #8b8281, que rende 3,60:1 sobre o fundo areia — abaixo do mínimo 4,5:1
     da WCAG AA. O único uso é o rótulo da faixa de números, em 11 px maiúsculo,
     justamente o tamanho que mais precisa de contraste. Este tom mantém o
     cinza quente e rende 4,77:1. */
  --fg-faint: #766e6e;
  --fg-invert: #fdfaf5;
  --fg-invert-soft: rgba(253, 250, 245, 0.72);
  --fg-invert-faint: rgba(253, 250, 245, 0.5);
  --line: rgba(34, 31, 31, 0.14);
  --line-invert: rgba(253, 250, 245, 0.18);
  --accent: var(--brand-red-ink);
  --accent-eco: var(--brand-green);

  /* Tipografia */
  --font-display: "Archivo", "Archivo Expanded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Fraunces", Georgia, "Times New Roman", serif;

  --step--2: clamp(0.69rem, 0.66rem + 0.14vw, 0.78rem);
  --step--1: clamp(0.83rem, 0.79rem + 0.2vw, 0.95rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.16rem);
  --step-1: clamp(1.2rem, 1.11rem + 0.44vw, 1.48rem);
  --step-2: clamp(1.44rem, 1.29rem + 0.74vw, 1.94rem);
  --step-3: clamp(1.73rem, 1.48rem + 1.22vw, 2.55rem);
  --step-4: clamp(2.07rem, 1.68rem + 1.94vw, 3.36rem);
  --step-5: clamp(2.49rem, 1.88rem + 3.02vw, 4.42rem);
  --step-6: clamp(2.99rem, 2.06rem + 4.62vw, 5.82rem);
  --step-7: clamp(3.58rem, 2.19rem + 6.96vw, 7.66rem);

  /* Ritmo e medidas */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 1440px;
  --maxw-text: 62ch;
  --section-y: clamp(5rem, 11vh, 10rem);
  --radius-s: 8px;
  --radius-m: 18px;
  --radius-l: 30px;
  --radius-xl: 44px;

  /* Movimento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.72, 0, 0.28, 1);
  --ease-organic: cubic-bezier(0.34, 1.32, 0.44, 1);
  --dur-fast: 0.28s;
  --dur: 0.62s;
  --dur-slow: 1.15s;

  /* Sombras (quentes, nunca cinza puro) */
  --shadow-s: 0 2px 10px rgba(34, 31, 31, 0.07);
  --shadow-m: 0 12px 34px -12px rgba(34, 31, 31, 0.24);
  --shadow-l: 0 34px 80px -30px rgba(11, 31, 23, 0.45);

  /* Estado do runtime, escrito pelo JS */
  --scroll-y: 0px;
  --vh: 1vh;
  --header-h: 74px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

img {
  height: auto;
}

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

button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--brand-red);
  color: #fff;
}

/* --------------------------------------------------------- TIPOGRAFIA    */
.display,
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.028em;
  text-wrap: balance;
  font-stretch: 112%;
}

h4,
h5 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.script {
  font-family: var(--font-script);
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 60, "WONK" 1;
}

.kicker {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}

.kicker::before {
  content: "";
  width: clamp(22px, 4vw, 46px);
  height: 2px;
  background: currentColor;
  flex: none;
  transform-origin: left;
  transform: scaleX(var(--kicker-scale, 1));
  transition: transform 0.9s var(--ease-out);
}

.kicker--eco {
  color: var(--accent-eco);
}
.kicker--sand {
  color: var(--sol-400);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--fg-soft);
  max-width: 46ch;
  text-wrap: pretty;
}

.prose p + p {
  margin-top: 1.1em;
}

.prose {
  max-width: var(--maxw-text);
  text-wrap: pretty;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.42em 0.85em;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--fg-soft);
  white-space: nowrap;
}

/* Marcador para conteúdo pendente do cliente. */
.tbd {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--clay-600);
  background: repeating-linear-gradient(
    -45deg,
    rgba(201, 133, 91, 0.14) 0 7px,
    rgba(201, 133, 91, 0.05) 7px 14px
  );
  border: 1px dashed rgba(168, 98, 60, 0.55);
  border-radius: 6px;
  padding: 0.1em 0.5em;
  line-height: 1.5;
}

.on-dark .tbd,
.casa .tbd,
.exp .tbd,
.contato .tbd,
.footer .tbd {
  color: var(--sol-300);
  border-color: rgba(255, 208, 138, 0.5);
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 208, 138, 0.15) 0 7px,
    rgba(255, 208, 138, 0.04) 7px 14px
  );
}

/* ---------------------------------------------------------- UTILITÁRIOS  */
.wrap {
  width: min(100% - var(--gutter) * 2, var(--maxw));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - var(--gutter) * 2, 1080px);
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.on-dark {
  color: var(--fg-invert);
  --accent: var(--brand-red);
  --fg: var(--fg-invert);
  --fg-soft: var(--fg-invert-soft);
  --fg-faint: var(--fg-invert-faint);
  --line: var(--line-invert);
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% -120%;
  z-index: 999;
  background: var(--brand-ink);
  color: var(--fg-invert);
  padding: 0.8em 1.4em;
  border-radius: 0 0 14px 14px;
  font-weight: 700;
  transition: translate 0.3s var(--ease-out);
}

.skip-link:focus-visible {
  translate: -50% 0;
}

/* Quebra de linha só no desktop: no celular a mesma quebra deixa órfãs. */
.br-desk {
  display: none;
}

@media (min-width: 48rem) {
  .br-desk {
    display: inline;
  }
}

.stack > * + * {
  margin-top: var(--stack-gap, 1.5rem);
}

.grain {
  position: fixed;
  inset: -120px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: overlay;
  background-image: var(--grain-url);
  background-size: 220px 220px;
  will-change: transform;
  animation: grain-shift 7s steps(6) infinite;
}

.noise-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: var(--grain-url);
  background-size: 200px 200px;
  mix-blend-mode: soft-light;
}
