/* web-links/public/assets/page.css — ver.urbearg.com
   Techo = tarjeta del feed de la app (PropertyOverlay.tsx) con el lenguaje visual de
   urbea-identidad-visual.html. Siempre oscuro (el feed es oscuro). Sin estilos inline:
   la CSP no permite 'unsafe-inline'. */

:root {
  --color_primary: #1a5e44;       /* verde del logo · CTA y chip Renta */
  --color_primary_soft: #5e9379;  /* aro del avatar sobre oscuro */
  --color_accent: #9a7150;        /* arcilla · chip Venta */
  --color_ink_feed: #17140f;      /* fondo feed */
  --color_paper: #f6f2eb;         /* blanco cálido */
  --color_carnita: #eee4d0;       /* isotipo sobre oscuro */
  --display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --wordmark: 'Outfit', var(--sans);
  --r_pill: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color_ink_feed);
  color: var(--color_paper);
  font-family: var(--sans);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.i { width: 1em; height: 1em; flex: none; }

/* ── Tarjeta: pantalla completa en el teléfono ─────────────────────────────── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--color_ink_feed);
}
.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  /* Placeholder del video (mockup .feedscr) mientras carga la portada o si no hay video. */
  background: linear-gradient(160deg, #6f5742 0%, #473829 55%, #2a2018 100%);
}

.media { position: absolute; inset: 0; display: grid; place-items: center; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media-mark { width: 88px; height: 88px; color: var(--color_carnita); opacity: .16; }
.player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
/* mp4 legacy (344.2c): el primer cuadro (#t=0.1) hace de portada; transparente hasta que carga. */
.clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }

/* Degradado dual del overlay: rgba(23,20,15,.35) 0% → transparente 26–52% → .86 100%. */
.shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(23, 20, 15, .35) 0%, rgba(23, 20, 15, 0) 26%, rgba(23, 20, 15, 0) 52%, rgba(23, 20, 15, .86) 100%);
}

