/* ==========================================================================
   BR Multimarcas — Bio Instagram
   HTML5 + CSS3 puro · mobile-first · 100% estático
   ========================================================================== */

/* ---------- Fontes locais (variáveis) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #050910;
  --navy: #102b48;
  --blue: #0878d1;
  --metal: #4ba3e3;
  --white: #ffffff;
  --gray: #aeb8c5;

  --stage-w: 430px;
  --gutter: clamp(18px, 5.6vw, 24px);
  --radius: 15px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Montserrat", "Inter", "Segoe UI", system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(8, 120, 209, 0.14) 0%, rgba(8, 120, 209, 0) 62%),
    radial-gradient(90% 60% at 50% 112%, rgba(16, 43, 72, 0.55) 0%, rgba(5, 9, 16, 0) 72%),
    var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

/* ---------- Utilidades ---------- */
.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: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy);
  border: 1px solid var(--metal);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

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

/* ---------- Palco (composição vertical) ---------- */
.stage {
  position: relative;
  width: 100%;
  max-width: var(--stage-w);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink);
}

/* Fotografia: largura total, proporção original preservada (sem cortes) */
.stage__art {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 0;
  aspect-ratio: 1080 / 1920;
  pointer-events: none;
}

.stage__art picture,
.stage__art img,
.stage__art .stage__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stage__art img {
  object-fit: cover;
  object-position: center top;
  user-select: none;
  -webkit-user-drag: none;
}

/* Degradê cinematográfico sobre a brita — nasce transparente e fecha em #050910 */
.stage__veil {
  background:
    linear-gradient(
      to bottom,
      rgba(5, 9, 16, 0) 36%,
      rgba(5, 9, 16, 0.06) 45%,
      rgba(5, 9, 16, 0.18) 53%,
      rgba(5, 9, 16, 0.4) 61%,
      rgba(5, 9, 16, 0.62) 68%,
      rgba(5, 9, 16, 0.8) 74%,
      rgba(5, 9, 16, 0.93) 81%,
      rgba(5, 9, 16, 0.985) 87%,
      #050910 94%,
      #050910 100%
    );
}

/* Conteúdo: começa a 66% da altura da foto e desce até o rodapé */
.stage__content {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 117.3% var(--gutter) calc(13px + env(safe-area-inset-bottom));
}

/* ---------- Marca ---------- */
.brand {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand__logo {
  display: block;
  width: clamp(212px, 70%, 268px);
}

.brand__logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 16px rgba(0, 0, 0, 0.55));
}

.brand__slogan {
  margin-top: 11px;
  color: #e7eef7;
  font-family: var(--font-display);
  font-size: clamp(8.6px, 2.35vw, 10.5px);
  font-weight: 600;
  line-height: 1.75;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 1px 10px rgba(5, 9, 16, 0.85);
}

