/* =========================================================
   PALACIO ARTÁ — Proyecto de inversión
   ========================================================= */

:root {
  --stone:      #ede7dc;
  --stone-dark: #d8cdb8;
  --ink:        #241f18;
  --ink-soft:   #4a4238;
  --gold:       #b3874a;
  --gold-light: #d9b476;
  --night:      #1c1712;
  --night-2:    #2a2119;
  --white:      #ffffff;
  --radius:     4px;
  --maxw:       1180px;
  --serif: 'Georgia', 'Iowan Old Style', 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--stone);
  line-height: 1.65;
}

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

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  color: var(--ink);
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 18px;
}

.section-lead {
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

section { padding: 90px 0; }
section.tight { padding: 60px 0; }

/* ---------- NAV ---------- */
header.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: rgba(28, 23, 18, 0);
  transition: background 0.35s ease, padding 0.35s ease, box-shadow .35s ease;
}
header.site-nav.solid {
  background: rgba(28, 23, 18, 0.94);
  padding: 12px 28px;
  box-shadow: 0 2px 18px rgba(0,0,0,0.25);
}
.brand {
  font-family: var(--serif);
  color: var(--white);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  color: var(--gold-light);
  margin-top: 2px;
}
nav.links {
  display: flex;
  align-items: center;
  gap: 30px;
}
nav.links a {
  color: var(--white);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  opacity: 0.88;
  transition: opacity .2s;
}
nav.links a:hover { opacity: 1; color: var(--gold-light); }
nav.links a.cta {
  border: 1px solid var(--gold);
  padding: 9px 18px;
  border-radius: var(--radius);
  opacity: 1;
}
nav.links a.cta:hover { background: var(--gold); color: var(--night); }
.nav-toggle { display: none; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,16,12,0.35) 0%, rgba(15,12,9,0.55) 55%, rgba(10,8,6,0.92) 100%), url('../img/fachada-hero.jpg') center/cover no-repeat;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 28px 90px;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero-content .eyebrow { color: var(--gold-light); }
.hero-content h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  max-width: 780px;
  line-height: 1.15;
}
.hero-content p {
  max-width: 560px;
  color: #efe9df;
  margin-top: 18px;
  font-size: 1.05rem;
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-primary { background: var(--gold); color: var(--night); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); }
.btn-ghost { border-color: rgba(255,255,255,0.5); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.hero-scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.7);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 34px;
  background: rgba(255,255,255,0.5);
  animation: scrollpulse 1.8s infinite;
}
@keyframes scrollpulse {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- QUOTE ---------- */
.quote-block {
  background: var(--night);
  color: var(--white);
  text-align: center;
  padding: 100px 0;
}
.quote-block blockquote {
  max-width: 780px;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  font-style: italic;
  line-height: 1.6;
  color: #f1ebe0;
}
.quote-block blockquote::before { content: '\201C'; color: var(--gold); }
.quote-block blockquote::after { content: '\201D'; color: var(--gold); }
.quote-block cite {
  display: block;
  margin-top: 26px;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.quote-disclaimer {
  margin-top: 22px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- STAT GRID (datos del inmueble) ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--stone-dark);
  border: 1px solid var(--stone-dark);
  margin-top: 46px;
}
.stat-cell {
  background: var(--stone);
  padding: 30px 24px;
}
.stat-cell .num {
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--gold);
  display: block;
}
.stat-cell .label {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-top: 6px;
  text-transform: uppercase;
}

/* ---------- LICENCIAS ---------- */
.license-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 46px;
}
.license-card {
  background: var(--white);
  border: 1px solid var(--stone-dark);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.license-card .tick {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.license-card h4 { font-size: 1.05rem; margin-bottom: 6px; }
.license-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* ---------- PROYECTO (dark section w/ cards) ---------- */
.project-section {
  background: var(--night-2);
  color: var(--white);
}
.project-section .eyebrow { color: var(--gold-light); }
.project-section .section-title { color: var(--white); }
.project-section .section-lead { color: rgba(255,255,255,0.7); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 46px;
}
.project-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.project-card .num {
  font-family: var(--serif);
  color: var(--gold-light);
  font-size: 1.6rem;
  display: block;
  margin-bottom: 10px;
}
.project-card p { font-size: 0.86rem; color: rgba(255,255,255,0.75); margin: 0; }

/* progress state */
.status-bar-wrap { margin-top: 50px; }
.status-bar-wrap .status-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 10px;
}
.status-bar {
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  overflow: hidden;
}
.status-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 20px;
  transition: width 1.4s cubic-bezier(.2,.8,.2,1);
}
.status-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
}

