/* ============================================================================
   ReelEstate — sistema de diseño (oct 2026)
   Blanco y negro como el logo; el color lo ponen las fotos y los videos.
   Oscuro por defecto, claro a elección (data-theme en <html>, ver prefs.js).
   Lo usan la landing y las páginas legales; la app lo adopta pantalla por
   pantalla. El showroom público sigue con tokens.css hasta que se decida.
   ========================================================================= */

:root, [data-theme="dark"] {
  --paper:   #0c0c0d;
  --paper-2: #141416;
  --paper-3: #1c1c1f;
  --card:    #121214;
  --ink:     #f2f2ed;
  --ink-2:   #a9a9a3;
  --ink-3:   #6e6e72;
  --line:    #232326;
  --line-2:  #333337;
  --btn:     #f2f2ed;
  --btn-ink: #0b0b0c;
  --nav-bg:  rgba(12, 12, 13, .78);
  --shadow:  0 1px 2px rgba(0, 0, 0, .5), 0 34px 80px -30px rgba(0, 0, 0, .9);
  color-scheme: dark;
}
[data-theme="light"] {
  --paper:   #ffffff;
  --paper-2: #f6f6f4;
  --paper-3: #eeeeeb;
  --card:    #ffffff;
  --ink:     #0b0b0c;
  --ink-2:   #505055;
  --ink-3:   #8e8e94;
  --line:    #e8e8e5;
  --line-2:  #d5d5d1;
  --btn:     #0b0b0c;
  --btn-ink: #ffffff;
  --nav-bg:  rgba(255, 255, 255, .82);
  --shadow:  0 1px 2px rgba(0, 0, 0, .04), 0 28px 64px -28px rgba(0, 0, 0, .25);
  color-scheme: light;
}
/* Siempre oscuro, sea cual sea el tema (la franja de cine). */
.dark {
  --paper: #0c0c0d; --paper-2: #141416; --paper-3: #1c1c1f; --card: #121214;
  --ink: #f2f2ed; --ink-2: #a9a9a3; --ink-3: #6e6e72; --line: #232326; --line-2: #333337;
  --btn: #f2f2ed; --btn-ink: #0b0b0c;
}
:root {
  --ok:   #16a34a;
  --hold: #d99a00;
  --sold: #e5484d;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1200px;
  --gut:  24px;
  --r:    14px;
}
@media (max-width: 600px) { :root { --gut: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
h1 { font-size: clamp(40px, 6.4vw, 84px); line-height: .98; letter-spacing: -.048em; }
h2 { font-size: clamp(30px, 3.7vw, 48px); line-height: 1.04; letter-spacing: -.04em; }
h3 { font-size: 18px; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); position: relative; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.dim { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logo: el SVG como máscara, así toma el color del texto en los dos temas. */
.logo {
  display: block;
  height: 24px;
  aspect-ratio: 1082 / 229;
  background: currentColor;
  -webkit-mask: url("/assets/brand/logo.svg") no-repeat center / contain;
          mask: url("/assets/brand/logo.svg") no-repeat center / contain;
}
.mark {
  display: block;
  width: 22px; height: 22px;
  background: currentColor;
  -webkit-mask: url("/assets/brand/mark.svg") no-repeat center / contain;
          mask: url("/assets/brand/mark.svg") no-repeat center / contain;
}

/* ---------------------------------------------------------------- botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .15s, background .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.icon-btn:hover { border-color: var(--ink-3); }
.icon-btn svg { width: 16px; height: 16px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 600;
  color: var(--ink-2); white-space: nowrap;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

/* ---------------------------------------------------------------- tema */
.theme-btn .sun { display: none; }
[data-theme="light"] .theme-btn .sun { display: block; }
[data-theme="light"] .theme-btn .moon { display: none; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.nav-links { display: flex; gap: 26px; margin: 0 auto; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.burger { display: none; }

.lang { position: relative; }
.lang-btn { width: auto; padding: 0 12px; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  display: none; z-index: 60;
}
.lang.open .lang-menu { display: block; }
.lang-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; }
.lang-menu a:hover { background: var(--paper-2); }
.lang-menu a[aria-current="true"]::after { content: "✓"; font-weight: 700; }

.sheet {
  display: none; position: fixed; inset: 68px 0 auto 0; z-index: 49;
  background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gut) 20px;
}
.sheet a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 600; }
.sheet .row { display: flex; gap: 8px; margin-top: 16px; }
.sheet .row .btn { flex: 1; }
body.menu-open .sheet { display: block; }
.sheet a.btn { display: inline-flex; padding: 0 20px; font-size: 15px; border-bottom: 0; }
.sheet a.btn-ghost { border: 1px solid var(--line-2); }
.sheet .prefs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.sheet .sheet-lang { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet .sheet-lang a, .sheet .prefs .btn { display: inline-flex; padding: 0 12px; height: 34px; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13.5px; font-weight: 600; }
.sheet .sheet-lang a[aria-current="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.sheet .prefs .theme-btn svg { width: 16px; height: 16px; }

@media (max-width: 600px) { .nav-cta .lang, .nav-cta .theme-btn { display: none; } }
@media (max-width: 960px) {
  .nav-links, .nav-cta .hide-m { display: none; }
  .burger { display: inline-flex; }
  .nav .wrap { justify-content: space-between; }
  .logo { height: 20px; }
}

/* Tarjeta de idioma (primera visita) */
.lang-ask {
  position: fixed; right: 16px; bottom: 16px; z-index: 80; width: min(340px, calc(100vw - 32px));
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px;
  animation: rise .35s cubic-bezier(.2, .7, .2, 1);
}
.lang-ask b { font-size: 15px; letter-spacing: -.01em; padding-right: 28px; }
.lang-ask .opts { display: flex; flex-direction: column; gap: 6px; }
.lang-ask .opts button {
  display: flex; justify-content: space-between; align-items: center; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 600;
}
.lang-ask .opts button:hover { border-color: var(--ink-3); }
.lang-ask .opts button.sug { border-color: var(--ink); }
.lang-ask .opts small { font-weight: 500; color: var(--ink-3); font-size: 12px; }
.lang-ask .x { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%; color: var(--ink-3); font-size: 18px; line-height: 1; }
.lang-ask .x:hover { background: var(--paper-2); color: var(--ink); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- footer */
footer.foot { border-top: 1px solid var(--line); padding: 48px 0 0; position: relative; overflow: hidden; }
.fcols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; font-size: 14px; }
.fcols b { display: block; margin-bottom: 12px; font-size: 13px; }
.fcols a { display: block; color: var(--ink-2); margin-bottom: 8px; }
.fcols a:hover { color: var(--ink); }
.fcols .mono { margin-top: 14px; display: block; }
.giant {
  font-weight: 700; letter-spacing: -.06em; line-height: .8; font-size: clamp(56px, 17vw, 226px);
  color: var(--paper-3); white-space: nowrap; margin-top: 64px; text-align: center; user-select: none;
}
.legal-row { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 16px 0 22px; margin-top: -6px; }
@media (max-width: 760px) { .fcols { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
