/* ===== VARIABLES ===== */
:root {
  --terracotta: #C4654A;
  --terracotta-light: #E8A990;
  --sun: #F4B942;
  --sun-pale: #FDF3D8;
  --sea: #2E7D8A;
  --sea-light: #5BA3AD;
  --sand: #FAF6F0;
  --sand-dark: #EDE6DA;
  --olive: #6B7B3C;
  --ink: #1A1A1A;
  --ink-light: #4A4A4A;
  --ink-muted: #7A7A7A;
  --white: #FFFFFF;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-normal: 0.4s var(--ease-out);
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { 
  scroll-behavior: smooth;
  overflow-x: hidden; /* FIX: Needed for iOS */
}
body { 
  font-family: var(--font-body); 
  background: var(--sand); 
  color: var(--ink); 
  line-height: 1.6; 
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw; /* FIX: Prevent body expanding beyond viewport */
}
.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 var(--space-md); 
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  padding: var(--space-md);
  background: var(--white);
  border-top: 1px solid var(--sand-dark);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner.hidden { display: none; }

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.cookie-text { flex: 1; min-width: 280px; }
.cookie-text h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cookie-text h3 i { color: var(--sun); }
.cookie-text p { font-size: 0.9rem; color: var(--ink-light); line-height: 1.5; }
.cookie-text a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 2px; }

.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}
.cookie-btn.accept { background: var(--ink); color: var(--white); }
.cookie-btn.accept:hover { background: var(--terracotta); }
.cookie-btn.decline { background: var(--sand); color: var(--ink); border: 1px solid var(--sand-dark); }
.cookie-btn.decline:hover { background: var(--sand-dark); }
.cookie-btn.settings { background: transparent; color: var(--ink-muted); padding: 0.75rem 1rem; }
.cookie-btn.settings:hover { color: var(--ink); }

/* ===== COOKIE SETTINGS MODAL ===== */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.cookie-modal-overlay.visible { opacity: 1; visibility: visible; }

.cookie-modal {
  background: var(--white);
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.cookie-modal-overlay.visible .cookie-modal { transform: translateY(0); }

.cookie-modal-header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--sand-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cookie-modal-header h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }

.cookie-modal-close {
  background: none; border: none;
  font-size: 1.5rem; color: var(--ink-muted);
  cursor: pointer; padding: 0.5rem;
  transition: color var(--transition-fast);
}
.cookie-modal-close:hover { color: var(--ink); }

.cookie-modal-body { padding: var(--space-md); }

.cookie-option { padding: var(--space-sm) 0; border-bottom: 1px solid var(--sand-dark); }
.cookie-option:last-child { border-bottom: none; }
.cookie-option-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.cookie-option h4 { font-weight: 600; font-size: 0.9375rem; }
.cookie-option p { font-size: 0.8125rem; color: var(--ink-muted); line-height: 1.5; }

.toggle-switch { position: relative; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--sand-dark);
  border-radius: 26px;
  transition: background var(--transition-fast);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px; width: 20px;
  left: 3px; bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.toggle-switch input:checked + .toggle-slider { background: var(--olive); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }
.toggle-switch input:disabled + .toggle-slider { opacity: 0.6; cursor: not-allowed; }

.cookie-modal-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--sand-dark);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-sm) 0;
  background: rgba(250, 246, 240, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26, 26, 26, 0.06);
  transition: transform var(--transition-normal);
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.nav-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: var(--space-md); 
}

