/* Badenheuer Inmobiliaria · demo "La tarjeta de Guillermo". Tokens = Variables "Primitivos" del Figma. */
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --marino: #1b2646;
  --hondo: #121a33;
  --oro: #d5b178;
  --oro-vivo: #e2b13c;
  --papel: #f3f3f1;
  --tinta: #1b2646;
  --suave: #4a5168;
  --blanco: #ffffff;
  --margen: clamp(20px, 6vw, 96px);
  --gap: clamp(12px, 2vw, 32px);
  --t-seccion: clamp(30px, 3.2vw, 44px);
  --t-fila: clamp(19px, 1.6vw, 22px);
  --t-texto: 17px;
  --t-chico: 16px;
  --display: "Cinzel", Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sec: clamp(96px, 11vw, 170px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; scrollbar-color: var(--marino) var(--papel); }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 400 var(--t-texto)/1.6 "IBM Plex Sans", system-ui, sans-serif; caret-color: var(--marino); overflow-x: clip; }
::selection { background: var(--oro); color: var(--marino); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--oro-vivo); outline-offset: 3px; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--marino); color: var(--blanco); padding: 12px 16px; }
.saltar:focus { top: 12px; }
h2 { font-family: var(--display); font-weight: 400; font-size: var(--t-seccion); line-height: 1.12; letter-spacing: 0.02em; }

.franja { background: var(--hondo); color: var(--oro); font-size: var(--t-chico); text-align: center; padding: 8px var(--margen); }

.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; background: var(--oro-vivo); color: var(--marino); font: 600 16px/1 "IBM Plex Sans", sans-serif; text-decoration: none; border: 0; cursor: pointer; transition: background-color .25s var(--ease), color .25s, transform .25s var(--ease); }
.boton:hover { background: var(--oro); }
.boton:active { transform: scale(.97); }
.boton-chico { min-height: 44px; padding: 0 20px; }
.boton-borde { background: var(--hondo); color: var(--oro); border: 2px solid var(--oro); }
.boton-borde:hover { background: var(--oro); color: var(--marino); }
.enlace { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; transition: text-underline-offset .25s var(--ease); }
.enlace:hover { text-underline-offset: 8px; }

/* Sello redibujado: círculo marino y tres edificios de franjas doradas. */
.se-fondo { fill: var(--marino); }
.se-franja, .se-filete { fill: var(--oro); }

.cabecera { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px var(--margen); background: var(--marino); color: var(--blanco); }
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: .04em; }
.marca-sello { width: 38px; height: 38px; }
.marca-sello .se-fondo { fill: var(--hondo); }
.cabecera ul { display: flex; gap: 28px; }
.cabecera nav a { text-decoration: none; font-weight: 600; font-size: 16px; display: inline-flex; min-height: 44px; align-items: center; }
.cabecera nav a:hover { color: var(--oro); }

