/* ─────────────────────────────────────────────────────────────────
    1. VARIABLES
    ══════════════════════════════════════════════════════════════
    SISTEMA DE 3 TOKENS — para cambiar la identidad de un edificio
    solo modificar estas 3 variables en :root:

      --base:      fondo oscuro del hero, loader y overlays
      --surface-0: fondo claro dominante de todas las paginas
      --accent:    color unico del edificio

    Ejemplo nuevo edificio:
      --base:      #0A0A0A;
      --surface-0: #FAFAF8;
      --accent:    #8AADBE;  <- solo esta linea cambia

    Todo lo demas se deriva automaticamente.
    ══════════════════════════════════════════════════════════════ */
:root {

  /* ══ TOKENS MAESTROS — UNICO LUGAR PARA EDITAR ══ */
  --base: #0A0A0A;
  --surface-0: #FAFAF8;
  --accent: #C4B49A;

  /* ── Derivados del acento (no tocar) ── */
  --accent-dim: color-mix(in srgb, var(--accent) 55%, transparent);
  --accent-faint: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-faint2: color-mix(in srgb, var(--accent) 22%, transparent);
  --accent-faint3: color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 28%, transparent);
  --accent-border2: color-mix(in srgb, var(--accent) 50%, transparent);
  --accent-stroke: color-mix(in srgb, var(--accent) 75%, transparent);
  --accent-strong: color-mix(in srgb, var(--accent) 90%, #000 10%);
  --accent-ui-border: color-mix(in srgb, var(--accent) 85%, #000 15%);

  /* ── Escala oscura del acento (cards + botones primarios) ── */
  --accent-btn:        color-mix(in srgb, var(--accent) 24%, #000 76%); /* #2E2B27 botón primario    */
  --accent-btn-hover:  color-mix(in srgb, var(--accent) 33%, #000 67%); /* #3D3A35 hover botón       */
  --accent-ink-1:      color-mix(in srgb, var(--accent) 46%, #000 54%); /* var(--accent-ink-1) texto medio       */
  --accent-ink-2:      color-mix(in srgb, var(--accent) 64%, #000 36%); /* var(--accent-ink-2) texto suave       */
  --accent-ink-3:      color-mix(in srgb, var(--accent) 84%, #000 16%); /* var(--accent-ink-3) texto sutil       */
  --accent-ink-4:      color-mix(in srgb, var(--accent) 94%, #000 6%);  /* var(--accent-ink-4) texto muy suave   */

  /* ── Aliases heredados (apuntan a los tokens, no modificar) ── */
  --h-gold: var(--accent);
  --h-dark: var(--base);
  --h-white: #F5F5F3;
  --h-dim: rgba(245, 245, 243, .55);
  --h-border: rgba(255, 255, 255, .09);

  /* Paleta clara dominante */
  --bg: var(--surface-0);
  --surface: #FFFFFF;
  --surface2: #F2F2F0;
  --ink: #111111;
  --ink2: #555555;
  --ink3: #A8A8A6;
  --line: #E0E0DC;

  /* Gris texturado — menú y páginas dark */
  --grey-base: #252523;
  --grey-light: #2E2E2C;
  --grey-mid: #3A3A38;

  /* Menú lateral — White Studio */
  --menu-bg: #ffffff;
  --menu-text: #111111;
  --menu-dim: #6b6b69;
  --menu-line: #ebebе8;

  /* Textura grain — fondo para páginas dark y menú */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");

  /* Easings */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.45, 0, 0.55, 1);
  --menu-panel-width: min(280px, 82vw);
  --app-height: 100dvh;
  --fixed-controls-safe-top: calc(22px + env(safe-area-inset-top) + 42px + 14px);
  /* ui-btn vars — FUENTE CANÓNICA: estas son las únicas definiciones.
     Las referencias con fallback (var(--ui-btn-size, 42px)) en secciones anteriores
     al layout de controles fijos son intencionales y resuelven al mismo valor. */
  --ui-btn-size: 42px;
  --ui-btn-gap: 10px;
  --ui-btn-edge: 22px;
  --ui-btn-top: calc(22px + env(safe-area-inset-top));
  --ui-btn-bottom: calc(14px + env(safe-area-inset-bottom));
  --ui-btn-bg: rgba(240, 240, 238, .92);
  --ui-btn-border: rgba(0, 0, 0, .10);
  --ui-btn-color: rgba(26, 26, 24, .80);

  /*
    Breakpoints usados en @media (referencia; los valores en queries deben coincidir):
    480px · 500px · 599px · 600px · 760 / 761px · 899px · 900px · 1000px
  */
  /*
    Escala z-index (de menor a mayor; solo referencia):
    1-10 .page y overlays internos · 2000 menuOverlay · 2500 sideMenu ·
    3300 chrome fijo (menu hamb / fs / qr / r360-fab) ·
    3340 r360-now-badge · 3380 r360-drawer (panel flotante o sheet; encima del chrome) ·
    9000+ modales y QR · 99998 loader
  */
  --z-r360-drawer: 3380;
  --menu-header-height: 130px;
}

/* ─────────────────────────────────────────────────────────────────
    2. RESET
───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow: hidden;
  height: 100%;
}

body {
  background: var(--h-dark);
  font-family: 'DM Sans', 'Barlow', sans-serif;
  font-weight: 300;
  overflow: hidden;
  height: 100%;
  min-height: var(--app-height);
  cursor: auto;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

@media (pointer: coarse) {
  body {
    cursor: none !important;
  }

  #cur {
    display: none !important;
  }
}

/* Touch devices en portrait: habilitar pan horizontal para sección Pisos */
@media (hover: none) and (orientation: portrait),
(pointer: coarse) and (orientation: portrait) {
  html {
    touch-action: pan-x pan-y !important;
  }

  .modal-canvas,
  #r360IframeWrap {
    touch-action: auto !important;
  }
}

@media (max-width: 760px) {
  html {
    touch-action: pan-x pan-y !important;
  }

  .modal-canvas,
  #r360IframeWrap {
    touch-action: auto !important;
  }
}

/* ─────────────────────────────────────────────────────────────────
    3. KEYFRAMES
───────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes lineGrow {
  from {
    height: 0;
  }

  to {
    height: 64px;
  }
}

@keyframes grain {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-1%, -1%);
  }

  50% {
    transform: translate(1%, -1%);
  }

  75% {
    transform: translate(-1%, 1%);
  }
}

@keyframes pageIn {
  from {
    opacity: 1;
  }

  to {
    opacity: 1;
  }
}

@keyframes pageOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(.98) translateY(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(.99) translateY(4px);
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-100%) skewX(-15deg);
  }

  to {
    transform: translateX(220%) skewX(-15deg);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes loaderPulse {

  0%,
  100% {
    opacity: .85;
  }

  50% {
    opacity: .3;
  }
}

@keyframes pulseDot {

  0%,
  100% {
    transform: scale(1);
    opacity: .8;
  }

  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

@keyframes rotatePhone {

  0%,
  100% {
    transform: rotate(0deg);
  }

  40%,
  60% {
    transform: rotate(90deg);
  }
}

@keyframes r360LogoPulse {

  0%,
  100% {
    opacity: .7;
    transform: scale(1);
  }

  50% {
    opacity: .2;
    transform: scale(.97);
  }
}

@keyframes r360Spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes navSwipePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .0), inset 8px 0 12px rgba(255, 255, 255, .08), inset -8px 0 12px rgba(255, 255, 255, .08);
  }

  40% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .0), inset 14px 0 18px rgba(255, 255, 255, .14), inset -14px 0 18px rgba(255, 255, 255, .14);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .0), inset 8px 0 12px rgba(255, 255, 255, .0), inset -8px 0 12px rgba(255, 255, 255, .0);
  }
}

@keyframes titleBlurIn {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes logoIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────────────────────────
    4. UTILIDADES
───────────────────────────────────────────────────────────────── */

/* Solo lectores de pantalla / título principal sin duplicar diseño */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scroll reveal */
.sr {
  opacity: 1;
}

.sr.in {
  opacity: 1;
}

.sr-left {
  opacity: 1;
}

.sr-left.in {
  opacity: 1;
}

.sr-right {
  opacity: 1;
}

.sr-right.in {
  opacity: 1;
}

.d1 {
  transition-delay: .07s;
}

.d2 {
  transition-delay: .14s;
}

.d3 {
  transition-delay: .21s;
}

.d4 {
  transition-delay: .28s;
}

.d5 {
  transition-delay: .35s;
}

/* Eyebrow / títulos comunes */
.eyebrow {
  font-size: .68rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 6px;
}

.section-lead {
  max-width: 760px;
  font-size: .86rem;
  line-height: 1.8;
  color: var(--ink2);
  margin-bottom: 28px;
}

/* Flecha animada en botones */
.arrow {
  display: inline-block;
  transition: transform .3s var(--ease);
  font-style: normal;
}

