:root {
  --bg: #161b1b;
  --bg-footer: #191919;
  --text: #f4f4f0;
  --footer-text: #d6d6d2;
  --muted: #8f8f8c;
  --sage: #a9b3a3;

  /* Altura do hero: proporção do design (2560 × 960) */
  --hero-h: clamp(480px, 37.5vw, 960px);

  /* "Gota" que desce do hero, no centro, onde fica a seta */
  --tab-w: 150px;
  --tab-h: 28px;
  --tab-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 30' preserveAspectRatio='none'%3E%3Cpath d='M0 0H150V2C114 2 104 30 75 30S36 2 0 2Z'/%3E%3C/svg%3E");

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-entrance: cubic-bezier(.16, 1, .3, 1);

  /* Altura do desfoque fixo no pé da tela */
  --blur-h: 270px;
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  height: calc(var(--hero-h) + var(--tab-h));
  margin-bottom: calc(var(--tab-h) * -1);
  overflow: hidden;
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--tab-h)) no-repeat,
    var(--tab-shape) bottom center / var(--tab-w) calc(var(--tab-h) + 2px) no-repeat;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--tab-h)) no-repeat,
    var(--tab-shape) bottom center / var(--tab-w) calc(var(--tab-h) + 2px) no-repeat;
}

/* Cena em camadas (fundo, jacaré, expert). Fica um pouco maior que o hero para as camadas
   poderem andar com o mouse (hero-parallax.js) sem mostrar os cantos. */
.hero__scene {
  position: absolute;
  inset: -12px -16px -24px;
}

.hero__layer {
  position: absolute;
  inset: 0;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
}

/* Entrada: a floresta surge do escuro; o expert desliza da direita e o jacaré vem logo depois,
   saindo de trás dele. No celular, começa quando a tela de carregamento sai. */
.hero__layer--bg .hero__img { animation: hero-bg-in 2s var(--ease-out) both; }

.hero__layer--bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  animation: hero-from-dark 1.6s ease-out both;
}

.hero__layer--expert .hero__img { animation: hero-expert-in 1.2s var(--ease-entrance) .1s both; }
.hero__layer--croc .hero__img { animation: hero-croc-in 1.5s var(--ease-entrance) .3s both; }

/* !important e seletor mais forte: precisa vencer também as regras de "reduzir movimento" lá embaixo */
html.is-booting .hero .hero__img,
html.is-booting .hero .hero__layer--bg::after,
html.is-booting .hero .hero__layer { animation-play-state: paused !important; }

/* Sem mouse (celular): balanço leve e contínuo, cada camada num ritmo */
@media (hover: none) {
  .hero__layer--bg { animation: hero-float-bg 11s ease-in-out infinite alternate; }
  .hero__layer--croc { animation: hero-float-croc 8s ease-in-out infinite alternate; }
  .hero__layer--expert { animation: hero-float-expert 6.5s ease-in-out infinite alternate; }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(14, 18, 18, 0) 55%,
    rgba(14, 18, 18, .5) 85%,
    rgba(14, 18, 18, .7) 100%);
  pointer-events: none;
}

.hero__title {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: calc(var(--tab-h) + clamp(30px, 2.2vw, 56px));
  margin: 0;
  padding: 0 16px;
  text-align: center;
  font-size: clamp(20px, 1.1vw + 12px, 38px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}

/* Máquina de escrever (typewriter.js) */
.js .typewriter:not(.is-ready),
.typewriter__rest {
  color: transparent;
  text-shadow: none;
}

.typewriter__caret { position: relative; }

.typewriter__caret::after {
  content: "";
  position: absolute;
  top: .1em;
  bottom: .06em;
  left: .04em;
  width: 2px;
  background: var(--sage);
  animation: blink .7s linear infinite;
}

.hero__arrow {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(var(--tab-h) - 26px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  color: var(--text);
  border-radius: 50%;
}

.hero__arrow svg {
  width: 20px;
  height: auto;
  animation: bob 1.8s ease-in-out infinite;
}

.hero__arrow:focus-visible { outline: 2px solid var(--sage); outline-offset: -4px; }

/* ---------- Links ---------- */

.links {
  position: relative;
  padding: calc(var(--tab-h) + clamp(56px, 5vw, 130px)) 16px clamp(64px, 5vw, 128px);
  background-color: var(--bg);
  background-image:
    radial-gradient(30% 55% at 23% 0%, rgba(200, 206, 206, .3), rgba(200, 206, 206, .1) 50%, rgba(200, 206, 206, 0) 100%),
    radial-gradient(40% 75% at 80% 10%, rgba(180, 186, 186, .16), rgba(180, 186, 186, .06) 55%, rgba(180, 186, 186, 0) 100%);
}

.links__list {
  display: grid;
  gap: clamp(20px, 1.9vw, 48px);
  max-width: 412px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.links__list li { animation: rise .8s var(--ease-out) both; }
.links__list li:nth-child(1) { animation-delay: .25s; }
.links__list li:nth-child(2) { animation-delay: .37s; }
.links__list li:nth-child(3) { animation-delay: .49s; }

.card {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .06),
    0 20px 40px -22px rgba(0, 0, 0, .8);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.card img {
  width: 100%;
  height: auto;
  transition: transform .6s var(--ease-out);
}

/* Reflexo de luz que atravessa o card na diagonal */
.card::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -100%;
  left: -200%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, .28) 50%,
    rgba(255, 255, 255, 0) 65%);
  transform: translate(0, 0) rotate(25deg);
  transition: transform .5s ease-in-out;
  pointer-events: none;
}

