/* ===========================================================
   Charles II Royal Home by Okean — Meia Praia, Itapema
   Gessele Empreendimentos × Okean Yachts
   =========================================================== */

:root {
  --bg: #f6f3ec;
  --bg-alt: #ece5d6;
  --graphite: #1a1917;
  --graphite-soft: #2b2925;
  --carvao: #3a372f;
  --text-soft: #6d6759;
  --line: #ddd3bd;
  --sand: #cbb98d;
  --bronze: #8a6a45;
  --bronze-soft: #a68657;
  --white: #ffffff;
  --radius: 2px;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: clamp(20px, 3vw, 28px);
  --space-lg: clamp(32px, 5vw, 56px);
  --space-xl: clamp(56px, 8vw, 96px);
  --space-2xl: clamp(80px, 12vw, 140px);

  --transition: 320ms cubic-bezier(.4,0,.2,1);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Playfair 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(--graphite-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 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; color: var(--graphite); margin: 0 0 0.3em; }
.text-gold { color: var(--sand); }
p { margin: 0 0 1em; }
::selection { background: var(--sand); color: var(--graphite); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--graphite); 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; }
.container.wide { max-width: 1560px; }
.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: 600;
  color: var(--bronze); margin-bottom: var(--space-sm);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.eyebrow-dark { color: var(--sand); }
.center .eyebrow { justify-content: center; }

.lead { max-width: 52ch; color: var(--text-soft); font-size: 1.05rem; line-height: 1.8; }
.lead-dark { color: rgba(255,255,255,0.72); }
.center .lead { margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 17px 32px; border-radius: var(--radius); font-weight: 600; font-size: 0.76rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  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(--graphite); color: var(--bg); }
.btn-primary:hover { background: var(--bronze); }
.btn-white { background: var(--white); color: var(--graphite); }
.btn-white:hover { background: var(--sand); }
.btn-text {
  background: transparent; border: none; padding: 0; text-transform: none; letter-spacing: 0;
  color: var(--graphite); font-size: 0.92rem; font-weight: 500;
  border-bottom: 1px solid var(--line);
  border-radius: 0; padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}
.btn-text:hover { color: var(--bronze); border-color: var(--bronze); }
.btn-text-light { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.4); }
.btn-text-light:hover { color: var(--sand); border-color: var(--sand); }
.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,243,236,0.92); backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 24px; gap: 20px; }
.header-logo { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.02em; color: #fff; transition: color var(--transition); }
.header-logo span { color: var(--sand); }
.header.is-solid .header-logo { color: var(--graphite); }
.header.is-solid .header-logo span { color: var(--bronze); }
.header .btn-header { padding: 11px 22px; background: var(--graphite); color: var(--bg); }
.header .btn-header:hover { background: var(--bronze); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 22% 42%; }
.hero-media-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,19,17,0.42) 0%, rgba(20,19,17,0.02) 30%, rgba(20,19,17,0.1) 55%, rgba(20,19,17,0.82) 100%); }
.hero-content { position: relative; z-index: 1; padding: 140px 24px 64px; max-width: 760px; }

@media (min-width: 1024px) {
  .hero-content { padding-left: 9vw; }
}
.hero-kicker { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.28em; color: var(--sand); margin-bottom: 22px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.14; max-width: 15ch; }
.hero h1 span { display: block; }
.hero-sub { max-width: 44ch; font-size: 1.05rem; line-height: 1.65; color: rgba(255,255,255,0.8); margin: 22px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 34px; }
.hero-place { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); margin: 36px 0 0; }

/* ---------- Altura (transição) ---------- */
.height-strip { background: var(--bg); border-bottom: 1px solid var(--line); padding: 40px 0; }
.height-row { display: flex; align-items: center; gap: 32px; }
.height-number { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 0.9; color: var(--graphite); white-space: nowrap; margin: 0; }
.height-number span { font-size: 0.34em; color: var(--bronze); margin-left: 6px; }
.height-line { width: 1px; align-self: stretch; background: var(--line); flex: none; }
.height-caption { font-size: 1rem; color: var(--text-soft); max-width: 26ch; line-height: 1.5; margin: 0; }

