/* ==========================================================================
   GW ARMAS E MUNIÇÕES: página inicial (versão mais limpa, 11/2026)
   Só a index.html carrega este arquivo. Cabeçalho, rodapé e cores vêm do style.css.
   ========================================================================== */

/* ---------- Entrada: o logo é desenhado e o site abre sozinho ---------- */
.intro {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center;
  background: #000; cursor: pointer;
  transition: background-color .7s ease;
}
.intro.is-leaving { background-color: rgba(0, 0, 0, 0); pointer-events: none; cursor: auto; }
.intro-mark { display: block; width: min(62vw, 300px); height: auto; overflow: visible; transform-origin: 0 0; }
.intro-mark .gm-ring { fill: none; stroke: url(#introBrass); stroke-width: 15; stroke-dasharray: 1; stroke-dashoffset: 1; animation: gm-draw 1.15s .15s cubic-bezier(.65, 0, .35, 1) forwards; }
.intro-mark .gm-glint { fill: none; stroke: #fff6d8; stroke-width: 15; stroke-linecap: round; stroke-dasharray: .045 .955; stroke-dashoffset: .045; opacity: 0; animation: gm-glint .95s 1.5s ease-in-out forwards; }
.intro-mark .gm-letters {
  fill: var(--ivory); fill-opacity: 0;
  stroke: var(--ivory); stroke-width: 2.6; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: gm-draw 1.3s .4s cubic-bezier(.65, 0, .35, 1) forwards, gm-fill .5s 1.6s ease forwards;
}
@keyframes gm-draw { to { stroke-dashoffset: 0; } }
@keyframes gm-fill { to { fill-opacity: 1; stroke-opacity: 0; } }
@keyframes gm-glint { 0% { opacity: 0; stroke-dashoffset: .045; } 15% { opacity: .85; } 100% { opacity: 0; stroke-dashoffset: -.955; } }
.intro-legal {
  position: absolute; left: 0; right: 0; bottom: max(1.6rem, env(safe-area-inset-bottom));
  text-align: center; font-size: .8rem; color: var(--steel);
  opacity: 0; animation: fadeIn .6s .9s forwards;
}
.intro.is-leaving .intro-legal { animation: none; opacity: 0; transition: opacity .3s; }
/* pulou a animação: o logo aparece completo antes de seguir para o cabeçalho */
.intro.is-skip .gm-ring, .intro.is-skip .gm-letters { animation: none; stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; }
.intro.is-skip .gm-ring { stroke-opacity: 1; }
.intro.is-skip .gm-glint { display: none; }
.brand img { transition: opacity .25s ease; }
/* o logo do cabeçalho só aparece quando o logo da entrada chega até ele */
body.has-gate .brand img { opacity: 0; }

/* ---------- Primeira dobra ---------- */
.h-hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding-top: var(--nav-h); overflow: hidden; isolation: isolate; }
.h-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 52% at 76% 46%, rgba(201, 162, 74, .11), transparent 70%); pointer-events: none; }
.h-hero-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(2.5rem, 7vh, 5.5rem); }

.h-title { font-size: clamp(3.1rem, 7.2vw, 6.8rem); line-height: .9; }
/* a máscara de cada linha deixa espaço para os acentos (Ã, À) em cima e a cedilha embaixo */
.h-title .ln { display: block; overflow: hidden; padding: .16em 0 .1em; margin: -.16em 0 -.1em; }
.h-title .ln > span { display: block; transform: translateY(108%); }
.is-ready .h-title .ln > span { animation: rise .95s var(--d, 0s) var(--ease) forwards; }

.h-sub { margin-top: 1.6rem; max-width: 42ch; font-size: clamp(1.05rem, 1.25vw, 1.18rem); color: var(--steel); opacity: 0; }
.is-ready .h-sub { animation: fadeIn .9s .55s forwards; }
.h-hero .hero-cta { margin-top: 2.2rem; }
.h-rate { margin-top: 1rem; opacity: 0; }
.is-ready .h-rate { animation: fadeIn .9s .75s forwards; }

