/* =========================================================
   ANDRETTO.VIZ — estilos globais
   Paleta oficial: #FBEED7 #D9C19D #B7966B #946D43 #724A24 #502B0F #2E1402
   Tipografia aprovada (direção B — "Didone do logo"):
     Italiana (títulos/rótulos) + Archivo Expanded (interface)
   ========================================================= */

/* As fontes (@font-face) ficam em fonts.css */

:root {
  --cream: #FBEED7;
  --accent: #B7966B;      /* único acento de cor */
  --espresso: #2E1402;
  --bg: #0f0c09;          /* preto quente */
  --line: rgba(251, 238, 215, .12);

  --display: "Italiana", "Didot", "Bodoni 72", serif;
  --ui: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--cream);
  font-family: var(--ui); font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; height: 100vh; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Texto de interface: Archivo expandido, caixa alta, pequeno */
.ui, .nav__links a, .hint, .contact__label {
  font-family: var(--ui); font-stretch: 125%; font-weight: 500;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}

/* Lenis (scroll suave) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ================= CARREGAMENTO ================= */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 34px;
  transition: opacity 1.1s ease, visibility 1.1s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
/* Sprite: 73 quadros do símbolo, 10 por linha, cada um 200×296 */
.loader__symbol {
  --w: 86px; --h: calc(var(--w) * 296 / 200);
  width: var(--w); height: var(--h);
  background: url("../img/symbol-sprite.webp") 0 0 / calc(var(--w) * 10) auto no-repeat;
}
.loader__logo {
  width: min(230px, 56vw);
  opacity: 0; transform: translateY(8px);
  transition: opacity .9s ease, transform .9s ease;
}
.loader.show-logo .loader__logo { opacity: .95; transform: none; }

/* ================= MENU ================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px var(--gutter);
  mix-blend-mode: difference;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav__logo img { width: 150px; opacity: 0; transform: translateY(-6px); transition: opacity .8s ease, transform .8s ease; }
.nav.show-logo .nav__logo img { opacity: 1; transform: none; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav__links a { color: #fff; position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ================= SEQUÊNCIAS DE FRAMES ================= */
.seq { position: relative; }
.seq--hero   { height: 560vh; }
.seq--living { height: 520vh; }
.seq__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.seq__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.seq__shade  { position: absolute; inset: 0; background: var(--bg); opacity: 0; pointer-events: none; }

.hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--espresso); font-size: 10px;
}
.hint i { width: 1px; height: 44px; background: rgba(46,20,2,.25); position: relative; overflow: hidden; }
.hint i::after {
  content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%;
  background: var(--espresso);
  animation: drip 2.2s cubic-bezier(.7,0,.3,1) infinite;
}
@keyframes drip { 0% { top: -100%; } 60%,100% { top: 100%; } }

/* ================= FAIXA (índice) =================
   Não ocupa a tela inteira: deixa ver que há mais abaixo. */
.band {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; align-items: center;
  height: clamp(260px, 42vh, 440px);
  padding: 0 var(--gutter);
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.band__item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* P3: separadores = linhas de cota (traços nas pontas) + linha de medida numerada */
.band__sep { position: relative; z-index: 2; height: 46%; background: rgba(251,238,215,.18); }
.band__sep::before, .band__sep::after { content: ""; position: absolute; left: -6px; width: 13px; height: 1px; background: rgba(251,238,215,.45); }
.band__sep::before { top: 0; } .band__sep::after { bottom: 0; }
.band__dim { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); top: 16%; height: 1px; background: rgba(251,238,215,.14); pointer-events: none; }
.band__dim span { position: absolute; top: -4px; width: 1px; height: 9px; background: rgba(251,238,215,.45); }
.band__dim b { position: absolute; top: -20px; transform: translateX(-50%); font-weight: 500; color: rgba(251,238,215,.35); }
.band__item { z-index: 3; }