/* ---------- Sections base ---------- */
.section { padding: var(--space-2xl) 0; }
.section-alt { background: var(--bg-alt); }
.no-pad-top { padding-top: 0; }
.no-pad-bottom { padding-bottom: 0; }

/* ---------- Conceito ---------- */
.concept-grid { display: grid; gap: var(--space-lg); }
.concept-text h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 16ch; }
.concept-media { aspect-ratio: 4/3; overflow: hidden; }
.concept-media img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 1024px) {
  .concept-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--space-xl); }
}

/* ---------- Números ---------- */
.stats { border-top: 1px solid var(--line); background: var(--bg); padding: 52px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.stat { padding: 22px 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(--graphite); font-weight: 700; }
.stat-unit { font-size: 0.95rem; color: var(--bronze); margin-left: 2px; font-family: var(--font); }
.stat span { font-size: 0.66rem; font-weight: 600; 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 26px; 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(5, 1fr); }
  .stat b { font-size: 2.3rem; }
}

/* ---------- Experiência náutica ---------- */
.nautical { position: relative; min-height: 92vh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.nautical-media { position: absolute; inset: 0; z-index: 0; }
.nautical-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.nautical-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,19,17,0.82) 0%, rgba(20,19,17,0.1) 45%, rgba(20,19,17,0.28) 100%); }
.nautical-content { position: relative; z-index: 1; padding: var(--space-2xl) 24px var(--space-xl); max-width: 640px; }
.nautical-content h2 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); }
.nautical-content .lead-dark { max-width: 46ch; margin-top: var(--space-sm); }
.nautical-content .btn-text { margin-top: var(--space-md); display: inline-block; }

@media (min-width: 1024px) { .nautical-content { padding-left: 64px; padding-right: 64px; } }

/* ---------- Galeria arquitetônica (editorial escalonada) ---------- */
.architecture-head { max-width: 620px; margin-bottom: 56px; }
.architecture-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.arch-flow { display: flex; flex-direction: column; gap: 60px; }
.arch-item { position: relative; }
.arch-frame { position: relative; overflow: hidden; }
.arch-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s cubic-bezier(.16,1,.3,1); }
.arch-frame:hover img { transform: scale(1.035); }
.arch-caption { margin-top: 14px; font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-soft); }

.arch-a .arch-frame { aspect-ratio: 21/9; }
.arch-b { display: grid; gap: 20px; }
.arch-b .arch-frame { aspect-ratio: 4/3; }
.arch-c .arch-frame { aspect-ratio: 16/9; }

@media (min-width: 900px) {
  .arch-b { grid-template-columns: 1fr 1fr; }
  .arch-b .arch-item:nth-child(2) { margin-top: 52px; }
}

/* ---------- 255 metros acima do ordinário ---------- */
.scale { position: relative; min-height: 86vh; display: flex; align-items: center; overflow: hidden; color: #fff; }
.scale-media { position: absolute; inset: 0; }
.scale-media img { width: 100%; height: 100%; object-fit: cover; object-position: 20% center; }
.scale-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,19,17,0.7) 0%, rgba(20,19,17,0.32) 45%, rgba(20,19,17,0.1) 100%); }
.scale-content { position: relative; z-index: 1; padding: 0 24px; max-width: 560px; }
.scale-content h2 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); }
.scale-content .lead-dark { max-width: 42ch; }

@media (min-width: 1024px) { .scale-content { padding-left: 64px; } }

/* ---------- Lazer ---------- */
.leisure-intro { max-width: 660px; }
.leisure-intro h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 18ch; }
.leisure-flow { margin-top: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-xl); }
.leisure-row { display: grid; gap: var(--space-lg); align-items: center; }
.leisure-label { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--bronze); display: block; margin-bottom: 14px; }
.leisure-row-text p { color: var(--text-soft); max-width: 42ch; }
.leisure-tags { list-style: none; margin: var(--space-sm) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.leisure-tags li { font-size: 0.82rem; color: var(--graphite-soft); position: relative; padding-left: 16px; }
.leisure-tags li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 1px; background: var(--bronze); }
.leisure-row-media { aspect-ratio: 4/3; overflow: hidden; }
.leisure-row-media img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 900px) {
  .leisure-row { grid-template-columns: 1fr 1.15fr; }
  .leisure-row-reverse .leisure-row-text { order: 2; }
  .leisure-row-reverse .leisure-row-media { order: 1; }
}