/* ── Marca arriba a la izquierda ──────────────────────────────────────────── */
.brand {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: 16px;
  display: flex; align-items: center; gap: 8px;
  color: var(--color_carnita);
  pointer-events: none;
}
.brand-mark { width: 24px; height: 24px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
.wordmark {
  font-family: var(--wordmark); font-weight: 600; font-size: 14px;
  letter-spacing: .24em; line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

/* ── Tocar para reproducir (toda el área del video es el botón) ───────────── */
.play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: none; border: 0; padding: 0;
  color: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.play-circle {
  width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(246, 242, 235, .16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(246, 242, 235, .5);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.play-circle .i { width: 26px; height: 26px; margin-left: 3px; }
.play:hover .play-circle { transform: scale(1.06); background: rgba(246, 242, 235, .24); }
.play:active .play-circle { transform: scale(.94); }
.play:focus-visible { outline: none; }
.play:focus-visible .play-circle { outline: 2px solid var(--color_paper); outline-offset: 4px; }

/* ── Info inferior (calco de PropertyOverlay: left 16, abajo) ──────────────── */
.info {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  pointer-events: none; /* los toques pasan al video */
  text-shadow: 0 1px 3px rgba(23, 20, 15, .55);
}
.agent { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-width: 0; }
.avatar {
  position: relative; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: #6f5742;
  border: 2px solid var(--color_primary_soft);
}
.avatar-initial { font-weight: 700; font-size: 13px; color: var(--color_paper); text-shadow: none; }
.avatar-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.agent-name {
  font-weight: 700; font-size: 13px; color: var(--color_paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}

.chips { display: flex; gap: 6px; margin-bottom: 8px; }
.chip {
  font-weight: 700; font-size: 11px; line-height: 1.2; letter-spacing: .01em;
  color: #fff; padding: 5px 10px; border-radius: var(--r_pill); text-shadow: none;
}
.chip-rent { background: var(--color_primary); }
.chip-sale { background: var(--color_accent); }
.chip-type {
  color: var(--color_paper);
  background: rgba(23, 20, 15, .36);
  border: 1px solid rgba(255, 255, 255, .2);
  padding: 4px 10px;
}

.zone {
  font-family: var(--display); font-weight: 600;
  font-size: 19px; line-height: 21px; letter-spacing: -.01em;
  color: var(--color_paper);
  margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.city {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: rgba(246, 242, 235, .75);
  margin: -1px 0 6px;
}
.city .i { width: 12px; height: 12px; }
.price {
  font-family: var(--display); font-weight: 600;
  font-size: 22px; line-height: 26px; letter-spacing: -.01em;
  color: #fff; margin-bottom: 8px;
}
.specs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(246, 242, 235, .85); }
.spec { display: inline-flex; align-items: center; gap: 6px; }
.spec .i { width: 14px; height: 14px; }
.spec-divider { width: 1px; height: 12px; background: rgba(194, 194, 189, .35); margin: 0 4px; }

/* ── CTA fijo abajo (en el lugar de la tab bar de la app) ──────────────────── */
.cta {
  flex: none;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--color_ink_feed);
  border-top: 1px solid rgba(246, 242, 235, .08);
}
.cta-row { display: flex; gap: 10px; }
.cta-label {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(246, 242, 235, .62);
}
.cta-label::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--color_primary_soft); }
.btn {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 14px;
  border-radius: var(--r_pill);
  font-family: var(--sans); font-weight: 700; font-size: 15px; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn span { overflow: hidden; text-overflow: ellipsis; }
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--color_paper); outline-offset: 3px; }
.btn-primary { background: var(--color_primary); color: #fff; box-shadow: 0 8px 20px -8px rgba(26, 94, 68, .8); }
.btn-primary:hover { background: #20704f; }
.btn-ghost { background: rgba(246, 242, 235, .08); color: var(--color_paper); border: 1px solid rgba(246, 242, 235, .24); }
.btn-ghost:hover { background: rgba(246, 242, 235, .14); }
.btn-ghost .i { color: var(--color_carnita); }

/* ── Páginas de mensaje (no disponible, link no válido, error, raíz) ───────── */
.card-message .stage {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 70% at 50% 0%, #2a2319 0%, rgba(23, 20, 15, 0) 62%),
    var(--color_ink_feed);
}
.message { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 32px; max-width: 360px; }
.message-badge {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 22px;
  background: rgba(246, 242, 235, .06);
  border: 1px solid rgba(246, 242, 235, .12);
}
.message-mark { width: 30px; height: 30px; color: var(--color_primary_soft); }
.message-title {
  font-family: var(--display); font-weight: 600;
  font-size: 24px; line-height: 1.15; letter-spacing: -.02em;
  margin-bottom: 10px;
}
.message-text { font-size: 15px; line-height: 1.5; color: rgba(246, 242, 235, .72); }
.home-lockup { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; color: var(--color_carnita); }
.home-lockup .brand-mark { width: 72px; height: 72px; }
.home-lockup .wordmark { font-size: 28px; }
.tagline { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(238, 228, 208, .7); }

/* ── Escritorio: la tarjeta centrada con proporción de teléfono ────────────── */
@media (min-width: 720px) and (min-height: 560px) {
  body {
    display: grid; place-items: center; padding: 32px 0;
    background:
      radial-gradient(120% 80% at 50% 0%, #221d16 0%, rgba(23, 20, 15, 0) 64%),
      var(--color_ink_feed);
  }
  .card {
    width: auto;
    height: min(calc(100vh - 64px), 880px);
    aspect-ratio: 390 / 844;
    border-radius: 32px;
    border: 1px solid #2a241c;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 0 0 8px rgba(246, 242, 235, .02);
  }
  .cta-row .btn { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .play-circle, .btn { transition: none; }
}
