/* ══ MR.HOMES — Estilos compartidos (header, footer, base) ══════════════ */

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: #fff;
  color: var(--color-black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; padding: 0; }
::selection { background: var(--color-red); color: #fff; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
}

/* ── Typography helpers ─────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 18px;
}
.eyebrow--red   { color: var(--color-red-light, #f01e2c); }
.eyebrow--light { color: rgba(255,255,255,0.62); }

.hed {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  line-height: 0.93;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease,
              border-color 120ms ease, transform 120ms ease;
}
.btn:active { transform: scale(0.98); }
.btn--sm  { padding: 10px 24px; font-size: 10px; border: 2px solid transparent; }
.btn--lg  { padding: 19px 48px; font-size: 12px; border: 2px solid transparent; }

.btn--red { background: var(--color-red); color: #fff; border-color: var(--color-red); }
.btn--red:hover { background: var(--color-red-dark, #a93226); border-color: var(--color-red-dark, #a93226); }

.btn--ghost-light { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.45); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.7); }

.btn--ghost-card {
  background: transparent; color: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 13px 26px; font-size: 11px;
}
.btn--ghost-card:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.55); }

.btn--ghost-xs {
  background: transparent; color: rgba(255,255,255,0.48);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 11px 26px; font-size: 10px;
}
.btn--ghost-xs:hover { color: #fff; border-color: rgba(255,255,255,0.45); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  border-bottom: 1px solid transparent;
  transition: background 300ms ease, border-color 300ms ease;
}
.site-header.scrolled {
  background: rgba(10,10,10,0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255,255,255,0.08);
}
.logo { display: flex; align-items: center; gap: 11px; }
.logo__mark { width: 30px; height: 25px; display: block; flex-shrink: 0; }
.logo__name {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  text-transform: uppercase; letter-spacing: -0.025em;
  color: #fff; line-height: 1;
}
.logo__name b { color: var(--color-red); font-weight: 700; }
.main-nav { display: flex; align-items: center; gap: 36px; }
.nav-link {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; border-bottom-color: var(--color-red); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 72px 0 40px;
}
.footer-inner {
  display: grid; grid-template-columns: 2.5fr 1fr 1fr 1.5fr;
  gap: 56px; margin-bottom: 60px;
}
.footer-brand__name {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  text-transform: uppercase; letter-spacing: -0.025em;
  color: #fff; margin-bottom: 14px; line-height: 1;
}
.footer-brand__name b { color: var(--color-red); font-weight: 700; }
.footer-brand__tag {
  font-family: var(--font-accent);
  font-size: 10px; font-style: italic;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.52); line-height: 1.8;
}
.footer-col-head {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); display: block; margin-bottom: 20px;
}
.footer-lnk {
  display: block; font-size: 13px;
  color: rgba(255,255,255,0.58); margin-bottom: 10px;
  transition: color 120ms ease;
}
.footer-lnk:hover { color: rgba(255,255,255,0.75); }
.footer-info { display: block; font-size: 13px; color: rgba(255,255,255,0.58); margin-bottom: 10px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 0.04em; }
.footer-motto {
  font-family: var(--font-accent);
  font-size: 10px; font-style: italic;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.48);
}

/* ── Hamburger ──────────────────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 100%; height: 1.5px;
  background: rgba(255,255,255,0.8);
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile-cta { display: none !important; }

/* ── Responsive — Tablet (≤1024px) ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .container { padding: 0 40px; }
  .site-header { padding: 0 32px; }

  .nav-toggle    { display: flex; }
  .header-cta    { display: none !important; }

  .main-nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(8,8,8,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 12px 32px 28px;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 250ms ease, opacity 200ms ease;
    pointer-events: none;
    z-index: 99;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link {
    font-size: 14px; letter-spacing: 0.1em;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.7);
  }
  .nav-mobile-cta {
    display: flex;
    margin-top: 20px; width: 100%;
    justify-content: center;
    padding: 16px; font-size: 11px;
  }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* ── Responsive — Mobile (≤768px) ──────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .site-header { padding: 0 20px; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-inner > div { text-align: center; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .site-footer { padding: 56px 0 32px; }
}

/* ── Passcode gate ──────────────────────────────────────────────────────── */
html.gate-locked body { visibility: hidden; }

#passcode-gate {
  visibility: visible;
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-black);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
html.gate-locked #passcode-gate { display: flex; }

