/* ===========================================================
   Atlantic Paradise Towers — Meia Praia, Itapema
   =========================================================== */

:root {
  --bg: #faf7f0;
  --bg-alt: #f2eadb;
  --ink: #211e19;
  --ink-soft: #3d372e;
  --graphite: #5c5648;
  --text-soft: #7a7362;
  --line: #e6dcc4;
  --champagne: #ad8f5c;
  --champagne-soft: #cbb27e;
  --white: #ffffff;
  --radius: 4px;
  --transition: 280ms cubic-bezier(.4,0,.2,1);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0; background: var(--bg); color: var(--ink-soft);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.12; color: var(--ink); margin: 0 0 0.3em; }
p { margin: 0 0 1em; }

::selection { background: var(--champagne-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--champagne); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 14px 22px; z-index: 200; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 720px; }
.center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.68rem; font-weight: 700;
  color: var(--champagne); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.eyebrow-dark { color: var(--champagne-soft); }
.center .eyebrow { justify-content: center; }

.lead { max-width: 44ch; margin: 0 auto; color: var(--text-soft); font-size: 1rem; line-height: 1.75; }
.lead-sm { color: var(--text-soft); font-size: 0.96rem; line-height: 1.7; max-width: 44ch; }
.lead-dark { color: rgba(255,255,255,0.7); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 30px; border-radius: 999px; font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.03em;
  border: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-primary { background: var(--white); color: var(--ink); }
.btn-primary:hover { background: var(--champagne); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-outline--dark { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-outline--dark:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-text {
  background: transparent; border: none; padding: 0;
  color: rgba(255,255,255,0.9); font-size: 0.85rem; font-weight: 500;
  transition: color var(--transition);
}
.btn-text:hover { color: var(--champagne-soft); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.header.is-solid { background: rgba(250,247,240,0.92); backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; gap: 16px; }
.header-logo { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #fff; transition: color var(--transition); }
.header.is-solid .header-logo { color: var(--ink); }
.header .btn-header { padding: 11px 22px; background: rgba(255,255,255,0.95); color: var(--ink); }
.header.is-solid .btn-header { background: var(--ink); color: var(--bg); }
.header .btn-header:hover { background: var(--champagne); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; color: #fff; background: var(--ink); }
.hero-media-wrap { position: absolute; inset: 0; overflow: hidden; }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero-media.ap-kenburns { animation: apKenburns 22s ease-in-out infinite alternate; }
@keyframes apKenburns { from { transform: scale(1); } to { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .hero-media.ap-kenburns { animation: none; } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.86) 0%, rgba(0,0,0,0.5) 34%, rgba(0,0,0,0.32) 62%, rgba(0,0,0,0.22) 100%); }
.hero-content { position: relative; z-index: 2; padding: 160px 24px 72px; max-width: 760px; }
.hero-kicker { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.32em; color: var(--champagne-soft); margin-bottom: 22px; }
.hero h1 { color: #fff; font-size: clamp(3rem, 13vw, 6.2rem); line-height: 0.98; margin-bottom: 0.2em; }
.hero h1 .text-gold { color: var(--champagne-soft); font-style: italic; }
.hero-sub { max-width: 34ch; font-size: 1.05rem; line-height: 1.6; color: rgba(255,255,255,0.86); margin: 22px 0 0; }
.hero-complement { font-size: 0.85rem; font-weight: 500; letter-spacing: 0.05em; color: rgba(255,255,255,0.6); margin: 14px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; margin-top: 34px; }
.hero-scroll-hint { display: flex; margin-top: 52px; }
.hero-scroll-hint span { width: 1px; height: 34px; background: rgba(255,255,255,0.4); animation: apPulse 2.2s ease-in-out infinite; }
@keyframes apPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) { .hero-scroll-hint span { animation: none; opacity: 0.5; } }

/* ---------- Hero: card de cadastro rápido ---------- */
.hero-lead-card { display: none; }
.hero-lead-card-title { color: #fff; font-size: 1rem; font-weight: 600; margin: 0 0 32px; text-align: center; }
.hlf { display: flex; flex-direction: column; gap: 24px; }
.hlf[hidden] { display: none; }
.hlf-field label { display: block; color: rgba(255,255,255,0.92); font-size: 0.8rem; font-weight: 600; margin-bottom: 9px; }
.hlf-field input {
  width: 100%; border: none; border-radius: 999px; padding: 19px 24px;
  font-size: 0.92rem; font-family: var(--font); background: #fff; color: var(--ink);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.hlf-field input::placeholder { color: var(--text-soft); }
.hlf-field input:focus { outline: 2px solid var(--champagne-soft); outline-offset: 2px; }
.hlf-submit {
  width: 100%; border: none; border-radius: 999px; padding: 20px;
  background: var(--champagne); color: #fff; font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer;
  transition: background var(--transition);
  margin-top: 12px;
}
.hlf-submit:hover { background: var(--ink); }

@media (min-width: 1024px) {
  .hero { align-items: flex-start; padding-top: 290px; padding-bottom: 64px; gap: 24px; }
  .hero-content { padding: 0 0 0 12vw; max-width: 540px; }
  .hero-lead-card {
    display: block; flex: none; margin-left: auto; margin-right: 7vw; margin-top: 26px;
    width: clamp(300px, 27vw, 400px); padding-bottom: 56px;
  }
}

/* ---------- Sections base ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.no-pad-top { padding-top: 0; }

/* ---------- Introduction ---------- */
.intro-body { max-width: 62ch; margin: 0 auto; }
.intro-body h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
.intro-body p { margin-top: 28px; }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); padding: 56px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.stat { padding: 20px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.stat:nth-child(1), .stat:nth-child(2) { border-top: none; }
.stat b { font-family: var(--font-display); font-size: 2.1rem; line-height: 1; color: var(--ink); font-weight: 400; }
.stat-unit { font-size: 1rem; color: var(--champagne); margin-left: 2px; font-family: var(--font); }
.stat span { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-soft); }

@media (min-width: 700px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 0 28px; border-top: none; border-left: 1px solid var(--line); }
  .stat:nth-child(1) { border-left: none; }
}
@media (min-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(6, 1fr); }
  .stat b { font-size: 2.3rem; }
}

/* ---------- Duo (imagem + texto) ---------- */
.duo { display: grid; }
.duo-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.duo-media img { width: 100%; height: 100%; object-fit: cover; }
.duo-text { display: flex; align-items: center; padding: 56px 24px; }
.duo-text-inner { max-width: 380px; }
.duo-text h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

@media (min-width: 1024px) {
  .duo { grid-template-columns: 3fr 2fr; }
  .duo-media { aspect-ratio: auto; min-height: 620px; }
  .duo-text { padding: 0 24px 0 72px; }
}

/* ---------- Residências ---------- */
.residences-grid { display: grid; gap: 48px; }
.residences-text h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); max-width: 14ch; }
.residences-list { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); max-width: 420px; }
.residences-list li { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); }
.residences-media { position: relative; aspect-ratio: 4/5; overflow: hidden; }
.residences-media img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 1024px) {
  .residences-grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
}