/* Hero: la tarjeta sobre la ciudad de noche. */
.hero { position: relative; min-height: calc(100svh - 100px); background: var(--hondo); color: var(--blanco); display: grid; place-items: center; align-content: center; gap: 36px; padding: 48px var(--margen) 64px; overflow: hidden; }
.hero-foto { position: absolute; inset: 0; }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.3); }
.escena { position: relative; perspective: 1400px; width: min(520px, 88vw); aspect-ratio: 1.75; }
.tarjeta { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: translateZ(var(--z, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--gy, 0deg)); transition: transform .9s var(--ease); cursor: pointer; }
.tarjeta.dada-vuelta { --gy: 180deg; }
html.anim .tarjeta { transition: none; }
.se-franja { transform-box: fill-box; transform-origin: 50% 100%; }
.cara { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #213058; display: grid; align-content: center; justify-items: center; text-align: center; padding: 24px; }
.cara::after { content: ""; position: absolute; inset: 10px; border: 1px solid var(--oro); pointer-events: none; } /* taste-skill-ignore: filete dorado del logo */
.tarjeta::before { content: ""; position: absolute; inset: 0; background: var(--oro); }
.cara-frente { transform: translateZ(1px); }
.cara-dorso { transform: rotateY(180deg) translateZ(1px); gap: 6px; font-size: 16px; }
/* El dorso no existe hasta que se da vuelta (y se va recién pasada la mitad del giro de vuelta). */
.cara-dorso { visibility: hidden; transition: visibility 0s .45s; }
.dada-vuelta .cara-dorso { visibility: visible; transition: none; }
.cara-dorso a { text-decoration: none; color: var(--oro); overflow-wrap: anywhere; }
.cara-dorso a:hover { text-decoration: underline; }
.t-dorso-t { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--oro); }
.t-sello { width: clamp(64px, 9vw, 92px); height: auto; }
.t-sello .se-fondo { fill: var(--hondo); }
.t-nombre { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 2.8vw, 34px); line-height: 1.12; letter-spacing: .06em; margin-top: 14px; }
.t-linea { display: block; }
.t-oficio { font-family: var(--display); color: var(--oro); font-size: 16px; letter-spacing: .3em; margin-top: 10px; padding-top: 8px; border-top: 2px solid var(--oro); }
.hero-texto { position: relative; text-align: center; }
.hero-bajada { font-size: 19px; color: #e7e8ee; }
.hero-acc { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; margin-top: 22px; }

/* Planillas: venta y alquiler. */
.planilla { padding: var(--sec) var(--margen); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.planilla-cab { grid-column: 1 / 5; align-self: start; position: sticky; top: 96px; }
.planilla-cab p { color: var(--suave); margin-top: 14px; max-width: 34ch; }
.filas { grid-column: 5 / 13; }
.fila { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dir precio" "det det" "acc acc"; gap: 2px 20px; padding: 16px 16px; margin: 0 -16px; transition: background-color .3s var(--ease); }
.fila:nth-child(odd) { background: #e9e9ec; }
.fila:hover { background: var(--marino); color: var(--blanco); }
.fila:hover .f-det { color: #cfd3e0; }
.fila:hover .enlace, .fila:hover .fx-ver-360 { color: var(--oro); }
.f-dir { grid-area: dir; font-family: var(--display); font-size: var(--t-fila); }
.f-precio { grid-area: precio; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.f-det { grid-area: det; color: var(--suave); font-size: 16px; }
.f-acc { grid-area: acc; display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 16px; }
.f-acc .enlace { min-height: 44px; display: inline-flex; align-items: center; color: var(--marino); }
.fx-ver-360 { color: var(--marino); }
.planilla-alq { background: var(--blanco); }
.planilla-alq .planilla-cab { position: static; }

.ciudad { background: var(--marino); color: var(--blanco); padding: var(--sec) var(--margen); }
.ciudad-fotos { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-top: 48px; }
.ciudad-fotos figure { position: relative; grid-column: 1 / 8; aspect-ratio: 3 / 2; overflow: hidden; }
.ciudad-fotos .cf-baja { grid-column: 8 / 13; margin-top: 120px; aspect-ratio: 4 / 5; }
.ciudad-fotos .cf-baja img { object-position: 45% 50%; }
/* Mapa del kit dentro de este mundo: esquinas rectas y activo en marino, sin tinte. */
.fx-mapa-lista a, .fx-mapa-frame { border-radius: 0; }
.fx-mapa-lista a[aria-current="true"], .fx-mapa-lista a:hover { background: var(--marino); color: var(--blanco); border-color: var(--marino); }
.ciudad-fotos img { width: 100%; height: 100%; object-fit: cover; }
figcaption { position: absolute; left: 0; bottom: 0; background: var(--hondo); color: var(--oro); font-size: var(--t-chico); padding: 6px 12px; }

.contacto { background: var(--hondo); color: var(--blanco); padding: var(--sec) var(--margen); display: grid; justify-items: start; gap: 22px; }
.contacto-frase { font-size: 19px; max-width: 40ch; color: #e7e8ee; }
.contacto-foto { position: relative; width: min(100%, 520px); aspect-ratio: 4 / 3; overflow: hidden; margin-top: 18px; }
.contacto-foto img { width: 100%; height: 100%; object-fit: cover; }
.contacto-datos { display: grid; gap: 10px; width: min(720px, 100%); }
.contacto-datos li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; }
.contacto-datos li > span:first-child { color: var(--oro); }
.contacto-datos .enlace { color: var(--blanco); overflow-wrap: anywhere; }

.pie { background: #0b1124; color: #cfd3e0; padding: 64px var(--margen) 48px; font-size: var(--t-chico); display: grid; gap: 8px; }
.pie p { max-width: 64ch; }
.pie-marca { font-family: var(--display); font-weight: 600; font-size: 28px; color: var(--oro); margin-bottom: 12px; }
.pie-creditos { margin-top: 12px; }

.fx-cinta { background: var(--oro); color: var(--marino); padding: 12px 0; font: 600 16px/1 "Cinzel", serif; letter-spacing: .06em; }
.fx-mapa h2, .fx-360 h2 { margin-bottom: 16px; }
.fx-mapa { max-width: none; padding: var(--sec) var(--margen); }

/* Movimiento: lo oculto se oculta solo con JS (.anim). */
html.anim .hero-texto { opacity: 0; }
html.anim .fila { opacity: 0; transform: translateY(16px); }
html.anim .filas.visto .fila { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease), background-color .3s var(--ease); }
html.anim .filas.visto .fila:nth-child(2) { transition-delay: 50ms; }
html.anim .filas.visto .fila:nth-child(3) { transition-delay: 100ms; }
html.anim .filas.visto .fila:nth-child(4) { transition-delay: 150ms; }
html.anim .filas.visto .fila:nth-child(n+5) { transition-delay: 200ms; }
html.anim .filas.listo .fila { transition-delay: 0ms; }

@media (min-width: 901px) {
  .ciudad { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
  .ciudad-fotos { display: contents; }
  .ciudad h2 { grid-column: 1 / 8; grid-row: 1; align-self: end; margin-bottom: 48px; }
  .ciudad-fotos figure { grid-column: 1 / 8; grid-row: 2; }
  .ciudad-fotos .cf-baja { grid-column: 8 / 13; grid-row: 1 / 3; margin-top: 0; }
  .fila { grid-template-areas: "dir precio" "det acc"; align-items: baseline; }
  .f-acc { justify-self: end; }
  .contacto { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
  .contacto h2, .contacto-frase, .contacto-foto { grid-column: 1 / 6; }
  .contacto-datos { grid-column: 7 / 13; grid-row: 1 / 3; }
  .contacto-foto { grid-row: 3 / 5; }
  .contacto > .boton { grid-column: 7 / 13; grid-row: 3; justify-self: start; align-self: start; }
}
@media (max-width: 900px) {
  .planilla-cab { grid-column: 1 / 13; position: static; margin-bottom: 32px; }
  .filas { grid-column: 1 / 13; }
  .ciudad-fotos figure { grid-column: 1 / 13; }
  .ciudad-fotos .cf-baja { grid-column: 4 / 13; margin-top: 24px; }
}
@media (max-width: 720px) {
  .cabecera nav { display: none; }
  .escena { aspect-ratio: 1.45; }
  .contacto-datos li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 360px) {
  .cabecera { gap: 10px; }
  .marca { font-size: 18px; gap: 8px; }
  .boton-chico { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* fx: colores para la capa de efectos */
:root { --fx-acento: #e2b13c; --fx-oscuro: #121a33; --fx-claro: #f3f3f1; }