.logo {
  font-family: var(--font-display);
  font-size: 1.75rem; 
  font-weight: 700;
  color: var(--ink); 
  text-decoration: none;
  display: flex; 
  align-items: center; 
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo-dot {
  width: 10px; height: 10px;
  background: var(--terracotta);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.nav-links { display: flex; align-items: center; gap: var(--space-xs); }

.nav-link {
  font-size: 0.875rem; 
  font-weight: 500;
  color: var(--ink-light); 
  text-decoration: none;
  padding: 0.6rem 1rem; 
  border-radius: 100px;
  transition: all var(--transition-fast);
}
.nav-link:hover { color: var(--ink); background: rgba(196, 101, 74, 0.1); }

.nav-cta { 
  background: var(--ink); 
  color: var(--white); 
  font-weight: 600; 
  padding: 0.6rem 1.25rem; 
}
.nav-cta:hover { background: var(--terracotta); color: var(--white); }

.nav-toggle { 
  display: none; 
  background: none; 
  border: none; 
  font-size: 1.5rem; 
  color: var(--ink); 
  cursor: pointer; 
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--sand);
  z-index: 99;
  padding: calc(80px + var(--space-lg)) var(--space-md) var(--space-lg);
  flex-direction: column;
  gap: var(--space-sm);
}
.mobile-menu.active { display: flex; }
.mobile-menu a { 
  font-size: 1.25rem; 
  font-weight: 600; 
  color: var(--ink); 
  text-decoration: none; 
  padding: var(--space-sm); 
  border-radius: 12px; 
  transition: background var(--transition-fast); 
}
.mobile-menu a:hover { background: var(--white); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  padding: calc(80px + var(--space-2xl)) 0 var(--space-2xl);
  display: flex; 
  align-items: center;
  position: relative; 
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--sun-pale) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(46, 125, 138, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
  pointer-events: none;
  z-index: 0;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(5deg); }
  66% { transform: translate(-20px, 20px) rotate(-3deg); }
}

.hero-content {
  position: relative; 
  z-index: 1;
  display: grid; 
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl); 
  align-items: center;
}

.hero-text { 
  animation: slideUp 0.8s var(--ease-out) forwards; 
  opacity: 0; 
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--white);
  border: 1px solid var(--sand-dark);
  border-radius: 100px;
  font-size: 0.8rem; 
  font-weight: 600;
  color: var(--terracotta);
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.hero-title span { color: var(--terracotta); font-style: italic; }

.hero-desc {
  font-size: 1.125rem;
  color: var(--ink-light);
  max-width: 480px;
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.hero-actions { 
  display: flex; 
  gap: var(--space-sm); 
  flex-wrap: wrap; 
}

.btn {
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem; 
  font-weight: 600;
  text-decoration: none; 
  border-radius: 100px;
  transition: all var(--transition-fast);
  cursor: pointer; 
  border: none;
}

.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover {
  background: var(--terracotta);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(196, 101, 74, 0.3);
}

.btn-secondary { 
  background: var(--white); 
  color: var(--ink); 
  border: 1px solid var(--sand-dark); 
}
.btn-secondary:hover { background: var(--sun-pale); border-color: var(--sun); }

.hero-visual { 
  position: relative; 
  animation: slideUp 0.8s var(--ease-out) 0.2s forwards; 
  opacity: 0; 
}

.hero-card {
  background: var(--white);
  border-radius: 24px;
  padding: var(--space-lg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 20px 60px rgba(0, 0, 0, 0.08);
  position: relative; 
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--terracotta), var(--sun), var(--sea));
}

.card-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-start; 
  margin-bottom: var(--space-md); 
}
.card-label { 
  font-size: 0.75rem; 
  font-weight: 600; 
  text-transform: uppercase; 
  letter-spacing: 0.1em; 
  color: var(--ink-muted); 
}
.card-badge { 
  display: flex; 
  align-items: center; 
  gap: 0.35rem; 
  font-size: 0.75rem; 
  color: var(--olive); 
  font-weight: 500; 
}
.card-badge i { font-size: 0.5rem; animation: blink 2s ease-in-out infinite; }

@keyframes blink { 
  0%, 100% { opacity: 1; } 
  50% { opacity: 0.3; } 
}

.dashboard-item {
  display: flex; 
  align-items: center; 
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--sand); 
  border-radius: 16px;
  margin-bottom: var(--space-sm);
  transition: all var(--transition-fast);
}
.dashboard-item:hover { background: var(--sun-pale); transform: translateX(4px); }

