/* ========================================
   REIS — Real Estate Investment Strategies
   José R. Andrades · Lic. C-15411
   ======================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  --bg: #0a0a0c;
  --bg-2: #111114;
  --bg-3: #16161b;
  --bg-card: #1a1a1f;
  --ink: #f5f5f7;
  --ink-soft: #c8c8d0;
  --ink-dim: #8a8a92;
  --ink-faint: #45454d;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --accent: #1A3FF0;
  --accent-light: #4865ff;
  --accent-glow: rgba(26,63,240,0.4);
  --accent-soft: rgba(26,63,240,0.08);
  --whatsapp: #25D366;

  --display: 'Fraunces', 'Times New Roman', serif;
  --body: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', 'SF Mono', monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
}

@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor, .cursor-dot { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

::selection { background: var(--accent); color: white; }

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

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

button {
  font-family: inherit;
  cursor: none;
  background: none;
  border: none;
  color: inherit;
}

/* ---------- GRAIN OVERLAY ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- CUSTOM CURSOR ---------- */
.cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, background .25s, border-color .25s;
  mix-blend-mode: difference;
  top: 0; left: 0;
}

.cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  top: 0; left: 0;
}

.cursor.hover {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-color: var(--accent);
  mix-blend-mode: normal;
}

/* ---------- NAVIGATION ---------- */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all .4s var(--ease);
  backdrop-filter: blur(0px);
}

nav.site-nav.scrolled {
  padding: 18px 48px;
  backdrop-filter: blur(20px);
  background: rgba(10,10,12,0.75);
  border-bottom: 1px solid var(--line);
}

nav .logo-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

nav .logo-block img {
  height: 26px;
  width: auto;
  filter: invert(1);
}

nav .logo-block .lic {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

nav ul.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

nav ul.nav-links a {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color .3s;
}

nav ul.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .4s var(--ease);
}

nav ul.nav-links a:hover::after,
nav ul.nav-links a.active::after {
  width: 100%;
}

nav ul.nav-links a.active {
  color: var(--accent-light);
}

nav .nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ---------- LANGUAGE TOGGLE ---------- */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}

.lang-toggle button {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-dim);
  transition: all .3s;
  letter-spacing: 0.1em;
}

.lang-toggle button.active {
  background: var(--ink);
  color: var(--bg);
}

.lang-toggle button:hover:not(.active) {
  color: var(--ink);
}

/* ---------- MOBILE NAV ---------- */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: all .3s var(--ease);
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 40px;
  transform: translateY(-100%);
  transition: transform .6s var(--ease);
}

.mobile-nav.open {
  transform: translateY(0);
}

.mobile-nav a {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -0.02em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color .3s, padding .3s var(--ease);
}

.mobile-nav a:hover {
  color: var(--accent-light);
  padding-left: 12px;
}

.mobile-nav a span.num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.2em;
}

@media (max-width: 900px) {
  nav.site-nav { padding: 18px 24px; }
  nav.site-nav.scrolled { padding: 14px 24px; }
  nav ul.nav-links { display: none; }
  .menu-toggle { display: flex; }
  .lang-toggle button { padding: 5px 10px; font-size: 10px; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all .4s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .6s, height .6s;
}

.btn-primary:hover::before { width: 500px; height: 500px; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--ink);
}

.btn .arrow {
  display: inline-block;
  transition: transform .4s var(--ease);
}

.btn:hover .arrow { transform: translateX(4px); }

/* ---------- SECTION COMMON ---------- */
section {
  position: relative;
  padding: 140px 48px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.container-narrow {
  max-width: 980px;
  margin: 0 auto;
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.section-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.section-title em {
  font-style: italic;
  color: var(--accent-light);
}

@media (max-width: 768px) {
  section { padding: 80px 24px; }
}

/* ---------- FOOTER ---------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 80px 48px 32px;
  background: var(--bg-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto 60px;
}

.footer-brand img {
  height: 36px;
  filter: invert(1);
  margin-bottom: 20px;
}

.footer-brand p {
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: 16px;
}

.footer-brand .lic-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 500;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 11px; }

.footer-col ul a {
  font-size: 13px;
  transition: color .3s;
}

.footer-col ul a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  footer.site-footer {
    padding: 60px 24px 24px;
  }
}

/* ---------- WHATSAPP / CALL FLOAT ---------- */
.float-call {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 32px var(--accent-glow), 0 4px 12px rgba(0,0,0,0.4);
  transition: transform .3s var(--ease);
  position: relative;
}

.float-btn:hover {
  transform: scale(1.08) translateY(-2px);
}

.float-btn.whatsapp {
  background: var(--whatsapp);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.4), 0 4px 12px rgba(0,0,0,0.4);
}

.float-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.float-btn::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.3;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.4; }
  100% { transform: scale(1.4); opacity: 0; }
}

@media (max-width: 768px) {
  .float-call {
    bottom: 20px;
    right: 20px;
  }
  .float-btn {
    width: 52px;
    height: 52px;
  }
}

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }

@keyframes rise {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ---------- LANG TOGGLE (CONTENT) ---------- */
/* Higher specificity to override component CSS like .pc-label { display: block } */
/* Default (no class on body) = English */
body [data-en] { display: inline; }
body [data-es] { display: none; }

/* When body has .is-es: show Spanish, hide English */
body.is-es [data-es] { display: inline; }
body.is-es [data-en] { display: none; }

/* Block-level variants */
body [data-en-block] { display: block; }
body [data-es-block] { display: none; }
body.is-es [data-es-block] { display: block; }
body.is-es [data-en-block] { display: none; }

/* CRITICAL: certain elements need their parent class's display value preserved */
/* The .pc-label class wants display: block, and lang-toggled spans should ALSO be block when visible */
.sb-price-card .pc-label[data-en],
.sb-price-card .pc-label[data-es],
.lic-label[data-en],
.lic-label[data-es] {
  display: none;
}
.sb-price-card .pc-label[data-en],
.lic-label[data-en] {
  display: block;
}
body.is-es .sb-price-card .pc-label[data-en],
body.is-es .lic-label[data-en] {
  display: none;
}
body.is-es .sb-price-card .pc-label[data-es],
body.is-es .lic-label[data-es] {
  display: block;
}