.card:focus-visible::before { transform: translate(150%, 50%) rotate(25deg); }

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow:
      0 0 0 1px rgba(169, 179, 163, .35),
      0 28px 50px -22px rgba(0, 0, 0, .9);
  }
  .card:hover img { transform: scale(1.04); }
  .card:hover::before { transform: translate(150%, 50%) rotate(25deg); }
}

.card:active { transform: scale(.98); }
.card:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; }

/* Folha decorativa, sobre a divisa entre hero e links.
   O wrapper corta o que sair da tela (evita rolagem horizontal no celular);
   a divisa fica a 200px do topo dele. */
.leaf-wrap {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: calc(var(--tab-h) - 200px);
  height: 400px;
  overflow: hidden;
  pointer-events: none;
}

.leaf {
  position: absolute;
  top: calc(200px - clamp(69px, 6vw, 153px));
  left: calc(50% + 21vw);
  width: clamp(110px, 9.6vw, 245px);
  height: auto;
  overflow: visible;
  rotate: 130deg;
  animation: sway 7s ease-in-out infinite alternate;
}

/* ---------- Rodapé ---------- */

.footer { background: var(--bg-footer); }

.footer__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px;
  font-size: 14px;
}

.footer__logo { width: 108px; height: auto; flex: none; }

.footer__copy { margin: 0; color: var(--footer-text); }

.nowrap { white-space: nowrap; }

.footer__policy {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}

.footer__policy:hover,
.footer__policy:focus-visible { color: var(--text); }

/* ---------- Brilho do mouse (spotlight.js) ---------- */

/* Camada presa à seção dos links, por baixo dos cards */
.spotlight-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.links nav { position: relative; }

.spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--spot-size);
  height: var(--spot-size);
  margin: calc(var(--spot-size) / -2) 0 0 calc(var(--spot-size) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--spot-color), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  will-change: transform;
}

.spotlight.is-visible { opacity: 1; }

/* ---------- Desfoque no pé da tela (bottom-blur.js) ---------- */

/* Cada camada borra o dobro da anterior (--b) e a máscara mostra só a sua
   faixa da altura (--s = onde a faixa começa), somando um desfoque progressivo. */
.bottom-blur {
  position: fixed;
  z-index: 9;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--blur-h);
  pointer-events: none;
  transition: transform .5s var(--ease-out);
}

.bottom-blur.is-hidden { transform: translateY(100%); }

