/* Corredor — Landing */

:root {
  --bg-deep: #06090d;
  --bg-elevated: #0e141c;
  --bg-card: #141c28;
  --bg-glass: rgba(20, 28, 40, 0.72);
  --text: #f2f6fa;
  --text-muted: #8fa3b8;
  --accent: #3ee8b0;
  --accent-dim: rgba(62, 232, 176, 0.15);
  --accent-warm: #ffb347;
  --sand: #d4c4b0;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Nav --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s;
}

.nav.is-scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav__inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav__logo span { color: var(--accent); }

.nav__links {
  display: none;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text); text-decoration: none; }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(62, 232, 176, 0.35);
  text-decoration: none;
}

@media (min-width: 768px) {
  .nav__links { display: flex; }
}

/* --- Hero --- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 2rem) clamp(1.25rem, 4vw, 3rem) 3rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(62, 232, 176, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(255, 179, 71, 0.12), transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(30, 80, 120, 0.25), transparent 60%),
    linear-gradient(180deg, #0a1219 0%, var(--bg-deep) 70%);
}

.hero__mesh {
  position: absolute;
  inset: -20%;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  animation: mesh-drift 25s ease-in-out infinite alternate;
}

@keyframes mesh-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-2%, -1%) scale(1.05); }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, transparent, black 30%, black 70%, transparent);
  opacity: 0.4;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(62, 232, 176, 0.25);
  border-radius: 999px;
}

.hero__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.hero__title em {
  font-style: italic;
  color: var(--sand);
}

.hero__lead {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 0 2.5rem;
}

/* --- Search panel --- */

.search-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 900px;
}

.search-panel__tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.search-tab {
  flex: 1;
  max-width: 140px;
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-tab:hover { color: var(--text); }

.search-tab.is-active {
  color: var(--bg-deep);
  background: var(--accent);
  border-color: var(--accent);
}

.search-panel__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .search-panel__grid {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
}

.search-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.search-field select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238fa3b8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.search-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.95rem 1.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), #2bc99a);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(62, 232, 176, 0.3);
}

.search-panel__hint {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Stats --- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 3rem;
  max-width: 900px;
}

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  text-align: center;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.2;
  color: var(--accent);
}

.stat__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Sections --- */

.section {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 4vw, 3rem);
}

.section__inner {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.section__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.section__lead {
  color: var(--text-muted);
  max-width: 50ch;
  margin: 0 0 3rem;
}

/* --- Property cards --- */

.properties-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
  .properties-grid--featured { grid-template-columns: 1.2fr 1fr 1fr; }
  .properties-grid--featured .property-card:first-child {
    grid-row: span 2;
  }
}

.property-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s;
}

.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(62, 232, 176, 0.25);
}

.property-card__visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.property-card:first-child .property-card__visual {
  aspect-ratio: auto;
  min-height: 280px;
  flex: 1;
}

.property-card__visual--apartment {
  background: linear-gradient(145deg, #1a3a52 0%, #0d1f2d 50%, #2d5a7b 100%);
}

.property-card__visual--house {
  background: linear-gradient(145deg, #1a3d2e 0%, #0d1a14 50%, #3d6b4f 100%);
}

.property-card__visual--land {
  background: linear-gradient(145deg, #4a3520 0%, #1a1408 50%, #8b6914 100%);
}

.property-card__visual--condo,
.property-card__visual--townhouse,
.property-card__visual--commercial,
.property-card__visual--other {
  background: linear-gradient(145deg, #2a2540 0%, #12101a 50%, #4a4060 100%);
}

.property-card__visual--photo {
  background: var(--bg-card);
}

.property-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-card__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 9, 13, 0.85) 100%);
  z-index: 1;
}

.property-card__visual--photo .property-card__icon {
  display: none;
}

.property-card__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 64px;
  height: 64px;
  opacity: 0.35;
}

.property-card__badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  z-index: 2;
}

.badge {
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
}

.badge--sale { background: var(--accent); color: var(--bg-deep); }
.badge--rent { background: var(--accent-warm); color: var(--bg-deep); }
.badge--type {
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.property-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-card__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.property-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.property-card__location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.property-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.property-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.property-card__link {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.property-card__link:hover { text-decoration: underline; }

/* --- Provinces --- */

.provinces-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .provinces-grid { grid-template-columns: repeat(4, 1fr); }
}

.province-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.25s;
}

.province-chip:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}

/* --- Steps --- */

.steps {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  position: relative;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.step__num {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--accent-dim);
  margin-bottom: 1rem;
}

.step__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.step__text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- CTA --- */

.cta-band {
  position: relative;
  padding: clamp(3rem, 8vw, 5rem);
  margin: 0 clamp(1.25rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
}

.cta-band__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 120%, rgba(62, 232, 176, 0.2), transparent),
    linear-gradient(135deg, #141c28, #0a1219);
  border: 1px solid var(--border);
  border-radius: inherit;
}

.cta-band__content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
}

.cta-band__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
}

.cta-band__text {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-deep);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(62, 232, 176, 0.35);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--text-muted);
  text-decoration: none;
}

/* --- Footer --- */

.footer {
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.footer__inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.footer__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer__meta.ok { color: var(--accent); }

/* --- Empty / offline --- */

.banner-offline {
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.35);
  border-radius: var(--radius);
  color: #f0b429;
  font-size: 0.9rem;
}

/* --- Reveal animations --- */

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
