/* =========================================================
   Estanzy · Tu estancia, con un toque
   Estilo "galería oscura" + animaciones e interacción
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --color-obsidian: #000000;
  --color-graphite: #0e0e0e;
  --color-carbon: #1d1d1f;
  --gradient-carbon: linear-gradient(#1d1d1f, #000000 288px);
  --color-steel: #333336;
  --color-slate: #6e6e73;
  --color-ash: #86868b;
  --color-porcelain: #f5f5f7;
  --color-white: #ffffff;
  --color-apple-blue: #0071e3;
  --color-electric-link: #2997ff;
  --color-cobalt-link: #0066cc;
  --color-copper-new: #b64400;
  --color-optical-yellow: #ffd500;

  --font-sf-pro-text: Inter, 'SF Pro Text', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-sf-pro-display: Inter, 'SF Pro Display', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-obsidian);
  color: var(--color-porcelain);
  font-family: var(--font-sf-pro-text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--color-electric-link); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: block; max-width: 100%; }
button { font: inherit; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---------- Tipografía ---------- */
.display {
  font-family: var(--font-sf-pro-display);
  font-weight: 600;
  font-size: 80px;
  line-height: 84px;
  letter-spacing: -1.2px;
}
.display-md {
  font-family: var(--font-sf-pro-display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.12px;
}
.product-label {
  font-family: var(--font-sf-pro-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 36px;
  letter-spacing: 0.128px;
  margin-top: 8px;
}
.eyebrow {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  color: var(--color-ash);
}
.lead {
  font-size: 19px;
  line-height: 1.42;
  letter-spacing: 0.228px;
  color: var(--color-ash);
}

/* ---------- Animaciones de entrada (hero) ---------- */
@keyframes rise {
  from { opacity: 0; translate: 0 36px; }
  to   { opacity: 1; translate: 0 0; }
}
.hero-anim {
  animation: rise 1s var(--ease) both;
  animation-delay: calc(var(--d) * 150ms + 150ms);
}

/* ---------- Revelado al hacer scroll ---------- */
.reveal { opacity: 0; }
.reveal.in {
  opacity: 1;
  animation: rise 1s var(--ease) var(--delay, 0ms) both;
}

/* ---------- Barra de progreso ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-porcelain);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 50;
}

/* ---------- Navegación global (44px) ---------- */
.global-nav {
  height: 44px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}
.logo {
  color: var(--color-porcelain);
  font-family: var(--font-sf-pro-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.2px;
}
.logo:hover { text-decoration: none; }
.nav-links { list-style: none; display: flex; gap: 26px; }
.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  position: relative;
  transition: color .3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--color-porcelain);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: #fff; text-decoration: none; }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* Botón hamburguesa (solo móvil) */
.menu-btn {
  display: none;
  width: 28px;
  height: 28px;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.menu-btn span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-porcelain);
  transition: transform .4s var(--ease), opacity .3s;
}
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Banner de anuncio (72px) ---------- */
.announce {
  height: 72px;
  background: var(--color-carbon);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 22px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.224px;
  color: var(--color-porcelain);
}
.announce a { color: var(--color-electric-link); }

/* ---------- Botones y controles ---------- */
.btn-buy {
  display: inline-block;
  background: var(--color-apple-blue);
  color: #fff;
  font-family: var(--font-sf-pro-text);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  border-radius: 170px;
  padding: 7px 14px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform .35s var(--ease), background-color .3s;
}
.btn-buy:hover { background: #0077ed; text-decoration: none; }
.btn-buy:active { scale: .97; }
.btn-buy.btn-lg {
  font-size: 17px;
  line-height: 20px;
  letter-spacing: -0.374px;
  padding: 12px 28px;
}
.btn-outline {
  display: inline-block;
  color: var(--color-porcelain);
  border: 1px solid var(--color-slate);
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  padding: 7px 14px;
  text-decoration: none;
  transition: transform .35s var(--ease), border-color .3s, background-color .3s;
}
.btn-outline:hover {
  border-color: var(--color-porcelain);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}
.capsule {
  display: inline-block;
  background: rgba(66, 66, 69, 0.72);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 36px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  padding: 9px 16px;
}

/* Botón flotante de demo */
.float-cta {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  padding: 10px 18px;
  font-size: 14px;
  opacity: 0;
  translate: 0 20px;
  pointer-events: none;
  transition: opacity .45s var(--ease), translate .45s var(--ease), background-color .3s;
  box-shadow: none;
}
.float-cta.show {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 22px 96px;
}
.hero-art {
  width: min(420px, 88vw);
  margin-bottom: 8px;
  perspective: 900px;
}
.tilt {
  transform-style: preserve-3d;
  transition: transform .6s var(--ease);
  will-change: transform;
}
.float { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
.nfc-arc {
  animation: nfcPulse 2.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes nfcPulse {
  0%, 100% { opacity: .15; }
  50%      { opacity: 1; }
}

.hero .display { margin-top: 10px; }
.hero-sub {
  margin-top: 16px;
  font-family: var(--font-sf-pro-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.19;
  letter-spacing: 0.231px;
  color: var(--color-ash);
}
.purchase {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 32px;
}

/* Indicador de scroll */
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  width: 22px;
  height: 36px;
  margin-left: -11px;
  border: 1px solid var(--color-slate);
  border-radius: 20px;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 6px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--color-porcelain);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ---------- Secciones ---------- */
.section { padding: 120px 0; }
.band { background: var(--gradient-carbon); padding: 120px 0; }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head.spaced { margin-top: 120px; }
.section-head .display-md { margin-top: 10px; }

.about p {
  max-width: 720px;
  margin: 20px auto 0;
  font-size: 19px;
  line-height: 1.42;
  letter-spacing: 0.228px;
  color: var(--color-ash);
}
.about p strong { color: var(--color-porcelain); font-weight: 600; }

/* ---------- Tarjetas y tiles ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card {
  background: var(--color-carbon);
  border-radius: 28px;
  padding: 40px;
  border: 1px solid transparent;
  transition: transform .5s var(--ease), border-color .4s;
}
.card:hover { border-color: var(--color-steel); transform: translateY(-4px); }
.card h3,
.tile h3 {
  font-family: var(--font-sf-pro-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 28px;
  letter-spacing: 0.196px;
  margin-bottom: 16px;
}
.card p,
.tile p {
  color: var(--color-ash);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip {
  border: 1px solid var(--color-slate);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  color: var(--color-porcelain);
  cursor: default;
  transition: background-color .3s, color .3s, transform .3s var(--ease);
}
.chip:hover {
  background: var(--color-porcelain);
  color: #000;
  transform: translateY(-2px);
}

/* Mock del panel de control (interactivo) */
.ui {
  background: #000;
  border: 1px solid var(--color-steel);
  border-radius: 20px;
  padding: 8px;
  margin-top: 24px;
}
.ui-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.29;
  letter-spacing: -0.224px;
  color: var(--color-porcelain);
}
.ui-row + .ui-row,
.ui-btn { border-top: 1px solid var(--color-carbon); }
.ui-row > span:last-child { color: var(--color-ash); text-align: right; }
.ui-btn {
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  cursor: pointer;
  text-align: left;
  border-radius: 14px;
  transition: background-color .3s;
}
.ui-btn:hover { background: var(--color-graphite); }
.ui-btn > span:last-child { color: var(--color-electric-link); }
.ui-btn.flash { animation: flashRow .6s var(--ease); }
@keyframes flashRow {
  from { background: rgba(255, 255, 255, .12); }
  to   { background: transparent; }
}
.ui-status {
  padding: 12px 16px 14px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  color: var(--color-ash);
  min-height: 42px;
}
.ui-status.busy { color: var(--color-porcelain); }

.dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #30d158;
  margin-right: 8px;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, .6); }
  50%      { box-shadow: 0 0 0 6px rgba(48, 209, 88, 0); }
}

