/* ─── EstateHome — Base ─── */
/* Variables, reset, typography, navigation, footer, buttons */

/* Design tokens (@font-face + :root custom properties) live in the canonical
   design-system package: /estatehome-design/tokens.css — the SOLE source of
   truth for the landing brand surface (Geist + warm-neutral + one clay accent).
   BaseLayout.astro links tokens.css before this file. This file holds only the
   reset, typography helpers, navigation, footer and buttons. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip (not hidden): hidden makes <body> a scroll container, which with a
     position:fixed nav triggers GPU repaint ghosting of page content. */
  overflow-x: clip;
}

/* ─── NAV ─── */
/* Header nav only. Scoped to a direct child of <body> so this rule never
   hits the footer's semantic <nav class="footer-col"> columns (that collision
   was the real cause of the earlier footer "ghost" + the light column boxes). */
body > nav {
  position: sticky; top: 0; z-index: 100;
  padding: 18px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin-inline: auto;
  padding: 0 64px; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-family: var(--font-sans);
  font-size: 20px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-logo span { color: inherit; }
/* Center menu: transactional only (max 3). */
.nav-primary { display: flex; gap: 28px; list-style: none; }
.nav-primary a {
  text-decoration: none; color: var(--text-muted);
  font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
.nav-primary a:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-lang {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 10px;
  background: var(--surface);
}
.nav-lang a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 100px;
  transition: background 0.2s, color 0.2s;
}
.nav-lang a:hover { color: var(--accent); }
.nav-lang a.active {
  background: var(--accent);
  color: #fff;
}
.nav-lang .sep { color: var(--border); }
.nav-login {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  text-decoration: none; padding: 10px 16px;
  border-radius: 8px; transition: color 0.2s, background 0.2s;
}
.nav-login:hover { color: var(--text); background: var(--hover); }
.nav-cta {
  background: var(--text); color: #fff;
  border: none; border-radius: 8px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
  text-decoration: none;
}
.nav-cta:hover { background: #000; }

/* ─── CONTENT-HUB DRAWER ───
   The whole content navigation, grouped by audience, in a right-side slide-in
   drawer (desktop AND mobile). Built on native <details> for a no-JS baseline;
   a small script adds overlay/Esc/scroll-lock. The trigger (summary) sits in
   the bar; overlay + panel are position:fixed. */
.nav-drawer { position: static; }
.nav-menu-trigger {
  list-style: none;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px; font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
}
.nav-menu-trigger::-webkit-details-marker { display: none; }
.nav-menu-trigger:hover { border-color: var(--text); background: var(--hover); }
.nav-menu-icon { display: inline-flex; flex-direction: column; gap: 3px; }
.nav-menu-icon span {
  display: block; width: 16px; height: 2px;
  border-radius: 2px; background: currentColor;
}

.nav-drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(17,17,17,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
}
.nav-drawer[open] .nav-drawer-overlay { opacity: 1; pointer-events: auto; }

.nav-drawer-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(360px, 88vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(17,17,17,0.12);
  padding: 28px 24px 40px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 201;
}
.nav-drawer[open] .nav-drawer-panel { transform: none; }

.nav-drawer-actions {
  display: none; /* shown on mobile; on desktop the bar carries these */
  flex-direction: column; gap: 8px;
  padding-bottom: 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.nav-drawer-action {
  text-decoration: none; color: var(--text);
  font-size: 16px; font-weight: 600; padding: 8px 0;
}
.nav-drawer-login { color: var(--accent); }

.nav-drawer-group { margin-top: 22px; }
.nav-drawer-group:first-of-type { margin-top: 4px; }
.nav-drawer-group-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.nav-drawer-panel a {
  display: block;
  text-decoration: none; color: var(--text-muted);
  font-size: 15px; padding: 8px 0;
  transition: color 0.2s;
}
.nav-drawer-panel a:hover { color: var(--accent); }

/* 'soon' entry: greyed, not clickable, with a small badge. */
.nav-soon {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted); opacity: 0.55;
  font-size: 15px; padding: 8px 0; cursor: default;
}
.nav-soon em {
  font-style: normal;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px; padding: 2px 8px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-drawer-overlay, .nav-drawer-panel { transition: none; }
}

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--text);
  color: #fff;
  border: none; border-radius: var(--radius);
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(17,17,17,0.08);
  text-decoration: none; display: inline-block;
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(17,17,17,0.14);
}
.btn-secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 13px 26px;
  font-family: inherit;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none; display: inline-block;
}
.btn-secondary:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--hover);
}

/* ─── FOOTER (dark, multi-column) ─── */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  padding: 56px max(24px, calc((100% - var(--max-w)) / 2)) 0;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand { max-width: 320px; }
.footer-logo {
  font-family: var(--font-sans);
  font-size: 18px; font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.footer-logo span { color: inherit; }
.footer-tagline {
  margin-top: 12px;
  font-size: 14px; line-height: 1.6;
  color: rgba(255,255,255,0.6);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-head {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.footer-link {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-link:hover { color: #fff; }
.footer-contact {
  font-style: normal;
  display: flex; flex-direction: column; gap: 8px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}
.footer-contact-company { color: #fff; font-weight: 600; }
.footer-link-btn {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; cursor: pointer; text-align: left;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ─── RESPONSIVE NAV/FOOTER ─── */
@media (max-width: 900px) {
  .nav-inner { padding: 0 24px; gap: 12px; }
  /* Center transactional links + login pill collapse into the drawer, which
     repeats them in its .nav-drawer-actions block. */
  .nav-primary { display: none; }
  .nav-login { display: none; }
  .nav-menu-trigger .nav-menu-text { display: none; }
  .nav-drawer-actions { display: flex; }
  .site-footer { padding-top: 44px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}