/* ---------- Resort (editorial gallery com legendas) ---------- */
.resort { background: var(--ink); color: #fff; }
.resort-intro { max-width: 640px; }
.resort-intro h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.9rem); max-width: 16ch; }
.resort-grid { display: flex; flex-direction: column; gap: 16px; margin-top: 60px; }
.resort-row { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.frame { position: relative; overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.16,1,.3,1); }
.frame:hover img { transform: scale(1.045); }
.frame-caption {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2;
  padding: 20px; background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: #fff;
}
.frame-wide { aspect-ratio: 16/9; grid-column: 1 / -1; }
.frame-tall { aspect-ratio: 3/4; }
.frame-square { aspect-ratio: 4/3; }
@media (min-width: 768px) { .frame-wide { aspect-ratio: 21/9; } }

.resort-also { margin-top: 56px; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 36px; }
.resort-also-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: rgba(255,255,255,0.45); }
.resort-also-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.resort-also-list li { display: flex; align-items: center; gap: 9px; font-size: 0.9rem; color: rgba(255,255,255,0.78); }
.resort-also-list li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--champagne-soft); }

@media (min-width: 768px) {
  .resort-row-3 { grid-template-columns: repeat(3, 1fr); }
  .resort-row-5 { grid-template-columns: 3fr 2fr; }
}

/* ---------- Pools (banner cinematográfico) ---------- */
.pools-banner { position: relative; min-height: 90vh; display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); }
.pools-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pools-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.08) 62%); }
.pools-content { position: relative; z-index: 2; padding: 0 24px 72px; max-width: 480px; color: #fff; }
.pools-content h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.9rem); }

@media (min-width: 1024px) {
  .pools-banner { min-height: 100vh; }
  .pools-content { padding: 0 64px 96px; }
}