.bottom-blur > div {
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(var(--b));
  backdrop-filter: blur(var(--b));
  -webkit-mask-image: linear-gradient(transparent var(--s), #000 calc(var(--s) + 12.5%), #000 calc(var(--s) + 25%), transparent calc(var(--s) + 37.5%));
  mask-image: linear-gradient(transparent var(--s), #000 calc(var(--s) + 12.5%), #000 calc(var(--s) + 25%), transparent calc(var(--s) + 37.5%));
}

.bottom-blur > div:nth-child(1) { --b: .25px; --s: 0%; }
.bottom-blur > div:nth-child(2) { --b: .5px;  --s: 12.5%; }
.bottom-blur > div:nth-child(3) { --b: 1px;   --s: 25%; }
.bottom-blur > div:nth-child(4) { --b: 2px;   --s: 37.5%; }
.bottom-blur > div:nth-child(5) { --b: 4px;   --s: 50%; }
.bottom-blur > div:nth-child(6) { --b: 8px;   --s: 62.5%; }
.bottom-blur > div:nth-child(7) { --b: 16px;  --s: 75%; }
.bottom-blur > div:nth-child(8) { --b: 32px;  --s: 87.5%; }

/* ---------- Tela de carregamento no celular (boot.js) ---------- */

.boot { display: none; }

.is-booting .boot,
.boot[data-leaving] {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
}

html.is-booting,
.is-booting body { overflow: hidden; }

/* A página espera o carregamento acabar para animar a entrada dos cards */
.is-booting .links__list li { animation-play-state: paused; }

.boot__content {
  display: grid;
  justify-items: center;
  gap: 40px;
  translate: 0 -3vh;
}

.boot__brand {
  display: block;
  width: 120px;
  height: auto;
  animation: boot-brand 1s var(--ease-out) both;
}

.boot__track {
  width: 160px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  opacity: 0;
  transition: opacity .4s linear;
}

.boot[data-track] .boot__track { opacity: 1; }

.boot__bar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transform: translateX(calc((var(--progress, 0) - 1) * 100%));
}

.boot[data-complete] .boot__content { opacity: 0; transition: opacity .35s linear; }
.boot[data-leaving] { opacity: 0; transition: opacity .8s var(--ease-out); }

/* ---------- Celular ---------- */

@media (max-width: 700px) {
  :root {
    --hero-h: clamp(420px, 68vh, 620px);
    --tab-w: 120px;
    --tab-h: 24px;
    --blur-h: 180px;
  }

  @supports (height: 1svh) {
    :root { --hero-h: clamp(420px, 68svh, 620px); }
  }

  .hero::after {
    background: linear-gradient(180deg,
      rgba(14, 18, 18, 0) 45%,
      rgba(14, 18, 18, .6) 80%,
      rgba(14, 18, 18, .85) 100%);
  }

  .hero__title { bottom: calc(var(--tab-h) + 26px); }

  .links {
    background-image:
      radial-gradient(75% 45% at 12% 0%, rgba(200, 206, 206, .24), rgba(200, 206, 206, .08) 50%, rgba(200, 206, 206, 0) 100%),
      radial-gradient(80% 60% at 95% 20%, rgba(180, 186, 186, .12), rgba(180, 186, 186, 0) 100%);
  }

  .leaf {
    top: calc(200px - 36px);
    left: auto;
    right: -14px;
    width: 58px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 14px;
    padding: 36px 16px calc(36px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 12.5px;
  }

  .footer__policy { margin-left: 0; }
}

/* ---------- Animações ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes boot-brand {
  from { opacity: 0; filter: blur(8px); }
}

@keyframes hero-bg-in {
  from { transform: scale(1.06); }
}

@keyframes hero-from-dark {
  from { opacity: 1; }
}

@keyframes hero-expert-in {
  from { opacity: 0; transform: translateX(max(70px, 8vw)); }
}

@keyframes hero-croc-in {
  from { opacity: 0; transform: translateX(max(110px, 13vw)); }
}

@keyframes hero-float-bg {
  from { translate: -1.5px 0; }
  to   { translate: 1.5px -1px; }
}

@keyframes hero-float-croc {
  from { translate: -3px 1px; }
  to   { translate: 3px -2px; }
}

@keyframes hero-float-expert {
  from { translate: 4px 0; }
  to   { translate: -4px -2px; }
}

@keyframes bob {
  50% { transform: translateY(5px); }
}

@keyframes sway {
  from { transform: rotate(-3deg); }
  to   { transform: rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  /* Detalhes que ficam ativos para todos: cursor piscando, seta indicando conteúdo abaixo
     e reflexo de luz nos cards (só brilho, não move o conteúdo) */
  .typewriter__caret::after { animation: blink .7s linear infinite !important; }
  .hero__arrow svg { animation: bob 1.8s ease-in-out infinite !important; }
  .card::before { transition: transform .5s ease-in-out !important; }

  /* Entrada e balanço do hero: pedidos para todos */
  .hero__layer--bg .hero__img { animation: hero-bg-in 2s var(--ease-out) both !important; }
  .hero__layer--bg::after { animation: hero-from-dark 1.6s ease-out both !important; }
  .hero__layer--expert .hero__img { animation: hero-expert-in 1.2s var(--ease-entrance) .1s both !important; }
  .hero__layer--croc .hero__img { animation: hero-croc-in 1.5s var(--ease-entrance) .3s both !important; }

  @media (hover: none) {
    .hero__layer--bg { animation: hero-float-bg 11s ease-in-out infinite alternate !important; }
    .hero__layer--croc { animation: hero-float-croc 8s ease-in-out infinite alternate !important; }
    .hero__layer--expert { animation: hero-float-expert 6.5s ease-in-out infinite alternate !important; }
  }

  /* Tela de carregamento: só esmaecimentos, sem deslocamento */
  .boot__brand { animation: boot-brand 1s var(--ease-out) both !important; }
  .boot__track { transition: opacity .4s linear !important; }
  .boot[data-complete] .boot__content { transition: opacity .35s linear !important; }
  .boot[data-leaving] { transition: opacity .8s var(--ease-out) !important; }
}