.h-photo { justify-self: end; width: min(100%, 420px); margin: 0; opacity: 0; transform: translateY(16px); }
.is-ready .h-photo { animation: h-photo-in 1.2s .3s var(--ease) forwards; }
@keyframes h-photo-in { to { opacity: 1; transform: none; } }
/* a foto tem fundo preto: fica num painel escuro emoldurado em latão, igual nos dois modos */
.h-photo-panel {
  display: grid; place-items: center; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 42%, #24211c 0%, #0c0c0b 70%);
  border: 1px solid rgba(201, 162, 74, .45); outline: 1px solid rgba(201, 162, 74, .2); outline-offset: 8px;
  box-shadow: var(--shadow);
}
.h-photo img {
  width: 90%; height: auto;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.h-photo figcaption { margin-top: 1.3rem; text-align: center; color: var(--steel); font-size: .9rem; }
.h-photo figcaption strong { display: block; margin-bottom: .2rem; font: 700 1.2rem/1.1 var(--f-display); letter-spacing: .05em; text-transform: uppercase; color: var(--text); }

.h-info { border-top: 1px solid var(--line); opacity: 0; }
.is-ready .h-info { animation: fadeIn .9s 1.1s forwards; }
.h-info-in { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 2.6rem; padding-block: 1.15rem; font-size: .92rem; color: var(--steel); }
.h-info-in a { color: var(--text); font-weight: 600; }
.h-info-in a:hover { color: var(--brass-hi); }

/* ---------- Seções ---------- */
.h-sec { padding-block: clamp(4.5rem, 9vw, 8rem); }
.h-sec + .h-sec { padding-top: 0; }
.h-sec-title { font-size: clamp(2rem, 3.8vw, 3.2rem); line-height: .95; max-width: 20ch; }
.h-sec-lead { margin-top: 1rem; max-width: 52ch; color: var(--steel); }

/* três frentes no mesmo endereço */
.h-pillars { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.6rem, 3vw, 3rem); margin-top: clamp(2.2rem, 4vw, 3.4rem); }
.h-pillar { display: grid; align-content: start; gap: .9rem; padding-top: 1.5rem; border-top: 1px solid rgba(201, 162, 74, .55); }
.h-pillar h3 { font-size: clamp(1.45rem, 2vw, 1.85rem); line-height: 1; }
.h-pillar p { max-width: 38ch; color: var(--steel); }
.h-pillar .link { justify-self: start; margin-top: .2rem; }

/* modelos em destaque: fotos pequenas, sobre placa marfim como no catálogo */
.h-feat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem 2rem; flex-wrap: wrap; }
.h-cards { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); margin-top: clamp(1.8rem, 3vw, 2.6rem); }
.h-card a { display: grid; gap: .9rem; color: inherit; }
.h-plate { display: block; aspect-ratio: 4 / 3; padding: 1rem; background: var(--ivory); transition: transform .45s var(--ease), box-shadow .45s; }
.h-plate img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.h-card h3 { font-size: 1.2rem; line-height: 1.05; }
.h-card p { margin-top: .25rem; font-size: .9rem; color: var(--steel); }
@media (hover: hover) {
  .h-card a:hover .h-plate { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--brass), var(--shadow); }
  .h-card a:hover h3 { color: var(--brass-hi); }
}

/* visita */
.h-sec.h-visit { padding-top: clamp(4.5rem, 9vw, 8rem); border-top: 1px solid var(--line); }
.h-visit-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.h-visit .info { margin: 1.8rem 0 2rem; }
.h-visit .map { min-height: 0; aspect-ratio: 4 / 3; max-height: 440px; }

/* blocos que voltaram para a página inicial: fotos menores e títulos no mesmo tamanho */
.path .h-sec-title, .h-desp .h-sec-title, .h-clube .h-sec-title { max-width: 24ch; }
.h-desp .print { width: min(100%, 340px); }
.h-clube .target-wrap { width: min(100%, 400px); }
.h-clube .offer { margin: 1.6rem 0 2rem; }

/* ---------- Celular e tablet ---------- */
@media (max-width: 900px) {
  .h-hero { min-height: 0; }
  .h-hero-in { grid-template-columns: 1fr; gap: 1.6rem; padding-block: 2.2rem 2.6rem; }
  .h-photo { justify-self: center; width: min(78%, 300px); order: 2; }
  .h-pillars { grid-template-columns: 1fr; gap: 2rem; }
  .h-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-visit-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .h-info-in { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .h-card h3 { font-size: 1.05rem; }
  .h-plate { padding: .6rem; }
  .h-visit .map-tap:not(.is-open) { aspect-ratio: auto; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  .intro-mark .gm-ring, .intro-mark .gm-letters { animation: none; stroke-dashoffset: 0; fill-opacity: 1; stroke-opacity: 0; }
  .intro-mark .gm-glint { display: none; }
  .intro-legal { animation: none; opacity: 1; }
  .h-title .ln > span, .h-sub, .h-rate, .h-photo, .h-info { animation: none !important; opacity: 1 !important; transform: none !important; }
}