/* ---------- Menu de acessos ---------- */
.links {
  width: 100%;
  margin-top: 21px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.links__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(75, 163, 227, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(75, 163, 227, 0.16) 0%, rgba(75, 163, 227, 0) 44%),
    linear-gradient(180deg, #143a5f 0%, #0f2b48 55%, #0a2035 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(0, 0, 0, 0.32),
    0 10px 22px -8px rgba(0, 0, 0, 0.85);
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(11px, 3.1vw, 13px);
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.3s var(--ease),
    transform 0.2s var(--ease),
    filter 0.2s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, 0.12) 50%, transparent 82%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.btn--half {
  min-height: 54px;
  gap: 6px;
  padding: 0 7px;
  font-size: clamp(8.8px, 2.5vw, 9.8px);
  letter-spacing: 0.01em;
}

.btn--half .btn__icon {
  width: 15px;
  height: 15px;
}

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

.btn:active {
  transform: translateY(1px) scale(0.993);
  filter: brightness(1.1);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    border-color: rgba(75, 163, 227, 0.68);
    background:
      linear-gradient(180deg, rgba(75, 163, 227, 0.28) 0%, rgba(75, 163, 227, 0) 46%),
      linear-gradient(180deg, #1a4a77 0%, #123657 55%, #0c263f 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3),
      0 14px 30px -10px rgba(0, 0, 0, 0.9),
      0 0 26px rgba(8, 120, 209, 0.28);
    transform: translateY(-1px);
  }

  .btn:hover::after {
    opacity: 1;
  }
}

/* ---------- Rodapé ---------- */
.footer {
  width: 100%;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid rgba(174, 184, 197, 0.13);
  text-align: center;
}

.footer__brand {
  color: var(--gray);
  font-family: var(--font-display);
  font-size: clamp(8.5px, 2.2vw, 9.5px);
  font-weight: 600;
  letter-spacing: 0.21em;
  text-indent: 0.21em;
  text-transform: uppercase;
}

.footer__brand span {
  margin: 0 0.2em;
  color: var(--metal);
  opacity: 0.75;
}

.footer__credit {
  margin-top: 5px;
  color: rgba(174, 184, 197, 0.7);
  font-size: clamp(8.5px, 2.2vw, 9.5px);
  letter-spacing: 0.015em;
}

.footer__credit a {
  color: rgba(203, 213, 224, 0.8);
  text-decoration: none;
  border-bottom: 1px solid rgba(174, 184, 197, 0.22);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer__credit a:focus-visible {
  outline: 2px solid var(--metal);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .footer__credit a:hover {
    color: var(--white);
    border-color: rgba(75, 163, 227, 0.65);
  }
}

/* ---------- Toast (links pendentes) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 50;
  width: max-content;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 18px;
  border: 1px solid rgba(75, 163, 227, 0.42);
  border-radius: 12px;
  background: rgba(8, 24, 40, 0.97);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 22px rgba(8, 120, 209, 0.16);
  color: #e7eef7;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Desktop: composição mobile centralizada ---------- */
@media (min-width: 700px) {
  body {
    background:
      radial-gradient(42% 60% at 50% 8%, rgba(8, 120, 209, 0.12) 0%, rgba(8, 120, 209, 0) 70%),
      radial-gradient(50% 70% at 50% 105%, rgba(16, 43, 72, 0.6) 0%, rgba(5, 9, 16, 0) 70%),
      #04070d;
  }

  .stage {
    box-shadow:
      -1px 0 0 rgba(75, 163, 227, 0.1),
      1px 0 0 rgba(75, 163, 227, 0.1),
      0 0 90px rgba(0, 0, 0, 0.7),
      0 0 140px rgba(8, 120, 209, 0.07);
  }
}

/* Telas baixas (ex.: iPhone SE na vertical): mantém a logo abaixo dos
   veículos e permite a rolagem vertical natural. */
@media (max-height: 700px) {
  .stage__content {
    padding-top: 128%;
  }
}

/* Telas muito altas (ex.: janela do navegador em monitores grandes):
   limita a composição e centraliza, sem criar vazio entre a foto e a logo. */
@media (min-height: 1100px) {
  body {
    align-items: center;
  }

  .stage,
  .stage__content {
    min-height: 1000px;
  }
}

/* Telas muito estreitas: mantém os dois botões lado a lado sem cortar texto */
@media (max-width: 359px) {
  .btn--half {
    gap: 5px;
    padding: 0 5px;
    font-size: 7.8px;
    letter-spacing: 0;
  }

  .btn--half .btn__icon {
    width: 14px;
    height: 14px;
  }
}

/* ---------- Animações de entrada ---------- */
@keyframes imageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.js .stage__art img,
.js .brand__logo,
.js .brand__slogan,
.js .btn,
.js .footer {
  opacity: 0;
}

.js.is-ready .stage__art img {
  animation: imageIn 1.3s ease-out both;
}

.js.is-ready .brand__logo {
  animation: riseIn 0.9s var(--ease) 0.18s both;
}

.js.is-ready .brand__slogan {
  animation: riseIn 0.8s var(--ease) 0.36s both;
}

.js.is-ready .btn {
  animation: riseIn 0.7s var(--ease) both;
}

.js.is-ready .btn[data-reveal="0"] { animation-delay: 0.48s; }
.js.is-ready .btn[data-reveal="1"] { animation-delay: 0.56s; }
.js.is-ready .btn[data-reveal="2"] { animation-delay: 0.64s; }
.js.is-ready .btn[data-reveal="3"] { animation-delay: 0.71s; }

.js.is-ready .footer {
  animation: riseIn 0.8s var(--ease) 0.84s both;
}

/* ---------- Acessibilidade / movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .stage__art img,
  .js .brand__logo,
  .js .brand__slogan,
  .js .btn,
  .js .footer {
    opacity: 1;
    animation: none !important;
    transform: none !important;
  }

  .btn,
  .toast,
  .footer__credit a,
  .skip-link {
    transition-duration: 0.01ms !important;
  }

  .btn:active {
    transform: none;
  }
}