/* ---------- Galeria complementar ---------- */
.gallery-head { max-width: 620px; margin-bottom: 48px; }
.gallery-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.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.3s 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-c2 { grid-column: span 2; aspect-ratio: 21/9; }
.g-sq { 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-lg6 { grid-column: span 6; }
  .g-lg4 { grid-column: span 4; }
  .g-lg3 { grid-column: span 3; }
  .g-lg2 { grid-column: span 2; }
}

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

/* ---------- Residências ---------- */
.residences { padding: var(--space-2xl) 0; background: var(--bg-alt); }
.residences-grid { display: grid; gap: var(--space-lg); }
.residences-text h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 16ch; }
.residences-list { list-style: none; margin: var(--space-md) 0 0; padding: 0; border-top: 1px solid var(--line); max-width: 460px; }
.residences-list li { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; color: var(--graphite-soft); display: flex; justify-content: space-between; gap: 16px; }
.residences-list li span { color: var(--text-soft); }
.residences-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.residences-media img { width: 100%; height: 100%; object-fit: cover; }

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

/* ---------- Localização ---------- */
.location h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.location-box {
  max-width: 480px; margin: 40px 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: 14px;
}
.location-line { font-size: 0.98rem; color: var(--graphite-soft); margin: 0; }

/* ---------- Manifesto ---------- */
.manifesto { position: relative; min-height: 74vh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.manifesto-media { position: absolute; inset: 0; }
.manifesto-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.3) brightness(0.4); }
.manifesto-content { position: relative; z-index: 1; text-align: center; padding: 64px 24px; }
.manifesto-text { font-family: var(--font-display); font-weight: 600; font-style: italic; font-size: clamp(1.4rem, 3.4vw, 2.2rem); color: #fff; line-height: 1.4; margin: 0; }
.manifesto-brand { margin: 22px 0 0; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.24em; color: var(--sand); }

/* ---------- Formulário ---------- */
.form-section { background: var(--graphite); padding: var(--space-2xl) 0; color: #fff; }
.form-section h2 { color: #fff; }
.form-grid { display: grid; gap: var(--space-lg); }
.form-intro { max-width: 380px; }
.lead-form { display: flex; flex-direction: column; gap: 22px; }
.lead-form .btn-primary { background: var(--bronze); color: #fff; }
.lead-form .btn-primary:hover { background: var(--bronze-soft); }
.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.12em; color: rgba(255,255,255,0.55); }
.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(--bronze-soft); }
.field-error { font-size: 0.74rem; color: #d99a5b; min-height: 1.2em; margin: 0; }
.field-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 0.8rem; color: rgba(255,255,255,0.62); line-height: 1.5; }
.field-consent input { margin-top: 3px; accent-color: var(--bronze); }
.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; }
}

/* ---------- 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-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--graphite); margin: 0; }
.footer-logo span { color: var(--bronze); font-size: 0.85rem; }
.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); transition: color var(--transition); }
.footer-links a:hover { color: var(--graphite); }
.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 calc(14px + env(safe-area-inset-bottom)); background: rgba(26,25,23,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: 50px; height: 50px; border-radius: 50%; background: var(--graphite); color: #fff;
  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(--bronze); }
@media (max-width: 1023px) { .whatsapp-fab { bottom: calc(92px + env(safe-area-inset-bottom)); } }

/* ---------- Barra de progresso vertical (desktop) ---------- */
.scroll-progress {
  position: fixed; top: 0; right: 18px; bottom: 0; width: 2px; z-index: 70;
  background: rgba(0,0,0,0.06); display: none;
}
.scroll-progress-fill { width: 100%; height: 0%; background: var(--bronze); transition: height 60ms linear; }
@media (min-width: 1280px) { .scroll-progress { display: block; } }
@media (prefers-reduced-motion: reduce) { .scroll-progress { display: none; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1s 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: var(--space-xl) 0; }
  .form-section { padding: var(--space-xl) 0; }
  .residences { padding: var(--space-xl) 0; }
}