.gate-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.gate-card .eyebrow { justify-content: center; display: flex; }
.gate-card .hed { color: #fff; font-size: 28px; margin-bottom: 28px; }
.gate-input {
  width: 100%;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 16px;
  margin-bottom: 14px;
  outline: none;
}
.gate-input:focus { border-color: var(--color-red); }
.gate-input::placeholder { color: rgba(255,255,255,0.45); }
.gate-error {
  color: var(--color-red-light, #f01e2c);
  font-size: 11px;
  letter-spacing: 0.06em;
  margin-top: 12px;
  min-height: 14px;
}
#passcode-gate .btn { width: 100%; justify-content: center; }

/* ── Form submit status ─────────────────────────────────────────────────── */
.form-status {
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
  margin-top: 12px;
  min-height: 0;
}
.form-status--ok { color: #6fcf6f; }
.form-status--error { color: var(--color-red-light, #f01e2c); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Legal pages (Aviso Legal / Privacidad / Cookies) ───────────────────── */
.legal-hero {
  background: var(--color-black);
  padding: 160px 0 64px;
}
.legal-hero .container { max-width: 760px; }
.legal-hero .eyebrow { margin-bottom: 16px; }
.legal-hero .hed { color: #fff; font-size: clamp(32px, 4vw, 52px); }
.legal-hero .legal-updated {
  display: block;
  margin-top: 18px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
.legal-content { background: #fff; padding: 72px 0 120px; }
.legal-content .container { max-width: 760px; }
.legal-content h2 {
  font-family: var(--font-body);
  font-size: 20px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.01em;
  color: var(--color-black);
  margin: 48px 0 16px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p {
  font-size: 15px; line-height: 1.75;
  color: rgba(26,26,26,0.68);
  margin-bottom: 16px;
}
.legal-content ul { margin: 0 0 16px; padding-left: 20px; }
.legal-content li {
  font-size: 15px; line-height: 1.75;
  color: rgba(26,26,26,0.68);
  margin-bottom: 8px;
}
.legal-content a { color: var(--color-red); border-bottom: 1px solid rgba(227,6,19,0.3); }
.legal-content a:hover { border-bottom-color: var(--color-red); }
.legal-content strong { color: var(--color-black); font-weight: 700; }
.legal-content .legal-fill {
  background: rgba(227,6,19,0.08);
  color: var(--color-red-dark, #a93226);
  padding: 1px 6px;
  font-weight: 600;
}
@media (max-width: 768px) {
  .legal-hero { padding: 120px 0 48px; }
  .legal-content { padding: 48px 0 80px; }
}

/* ── Cookie consent banner ──────────────────────────────────────────────── */
#cookie-consent { position: relative; z-index: 9997; }

.cookie-bar[hidden] { display: none; }
.cookie-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9997;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-bar__text {
  flex: 1 1 420px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.7);
  margin: 0;
}
.cookie-bar__text a { color: var(--color-red-light, #f01e2c); border-bottom: 1px solid rgba(240,30,44,0.4); }
.cookie-bar__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  padding: 20px;
}
.cookie-modal.open { display: flex; }
.cookie-modal__card {
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.12);
  max-width: 560px; width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
}
.cookie-modal__title { color: #fff; font-size: 22px; margin-bottom: 24px; }
.cookie-cat { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cookie-cat:last-of-type { border-bottom: none; }
.cookie-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.cookie-cat__name {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: #fff;
}
.cookie-cat__badge { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.45); flex-shrink: 0; }
.cookie-cat__desc { font-size: 13px; line-height: 1.65; color: rgba(255,255,255,0.6); margin: 0; }
.cookie-modal__actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

.cookie-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.cookie-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.cookie-toggle__track {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms ease;
}
.cookie-toggle__track::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 150ms ease;
}
.cookie-toggle input:checked + .cookie-toggle__track { background: var(--color-red); }
.cookie-toggle input:checked + .cookie-toggle__track::before { transform: translateX(18px); }

@media (max-width: 768px) {
  .cookie-bar { padding: 18px 20px; flex-direction: column; align-items: stretch; }
  .cookie-bar__actions { justify-content: stretch; }
  .cookie-bar__actions .btn { flex: 1 1 auto; justify-content: center; }
  .cookie-modal__card { padding: 28px 24px; }
}

.cookie-float-btn[hidden] { display: none; }
.cookie-float-btn {
  position: fixed;
  left: 20px; bottom: 20px;
  z-index: 9996;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-black);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: transform 150ms ease, border-color 150ms ease;
}
.cookie-float-btn:hover { transform: scale(1.08); border-color: rgba(255,255,255,0.35); }
