/* ==========================================================================
   AURORA BOREAL — Residencia en Carrasco, Montevideo
   Estilos mobile-first
   ========================================================================== */

:root {
  --navy-deep: #0e1a3d;
  --navy: #16265e;
  --blue: #1e4f91;
  --blue-light: #2c6fa6;
  --gold: #c9a876;
  --gold-deep: #ad8c5c;
  --silver-blue: #eef2f8;
  --silver-blue-2: #e4eaf3;
  --white: #ffffff;
  --ink: #1c2333;
  --ink-soft: #57607a;
  --line: #e1e6ef;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1200px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 55px -22px rgba(14, 26, 61, 0.32);
  --shadow-sm: 0 10px 26px -12px rgba(14, 26, 61, 0.22);

  --header-h: 78px;
  --gap-lg: 56px;
  --gap-md: 40px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy-deep);
  line-height: 1.12;
  margin: 0 0 .5em;
}

p { line-height: 1.6; color: var(--ink-soft); margin: 0 0 1em; }

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

button { font: inherit; background: none; border: none; cursor: pointer; padding: 0; color: inherit; }

.ico { width: 19px; height: 19px; flex-shrink: 0; }

a:focus-visible, button:focus-visible, iframe:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-deep);
  color: #fff;
  padding: .8em 1.2em;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

section { position: relative; }
section[id], h2[id] { scroll-margin-top: var(--header-h); }

.section-head { max-width: 620px; margin: 0 auto 2.25rem; text-align: center; padding: 0 1.25rem; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: .3em; }
.section-head p { max-width: 460px; margin: 0 auto; }
.section-head__divider {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  margin: .6rem 0 .8rem;
}
.section-head__divider span { width: 34px; height: 1px; background: var(--gold); }
.section-head__divider svg { width: 18px; height: 18px; color: var(--gold); }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
  min-height: 44px;
}
.btn--primary { background: var(--navy-deep); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--navy-deep); border: 1.5px solid var(--navy-deep); }
.btn--ghost:hover { background: var(--navy-deep); color: #fff; }
.btn--gold { background: var(--gold); color: var(--navy-deep); }
.btn--gold:hover { background: var(--gold-deep); transform: translateY(-2px); }
.btn--lg { padding: 1em 2.1em; font-size: 1rem; }
.btn--block { width: 100%; }

/* ==================== HEADER ==================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background .3s ease, box-shadow .3s ease;
}
.header__inner {
  max-width: 1360px;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.header__brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: .01em;
}
.header__logo { width: 38px; height: 38px; object-fit: contain; border-radius: 6px; }
.header__brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.header__brand-text small { font-family: var(--font-body); font-size: .58rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

.header__nav { display: none; gap: 1.6rem; align-items: center; }
.header__nav a { font-size: .9rem; font-weight: 500; color: #fff; opacity: .92; transition: opacity .2s ease; }
.header__nav a:hover { opacity: 1; }

.header__actions { display: flex; align-items: center; gap: .9rem; }
.header__ig, .header__phones { display: none; }
.header__phones {
  display: none;
  align-items: center;
  gap: .5rem;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.header__phones .ico { color: var(--gold); }
.header__ig {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.3px solid rgba(255,255,255,.35);
  color: #fff;
  transition: border-color .2s ease, background .2s ease;
}
.header__ig:hover { border-color: var(--gold); background: rgba(255,255,255,.06); }

.header__burger {
  width: 42px; height: 42px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  border-radius: 8px;
}
.header__burger span { display: block; width: 22px; height: 2px; background: #fff; transition: transform .3s ease, opacity .3s ease; }

.header--solid { background: rgba(14, 26, 61, 0.97); box-shadow: 0 2px 20px rgba(0,0,0,.14); }
.header--menu-open .header__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header--menu-open .header__burger span:nth-child(2) { opacity: 0; }
.header--menu-open .header__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  background: var(--navy-deep);
  padding: 1rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: transform .25s ease, opacity .25s ease, visibility .25s ease;
  z-index: 99;
  box-shadow: 0 20px 30px -10px rgba(0,0,0,.3);
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
.mobile-menu a { color: #fff; padding: .85em .3em; font-size: 1rem; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-menu__row { display: flex; gap: 1.5rem; padding: .85em .3em; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-menu__row a { padding: 0; border: 0; font-weight: 700; color: var(--gold); }
.mobile-menu__ig { opacity: .85; }

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: clamp(560px, 82vh, 700px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(9,15,38,.82) 0%, rgba(9,15,38,.45) 45%, rgba(9,15,38,.12) 68%, rgba(9,15,38,.32) 100%),
    linear-gradient(180deg, rgba(9,15,38,.6) 0%, rgba(9,15,38,.05) 26%, rgba(9,15,38,.1) 55%, rgba(8,14,35,.85) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 1.75rem) 1.25rem 3rem;
  color: #fff;
}
.hero__title {
  color: #fff;
  font-size: clamp(2.05rem, 5.6vw, 4rem);
  line-height: 1.1;
  max-width: 17ch;
  margin-bottom: .5rem;
  letter-spacing: -.01em;
}
.hero__title-accent { color: var(--gold); }
.hero__rule { display: block; width: 64px; height: 2px; background: var(--gold); margin-bottom: 1.1rem; }
.hero__subtitle {
  color: #e7edf7;
  font-size: clamp(1rem, 2vw, 1.12rem);
  max-width: 42ch;
  margin-bottom: 1.3em;
}
.hero__location {
  display: flex;
  align-items: flex-start;
  gap: .6em;
  font-size: .85rem;
  color: #d7e2f2;
  margin-bottom: 1.8em;
}
.hero__location .ico { color: var(--gold); margin-top: 2px; }
.hero__location strong { color: #fff; letter-spacing: .03em; text-transform: uppercase; font-size: .82rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.hero .btn--ghost:hover { background: #fff; color: var(--navy-deep); }

/* ==================== LA RESIDENCIA + SERVICIOS (círculos) ==================== */
.acompanamiento { padding: var(--gap-lg) 1.25rem; background: var(--white); }
.servicios-circ {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem 1rem;
}
.s-circ { display: flex; flex-direction: column; align-items: center; text-align: center; }
.s-circ__ico {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--silver-blue);
  color: var(--blue-light);
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--white);
  outline: 1px solid var(--line);
  margin-bottom: 1rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.s-circ__ico img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
}
.s-circ__ico::after {
  content: "";
  position: absolute;
  top: 2px; right: 4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  border: 1.5px solid var(--white);
  z-index: 1;
}
.s-circ__ico svg { width: 32px; height: 32px; }
.s-circ:hover .s-circ__ico { transform: translateY(-4px); box-shadow: var(--shadow); }
.s-circ h3 { font-family: var(--font-body); font-size: .88rem; font-weight: 600; color: var(--navy-deep); margin: 0 0 .35em; line-height: 1.35; }
.s-circ p { font-size: .78rem; line-height: 1.45; margin: 0; max-width: 22ch; }