/* Tiles negros */
.tile {
  background: var(--color-obsidian);
  border-radius: 28px;
  padding: 32px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid transparent;
  transition: transform .5s var(--ease), border-color .4s;
}
.tile:hover {
  transform: translateY(-6px);
  border-color: var(--color-steel);
}
.tile h3 {
  font-size: 21px;
  line-height: 1.19;
  letter-spacing: 0.231px;
  margin: 24px 0 8px;
}
.tile p { font-size: 14px; line-height: 1.29; letter-spacing: -0.224px; }
.tile .icon {
  font-size: 28px;
  line-height: 1;
  display: inline-block;
  transition: transform .5s var(--ease);
}
.tile:hover .icon { transform: scale(1.2) rotate(-6deg); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Métricas */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-tile {
  background: var(--color-obsidian);
  border-radius: 28px;
  padding: 40px 32px;
  border: 1px solid transparent;
  transition: transform .5s var(--ease), border-color .4s;
}
.stat-tile:hover { transform: translateY(-6px); border-color: var(--color-steel); }
.stat-tile .big {
  font-family: var(--font-sf-pro-display);
  font-weight: 600;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.84px;
  font-variant-numeric: tabular-nums;
}
.stat-tile p {
  margin-top: 12px;
  color: var(--color-ash);
  font-size: 14px;
  line-height: 1.29;
  letter-spacing: -0.224px;
}

/* ---------- Demo interactiva "Pruébalo" ---------- */
.demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.demo-copy .display-md { margin-top: 10px; }
.demo-copy .lead { margin: 16px 0 32px; max-width: 440px; }
.demo-hint {
  margin-top: 16px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  color: var(--color-ash);
}

.tap-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-porcelain);
  color: #000;
  border: 0;
  border-radius: 170px;
  padding: 16px 32px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.374px;
  cursor: pointer;
  transition: transform .35s var(--ease), background-color .3s;
}
.tap-btn:hover { background: #fff; }
.tap-btn:active { scale: .97; }
.tap-btn .tap-label { position: relative; }
.ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-porcelain);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}
.tap-btn.is-active .ring { animation: ring 1.6s var(--ease) infinite; }
.tap-btn.is-active .ring:nth-child(2) { animation-delay: .5s; }
.tap-btn.is-active .ring:nth-child(3) { animation-delay: 1s; }
@keyframes ring {
  from { opacity: .8; transform: scale(1); }
  to   { opacity: 0;  transform: scale(1.9); }
}

