/* ==========================================================================
   CasaBridge — Design System
   Paleta oscura + dorado, tipografía editorial, animaciones sutiles.
   ========================================================================== */

:root {
  --bg: #0a0a0c;
  --bg-alt: #111319;
  --surface: #15171d;
  --surface-2: #1b1e26;
  --border: rgba(201, 162, 39, 0.22);
  --border-strong: rgba(201, 162, 39, 0.45);
  --gold: #c9a227;
  --gold-light: #e8ca6c;
  --gold-dim: rgba(201, 162, 39, 0.12);
  --text: #f2ede1;
  --text-muted: #a39d8f;
  --text-dim: #6f6a5f;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

/* ---------- Background ambience ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(201,162,39,0.08), transparent 60%),
    radial-gradient(500px circle at 85% 40%, rgba(201,162,39,0.06), transparent 60%);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 26px 0;
  transition: all 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 16px 0;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}
.brand span { color: var(--gold); }
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  font-size: 14px;
}
.nav-links a {
  color: var(--text-muted);
  transition: color 0.25s;
  position: relative;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-toggle { display: none; }

/* ---------- Selector de idioma ---------- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}
.lang-switch button {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
  line-height: 1;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active {
  background: var(--gold);
  color: #1a1305;
}
@media (max-width: 820px) {
  .lang-switch { margin-left: 0; margin-top: 8px; }
}

@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 78%;
    max-width: 320px;
    background: var(--bg-alt);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    border-left: 1px solid var(--border);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 40px; height: 40px;
    color: var(--text);
    font-size: 18px;
    z-index: 110;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17140a;
  box-shadow: 0 8px 26px rgba(201, 162, 39, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(201, 162, 39, 0.38);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
}
.btn-block { width: 100%; }

/* ---------- Hero (shared) ---------- */
.hero {
  position: relative;
  padding: 180px 0 120px;
  z-index: 1;
}
.hero-tag {
  color: var(--gold-light);
}
.hero h1 {
  font-size: clamp(38px, 5.5vw, 68px);
  max-width: 900px;
}
.hero .lede {
  font-size: 19px;
  max-width: 620px;
  margin-bottom: 36px;
}

/* ---------- Split hero (home) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 64px;
}
.split-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, transform 0.35s var(--ease);
}
.split-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(201,162,39,0.10), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.split-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}
.split-card:hover::before { opacity: 1; }
.split-card h3 { font-size: 26px; margin-bottom: 12px; }
.split-card .tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  margin-bottom: 14px;
  display: block;
}
.split-card ul { margin: 20px 0 28px; padding: 0; list-style: none; }
.split-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
}
.split-card li::before { content: '—'; color: var(--gold); }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
section { position: relative; z-index: 1; padding: 100px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); }

/* ---------- Steps / process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.step .num {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  color: var(--gold);
  margin-bottom: 14px;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.stat { text-align: center; }
.stat .value {
  font-family: 'Playfair Display', serif;
  font-size: 44px;
  color: var(--gold-light);
}
.stat .label {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
@media (max-width: 820px) { .stats { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
}
.checkbox-field input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--gold);
  cursor: pointer;
}
.checkbox-field a { color: var(--gold-light); text-decoration: underline; }
.checkbox-field a:hover { color: var(--gold); }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.field textarea { resize: vertical; min-height: 100px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .row-2 { grid-template-columns: 1fr; } }
.form-note { font-size: 12.5px; color: var(--text-dim); margin-top: 14px; }

/* ---------- Pricing ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.plan:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.plan.featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201,162,39,0.08), var(--surface) 40%);
  position: relative;
}
.plan.featured::after {
  content: 'Más popular';
  position: absolute;
  top: -13px; left: 30px;
  background: var(--gold);
  color: #17140a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.plan h3 { font-size: 20px; margin-bottom: 4px; }
.plan .price {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  color: var(--gold-light);
  margin: 14px 0 4px;
}
.plan .price span { font-size: 14px; color: var(--text-dim); font-family: 'Inter', sans-serif; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 28px; flex: 1; }
.plan li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.plan li:first-child { border-top: none; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }

/* ---------- Guarantee strip ---------- */
.guarantees {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.guarantee {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}
.guarantee .icon { font-size: 26px; color: var(--gold); margin-bottom: 10px; }
.guarantee h4 { font-size: 15px; margin-bottom: 6px; }
.guarantee p { font-size: 13.5px; margin: 0; }
@media (max-width: 820px) { .guarantees { grid-template-columns: 1fr; } }

/* ---------- CTA banner ---------- */
.cta-banner {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 56px;
  text-align: center;
  background: radial-gradient(600px circle at 50% 0%, rgba(201,162,39,0.10), var(--surface) 70%);
}
.cta-banner h2 { margin-bottom: 14px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 36px;
  position: relative;
  z-index: 1;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 36px;
}
.footer-links { display: flex; gap: 28px; font-size: 14px; color: var(--text-muted); flex-wrap: wrap; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom {
  font-size: 12.5px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* ---------- Thank-you page ---------- */
.confirm {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 180px 0 100px;
}
.confirm .mark {
  width: 68px; height: 68px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px;
  font-size: 28px;
  color: var(--gold-light);
  animation: pop 0.6s var(--ease);
}
@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.muted { color: var(--text-dim); }
.mt-24 { margin-top: 24px; }
.badge {
  display: inline-block;
  font-size: 12px;
  color: var(--gold-light);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
}
