/* ===========================================================
   Elizabeth II Royal Home — Meia Praia, Itapema
   =========================================================== */

:root {
  --cream: #f6f0e5;
  --cream-alt: #ece2cd;
  --navy: #16273a;
  --navy-soft: #223549;
  --wood: #7a5738;
  --champagne: #b3945e;
  --champagne-soft: #d1b788;
  --ink-soft: #45443d;
  --line: #ded0ac;
  --white: #ffffff;
  --radius: 2px;
  --transition: 320ms cubic-bezier(.4,0,.2,1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Libre Baskerville", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--cream); color: var(--ink-soft);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.005em; line-height: 1.22; color: var(--navy); margin: 0 0 0.35em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
::selection { background: var(--champagne-soft); color: var(--navy); }
:focus-visible { outline: 2px solid var(--champagne); outline-offset: 3px; border-radius: 2px; }

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

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

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

.lead { max-width: 56ch; margin: 0 auto; color: var(--ink-soft); font-size: 1.04rem; line-height: 1.85; }
.lead-sm { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.75; max-width: 42ch; }
.lead-dark { color: rgba(255,255,255,0.75); max-width: 46ch; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 30px; border-radius: var(--radius); font-weight: 600; font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background var(--transition), color var(--transition), border-color var(--transition); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--wood); }
.btn-line { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-line:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.header.is-solid .btn-line { border-color: var(--navy); color: var(--navy); }
.header.is-solid .btn-line:hover { background: var(--navy); color: #fff; }
.btn-text { background: transparent; border: none; padding: 0; text-transform: none; letter-spacing: 0; color: rgba(255,255,255,0.9); font-size: 0.92rem; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.4); border-radius: 0; padding-bottom: 2px; transition: color var(--transition), border-color var(--transition); }
.btn-text:hover { color: var(--champagne-soft); border-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(246,240,229,0.94); backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 26px 24px; gap: 20px; }
.header-logo { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.01em; color: #fff; transition: color var(--transition); }
.header-logo span { color: var(--champagne-soft); font-style: italic; font-weight: 400; }
.header.is-solid .header-logo { color: var(--navy); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 80% center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,24,0.4) 0%, rgba(10,16,24,0.05) 30%, rgba(10,16,24,0.15) 55%, rgba(10,16,24,0.82) 100%); }
.hero-content { position: relative; z-index: 1; padding: 140px 24px 72px; max-width: 660px; }
.hero-eyebrow { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; color: var(--champagne-soft); margin-bottom: 22px; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.8vw, 3.8rem); line-height: 1.12; }
.text-gold { color: var(--champagne-soft); }
.hero-sub { max-width: 40ch; font-size: 1.02rem; line-height: 1.7; color: rgba(255,255,255,0.8); margin: 20px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 32px; }

@media (min-width: 1024px) { .hero-content { padding-left: 7vw; } }

/* ---------- Apresentação ---------- */
.intro { padding: 116px 0; }
.intro h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }

/* ---------- Números ---------- */
.numbers { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 52px 0; }
.numbers-row { display: flex; flex-wrap: wrap; gap: 30px 0; }
.number-item { display: flex; flex-direction: column; gap: 6px; flex: 1 1 40%; min-width: 140px; }
.number-item b { font-family: var(--font-display); font-size: 2.1rem; line-height: 1; color: var(--navy); font-weight: 700; }
.number-item span { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.number-line { display: none; }

@media (min-width: 900px) {
  .numbers-row { flex-wrap: nowrap; align-items: center; }
  .number-item { min-width: 0; }
  .number-line { display: block; width: 1px; height: 40px; background: var(--line); flex: none; }
}

/* ---------- Grande diferencial ---------- */
.differential { position: relative; min-height: 82vh; overflow: hidden; }
.differential-media { position: absolute; inset: 0; }
.differential-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.differential::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,20,28,0.72) 0%, rgba(15,20,28,0.3) 45%, rgba(15,20,28,0.05) 75%); }
.differential-text { position: relative; z-index: 1; min-height: 82vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 560px; color: #fff; }
.differential-text h2 { color: #fff; font-size: clamp(2rem, 3.8vw, 2.9rem); }

@media (min-width: 1024px) { .differential-text { padding-left: 7vw; } }

/* ---------- Apartamento (cards comparativos) ---------- */
.apartment { padding: 116px 0; background: var(--cream-alt); }
.apartment > .container { margin-bottom: 48px; max-width: 720px; }
.apartment h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.apartment-cards { display: grid; gap: 32px; padding: 0 24px; max-width: 1200px; margin: 0 auto; }
.apartment-card { background: var(--white); border: 1px solid var(--line); }
.apartment-card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.apartment-card-media img { width: 100%; height: 100%; object-fit: cover; }
.apartment-card-label { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--navy); margin: 24px 24px 12px; }
.apartment-card ul { list-style: none; margin: 0 24px 24px; padding-top: 12px; border-top: 1px solid var(--line); }
.apartment-card li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-soft); }
.apartment-card li:last-child { border-bottom: none; }

@media (min-width: 900px) { .apartment-cards { grid-template-columns: 1fr 1fr; } }

/* ---------- Arquitetura ---------- */
.architecture { display: flex; flex-direction: column; background: var(--navy); color: #fff; }
.architecture-media { position: relative; aspect-ratio: 4/3; }
.architecture-media img { width: 100%; height: 100%; object-fit: cover; }
.architecture-text { padding: 64px 24px; display: flex; flex-direction: column; justify-content: center; }
.architecture-text h2 { color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.7rem); max-width: 14ch; }
.architecture-text .lead-sm { color: rgba(255,255,255,0.72); }

