/* ══ 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); }
.eyebrow--light { color: rgba(255,255,255,0.38); }

.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.2); display: block; margin-bottom: 20px;
}
.footer-lnk {
  display: block; font-size: 13px;
  color: rgba(255,255,255,0.38); 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.38); 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.18); 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.13);
}

/* ── 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.35); }
.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; }