/* Luz L1 (aprovada): lanterna com inércia que revela a malha de construção */
.band { --x: 50%; --y: 50%; overflow: hidden; }
.band__glow, .band__grid { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.band__glow { background: radial-gradient(340px circle at var(--x) var(--y), rgba(183,150,107,.16), transparent 70%); }
.band__grid {
  background-image:
    linear-gradient(rgba(251,238,215,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,238,215,.22) 1px, transparent 1px),
    linear-gradient(rgba(251,238,215,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,238,215,.08) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(260px circle at var(--x) var(--y), #000 0%, rgba(0,0,0,.5) 45%, transparent 75%);
          mask-image: radial-gradient(260px circle at var(--x) var(--y), #000 0%, rgba(0,0,0,.5) 45%, transparent 75%);
}
.band__coords {
  position: absolute; z-index: 2; left: var(--x); top: var(--y);
  transform: translate(16px, 16px); font-size: 9px; white-space: pre;
  color: rgba(183,150,107,.8); pointer-events: none; opacity: 0; transition: opacity .4s ease;
}
.band.is-hover .band__coords { opacity: 1; }
/* Estilo A (aprovado): só tipografia + linha dourada que se desenha */
.band__label {
  position: relative; padding-bottom: 12px;
  font-family: var(--display); font-size: clamp(28px, 2.8vw, 42px);
  letter-spacing: .02em; line-height: 1;
  transition: letter-spacing .8s var(--ease), color .6s ease;
}
.band__label::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .8s var(--ease);
}
.band__item:hover .band__label { letter-spacing: .08em; }
.band__item:hover .band__label::after { transform: scaleX(1); transform-origin: left; }

/* ================= PAINEL DE CONTATO ================= */
.contact { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.contact.is-open { visibility: visible; }
.contact__backdrop {
  position: absolute; inset: 0; background: rgba(15,12,9,.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .6s ease;
}
.contact.is-open .contact__backdrop { opacity: 1; }
.contact__panel {
  position: absolute; left: 50%; bottom: 0;
  width: min(560px, 100%);
  transform: translate(-50%, 100%);
  background: var(--bg);
  border: 1px solid var(--line); border-bottom: 0;
  padding: 56px var(--gutter) 44px;
  transition: transform .8s var(--ease);
}
.contact.is-open .contact__panel { transform: translate(-50%, 0); }
.contact__close { position: absolute; top: 18px; right: 18px; width: 28px; height: 28px; }
.contact__close svg { width: 100%; height: 100%; stroke: var(--cream); stroke-width: 1; fill: none; }
.contact__list { list-style: none; margin: 0; padding: 0; }
.contact__list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 22px 0; border-top: 1px solid var(--line);
  transition: color .5s ease;
}
.contact__list li:last-child a { border-bottom: 1px solid var(--line); }
.contact__label { color: rgba(251,238,215,.5); }
.contact__value { font-family: var(--ui); font-stretch: 100%; font-weight: 300; font-size: clamp(16px, 2vw, 19px); letter-spacing: .01em; }
.contact__list a:hover { color: var(--accent); }

/* ================= SELETOR DE LÍNGUA ================= */
.lang { position: relative; margin-left: 6px; }
.lang__cur { color: #fff; font: inherit; font-family: var(--ui); font-stretch: 125%; font-weight: 500; font-size: 11px; letter-spacing: .14em;
  padding: 4px 0 4px 14px; border-left: 1px solid rgba(255,255,255,.35); }
.lang__list { list-style: none; margin: 0; padding: 8px 0 0; position: absolute; right: 0; top: 100%;
  display: flex; flex-direction: column; gap: 6px; opacity: 0; pointer-events: none; transform: translateY(-4px);
  transition: opacity .4s ease, transform .5s var(--ease); }
.lang.is-open .lang__list { opacity: 1; pointer-events: auto; transform: none; }
.lang__list button { color: rgba(255,255,255,.6); font-family: var(--ui); font-stretch: 125%; font-weight: 500; font-size: 11px; letter-spacing: .14em; padding: 2px 0; }
.lang__list button:hover, .lang__list button[aria-current="true"] { color: #fff; }

/* ================= RODAPÉ (R2) ================= */
.foot {
  position: relative; z-index: 2; background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 90px var(--gutter) 34px; text-align: center;
}
.foot__sym { width: 48px; margin: 0 auto 30px; }
.foot__nav { display: flex; justify-content: center; gap: 48px; margin: 0 0 34px; }
.foot__nav a { position: relative; font-family: var(--display); font-size: 30px; letter-spacing: .02em; }
.foot__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease);
}
.foot__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.foot__icons { display: flex; justify-content: center; gap: 28px; margin: 0 0 64px; }
.foot__icons svg { width: 21px; height: 21px; fill: none; stroke: var(--cream); stroke-width: 1; transition: stroke .5s ease, transform .6s var(--ease); }
.foot__icons a:hover svg { stroke: var(--accent); transform: translateY(-2px); }
.foot__bottom { display: flex; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); font-size: 10px; }
.foot__bottom small { font-size: inherit; color: rgba(251,238,215,.4); }
.foot__bottom { align-items: center; gap: 16px; }
.foot__origin { text-align: center; }
.foot__bottom a { color: rgba(251,238,215,.4); transition: color .5s ease; }
.foot__bottom a:hover { color: var(--accent); }

/* ================= CELULAR (retrato) ================= */
@media (max-width: 820px) and (orientation: portrait) {
  .seq--hero { height: 480vh; }
  .seq--living { height: 440vh; }
  .nav { padding: 20px var(--gutter); }
  .nav__logo img { width: 96px; }
  .nav__links { gap: 12px; }
  .nav__links a { font-size: 10px; letter-spacing: .08em; font-stretch: 100%; }
  .band { grid-template-columns: 1fr; height: auto; padding: 36px var(--gutter); }
  .band__item { height: 88px; }
  .band__sep { height: 1px; width: 56%; justify-self: center; }
  .band__sep::before, .band__sep::after { left: auto; top: -6px; width: 1px; height: 13px; }
  .band__sep::before { left: 0; } .band__sep::after { right: 0; bottom: auto; }
  .band__dim, .band__coords { display: none; }
  .band__label { font-size: 24px; }
  .foot__nav { gap: 22px; }
  .foot__bottom { flex-direction: column; gap: 10px; }
  .lang__cur { font-size: 10px; letter-spacing: .08em; font-stretch: 100%; padding-left: 10px; }
  .foot__nav a { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .hint i::after { animation: none; }
}

/* ================= DESTAQUE DA HOME — Andretto Concept 60M =================
   Seção longa com um quadro "grudado" na tela: ao rolar, a janela
   se abre até a tela cheia, a cota "60 M" se desenha e o texto entra. */
.feat { position: relative; height: 260vh; }
.feat__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.feat__media { position: absolute; inset: 0; clip-path: inset(16% 20% 16% 20%); will-change: clip-path; }
.feat__img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.22); will-change: transform; }
.feat__shade { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(to top, rgba(15,12,9,.82) 0%, rgba(15,12,9,.25) 42%, rgba(15,12,9,0) 62%); }
.feat__dim { position: absolute; left: 20%; right: 20%; top: calc(16% - 34px); display: flex; align-items: center; gap: 14px; color: rgba(251,238,215,.7); }
.feat__dim span { flex: 1; height: 1px; background: rgba(251,238,215,.4); position: relative; transform: scaleX(0); }
.feat__dim span:first-child { transform-origin: right; } .feat__dim span:last-child { transform-origin: left; }
.feat__dim span:first-child::before, .feat__dim span:last-child::after { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: rgba(251,238,215,.6); }
.feat__dim span:first-child::before { left: 0; } .feat__dim span:last-child::after { right: 0; }
.feat__dim b { font-weight: 500; opacity: 0; }
.feat__txt { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 9vh; opacity: 0; transform: translateY(30px); }
.feat__lbl { color: var(--accent); margin: 0 0 18px; }
.feat__title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(54px, 9vw, 150px); line-height: .9; }
.feat__line { margin: 22px 0 0; font-family: var(--ui); font-weight: 300; font-stretch: 100%; font-size: clamp(16px, 1.4vw, 20px); color: rgba(251,238,215,.85); }
.feat__cta { display: inline-flex; align-items: center; gap: 16px; margin-top: 30px; padding-bottom: 10px; border-bottom: 1px solid rgba(251,238,215,.3); transition: color .4s ease, border-color .4s ease, gap .5s var(--ease); }
.feat__cta svg { width: 40px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1; }
.feat__cta:hover { color: var(--accent); border-color: var(--accent); gap: 24px; }
@media (max-width: 820px) {
  .feat { height: 240vh; }
  /* no celular o iate não cabe cortado em pé: a imagem fica numa faixa larga e o texto embaixo */
  .feat__media { inset: auto 0; top: 15vh; height: 78vw; clip-path: inset(12% 8% 12% 8%); }
  .feat__dim { left: 8%; right: 8%; top: calc(15vh + 9.4vw - 26px); }
  .feat__shade { display: none; }
  .feat__txt { top: calc(15vh + 78vw + 5vh); bottom: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .feat { height: auto; } .feat__pin { position: relative; }
  .feat__media { clip-path: none; } .feat__img { transform: none; }
  .feat__shade, .feat__txt { opacity: 1; transform: none; } .feat__dim { display: none; }
}

/* ================= GALERIA DO IATE (home) — trilho horizontal ================= */
.rail { position: relative; height: 420vh; }
.rail__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.rail__track { display: flex; align-items: center; gap: 4vw; padding: 0 20vw 0 var(--gutter); will-change: transform; }
.rail__card { flex: 0 0 auto; width: 60vw; margin: 0; position: relative; }
.rail__card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; cursor: zoom-in; filter: brightness(.82); transition: filter .8s ease; }
.rail__card:hover img { filter: brightness(1); }
.rail__card figcaption { position: absolute; left: 0; top: -28px; color: rgba(251,238,215,.5); }
.rail__card:nth-child(even) { transform: translateY(6vh); }
.rail__end { flex: 0 0 auto; width: 34vw; display: flex; flex-direction: column; gap: 10px; }
.rail__endt { font-family: var(--display); font-size: clamp(40px, 5vw, 84px); line-height: .95; }
.rail__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 7vh; height: 1px; background: rgba(251,238,215,.14); }
.rail__bar i { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
@media (max-width: 820px) {
  /* no celular a galeria vira uma sequência vertical: rolar para baixo é o gesto natural */
  .rail { height: auto; padding: 4vh 0 10vh; }
  .rail__pin { position: relative; height: auto; overflow: visible; display: block; }
  .rail__track { flex-direction: column; align-items: stretch; gap: 42px; padding: 0 var(--gutter); transform: none !important; }
  .rail__card, .rail__card:nth-child(even) { width: 100%; transform: none; }
  .rail__card img { filter: none; }
  .rail__end { width: 100%; padding-top: 12px; }
  .rail__bar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rail { height: auto; } .rail__pin { position: relative; height: auto; overflow-x: auto; padding: 8vh 0; }
}
