/* =========================================================
   JJ Biquínis Brasil — Landing Page
   Tipografia: Qasbyne (títulos) + Inter (corpo)
   ========================================================= */

/* ---------- Fonte de títulos: Qasbyne ----------
   Coloque os arquivos da fonte em assets/fonts/.
   Ajuste os formatos conforme os arquivos que você tiver. */
@font-face {
  font-family: "Qasbyne";
  src: url("assets/fonts/Qasbyne.woff2") format("woff2"),
       url("assets/fonts/Qasbyne.woff") format("woff"),
       url("assets/fonts/Qasbyne.otf") format("opentype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variáveis / Design tokens (valores exatos do Figma) ---------- */
:root {
  --cream: #F6EDDA;
  --cream-card: #EDEAD5;
  --green-dark: #00350F;   /* faixas, footer, CTA */
  --green-brand: #013819;  /* títulos/marca */
  --green-mid: #2B5A36;
  --green-grad-b: #3E9A54; /* fim do gradiente dos botões */
  --green-grad-b2: #4DAF64;
  --yellow: #FFAD00;
  --yellow-dark: #e59c00;
  --text: #202020;
  --text-2: #2A313B;
  --text-soft: #5B5B5B;
  --badge-text: #505268;
  --white: #F8F8F9;
  --border: rgba(43, 90, 54, 0.3);
  --border-chip: rgba(43, 90, 54, 0.4);

  --header-h: 88px;

  --radius: 5px;
  --radius-lg: 8px;
  --shadow: 0 10px 30px rgba(0, 53, 15, 0.08);
  --shadow-hover: 0 16px 40px rgba(0, 53, 15, 0.16);
  --maxw: 1280px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);

  --font-title: "Qasbyne", "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-cta: "Poppins", "Inter", sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--header-h); /* compensa o header fixo */
}

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

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

/* ---------- Utilitários ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 72px; }

.section__title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--green-brand);
  letter-spacing: 0.2px;
}

.section__lead {
  color: var(--text-soft);
  font-size: 1rem;
  max-width: 46ch;
}

.text-accent { color: var(--green-mid); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center; /* centraliza também quando o texto quebra em 2 linhas */
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  will-change: transform;
}

.btn--lg { padding: 17px 34px; font-size: 1rem; }

.btn--green {
  background: linear-gradient(90deg, var(--green-dark), var(--green-grad-b));
  color: var(--white);
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(0, 53, 15, 0.24);
}
.btn--green:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 53, 15, 0.34);
}

.btn--yellow {
  background: var(--yellow);
  color: #1b1b1b;
  box-shadow: 0 8px 20px rgba(255, 173, 0, 0.35);
}
.btn--yellow:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(255, 173, 0, 0.45);
}

.btn__icon { font-size: 1.1em; }

/* ---------- Badge / Chips ---------- */
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.badge--light {
  background: rgba(183, 200, 213, 0.22);
  border: 1px solid rgba(212, 212, 205, 0.35);
  color: var(--badge-text);
  font-size: 0.82rem;
  padding: 9px 20px;
  backdrop-filter: blur(4px);
}

/* =========================================================
   HEADER / MENU
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--green-dark);
  display: flex;
  align-items: center;
  /* fade suave ao esconder/mostrar conforme a direção do scroll */
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
/* some ao descer a tela, volta ao subir (classe controlada por JS) */
.site-header.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header__logo { display: block; flex-shrink: 0; }
.site-header__logo img {
  height: 52px;
  width: auto;
  display: block;
}

/* --- navegação (desktop: à direita) --- */
.nav__list {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
}
.nav__list a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav__list a:hover { color: var(--yellow); }
.nav__list a:hover::after,
.nav__list a:focus-visible::after { transform: scaleX(1); }