.dashboard-icon {
  width: 44px; 
  height: 44px; 
  border-radius: 12px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 1.25rem; 
  flex-shrink: 0;
}
.dashboard-icon.sun { background: linear-gradient(135deg, #FEF3C7, #FDE68A); }
.dashboard-icon.sea { background: linear-gradient(135deg, #CFFAFE, #A5F3FC); }
.dashboard-icon.culture { background: linear-gradient(135deg, #FCE7F3, #FBCFE8); }
.dashboard-icon.bike { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); }

.dashboard-text { 
  flex: 1; 
  min-width: 0; 
  overflow: hidden;
}
.dashboard-title { 
  font-weight: 600; 
  font-size: 0.9375rem; 
  margin-bottom: 0.125rem; 
}
.dashboard-desc { 
  font-size: 0.8125rem; 
  color: var(--ink-muted); 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}

.dashboard-meta { 
  font-size: 0.75rem; 
  font-weight: 600; 
  color: var(--ink-light); 
  white-space: nowrap; 
}

/* ===== STATS STRIP ===== */
.stats-strip { 
  padding: var(--space-xl) 0; 
  background: var(--white); 
  border-top: 1px solid var(--sand-dark); 
  border-bottom: 1px solid var(--sand-dark); 
}

.stats-grid { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: var(--space-lg); 
}

.stat-item { text-align: center; }

.stat-icon {
  width: 48px; height: 48px;
  margin: 0 auto var(--space-sm);
  background: var(--sand); 
  border-radius: 16px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 1.25rem;
}

.stat-label { 
  font-size: 0.75rem; 
  font-weight: 600; 
  text-transform: uppercase; 
  letter-spacing: 0.1em; 
  color: var(--ink-muted); 
  margin-bottom: 0.25rem; 
}

.stat-value { 
  font-family: var(--font-display); 
  font-size: 1.25rem; 
  font-weight: 600; 
  color: var(--ink); 
}

/* ===== SECTION STYLES ===== */
section { padding: var(--space-2xl) 0; }

.section-header { 
  text-align: center; 
  max-width: 600px; 
  margin: 0 auto var(--space-xl); 
}

.section-tag {
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: var(--terracotta); 
  color: var(--white);
  font-size: 0.75rem; 
  font-weight: 600;
  text-transform: uppercase; 
  letter-spacing: 0.08em;
  border-radius: 100px;
  margin-bottom: var(--space-sm);
}

.section-title { 
  font-family: var(--font-display); 
  font-size: clamp(2rem, 4vw, 3rem); 
  font-weight: 700; 
  margin-bottom: var(--space-sm); 
  letter-spacing: -0.02em; 
}

.section-desc { 
  font-size: 1.0625rem; 
  color: var(--ink-light); 
  line-height: 1.7; 
}

/* ===== GUIDE GRID ===== */
.guide-section { background: var(--white); }

.guide-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: var(--space-md); 
}

.guide-card {
  background: var(--sand); 
  border-radius: 20px; 
  padding: var(--space-lg);
  transition: all var(--transition-normal);
  position: relative; 
  overflow: hidden;
}
.guide-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--sun) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.guide-card:hover { 
  transform: translateY(-8px); 
  box-shadow: 0 20px 60px rgba(196, 101, 74, 0.15); 
}
.guide-card:hover::before { opacity: 0.05; }
.guide-card > * { position: relative; z-index: 1; }

.guide-emoji {
  width: 56px; height: 56px;
  background: var(--white); 
  border-radius: 16px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.guide-tag { 
  font-size: 0.6875rem; 
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: 0.1em; 
  color: var(--terracotta); 
  margin-bottom: 0.5rem; 
}

.guide-title { 
  font-family: var(--font-display); 
  font-size: 1.5rem; 
  font-weight: 700; 
  margin-bottom: 0.75rem; 
}

.guide-text { 
  font-size: 0.9375rem; 
  color: var(--ink-light); 
  margin-bottom: var(--space-md); 
  line-height: 1.65; 
}

.guide-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.guide-link {
  display: inline-flex; 
  align-items: center; 
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  background: var(--white); 
  border-radius: 100px;
  font-size: 0.8125rem; 
  font-weight: 600;
  color: var(--ink); 
  text-decoration: none;
  transition: all var(--transition-fast);
}
.guide-link:hover { background: var(--ink); color: var(--white); }
.guide-link i { font-size: 0.75rem; }

/* ===== NEIGHBORHOODS ===== */
.neighborhoods-section { 
  background: linear-gradient(180deg, var(--sand) 0%, var(--white) 100%); 
}

.neighborhoods-layout { 
  display: grid; 
  grid-template-columns: 2fr 1fr; 
  gap: var(--space-lg); 
}

.neighborhoods-main { 
  background: var(--white); 
  border-radius: 24px; 
  padding: var(--space-lg); 
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.06); 
}

.neighborhoods-header { margin-bottom: var(--space-md); }

.neighborhoods-title { 
  font-family: var(--font-display); 
  font-size: 1.75rem; 
  font-weight: 700; 
  margin-bottom: 0.5rem; 
}

.neighborhoods-desc { 
  color: var(--ink-light); 
  font-size: 0.9375rem; 
}

.vibe-tags { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.5rem; 
  margin-bottom: var(--space-md); 
}

.vibe-tag {
  padding: 0.4rem 0.75rem;
  background: var(--sand); 
  border-radius: 100px;
  font-size: 0.75rem; 
  font-weight: 600;
  color: var(--ink-light);
  display: flex; 
  align-items: center; 
  gap: 0.35rem;
}
.vibe-tag i { color: var(--terracotta); }

.neighborhood-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: var(--space-sm); 
}

.neighborhood-card {
  display: flex; 
  align-items: flex-start; 
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--sand); 
  border-radius: 16px;
  transition: all var(--transition-fast);
  text-decoration: none; 
  color: inherit;
}
.neighborhood-card:hover { background: var(--sun-pale); transform: translateX(4px); }

.neighborhood-emoji {
  width: 44px; height: 44px;
  background: var(--white); 
  border-radius: 12px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 1.25rem; 
  flex-shrink: 0;
}

.neighborhood-info h4 { font-weight: 700; margin-bottom: 0.125rem; }
.neighborhood-info p { font-size: 0.8125rem; color: var(--ink-muted); line-height: 1.5; }

.quickstart-sidebar { 
  display: flex; 
  flex-direction: column; 
  gap: var(--space-md); 
}

.quickstart-card { 
  background: var(--white); 
  border-radius: 20px; 
  padding: var(--space-md); 
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04); 
}
.quickstart-card h3 { 
  font-family: var(--font-display); 
  font-size: 1.25rem; 
  font-weight: 700; 
  margin-bottom: var(--space-sm); 
}

