/* ============================================================================
   Domus Reale — Shared shell stylesheet (nav, footer, theme, container, btn)
   Loaded by vendita / affitto / vendere-casa / valutazione-gratuita / le-case-del-garda / contatti
   Color tokens + theme overrides mirrored from index.html (single source of truth).
   ============================================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --bg-cream: #f1f1f3;
  --bg-dark: #0a0a0a;
  --text: #0a0a0a;
  --text-body: #18181b;
  --text-muted: #52525b;
  --text-faint: #a1a1aa;
  --border: #e4e4e7;
  --border-soft: #f4f4f5;
  --accent: #0a0a0a;
  --accent-hover: #27272a;
  --accent-soft: #f4f4f5;
  --terracotta: #4f46e5;
  --terracotta-soft: #eef2ff;
  --gold: #6366f1;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
}
[data-theme="dark"] {
  --bg: #0b0b0d;
  --bg-soft: #131316;
  --bg-cream: #18181b;
  --bg-dark: #050507;
  --text: #fafafa;
  --text-body: #e4e4e7;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --border: #27272a;
  --border-soft: #1f1f22;
  --accent: #fafafa;
  --accent-hover: #d4d4d8;
  --accent-soft: #1f1f22;
  --terracotta: #818cf8;
  --terracotta-soft: #1e1b4b;
  --gold: #a5b4fc;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}
[data-theme="dark"] .topnav { background: rgba(11, 11, 13, 0.78); }
[data-theme="dark"] .btn { color: #0a0a0a; }
[data-theme="dark"] .btn-ghost { color: var(--text); background: transparent; }
[data-theme="dark"] .btn-ghost:hover { background: var(--bg-soft); border-color: var(--text); }
[data-theme="dark"] .lang-toggle button.active { background: #fafafa; color: #0a0a0a; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: 'Space Grotesk', 'Space Grotesk Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5 { margin: 0; color: var(--text); }
.serif {
  font-family: 'Space Grotesk', 'Space Grotesk Fallback', -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
p { margin: 0 0 1em 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* === Top nav === */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-soft);
}
.topnav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}
.logo {
  font-family: 'Space Grotesk', 'Space Grotesk Fallback', -apple-system, sans-serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
}
.logo span { color: var(--terracotta); font-weight: 600; }
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--text-body);
  flex-wrap: nowrap;
  white-space: nowrap;
}
.nav-links a { white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a.active { font-weight: 500; }
.nav-right {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
}
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
}
.theme-toggle:hover { background: var(--bg-soft); border-color: var(--text-faint); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .theme-sun { display: none; }
.theme-toggle .theme-moon { display: block; }
[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-sun { display: block; }
.lang-toggle { display: flex; gap: 2px; font-size: 12px; letter-spacing: 0.06em; color: var(--text-muted); }
.lang-toggle button {
  background: none;
  border: none;
  padding: 6px 9px;
  color: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  border-radius: 14px;
  font-family: inherit;
}
.lang-toggle button.active { background: var(--bg-dark); color: white; }

.btn {
  padding: 11px 22px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  font-size: 13px;
  border: none;
  letter-spacing: 0.02em;
  font-weight: 500;
  transition: background 0.15s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text); background: var(--bg-soft); }
.btn-lg { padding: 16px 32px; font-size: 14.5px; }
.nav-login { padding: 9px 18px; text-align: center; flex-shrink: 0; }
@media (max-width: 1200px) {
  .nav-links { gap: 16px; font-size: 12.5px; }
  .topnav-inner { gap: 18px; }
}

/* === Generic page hero === */
.page-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border-soft);
}
.page-hero .crumb {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}
.page-hero .crumb a { color: var(--text-muted); }
.page-hero .crumb a:hover { color: var(--accent); }
.page-hero h1 {
  font-family: 'Space Grotesk', 'Space Grotesk Fallback', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 56px;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin-bottom: 18px;
  max-width: 820px;
}
.page-hero h1 em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}
.page-hero .lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 720px;
}

/* Generic section */
.sec {
  padding: 72px 0;
  border-bottom: 1px solid var(--border-soft);
}
.sec:last-of-type { border-bottom: 0; }
.sec-head {
  margin-bottom: 36px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
}
.sec-head h2 {
  font-family: 'Space Grotesk', 'Space Grotesk Fallback', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 36px;
  letter-spacing: -0.04em;
}
.sec-head h2 em { font-style: normal; font-weight: 400; color: var(--text-muted); }
.sec-head .meta { font-size: 13px; color: var(--text-muted); letter-spacing: 0.02em; }

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 {
  font-family: 'Space Grotesk', 'Space Grotesk Fallback', -apple-system, sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

/* Footer */
footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 40px;
  margin-top: 80px;
}
footer .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}
footer h5 {
  font-family: 'Space Grotesk', 'Space Grotesk Fallback', -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 16px;
}
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13px; }
footer ul a:hover { color: var(--terracotta); }
footer .brand {
  font-family: 'Space Grotesk', 'Space Grotesk Fallback', -apple-system, sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: white;
  margin-bottom: 14px;
}
footer .brand span { color: var(--terracotta); }
footer .meta {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

@media (max-width: 1024px) {
  .nav-links { gap: 18px; font-size: 12.5px; }
  .page-hero h1 { font-size: 44px; }
}
@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .topnav-inner { padding: 0 20px; height: 60px; gap: 16px; }
  .nav-links { display: none; }
  .page-hero { padding: 48px 0 36px; }
  .page-hero h1 { font-size: 34px; }
  .page-hero .lead { font-size: 16px; }
  .sec { padding: 48px 0; }
  .sec-head h2 { font-size: 26px; }
  footer .container { grid-template-columns: 1fr; gap: 36px; padding: 0 20px; }
}
