/* ==========================================================================
   Landing page — Observatorio Inmobiliario de Floridablanca
   Paleta y tipografía coherentes con el login existente (backend/static/css/app.css)
   ========================================================================== */

:root {
  /* =========================
     PALETA INSTITUCIONAL
     ========================= */
  --color-azul: #2A4F7F;
  --color-amarillo: #FFB600;
  --color-verde: #15882E;
  --color-negro: #000000;

  /* =========================
     SISTEMA DE COLOR DE INTERFAZ
     La identidad se equilibra con tonos derivados
     para fondos, textos, superficies y estados.
     ========================= */
  --green: #176447;              /* Verde principal de interfaz */
  --green-700: #14543F;          /* Verde profundo */
  --green-900: #12352B;          /* Fondo oscuro / hero */
  --green-950: #0D2921;           /* Fondo más profundo */
  --lime: var(--color-amarillo);  /* CTA principal */
  --blue: var(--color-azul);     /* Acento institucional */
  --ink: #202822;                /* Texto principal */
  --muted: #66756E;              /* Texto secundario */
  --paper: #F4F7F4;              /* Fondo general */
  --white: #FFFFFF;
  --line: #DCE5DF;
  --orange: #EF9A52;              /* Acento opcional, uso limitado */

  /* Colores semánticos */
  --color-texto: #202822;
  --color-texto-secundario: #66756E;
  --color-fondo: #F4F7F4;
  --color-borde: #DCE5DF;
  --color-verde-oscuro: #12352B;
  --color-verde-hover: #14543F;
  --color-amarillo-hover: #E6A900;
  --color-texto-hero: #F7FBF8;
  --color-texto-hero-secundario: #D0E0D7;
  --color-texto-banda: #D0E0D7;
  --color-texto-footer: #D0E0D7;
  --color-texto-footer-secundario: #A8C0B5;

  /* =========================
     SUPERFICIES, BORDES Y SOMBRAS
     ========================= */
  --shadow-card: 0 20px 60px rgba(8, 35, 27, 0.28);
  --shadow-header: 0 8px 30px rgba(18, 53, 43, 0.08);
  --shadow-card-hover: 0 18px 40px rgba(18, 53, 43, 0.10);
  --shadow-chip: 0 10px 30px rgba(8, 35, 27, 0.24);
  --border-white-soft: rgba(255, 255, 255, 0.16);
  --border-white-medium: rgba(255, 255, 255, 0.62);
  --surface-white-soft: rgba(255, 255, 255, 0.07);
  --surface-white-hover: rgba(255, 255, 255, 0.12);
  --surface-green-soft: rgba(21, 136, 46, 0.06);
  --shadow-green-soft: rgba(21, 136, 46, 0.18);
  --header-background: rgba(255, 255, 255, 0.94);

  /* =========================
     TIPOGRAFÍA Y DIMENSIONES
     ========================= */
  --radius: 14px;
  --radius-lg: 22px;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'DM Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
}

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

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

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

/* Accesibilidad: enlace para saltar al contenido */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--lime);
  color: var(--green-900);
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 14px 24px;
  font: 700 15px var(--font-body);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--lime);
  color: var(--green-900);
}

.btn-primary:hover {
  background: var(--color-amarillo-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--border-white-medium);
}

.btn-outline:hover {
  border-color: var(--white);
  background: var(--surface-white-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--green);
  background: var(--surface-green-soft);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-background);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-header);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  background: var(--lime);
  color: var(--green-900);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font: 700 14px var(--font-display);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font: 700 17px var(--font-display);
  color: var(--ink);
}

.brand-text small {
  font: 500 12px var(--font-body);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.site-nav a {
  font: 500 15px var(--font-body);
  color: var(--ink);
  position: relative;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--green);
}

.nav-access-mobile {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: radial-gradient(120% 120% at 80% -10%, #236B4E 0%, var(--green-700) 42%, var(--green-900) 100%);
  color: var(--color-texto-hero);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding-block: 88px 96px;
}

.hero-copy .eyebrow {
  color: var(--lime);
}

.hero-copy h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 4.6vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  max-width: 15ch;
  margin: 18px 0 22px;
}

.hero-copy .lead {
  color: var(--color-texto-hero-secundario);
  font-size: 18px;
  line-height: 1.65;
  max-width: 52ch;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Ilustración / mapa */
.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.map-card {
  position: relative;
  width: min(480px, 100%);
  background: var(--surface-white-soft);
  border: 1px solid var(--border-white-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.map-art {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.map-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--ink);
  font: 600 13px var(--font-body);
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-chip);
}

.map-chip--top {
  top: 34px;
  left: -16px;
}

.map-chip--bottom {
  bottom: 30px;
  right: -12px;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 14px;
  line-height: 1.2;
}

.map-chip--bottom strong {
  font: 700 22px var(--font-display);
  color: var(--green);
}

.map-chip--bottom span {
  font-size: 11px;
  color: var(--muted);
}

.chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--shadow-green-soft);
}

/* ==========================================================================
   Secciones generales
   ========================================================================== */

.section {
  padding: 88px 0;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
  margin: 12px 0 16px;
}

.section-intro {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}

/* Pilares */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pillar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pillar:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}

.pillar-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--green);
  color: var(--lime);
  font-size: 22px;
  margin-bottom: 20px;
}

.pillar h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.pillar p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Banda CTA */
.section--band {
  padding: 0;
}

.section--band .container {
  background: var(--green-900);
  color: var(--color-texto-hero);
  border-radius: var(--radius-lg);
  padding: 56px 64px;
}

.band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.band-inner h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.band-text {
  color: var(--color-texto-banda);
  font-size: 16px;
  line-height: 1.6;
  max-width: 60ch;
  margin: 0;
}

.band-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--green-900);
  color: var(--color-texto-footer);
  margin-top: 88px;
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand .brand-text strong {
  color: var(--white);
}

.footer-brand .brand-text small {
  color: var(--color-texto-footer-secundario);
}

.footer-note {
  margin: 0;
  font-size: 14px;
  max-width: 42ch;
  text-align: right;
}

/* ==========================================================================
   Animación de aparición
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn {
    transition: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 60px 72px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .hero-visual {
    justify-content: center;
  }

  .map-card {
    width: min(460px, 100%);
  }

  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .container {
    width: min(1120px, 100% - 36px);
  }

  .header-inner {
    height: 68px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 18px 18px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
  }

  .site-nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .nav-access-mobile {
    display: block;
    color: var(--green);
    font-weight: 700;
  }

  .hero-inner {
    padding-block: 48px 56px;
  }

  .hero-copy .lead {
    font-size: 16px;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 150px;
  }

  .map-chip--top {
    left: 4px;
  }

  .map-chip--bottom {
    right: 4px;
  }

  .section {
    padding: 60px 0;
  }

  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .section--band .container {
    padding: 40px 28px;
  }

  .band-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .band-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .band-actions .btn {
    flex: 1;
  }

  .site-footer {
    margin-top: 60px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-note {
    text-align: left;
  }
}