.quickstart-item {
  display: flex; 
  align-items: flex-start; 
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--sand-dark);
  text-decoration: none; 
  color: inherit;
  transition: all var(--transition-fast);
}
.quickstart-item:last-child { border-bottom: none; }
.quickstart-item:hover { padding-left: 0.5rem; }
.quickstart-item i { color: var(--sea); margin-top: 0.125rem; }
.quickstart-item h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.125rem; }
.quickstart-item p { font-size: 0.8125rem; color: var(--ink-muted); }

.quickstart-meta { 
  font-size: 0.75rem; 
  font-weight: 600; 
  color: var(--terracotta); 
  white-space: nowrap; 
  margin-left: auto; 
}

/* ===== NEWSLETTER ===== */
.newsletter-section { 
  background: var(--ink); 
  color: var(--white); 
  position: relative; 
  overflow: hidden; 
}
.newsletter-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(244, 185, 66, 0.15) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.newsletter-content {
  position: relative; 
  z-index: 1;
  display: grid; 
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl); 
  align-items: center;
}

.newsletter-text h2 { 
  font-family: var(--font-display); 
  font-size: clamp(2rem, 4vw, 2.75rem); 
  font-weight: 700; 
  margin-bottom: var(--space-sm); 
}
.newsletter-text p { 
  font-size: 1.0625rem; 
  color: rgba(255, 255, 255, 0.7); 
  line-height: 1.7; 
}