@media (min-width: 1024px) {
  .architecture { flex-direction: row; min-height: 78vh; }
  .architecture-media { flex: 0 0 55%; aspect-ratio: auto; }
  .architecture-text { flex: 0 0 45%; padding: 0 5vw; }
}

/* ---------- Galeria mosaico ---------- */
.gallery-section { padding: 116px 0; }
.gallery-section > .container { margin-bottom: 48px; max-width: 720px; }
.gallery-section h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.gallery-mosaic { display: grid; gap: 14px; padding: 0 24px; max-width: 1320px; margin: 0 auto; grid-template-columns: repeat(2, 1fr); }
.g-item { position: relative; overflow: hidden; border: none; padding: 0; cursor: pointer; background: none; display: block; width: 100%; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s cubic-bezier(.16,1,.3,1); }
.g-item:hover img { transform: scale(1.045); }
.g-item::after { content: ""; position: absolute; inset: 0; background: rgba(16,22,31,0); transition: background var(--transition); }
.g-item:hover::after { background: rgba(16,22,31,0.08); }
.g-a { aspect-ratio: 21/9; grid-column: span 2; }
.g-b { aspect-ratio: 3/4; }
.g-d { aspect-ratio: 4/3; }
.g-e { aspect-ratio: 4/3; }
.g-f { aspect-ratio: 16/9; grid-column: span 2; }

@media (min-width: 900px) {
  .gallery-mosaic { grid-template-columns: repeat(6, 1fr); }
  .g-a { grid-column: span 6; }
  .g-b { grid-column: span 2; aspect-ratio: 3/4; }
  .g-c { grid-column: span 2; }
  .g-d { grid-column: span 2; aspect-ratio: auto; }
  .g-e { grid-column: span 3; aspect-ratio: 4/3; }
  .g-f { grid-column: span 3; aspect-ratio: auto; }
}

.lightbox { position: fixed; inset: 0; z-index: 200; display: none; flex-direction: column; background: rgba(12,18,26,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; } }

/* ---------- Lazer ---------- */
.leisure { background: var(--navy-soft); color: #fff; padding: 100px 0; }
.leisure-head { max-width: 640px; margin-bottom: 48px; }
.leisure-head h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 2.9rem); }
.leisure-flow { display: grid; gap: 40px; padding: 0 24px; max-width: 1320px; margin: 0 auto; }
.leisure-cat-label { font-family: var(--font-display); font-size: 1.4rem; color: var(--champagne-soft); margin-bottom: 12px; }
.leisure-cat ul { list-style: none; }
.leisure-cat li { font-size: 0.92rem; color: rgba(255,255,255,0.78); padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }

@media (min-width: 700px) { .leisure-flow { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Experiência ---------- */
.experience { position: relative; min-height: 60vh; overflow: hidden; }
.experience img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.experience-overlay { position: absolute; inset: 0; background: rgba(12,18,26,0.4); }
.experience-text { position: relative; z-index: 1; min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; }
.experience-text p { font-family: var(--font-display); font-style: italic; font-size: clamp(1.3rem, 2.8vw, 2rem); color: #fff; max-width: 20ch; margin: 0 auto; }

/* ---------- Localização ---------- */
.location { padding: 100px 0; }
.location h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }

/* ---------- Entrega ---------- */
.delivery { background: var(--cream-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0; }
.delivery-row { display: flex; align-items: baseline; justify-content: center; gap: 20px; text-align: center; flex-wrap: wrap; }
.delivery-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); margin: 0; }
.delivery-year { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--navy); margin: 0; }

/* ---------- Formulário ---------- */
.form-section { padding: 116px 0; }
.form-grid { display: grid; gap: 48px; }
.form-intro { max-width: 380px; }
.form-intro h2 { font-size: clamp(2rem, 3.4vw, 2.7rem); }
.lead-form { display: flex; flex-direction: column; gap: 22px; }
.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 { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.field input { background: transparent; border: none; border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 0.95rem; color: var(--navy); font-family: var(--font); }
.field input::placeholder { color: #a89877; }
.field input:focus { outline: none; border-bottom-color: var(--champagne); }
.field-error { font-size: 0.74rem; color: #9c4a3a; min-height: 1.2em; margin: 0; }
.form-microcopy { font-size: 0.78rem; line-height: 1.6; color: #8f8265; margin: 0; }

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

/* ---------- Footer ---------- */
.footer { background: var(--cream); border-top: 1px solid var(--line); padding: 52px 0 36px; }
.footer-row { display: flex; flex-direction: column; gap: 28px; justify-content: space-between; }
.footer-logo { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--navy); margin: 0; }
.footer-logo span { color: var(--champagne); font-style: italic; font-weight: 400; }
.footer-meta { font-size: 0.82rem; color: var(--ink-soft); margin: 6px 0 0; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 0.82rem; }
.footer-links a { color: var(--ink-soft); transition: color var(--transition); }
.footer-links a:hover { color: var(--navy); }
.footer-legal { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 22px; font-size: 0.74rem; color: #8f8265; }
.footer-legal p { margin: 0; }

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

/* ---------- Sticky CTA ---------- */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: rgba(22,39,58,0.97); 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; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(.16,1,.3,1), transform 0.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; } }

@media (max-width: 1023px) {
  .intro, .apartment, .gallery-section, .leisure, .location, .form-section { padding: 72px 0; }
}