/* ==================== INSTALACIONES ==================== */
.instalaciones { padding: var(--gap-lg) 1.25rem; background: var(--silver-blue); }
.inst-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
}
.inst-tile {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
}
.inst-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.inst-tile:hover img { transform: scale(1.05); }
.inst-tile--big { aspect-ratio: 16/10; }
.inst-tile__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.3rem .9rem .75rem;
  background: linear-gradient(0deg, rgba(9,15,38,.78), transparent);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  text-align: left;
}
.inst-tile--video .inst-tile__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.inst-tile--video .inst-tile__play svg {
  width: 60px; height: 60px;
  color: #fff;
  background: rgba(14,26,61,.55);
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 50%;
  padding: 14px;
  transition: transform .25s ease, background .25s ease;
}
.inst-tile--video:hover .inst-tile__play svg { transform: scale(1.08); background: var(--navy-deep); }
.inst-tile--video::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(9,15,38,.28);
}

/* ==================== CONTACTO (compacto) ==================== */
.contacto { padding: var(--gap-lg) 1.25rem calc(var(--gap-lg) - 10px); background: var(--navy-deep); }
.contacto__bar {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: grid;
  gap: 1.4rem;
  box-shadow: var(--shadow);
}
.contacto__thumb { width: 100%; border-radius: var(--radius-sm); aspect-ratio: 4/3; object-fit: cover; }
.contacto__text h2 { color: #fff; font-size: clamp(1.5rem, 4vw, 1.9rem); margin-bottom: .25em; }
.contacto__text p { color: #c9d6ea; font-size: .92rem; margin: 0; }

.contacto__datos { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
.contacto__datos li { display: flex; align-items: flex-start; gap: .7rem; }
.contacto__datos .ico { color: var(--gold); margin-top: 2px; }
.contacto__datos span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #8fa3c4; margin-bottom: .15em; }
.contacto__datos a, .contacto__addr { color: #fff; font-weight: 600; font-size: .95rem; }
.contacto__datos li:last-child span:first-child { margin-bottom: .15em; }

.contacto__map {
  max-width: var(--container);
  margin: 1.1rem auto 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 200px;
  box-shadow: var(--shadow-sm);
}
.contacto__map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ==================== FOOTER ==================== */
.footer { background: #0a1330; padding: 2.5rem 1.25rem 6.5rem; }
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}
.footer__logo { width: 46px; height: 46px; object-fit: contain; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.1rem; }
.footer__nav a { color: #b7c4dc; font-size: .86rem; }
.footer__nav a:hover { color: #fff; }
.footer__socials { display: flex; gap: .8rem; }
.footer__social-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  transition: background .2s ease;
}
.footer__social-btn:hover { background: rgba(255,255,255,.18); }
.footer__tagline { color: #8595b8; font-size: .8rem; margin: 0; }
.footer__copy { color: #5f6c8a; font-size: .76rem; margin: 0; }

/* ==================== FLOATING WHATSAPP ====================
   En mobile el rol de "botón flotante siempre accesible" lo cumple la
   barra inferior (Llamar | WhatsApp); el círculo flotante sólo se
   muestra en desktop para no duplicar el mismo botón dos veces. */
.floating-wa {
  display: none;
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  align-items: center; justify-content: center;
  box-shadow: 0 10px 25px -8px rgba(0,0,0,.4);
  transition: transform .2s ease;
}
.floating-wa:hover { transform: scale(1.08); }
.floating-wa .ico { width: 28px; height: 28px; }

/* ==================== MOBILE BOTTOM BAR ==================== */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  box-shadow: 0 -6px 20px rgba(0,0,0,.1);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bar__btn {
  display: flex; align-items: center; justify-content: center; gap: .5em;
  padding: .95rem 0;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy-deep);
  min-height: 44px;
}
.mobile-bar__btn--wa { background: #25d366; color: #fff; }

/* ==================== LIGHTBOX ==================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(7, 12, 28, .95);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.lightbox[hidden] { display: none; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.1rem;
  width: 44px; height: 44px;
  color: #fff; font-size: 2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.lightbox__close:hover { background: rgba(255,255,255,.2); }
.lightbox img, .lightbox video { max-width: 100%; max-height: 78vh; border-radius: 10px; object-fit: contain; }
.lightbox video { max-width: min(90vw, 960px); width: 100%; background: #000; }
.lightbox__caption { color: #d6e2f2; margin-top: 1rem; font-size: .9rem; text-align: center; }

/* ==================== SCROLL REVEAL ==================== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .inst-tile img, .btn, .floating-wa { transition: none; }
}

/* ==========================================================================
   BREAKPOINTS
   ========================================================================== */

@media (min-width: 560px) {
  .contacto__datos { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 700px) {
  .servicios-circ { grid-template-columns: repeat(3, 1fr); }
  .inst-grid { grid-template-columns: repeat(3, 1fr); }
  .inst-tile--big { grid-column: span 3; }
}

@media (min-width: 860px) {
  .contacto__bar { grid-template-columns: auto 1fr auto; align-items: center; }
  .contacto__thumb { width: 130px; height: 130px; aspect-ratio: 1/1; }
  .contacto__text { grid-column: 2; }
  .contacto__datos { grid-column: 1 / -1; grid-template-columns: repeat(3, auto); justify-content: space-between; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.1); margin-top: .4rem; }
}

@media (min-width: 1024px) {
  .header__nav { display: flex; }
  .header__ig, .header__phones { display: inline-flex; }
  .header__burger { display: none; }
  .mobile-menu { display: none !important; }
  .mobile-bar { display: none; }
  .floating-wa { display: flex; }

  :root { --gap-lg: 96px; }

  .servicios-circ { grid-template-columns: repeat(6, 1fr); gap: 1.5rem .9rem; }

  .inst-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 1rem; height: 640px; }
  .inst-tile--big { grid-column: 1 / 3; grid-row: 1 / 3; aspect-ratio: auto; }
  .inst-tile:not(.inst-tile--big) { aspect-ratio: auto; }

  .contacto__bar { padding: 2rem 2.4rem; }
}

@media (min-width: 1180px) {
  .header__inner { padding: 0 2rem; }
}