.newsletter-form { 
  display: flex; 
  gap: var(--space-sm); 
  flex-wrap: wrap; 
}

.newsletter-input {
  flex: 1; 
  min-width: 200px;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  color: var(--white);
  font-family: var(--font-body); 
  font-size: 1rem;
  outline: none;
  transition: all var(--transition-fast);
}
.newsletter-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.newsletter-input:focus { background: rgba(255, 255, 255, 0.15); border-color: var(--sun); }
.newsletter-input:disabled { opacity: 0.6; cursor: not-allowed; }

.newsletter-btn {
  padding: 1rem 2rem;
  background: var(--sun); 
  color: var(--ink);
  font-family: var(--font-body); 
  font-size: 1rem; 
  font-weight: 700;
  border: none; 
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem;
  white-space: nowrap;
}
.newsletter-btn:hover:not(:disabled) { background: var(--white); transform: translateY(-2px); }
.newsletter-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.newsletter-btn .spinner {
  width: 18px; height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.newsletter-note { 
  margin-top: var(--space-sm); 
  font-size: 0.8125rem; 
  color: rgba(255, 255, 255, 0.5); 
}

.newsletter-signup{ max-width:720px; }

.newsletter-legal{
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,.5);
  text-align: left;
}

.newsletter-message{
  margin-top: var(--space-sm);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.newsletter-message.success { background: rgba(102, 187, 106, 0.2); color: #a5d6a7; }
.newsletter-message.error { background: rgba(239, 83, 80, 0.2); color: #ef9a9a; }

/* Hidden iframe for Brevo form submission */
.brevo-iframe { display: none; }

/* Brevo honeypot field - must be hidden */
.input--hidden { 
  position: absolute;
  left: -5000px;
}

/* ===== FOOTER ===== */
footer { 
  background: var(--sand); 
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-top { 
  display: grid; 
  grid-template-columns: 2fr 1fr 1fr 1fr; 
  gap: var(--space-xl); 
  margin-bottom: var(--space-xl); 
}

.footer-brand { max-width: 280px; }
.footer-brand .logo { margin-bottom: var(--space-sm); }
.footer-brand p { font-size: 0.9375rem; color: var(--ink-light); line-height: 1.65; }

.footer-col h4 { 
  font-size: 0.75rem; 
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: 0.1em; 
  color: var(--ink-muted); 
  margin-bottom: var(--space-sm); 
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { 
  font-size: 0.9375rem; 
  color: var(--ink-light); 
  text-decoration: none; 
  transition: color var(--transition-fast); 
}
.footer-col a:hover { color: var(--terracotta); }

.footer-bottom {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  flex-wrap: wrap; 
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--sand-dark);
}

.footer-copy { font-size: 0.875rem; color: var(--ink-muted); }

.footer-social { display: flex; gap: 0.75rem; }

.social-link {
  width: 40px; height: 40px;
  background: var(--white); 
  border-radius: 12px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: var(--ink-light); 
  text-decoration: none;
  transition: all var(--transition-fast);
}
.social-link:hover { 
  background: var(--ink); 
  color: var(--white); 
  transform: translateY(-2px); 
}

.cookie-settings-link { cursor: pointer; }


/* ===========================================
   RESPONSIVE BREAKPOINTS
   =========================================== */

/* Tablet and below */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  
  .hero-content { 
    grid-template-columns: 1fr; 
    text-align: center; 
  }
  
  .hero-desc { 
    margin-left: auto; 
    margin-right: auto;
    max-width: 100%;
  }
  
  .hero-actions { 
    justify-content: center; 
  }
  
  .hero-visual {
    max-width: 500px;
    margin: 0 auto;
  }
  
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  
  .neighborhoods-layout { grid-template-columns: 1fr; }
}

/* Medium screens */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  
  .newsletter-content { 
    grid-template-columns: 1fr; 
    text-align: center; 
  }
  
  .newsletter-form { 
    justify-content: center; 
  }
  
  .newsletter-legal {
    text-align: center;
  }

  .footer-top { grid-template-columns: 1fr 1fr; }
  
  .cookie-content {
    justify-content: center;
    text-align: center;
  }
  
  .cookie-text h3 {
    justify-content: center;
  }
}

/* Small screens / Mobile */
@media (max-width: 600px) {
  :root {
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }
  
  /* NUCLEAR FIX: Force all elements to respect viewport width */
  /* Note: Using 100% instead of 100vw because 100vw can include scrollbar width on iOS */
  *, *::before, *::after {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  section {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  .hero {
    min-height: auto;
    padding: calc(70px + var(--space-xl)) 0 var(--space-xl);
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* fallback */
    overflow: clip; /* stricter, if supported */
  }
  
  /* Hide decorative elements that cause overflow */
  .hero::before,
  .hero::after {
    display: none !important;
  }
  
  .hero-content {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    overflow: clip;
  }
  
  .hero-text {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    overflow: clip;
    animation: none;
    opacity: 1;
  }
  
  .hero-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.85rem;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
  
  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
  }
  
  .hero-desc {
    font-size: 0.9375rem;
    max-width: 100%;
    width: 100%;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    word-break: break-word;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    max-width: 100%;
  }
  
  .hero-visual {
    width: 100%;
    max-width: 100%;
    animation: none;
    opacity: 1;
  }
  
  .hero-card {
    padding: var(--space-md);
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  
  .dashboard-item {
    padding: 0.75rem;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
  }
  
  .dashboard-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.1rem;
  }
  
  .dashboard-text {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }
  
  .dashboard-title {
    font-size: 0.875rem;
  }
  
  .dashboard-desc {
    font-size: 0.75rem;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .dashboard-meta {
    font-size: 0.7rem;
    flex-shrink: 0;
  }
  
  .guide-grid { grid-template-columns: 1fr; }
  
  .guide-card {
    width: 100%;
    max-width: 100%;
  }
  
  .neighborhood-grid { grid-template-columns: 1fr; }
  
  .neighborhoods-main,
  .quickstart-sidebar,
  .quickstart-card {
    width: 100%;
    max-width: 100%;
  }
  
  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .cookie-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  
  .stats-grid {
    width: 100%;
    max-width: 100%;
  }
  
  .stat-item {
    max-width: 100%;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  /* Newsletter section */
  .newsletter-section {
    width: 100%;
    max-width: 100%;
  }
  
  .newsletter-section::before {
    display: none !important;
  }
  
  .newsletter-content {
    width: 100%;
    max-width: 100%;
  }
  
  .newsletter-signup {
    width: 100%;
    max-width: 100%;
  }
  
  /* Footer */
  .footer-top {
    width: 100%;
    max-width: 100%;
  }
  
  .footer-brand,
  .footer-col {
    width: 100%;
    max-width: 100%;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .footer-top { grid-template-columns: 1fr; }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .hero-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }
  
  .hero-card {
    border-radius: 16px;
    padding: var(--space-sm);
  }
  
  .card-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .newsletter-input {
    min-width: 100%;
    width: 100%;
  }
  
  .newsletter-btn {
    width: 100%;
    justify-content: center;
  }
  
  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }
  
  .newsletter-text h2 {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .guide-emoji {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  
  .guide-title {
    font-size: 1.25rem;
  }
}
