/* Residencial Refugio de la Condesa
   Palette drawn from the photos: plaster cream, terracotta arch,
   ochre walls, forged iron, foliage green. */

:root {
  --plaster: #f8f1e4;
  --plaster-deep: #f1e5d0;
  --ink: #33241b;
  --ink-soft: #6b5847;
  --terracotta: #bc5b39;
  --terracotta-deep: #9d4527;
  --ochre: #d29a2f;
  --leaf: #47603d;
  --card: #fffaf1;
  --line: #e3d3b8;
  --serif: 'Marcellus', 'Palatino Linotype', Georgia, serif;
  --sans: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  overflow-x: clip;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--plaster);
  line-height: 1.6;
  font-size: 1.0625rem;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
}

a { color: var(--terracotta-deep); }

:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 241, 228, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 64px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 1;
  min-width: 0;
}

.brand svg { flex-shrink: 0; }

.brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

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

.site-nav a.active {
  color: var(--terracotta-deep);
  border-bottom: 2px solid var(--terracotta);
  padding-bottom: 2px;
}

.lang-toggle {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font: 600 0.85rem var(--sans);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-toggle:hover { border-color: var(--ochre); color: var(--ink); }

@media (max-width: 640px) {
  .site-nav { gap: 0.9rem; }
  .site-nav a.hide-sm { display: none; }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  z-index: -2;
  animation: hero-zoom 26s linear forwards, hero-fade 1.2s ease-out both;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* Ken Burns: one slow push toward the gate, then rest. The zoom runs
   linear and never touches scale(1), so every frame moves the same
   tiny amount and the browser is always resampling, never snapping. */
@keyframes hero-zoom {
  from { transform: scale(1.04) translateZ(0); }
  to { transform: scale(1.12) translateZ(0); }
}

@keyframes hero-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(35, 20, 12, 0.82) 0%,
    rgba(35, 20, 12, 0.35) 40%,
    rgba(35, 20, 12, 0.12) 70%
  );
}

.hero-inner {
  color: #fdf6ea;
  padding: 4.5rem 0 3.5rem;
}

.eyebrow {
  font: 600 0.85rem var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ochre);
}

.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  margin: 0.4rem 0 0.8rem;
  color: #fdf6ea;
}

.hero p {
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: rgba(253, 246, 234, 0.92);
}

.hero-actions { margin-top: 1.8rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  text-decoration: none;
  font: 600 1rem var(--sans);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--terracotta);
  color: #fff8ee;
}

.btn-primary:hover { background: var(--terracotta-deep); }

.btn-ghost {
  border-color: rgba(253, 246, 234, 0.6);
  color: #fdf6ea;
}

.btn-ghost:hover { background: rgba(253, 246, 234, 0.14); }

/* ---------------- sections ---------------- */

section { padding: 4.5rem 0; }

.section-head { max-width: 38rem; margin-bottom: 2.5rem; }

.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0.35rem 0 0.75rem; }

.section-head p { color: var(--ink-soft); }

/* welcome */

.welcome { padding-top: 5rem; }

.welcome-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 820px) {
  .welcome-grid { grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; }
}

.welcome-grid h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0.35rem 0 1rem; }

.welcome-grid .lead {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.welcome-grid p + p { margin-top: 0.9rem; }

.welcome-photo img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}

.welcome-photo {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(51, 36, 27, 0.45);
  transform: rotate(1.2deg);
}

/* amenities */

.amenities { background: var(--plaster-deep); }

.amenity-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.amenity {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.4rem 1.4rem 1.5rem;
}

.amenity svg { color: var(--terracotta); margin-bottom: 0.75rem; }

.amenity h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }

.amenity p { color: var(--ink-soft); font-size: 0.97rem; }

/* gallery */

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

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

.gallery-grid figure {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

@media (hover: hover) {
  .gallery-grid figure:hover img { transform: scale(1.04); }
}

.gallery-grid figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.6rem 0.9rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fdf6ea;
  background: linear-gradient(to top, rgba(35, 20, 12, 0.75), transparent);
}

/* location */

.location { background: var(--leaf); color: #f2ede0; }

.location .eyebrow { color: var(--ochre); }

.location h2 { color: #f9f5e9; font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0.35rem 0 0.8rem; }

.location p { max-width: 36rem; color: rgba(242, 237, 224, 0.9); }

/* ---------------- vecinos page ---------------- */

.page-head {
  background: var(--plaster-deep);
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.4rem 0 0.8rem; }

.page-head p { max-width: 36rem; color: var(--ink-soft); }

.vecinos-grid {
  display: grid;
  gap: 1.4rem;
  padding: 3rem 0 4.5rem;
}

@media (min-width: 820px) {
  .vecinos-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.8rem;
}

.panel h2 { font-size: 1.45rem; margin-bottom: 0.5rem; }

.panel > p { color: var(--ink-soft); margin-bottom: 1.1rem; }

.panel-portal { border-top: 4px solid var(--terracotta); }

.panel-docs { border-top: 4px solid var(--ochre); }

.doc-list { list-style: none; }

.doc-list li + li { border-top: 1px solid var(--line); }

.doc-list a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.2rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}

.doc-list a:hover { color: var(--terracotta-deep); }

.doc-list svg { color: var(--terracotta); flex-shrink: 0; }

.doc-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 1.2rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.note { font-size: 0.95rem; color: var(--ink-soft); margin-top: 1.1rem; }

/* ---------------- footer ---------------- */

.site-footer {
  background: #2b1e15;
  color: #cbb9a4;
  padding: 2.6rem 0;
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer .foot-brand {
  font-family: var(--serif);
  color: #f1e5d0;
  font-size: 1.05rem;
}

.site-footer a { color: #e8c883; text-decoration: none; }

.site-footer a:hover { text-decoration: underline; }

/* ---------------- motion ---------------- */

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

.js .reveal.shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero img { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery-grid img { transition: none; }
}