/* ---------- ANTES / DESPUÉS ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 50px;
}
.compare-card {
  background: var(--white);
  border: 1px solid var(--stone-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
}
.compare-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .5s ease;
}
.compare-media img.render { opacity: 0; }
.compare-media.show-render img.actual { opacity: 0; }
.compare-media.show-render img.render { opacity: 1; }
.compare-tag {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 3;
  background: rgba(28,23,18,0.75);
  color: var(--white);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 20px;
  pointer-events: none;
}
.compare-toggle {
  position: absolute;
  bottom: 14px; right: 14px;
  z-index: 3;
  background: var(--gold);
  color: var(--night);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 600;
  pointer-events: none;
}
.compare-caption {
  padding: 16px 20px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.compare-caption strong { color: var(--ink); display: block; font-family: var(--serif); font-size: 1.05rem; margin-bottom: 3px; }

/* ---------- INVERSION ---------- */
.invest-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  margin-top: 50px;
  align-items: start;
}
.invest-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--stone-dark);
}
.invest-table th {
  text-align: left;
  background: var(--night);
  color: var(--white);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 18px;
  font-weight: 600;
}
.invest-table td {
  padding: 16px 18px;
  border-top: 1px solid var(--stone-dark);
  font-size: 0.92rem;
}
.invest-table td.amount {
  text-align: right;
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1.05rem;
  white-space: nowrap;
}
.invest-table tr.total td { font-weight: 700; background: var(--stone); }
.invest-table tr.total td.amount { font-size: 1.2rem; }

.roi-card {
  background: var(--night);
  color: var(--white);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.roi-card h4 {
  color: var(--gold-light);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}
.roi-item { margin-bottom: 22px; }
.roi-item:last-child { margin-bottom: 0; }
.roi-item .roi-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}
.roi-item .roi-value { color: var(--white); font-weight: 600; }
.roi-bar {
  height: 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.roi-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gold-light);
  border-radius: 20px;
  transition: width 1.2s ease;
}

/* ---------- GALERIA ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 10px;
  margin-top: 46px;
}
.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}
.gallery-grid figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-grid figure.big { grid-column: span 2; grid-row: span 2; }
.gallery-grid figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent);
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,8,6,0.94);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 2px;
}
.lightbox-close {
  position: absolute;
  top: 26px; right: 32px;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  background: none;
  border: none;
}

/* ---------- CONTACTO ---------- */
.contact-section { background: var(--night); color: var(--white); }
.contact-section .eyebrow { color: var(--gold-light); }
.contact-section .section-title { color: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  margin-top: 46px;
}
.contact-info p { color: rgba(255,255,255,0.72); }
.contact-detail { margin-top: 26px; }
.contact-detail div { margin-bottom: 16px; font-size: 0.92rem; }
.contact-detail span.label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 4px;
}
form.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.92rem;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,0.4); }
.contact-form label { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-bottom: -8px; }
.contact-form button { align-self: flex-start; }
.form-success {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--gold-light);
  display: none;
}
.form-success.show { display: block; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--night);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 28px 20px;
  font-size: 0.76rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
footer strong { color: rgba(255,255,255,0.7); }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .license-row { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-grid { grid-template-columns: 1fr; }
  .invest-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid figure.big { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 720px) {
  nav.links { position: fixed; top: 0; right: 0; height: 100vh; width: 78%; max-width: 320px;
    background: var(--night); flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 26px; padding: 40px; transform: translateX(100%); transition: transform .35s ease; }
  nav.links.open { transform: translateX(0); }
  .nav-toggle {
    display: block; z-index: 110; background: none; border: none; color: var(--white);
    font-size: 1.5rem; cursor: pointer;
  }
  section { padding: 60px 0; }
}