/* ---------- Galeria + Lightbox ---------- */
.gallery-head { max-width: 620px; margin-bottom: 44px; }
.gallery-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery-item { position: relative; overflow: hidden; border: none; padding: 0; cursor: pointer; background: none; display: block; width: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.gallery-item:hover img { transform: scale(1.045); }
.gallery-item::after {
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0); transition: background var(--transition);
}
.gallery-item:hover::after { background: rgba(0,0,0,0.08); }
.g-span-2 { grid-column: span 2; }
.g-wide { aspect-ratio: 21/9; }
.g-square { aspect-ratio: 4/3; }
.g-tall { aspect-ratio: 3/4; }

@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(6, 1fr); gap: 16px; }
  .g-c6 { grid-column: span 6; }
  .g-c4 { grid-column: span 4; }
  .g-c3 { grid-column: span 3; }
  .g-c2 { grid-column: span 2; }
}

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none; flex-direction: column;
  background: rgba(20,17,12,0.98); backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; }
.lightbox-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; }
.lightbox-counter { font-size: 0.82rem; color: rgba(255,255,255,0.7); }
.lightbox-close {
  width: 42px; height: 42px; border-radius: 50%; border: none; background: transparent; color: #fff;
  font-size: 1.4rem; cursor: pointer; transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.12); }
.lightbox-stage { position: relative; flex: 1; padding: 0 8px 24px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lightbox-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,0.12);
  color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.24); }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
@media (min-width: 768px) {
  .lightbox-prev { left: 28px; }
  .lightbox-next { right: 28px; }
  .lightbox-nav { width: 54px; height: 54px; }
}

/* ---------- Localização ---------- */
.location-box {
  max-width: 460px; margin: 48px auto 0; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.location-address { display: flex; align-items: center; gap: 10px; font-size: 0.94rem; font-weight: 500; color: var(--ink-soft); }
.location-badge { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--champagne); }

/* ---------- Formulário ---------- */
.form-section { background: var(--ink); padding: 100px 0; color: #fff; }
.form-section h2 { color: #fff; }
.form-grid { display: grid; gap: 48px; }
.form-intro { max-width: 380px; }
.lead-form { display: flex; flex-direction: column; gap: 24px; }
.lead-form[hidden] { display: none; }
.form-row { display: grid; gap: 22px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field legend { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.55); padding: 0; }
.field input {
  background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.25);
  padding: 12px 0; font-size: 0.95rem; color: #fff; font-family: var(--font);
}
.field input::placeholder { color: rgba(255,255,255,0.32); }
.field input:focus { outline: none; border-bottom-color: var(--champagne); }
.form-microcopy { font-size: 0.78rem; line-height: 1.6; color: rgba(255,255,255,0.45); margin: 0; }

@media (min-width: 1024px) {
  .form-grid { grid-template-columns: 5fr 7fr; align-items: start; }
}

/* ---------- CTA final ---------- */
.final-cta { position: relative; min-height: 84vh; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--ink); }
.final-cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.final-cta-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.56); }
.final-cta-content { position: relative; z-index: 2; max-width: 640px; padding: 0 24px; text-align: center; color: #fff; }
.final-cta-content h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); }
.final-cta-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; margin-top: 36px; }

/* ---------- Footer ---------- */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer-row { display: flex; flex-direction: column; gap: 28px; justify-content: space-between; }
.footer-logo { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); margin: 0; }
.footer-meta { font-size: 0.82rem; color: var(--text-soft); margin: 6px 0 0; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 0.82rem; }
.footer-links a { color: var(--text-soft); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.footer-links a:hover { color: var(--ink); }
.footer-legal { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 24px; font-size: 0.74rem; color: var(--text-soft); line-height: 1.7; }
.footer-legal p { margin: 0 0 6px; }

@media (min-width: 900px) {
  .footer-row { flex-direction: row; }
  .footer-links { align-items: flex-end; }
}

/* ---------- CTA flutuante mobile + WhatsApp ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  padding: 14px 16px; background: rgba(33,30,25,0.96); backdrop-filter: blur(10px);
  transform: translateY(100%); transition: transform var(--transition);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sticky-cta.is-visible { transform: translateY(0); }
@media (min-width: 1024px) { .sticky-cta { display: none; } }

.whatsapp-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.whatsapp-fab.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.whatsapp-fab:hover { background: var(--champagne); }
@media (max-width: 1023px) { .whatsapp-fab { bottom: 92px; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive base ---------- */
@media (max-width: 1023px) {
  .section { padding: 72px 0; }
  .form-section { padding: 72px 0; }
  .pools-banner { min-height: 70vh; }
  .final-cta { min-height: 70vh; }
}