.phone-wrap { display: flex; justify-content: center; }
.phone {
  position: relative;
  width: min(300px, 80vw);
  height: 560px;
  border-radius: 44px;
  background: var(--color-carbon);
  border: 1px solid var(--color-steel);
  padding: 12px;
  overflow: hidden;
}
.phone::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  translate: -50% 0;
  width: 90px;
  height: 24px;
  border-radius: 20px;
  background: #000;
  z-index: 3;
}
.phone-idle,
.phone-content {
  position: absolute;
  inset: 12px;
  border-radius: 34px;
  background: #000;
}
.phone-idle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ash);
  font-size: 14px;
  letter-spacing: -0.224px;
  transition: opacity .5s;
}
.phone-content {
  padding: 60px 22px 22px;
  opacity: 0;
  transition: opacity .6s var(--ease);
  pointer-events: none;
}
.phone.is-on .phone-idle { opacity: 0; }
.phone.is-on .phone-content { opacity: 1; pointer-events: auto; }

.hello {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  color: var(--color-ash);
}
.phone-content h3 {
  font-family: var(--font-sf-pro-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 28px;
  letter-spacing: 0.196px;
  margin: 8px 0 18px;
}
.info-list { list-style: none; }
.info-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-carbon);
  font-size: 14px;
  line-height: 1.29;
  letter-spacing: -0.224px;
  opacity: 0;
}
.info-list span { color: var(--color-ash); }
.info-list b { font-weight: 600; }
.phone.is-on .info-list li {
  animation: rise .7s var(--ease) both;
  animation-delay: calc(var(--i) * 90ms + 250ms);
}

/* ---------- Métricas y animación de contadores ---------- */

/* ---------- Futuro (panel Carbon) ---------- */
.future {
  background: var(--color-carbon);
  border-radius: 28px;
  padding: 72px 48px;
}
.future-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.future-grid .tile { min-height: 200px; }
.future-grid .tile h3 { margin-top: 0; }
.closing-text {
  max-width: 720px;
  margin: 56px auto 0;
  text-align: center;
  font-size: 19px;
  line-height: 1.42;
  letter-spacing: 0.228px;
  color: var(--color-ash);
}
.closing {
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-sf-pro-display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.12px;
}

/* ---------- Sección clara (reinicio visual) ---------- */
.light {
  background: var(--color-porcelain);
  color: #1d1d1f;
  padding: 120px 0;
}
.light .eyebrow { color: #6e6e73; }
.pale {
  background: #ffffff;
  border-radius: 28px;
  padding: 48px;
  max-width: 860px;
  margin: 32px auto 0;
  text-align: left;
  transition: transform .5s var(--ease);
}
.pale:hover { transform: translateY(-4px); }
.pale p {
  font-family: var(--font-sf-pro-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.24;
  letter-spacing: 0.196px;
  color: #1d1d1f;
}

/* ---------- Formulario de contacto ---------- */
.contact-form {
  max-width: 560px;
  margin: 40px auto 0;
  display: grid;
  gap: 12px;
  text-align: left;
}
.contact-form input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-slate);
  border-radius: 980px;
  color: var(--color-porcelain);
  font-family: inherit;
  font-size: 17px;
  letter-spacing: -0.374px;
  padding: 12px 24px;
  outline: none;
  transition: border-color .3s, background-color .3s;
}
.contact-form input:hover { border-color: var(--color-ash); }
.contact-form input::placeholder { color: var(--color-ash); }
.contact-form input:focus {
  outline: 1px solid var(--color-apple-blue);
  outline-offset: 1px;
  background: rgba(255, 255, 255, 0.07);
}
.contact-form .btn-buy { width: 100%; text-align: center; }
.contact-form > div { text-align: center; }
.contact-form > div .btn-buy { width: auto; }

/* ---------- Pie ---------- */
.footer {
  border-top: 1px solid var(--color-carbon);
  padding: 28px 0 40px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: -0.12px;
  color: var(--color-ash);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; }
.footer a { color: var(--color-electric-link); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .display { font-size: 56px; line-height: 60px; letter-spacing: -0.84px; }
  .display-md { font-size: 32px; }
  .closing { font-size: 28px; }

  .split,
  .grid-3,
  .stats,
  .future-grid,
  .demo { grid-template-columns: 1fr; }
  .demo { gap: 48px; }

  .menu-btn { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    background: var(--color-graphite);
    flex-direction: column;
    gap: 18px;
    padding: 24px 22px;
    border-bottom: 1px solid #282828;
  }
  .nav-links.open { display: flex; }

  .card,
  .future { padding: 32px 24px; }
  .future { padding: 48px 24px; }
  .pale { padding: 32px 24px; }
  .pale p { font-size: 22px; }
  .section, .band, .light { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .section-head.spaced { margin-top: 80px; }
  .hero { min-height: 620px; }
  .float-cta { right: 16px; bottom: 16px; }
}

/* ---------- Accesibilidad: reducir movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; }
}