/* --- botão hamburguer (só no mobile) --- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }

/* vira "X" quando aberto */
.nav-toggle.is-open .nav-toggle__bars { background: transparent; }
.nav-toggle.is-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* âncoras não ficam escondidas atrás do header fixo */
[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 620px;
  border-bottom: 12px solid var(--green-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* imagem de fundo em toda a largura */
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media picture { display: block; width: 100%; height: 100%; }
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* inner usa o MESMO container/grid da seção de baixo,
   garantindo que o texto do hero comece na mesma coluna vertical
   do parágrafo da galeria (a "reta" de alinhamento) */
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 24px;
  display: grid;
  /* coluna do texto mais larga: a copy fica à esquerda e a modelo à direita,
     assim o título cabe em 3 linhas mesmo com a fonte no tamanho máximo (58px) */
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
}

/* painel na 1ª coluna, alinhado à ESQUERDA do container — a borda esquerda
   coincide com o título "Os biquínis cariocas" e o grid de fotos abaixo */
.hero__panel {
  grid-column: 1;
  justify-self: start;
  width: min(700px, 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.hero__title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.4rem, 3.6vw, 3.625rem); /* até 58px como no Figma */
  line-height: 1.1;
  color: var(--text-2);
}
.hero__title .text-accent { color: var(--green-brand); }

.hero__text {
  color: var(--badge-text);
  font-size: 1.05rem;
  max-width: 44ch;
}
.hero__text strong { color: var(--text-2); font-weight: 600; }

/* legibilidade sobre a foto, sem caixa de fundo */
.hero__title,
.hero__text { text-shadow: 0 1px 12px rgba(246, 237, 218, 0.55); }

/* botão WhatsApp em Poppins, uppercase */
.hero__panel .btn {
  width: min(520px, 100%);
  height: 60px;
  font-family: var(--font-cta);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* =========================================================
   GALERIA
   ========================================================= */
.section__head { margin-bottom: 42px; }
/* parágrafo alinhado à DIREITA (borda direita = borda das fotos) com a mesma
   largura do painel do hero, então a borda esquerda coincide com o hero (a "reta") */
.section__head .section__lead {
  justify-self: end;
  width: min(468px, 100%);
  max-width: none;
  padding-top: 8px;
}

.galeria__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.galeria__item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
/* proporção original das fotos (sem crop) */
.galeria__item img { width: 100%; height: auto; display: block; transition: transform 0.6s ease; }
.galeria__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.galeria__item:hover img { transform: scale(1.06); }

/* ---------- Carrossel infinito (ativado via JS no mobile) ----------
   O JS move os itens para uma faixa (.galeria__track) e duplica o conjunto;
   a faixa desliza continuamente e o -50% cria o loop sem emenda. */
.galeria__grid[data-carousel] {
  display: block;
  grid-template-columns: none;
  overflow: hidden;
  gap: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.galeria__track {
  display: flex;
  width: max-content;
  animation: gal-scroll 26s linear infinite;
}
/* pausa ao tocar/passar o dedo */
.galeria__grid[data-carousel]:hover .galeria__track,
.galeria__grid[data-carousel]:active .galeria__track { animation-play-state: paused; }

.galeria__track .galeria__item {
  flex: 0 0 auto;
  width: 68vw;
  max-width: 300px;
  margin-right: 16px;   /* margem uniforme = loop exato em -50% */
}

@keyframes gal-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .galeria__track { animation: none; }
  .galeria__grid[data-carousel] {
    overflow-x: auto;
    -webkit-mask-image: none;
            mask-image: none;
    scroll-snap-type: x mandatory;
  }
  .galeria__track .galeria__item { scroll-snap-align: center; }
}

.galeria__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: rgba(151, 205, 163, 0.1);
  border: 1px solid var(--border-chip);
  border-radius: var(--radius);
  padding: 15px 30px;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
}
.chip__check { width: 32px; height: 32px; flex-shrink: 0; }

/* =========================================================
   MODELOS / BENTO
   ========================================================= */
/* Bento exato: texto+botão (topo-esq), foto praia (meio-esq),
   2 fotos verticais (dir, altura total), estampada + piscina (linha inferior) */
.modelos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: auto 250px 250px;
  grid-template-areas:
    "intro   intro   tall1  tall2"
    "beach   beach   tall1  tall2"
    "pattern pattern pool   pool";
  gap: 16px;
}
.modelos__intro {
  grid-area: intro;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 8px;
}
.modelos__intro .btn { align-self: flex-start; }

.m-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.m-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.m-photo:hover { transform: translateY(-4px); }
.m-photo:hover img { transform: scale(1.05); }

.m-photo--tall1   { grid-area: tall1; }
.m-photo--tall2   { grid-area: tall2; }
.m-photo--beach   { grid-area: beach; }
.m-photo--pattern { grid-area: pattern; }
.m-photo--pool    { grid-area: pool; }

/* =========================================================
   REVENDE / ATACADO
   ========================================================= */
.revende__top { margin-bottom: 40px; align-items: center; }
.revende__intro { display: flex; flex-direction: column; gap: 22px; }
.revende__intro .btn { align-self: flex-start; }
.revende__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.revende__media img { width: 100%; height: 240px; object-fit: cover; }

/* 6 colunas: linha 1 = 2 cards largos (3+3); linha 2 = 3 cards (2+2+2) */
.features {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  list-style: none;
}
.feature:nth-child(1),
.feature:nth-child(2) { grid-column: span 3; }
.feature:nth-child(3),
.feature:nth-child(4),
.feature:nth-child(5) { grid-column: span 2; }
.feature {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 40px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.feature__text { color: var(--text-soft); font-size: 1rem; }

/* =========================================================
   SOBRE / NASCIDA NO RIO
   ========================================================= */
.sobre__grid { align-items: center; gap: 48px; }
.sobre__media {
  background: var(--green-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
/* proporção original da foto (sem crop), no desktop e no mobile */
.sobre__media img { width: 100%; height: auto; display: block; }
.sobre__content { display: flex; flex-direction: column; gap: 20px; }
.sobre__content .btn { align-self: flex-start; }

/* =========================================================
   CTA FINAL
   ========================================================= */
.cta { padding-block: 40px 80px; }

/* bloco único arredondado: painel verde à esquerda + foto à direita */
.cta__box {
  display: grid;
  grid-template-columns: 42% 58%;
  background: var(--green-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 320px;
}
.cta__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding: clamp(32px, 4vw, 56px);
  text-align: left;
}
.cta__title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  color: var(--white);
}
.cta__text { color: #BFD8C5; font-size: 1rem; }
.cta__content .btn { margin-top: 8px; align-self: flex-start; min-width: 235px; }

/* a foto não pode ditar a altura da linha: fica absoluta e só preenche o painel */
.cta__media { position: relative; overflow: hidden; }
.cta__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--green-dark);
  color: var(--white);
  text-align: center;
  padding-block: 40px;
  font-size: 0.95rem;
  font-weight: 500;
}
.footer__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(248, 248, 249, 0.4);
  transition: text-decoration-color var(--transition), color var(--transition);
}
.footer__link:hover,
.footer__link:focus-visible { text-decoration-color: currentColor; }

/* =========================================================
   ANIMAÇÕES DE ENTRADA
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 980px) {
  .hero { min-height: 520px; }
  .hero__img { object-position: 25% top; }
  .hero__panel { margin-right: clamp(16px, 4vw, 40px); }
  .galeria__grid { grid-template-columns: repeat(3, 1fr); }
  .revende__top,
  .sobre__grid { grid-template-columns: 1fr; }
  .section__head.grid-2 { grid-template-columns: 1fr; gap: 12px; }
  .section__head .section__lead { justify-self: start; }

  /* Modelos: 2 colunas (texto + 1ª vertical em cima; praia larga; estampada + piscina) */
  .modelos__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 240px 240px;
    grid-template-areas:
      "intro   tall1"
      "beach   tall2"
      "pattern pool";
  }
  /* Benefícios: 2 largos em cima, depois pares */
  .feature:nth-child(1),
  .feature:nth-child(2) { grid-column: span 6; }
  .feature:nth-child(3),
  .feature:nth-child(4),
  .feature:nth-child(5) { grid-column: span 3; }
}

@media (max-width: 620px) {
  /* --- Header mobile: logo + hamburguer discreto --- */
  :root { --header-h: 64px; }
  .site-header__logo img { height: 34px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--green-dark);
    border-top: 1px solid rgba(248, 248, 249, 0.12);
    /* fechado por padrão */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
  }
  .nav__list a { padding: 14px 0; font-size: 1rem; }
  .nav__list a::after { display: none; }
  .nav__list li + li { border-top: 1px solid rgba(248, 248, 249, 0.1); }

  /* espaçamento vertical mais compacto entre as seções */
  .section { padding-block: 36px; }
  .section__head { margin-bottom: 28px; }
  .galeria__footer { margin-top: 24px; }
  .cta { padding-block: 20px 48px; }

  .galeria__grid { grid-template-columns: repeat(2, 1fr); }

  /* Modelos: as 2 verticais lado a lado, depois as 3 horizontais em largura total */
  .modelos__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-template-areas:
      "intro   intro"
      "tall1   tall2"
      "beach   beach"
      "pattern pattern"
      "pool    pool";
    align-items: start;
  }
  /* proporção original das fotos (sem crop) */
  .m-photo { height: auto; }
  .m-photo img { height: auto; }

  /* CTA final: foto em cima, painel verde embaixo */
  .cta__box { grid-template-columns: 1fr; min-height: 0; }
  .cta__media { order: -1; height: 260px; }

  /* Benefícios: bento grid no mobile — 2 metades · 1 destaque largo · 2 metades */
  .feature { padding: 18px 20px; }
  .feature:nth-child(1),
  .feature:nth-child(2),
  .feature:nth-child(4),
  .feature:nth-child(5) { grid-column: span 3; }
  .feature:nth-child(3) { grid-column: span 6; }
  .feature__title { font-size: 1.05rem; margin-bottom: 8px; }
  .feature__text { font-size: 0.9rem; }
  .galeria__footer { flex-direction: column; align-items: stretch; }
  .galeria__footer .btn { width: 100%; }
  .chips { justify-content: center; }
  .chip { width: 100%; justify-content: center; }
  /* Hero mobile: banner vertical na proporção natural (o fade para o creme já
     vem na imagem e casa com o BG da página). A copy sobe para dentro da
     faixa creme da própria foto. */
  .hero {
    display: block;
    min-height: 0;
    align-items: initial;
    border-bottom-width: 8px;
  }
  .hero__media { position: static; height: auto; min-height: 0; max-height: none; }
  .hero__media picture { height: auto; }
  .hero__img { height: auto; object-fit: fill; }
  .hero__inner {
    grid-template-columns: 1fr;
    /* foto tem ratio 880x1686 (h = 1.916 x largura); o creme começa a ~54% dela,
       então puxamos a copy 88vw para cima a partir da base da imagem */
    margin-top: -88vw;
    padding-block: 0 36px;
  }
  .hero__panel { grid-column: 1; width: 100%; margin: 0; }
  .hero__title, .hero__text { text-shadow: none; }
  /* no mobile o título quebra naturalmente (sem as quebras fixas do desktop) */
  .hero__title br { display: none; }
  .section__head .section__lead { justify-self: start; }
  .btn { width: 100%; }
  .modelos__intro .btn,
  .revende__intro .btn,
  .sobre__content .btn { align-self: stretch; }
}
