/* ==========================================================================
   SismApp Landing Page Stylesheet
   Design System: Earth Contemporary (Fedele all'app Flutter SismApp)
   Palette: Pumice Stone, Volcanic Forest, Tuscan Terracotta, Pure Paper
   ========================================================================== */

/* impeccable-disable cream-palette -- committed brand palette from Flutter AppColors */

:root {
  /* Earth Contemporary Palette - sincronizzata con lib/src/design/app_theme.dart */
  --bg-pumice: #F8F6F0;        /* Sfondo app ufficiale: pietra pomice / calcare */
  --surface-paper: #FFFCF7;    /* Superficie carte: carta avorio calda (solida, 6 caratteri hex) */
  --surface-muted: #F2EFE8;    /* Superficie secondaria / segmenti */
  --surface-elevated: #FFFFFF; /* Elevazione massima */
  
  --primary-volcanic: #173B2D; /* Verde vulcanico scuro (titoli principali e wordmark) */
  --text-heading: #173B2D;     /* Testo titoli light */
  --skip-bg: #173B2D;
  --skip-color: #FFFFFF;
  --badge-community-color: #8E3427;
  --badge-official-color: #173B2D;
  --manifesto-bg: #173B2D;
  --manifesto-text: #FFFFFF;
  --manifesto-subtext: #CFDDD5;
  
  --primary-pine: #244F3A;     /* Verde pino istituzionale app */
  --primary-pale: #E2EAE5;     /* Badge ufficiale INGV sfondo */
  --primary-border: #C7D7CD;   /* Badge ufficiale INGV bordo */
  
  --sage: #708A74;             /* Verde salvia ad alto contrasto */
  
  --terracotta: #B95737;       /* Terracotta toscana (accento SismaPulse / Segnala) */
  --terracotta-pale: #F8ECE6;  /* Badge community sfondo */
  --terracotta-border: #ECD6CC;/* Badge community bordo */
  --terracotta-dark: #8E3427;  /* Terracotta scuro / magnitudo forte */
  
  --amber: #E2A346;            /* Ambra / magnitudo lieve-moderata */
  --amber-pale: #FFF7ED;       /* Badge preliminare sfondo */
  --amber-border: #FDBA74;     /* Badge preliminare bordo */
  --amber-text: #9A3412;       /* Badge preliminare testo */
  
  --btn-primary-bg: #173B2D;
  --btn-primary-color: #FFFFFF;
  --btn-primary-hover-bg: #244F3A;
  --btn-primary-hover-color: #FFFFFF;

  --btn-terracotta-bg: #B95737;
  --btn-terracotta-color: #FFFFFF;
  --btn-terracotta-hover-bg: #8E3427;
  --btn-terracotta-hover-color: #FFFFFF;

  --mag-strong-bg: #8E342F;
  --mag-strong-color: #FFFFFF;
  --mag-terracotta-bg: #B95737;
  --mag-terracotta-color: #FFFFFF;
  --mag-amber-bg: #E2A346;
  --mag-amber-color: #173B2D;
  --mag-sage-bg: #D6DFD8;
  --mag-sage-color: #173B2D;
  
  --text-primary: #1D3027;     /* Testo di lettura (inchiostro vulcanico) - 10:1 */
  --text-secondary: #4A5A52;   /* Testo secondario verificato WCAG AA >= 5.5:1 */
  --text-tertiary: #6E7E76;    /* Note tecniche e didascalie */
  
  --border-line: #E2E4DC;      /* Bordo strutturale sottile */
  --border-medium: #D0D3C7;    /* Bordo interattivo */
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 9999px;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-tabular: 'JetBrains Mono', monospace;
  
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 16px -2px rgba(0, 0, 0, 0.06);
  --shadow-floating: 0 16px 36px -6px rgba(0, 0, 0, 0.10);
  
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* Safe Area Insets for Modern Mobile Notches & Bars */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* ==========================================================================
   Earth Contemporary Dark Theme (Fedele a lib/src/design/app_theme.dart dark)
   Attivato esclusivamente via [data-theme="dark"] (Default del sito: Chiaro)
   ========================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-pumice: #13201A;        /* Sfondo dark ufficiale: roccia vulcanica */
  --surface-paper: #1A2B23;    /* Superficie card dark: pino scuro vulcanico */
  --surface-muted: #16241D;    /* Superficie secondaria */
  --surface-elevated: #22352C; /* Elevazione massima dark */
  
  --primary-volcanic: #81B898;
  --text-heading: #E4ECE7;     /* Testo titoli e wordmark su dark - 12:1 */
  --skip-bg: #81B898;
  --skip-color: #0F2D1F;
  --badge-community-color: #FFB4AB; /* Contrasto 6.8:1 su #36221C */
  --badge-official-color: #D6EEDB;  /* Contrasto 7.2:1 su #1E3B2E */
  --manifesto-bg: #0E1B15;
  --manifesto-text: #E4ECE7;
  --manifesto-subtext: #98ACA1;

  --primary-pine: #81B898;     /* Verde primario dark accenti (AppColors.dark.primary) */
  --primary-pale: #1E3B2E;     /* Badge ufficiale sfondo dark */
  --primary-border: #2D5442;   /* Badge ufficiale bordo dark */
  
  --sage: #98ACA1;             /* Salvia secondario dark */
  
  --terracotta: #F78563;       /* Terracotta illuminata ad alto contrasto (5.8:1 su #1A2B23) */
  --terracotta-pale: #36221C;  /* Badge community sfondo dark */
  --terracotta-border: #523126;/* Badge community bordo dark */
  --terracotta-dark: #FFB4AB;
  
  --amber: #E8AA50;
  --amber-pale: #322515;
  --amber-border: #573E1E;
  --amber-text: #FBBF24;
  
  --btn-primary-bg: #81B898;
  --btn-primary-color: #0F2D1F;
  --btn-primary-hover-bg: #9BD0B2;
  --btn-primary-hover-color: #071F14;

  --btn-terracotta-bg: #F78563;
  --btn-terracotta-color: #361208;
  --btn-terracotta-hover-bg: #FFA085;
  --btn-terracotta-hover-color: #220B04;

  --mag-strong-bg: #993B35;
  --mag-strong-color: #FFFFFF;
  --mag-terracotta-bg: #F78563;
  --mag-terracotta-color: #361208;
  --mag-amber-bg: #E8AA50;
  --mag-amber-color: #221805;
  --mag-sage-bg: #273D32;
  --mag-sage-color: #D6EEDB;
  
  --text-primary: #E4ECE7;     /* Testo lettura dark - contrasto 12:1 */
  --text-secondary: #98ACA1;   /* Testo secondario dark - contrasto 7.5:1 */
  --text-tertiary: #758A7E;
  
  --border-line: #263C31;      /* Bordo scuro sottile */
  --border-medium: #314C3E;    /* Bordo interattivo */
  
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 4px 16px -2px rgba(0, 0, 0, 0.45);
  --shadow-floating: 0 16px 36px -6px rgba(0, 0, 0, 0.65);
}

/* Base & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  color-scheme: light dark;
}

/* Anchor Target Scroll Offsets for Fixed Navbar */
[id] {
  scroll-margin-top: 86px;
}

@media (min-width: 901px) {
  #sismapulse {
    scroll-margin-top: 260px;
  }
}

body {
  background-color: var(--bg-pumice);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  overflow-x: hidden;
}

/* WCAG Skip to Main Content Link */
.skip-link {
  position: absolute;
  top: -80px;
  left: 20px;
  background: var(--skip-bg);
  color: var(--skip-color);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  z-index: 9999;
  transition: top 180ms var(--ease-out);
  box-shadow: var(--shadow-card);
}

.skip-link:focus {
  top: 18px;
}

/* Mobile Touch & Accessible Focus */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Custom Selection & Focus */
::selection {
  background-color: var(--terracotta);
  color: #FFFFFF;
}

:focus-visible {
  outline: 2.5px solid var(--primary-pine);
  outline-offset: 3px;
}

/* Emil Kowalski Button Press Feedback: tactile responsive scale */
.btn:active,
.store-badge-btn:active,
.segment-btn:active,
.btn-refresh:active,
.faq-btn:active,
.cookie-action-btn:active {
  transform: scale(0.97);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-pumice);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sage);
}

/* Container */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: max(12px, var(--safe-top)) 0 12px;
  background: rgba(248, 246, 240, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-line);
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

:root[data-theme="dark"] .navbar {
  background: rgba(19, 32, 26, 0.94);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-heading);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-line);
  box-shadow: var(--shadow-subtle);
  object-fit: cover;
  background: var(--surface-paper);
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-heading);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color var(--transition-smooth);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover {
  color: var(--text-heading);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Toggle Button (Desktop & Mobile) */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  border: 1px solid var(--border-line);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-smooth);
  flex-shrink: 0;
  position: relative;
}

.btn-theme-toggle::before {
  content: "";
  position: absolute;
  inset: -4px;
}

.btn-theme-toggle:hover {
  background: var(--surface-paper);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-theme-toggle:active {
  transform: scale(0.92);
}

/* Theme Icons Display Rules */
:root[data-theme="dark"] .theme-icon-moon {
  display: none !important;
}
:root[data-theme="dark"] .theme-icon-sun {
  display: block !important;
}

:root:not([data-theme="dark"]) .theme-icon-sun {
  display: none;
}
:root:not([data-theme="dark"]) .theme-icon-moon {
  display: block;
}

/* Mobile Hamburger Toggle Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--surface-muted);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-smooth);
  position: relative;
}

.nav-toggle::before {
  content: "";
  position: absolute;
  inset: -4px;
}

.nav-toggle:active {
  transform: scale(0.92);
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--primary-volcanic);
  border-radius: 2px;
  transition: transform 220ms var(--ease-out), opacity 220ms ease;
}

.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Backdrop Overlay */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 32, 26, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-out);
}

.mobile-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Drawer Panel */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background-color: var(--surface-paper);
  border-left: 1px solid var(--border-line);
  box-shadow: -10px 0 36px rgba(0, 0, 0, 0.22);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 280ms var(--ease-drawer);
  padding: max(16px, var(--safe-top)) 0 max(16px, var(--safe-bottom));
  visibility: hidden;
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--border-line);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-close-btn {
  background: var(--surface-muted);
  border: 1px solid var(--border-line);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.45rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease;
}

.drawer-close-btn:active {
  transform: scale(0.92);
}

.drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.drawer-status {
  margin-bottom: 4px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.02rem;
  background: transparent;
  transition: background-color 140ms ease, color 140ms ease;
  min-height: 48px;
}

.drawer-link:hover, .drawer-link:active {
  background: var(--surface-muted);
  color: var(--primary-pine);
}

.drawer-link svg {
  color: var(--primary-pine);
  flex-shrink: 0;
}

.drawer-theme-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-line);
  margin-top: 4px;
}

.drawer-theme-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.drawer-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-paper);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 140ms ease;
}

.drawer-theme-toggle:active {
  transform: scale(0.94);
}

.drawer-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border-line);
}

.drawer-cta-btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 1rem;
  text-align: center;
  justify-content: center;
}

.drawer-legal-links {
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-align: center;
}

.drawer-legal-links a {
  color: var(--text-secondary);
  text-decoration: underline;
  padding: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-smooth), background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  border: 1px solid transparent;
  font-family: var(--font-body);
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: var(--btn-primary-hover-bg);
    color: var(--btn-primary-hover-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  }
}

.btn-terracotta {
  background: var(--btn-terracotta-bg);
  color: var(--btn-terracotta-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (hover: hover) {
  .btn-terracotta:hover {
    background: var(--btn-terracotta-hover-bg);
    color: var(--btn-terracotta-hover-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  }
}

.btn-secondary {
  background: var(--surface-paper);
  color: var(--text-primary);
  border: 1px solid var(--border-line);
  box-shadow: var(--shadow-subtle);
}

@media (hover: hover) {
  .btn-secondary:hover {
    border-color: var(--border-medium);
    background: var(--surface-elevated);
    transform: translateY(-1px);
  }
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.88rem;
}

/* Official Badges matching App Theme */
.badge-official {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-pale);
  border: 1px solid var(--primary-border);
  color: var(--badge-official-color);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.badge-community {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--terracotta-pale);
  border: 1px solid var(--terracotta-border);
  color: var(--badge-community-color);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.badge-preliminary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--amber-pale);
  border: 1px solid var(--amber-border);
  color: var(--amber-text);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Hero Section */
.hero {
  padding: 140px 0 80px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
}

.hero-header-badge {
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  margin-bottom: 22px;
}

.hero-title .highlight-terracotta {
  color: var(--terracotta);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 34px;
  max-width: 560px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.store-badge-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-paper);
  color: var(--text-heading);
  border: 1px solid var(--border-line);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-smooth);
}

.store-badge-btn:hover {
  background: #FFFFFF;
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.store-badge-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-btn-text .sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.store-btn-text .main {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

.hero-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.hero-checks li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-checks svg {
  color: var(--primary-pine);
  flex-shrink: 0;
}

/* Device Mockup: Exact Replica of SismApp Flutter App */
.mockup-wrapper {
  display: flex;
  justify-content: center;
}

.device-frame {
  width: 326px;
  background: #EAE6DC;
  border-radius: 44px;
  padding: 11px;
  border: 3px solid #D6D2C4;
  box-shadow: var(--shadow-floating), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.device-screen {
  background: var(--bg-pumice);
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid var(--border-line);
  display: flex;
  flex-direction: column;
  min-height: 580px;
  position: relative;
}

/* Screen Notch / Dynamic Area */
.screen-notch-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 18px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-volcanic);
}

.notch-pill {
  width: 72px;
  height: 16px;
  background: #000000;
  border-radius: var(--radius-pill);
}

/* App Bar in Mockup */
.appbar-mockup {
  background: var(--bg-pumice);
  padding: 10px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-line);
}

.appbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.appbar-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border-line);
  object-fit: cover;
}

.appbar-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--primary-volcanic);
}

/* Segmented Control matching Flutter SegmentedButton */
.segmented-control {
  margin: 10px 14px 6px;
  background: var(--surface-muted);
  border-radius: var(--radius-pill);
  padding: 3px;
  display: flex;
  border: 1px solid var(--border-line);
}

.segment-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-align: center;
}

.segment-btn.active {
  background: var(--surface-paper);
  color: var(--primary-volcanic);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Feed Container in Mockup */
.mockup-feed-scroll {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 380px;
}

/* Flutter ListTile Card Replica */
.quake-card {
  background: var(--surface-paper);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-smooth);
}

.quake-card:hover {
  transform: translateY(-1px);
}

/* 50x50 Magnitude Badge matching _MagnitudeTile in Flutter */
.mag-tile {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-align: center;
}

.mag-tile .val {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-body);
  letter-spacing: -0.4px;
}

.mag-tile .lbl {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-top: 2px;
}

/* Magnitude Colors */
.mag-strong {
  background: var(--mag-strong-bg);
  color: var(--mag-strong-color);
}

.mag-terracotta {
  background: var(--mag-terracotta-bg);
  color: var(--mag-terracotta-color);
}

.mag-amber {
  background: var(--mag-amber-bg);
  color: var(--mag-amber-color);
}

.mag-sage {
  background: var(--mag-sage-bg);
  color: var(--mag-sage-color);
}

/* Card details */
.card-body {
  flex: 1;
  min-width: 0;
}

.card-city {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.card-context {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1px;
}

.card-meta-line {
  font-size: 0.73rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

.card-arrow {
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Mockup Bottom Navigation Bar matching _EarthContemporaryBottomBar */
.bottom-nav-mockup {
  background: var(--surface-paper);
  border-top: 1px solid var(--border-line);
  padding: 6px 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.03);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
}

.nav-item.active {
  color: var(--primary-pine);
  font-weight: 800;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* The Prominent Central Action Button "Segnala" */
.nav-center-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: -12px;
}

.center-btn-circle {
  width: 40px;
  height: 40px;
  background: var(--terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.nav-center-action span {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--terracotta);
}

/* Live Ticker Bar */
.live-bar {
  padding: 20px 0;
  background: var(--surface-paper);
  border-top: 1px solid var(--border-line);
  border-bottom: 1px solid var(--border-line);
}

.live-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.live-bar-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-heading);
}

.live-bar-event {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.94rem;
}

.btn-refresh {
  background: var(--bg-pumice);
  border: 1px solid var(--border-line);
  color: var(--text-heading);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-smooth), background-color 140ms ease;
}

.btn-refresh:hover {
  background: #FFFFFF;
  transform: rotate(90deg);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 56px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Two Souls Layout (INGV vs Community) */
.souls-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.soul-column {
  background: var(--surface-paper);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-xl);
  padding: 42px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.soul-column.official {
  border-color: var(--primary-border);
}

.soul-column.community {
  border-color: var(--terracotta-border);
}

.soul-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-heading);
  margin: 18px 0 14px;
}

.soul-text {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 28px;
}

.soul-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.soul-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.96rem;
  color: var(--text-primary);
}

.soul-list svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.soul-column.official .soul-list svg {
  color: var(--primary-pine);
}

.soul-column.community .soul-list svg {
  color: var(--terracotta);
}

/* Features Grid with Inline Headings */
.features-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-panel {
  background: var(--surface-paper);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
}

.feature-panel:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-card);
}

.feature-panel.prominent {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--surface-paper) 0%, #FAF6EE 100%);
  border-color: #E0DDD2;
}

.panel-header-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-icon-inline {
  width: 24px;
  height: 24px;
  color: var(--primary-pine);
  flex-shrink: 0;
}

.panel-icon-inline.terracotta-color {
  color: var(--terracotta);
}

.panel-icon-inline.amber-color {
  color: var(--amber-text);
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.2px;
}

.panel-body {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

/* Ethical Manifesto */
.manifesto-box {
  background: var(--manifesto-bg);
  color: var(--manifesto-text);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  margin: 60px 0;
  box-shadow: var(--shadow-floating);
  position: relative;
  border: 1px solid var(--border-line);
}

.manifesto-quote {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 18px;
  color: var(--manifesto-text);
}

.manifesto-subtext {
  font-size: 1.05rem;
  color: var(--manifesto-subtext);
  line-height: 1.7;
  max-width: 800px;
}

/* SismaSafe Protezione Civile Checklist */
.safety-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: var(--surface-paper);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-card);
}

.safety-points {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.safety-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-line);
}

.safety-row:last-child {
  border-bottom: none;
}

.safety-row-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-pale);
  color: var(--primary-pine);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* FAQ Accordion */
.faq-wrap {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-card {
  background: var(--surface-paper);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: border-color var(--transition-smooth);
}

.faq-card:hover {
  border-color: var(--border-medium);
}

.faq-btn {
  width: 100%;
  padding: 22px 26px;
  text-align: left;
  background: none;
  border: none;
  color: var(--primary-volcanic);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.faq-chevron {
  transition: transform var(--transition-smooth);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.faq-card.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth), padding var(--transition-smooth);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  padding: 0 26px;
}

.faq-card.open .faq-content {
  max-height: 340px;
  padding: 0 26px 24px;
}

/* Final Download CTA Block */
.download-block {
  background: var(--surface-muted);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.download-app-icon {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  border: 1px solid var(--border-line);
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
  background: var(--surface-paper);
}

.download-title {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.download-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 34px;
}

.download-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.download-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  padding: 72px 0 36px;
  border-top: 1px solid var(--border-line);
  background: var(--surface-paper);
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 18px;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

.footer-nav a:hover {
  color: var(--text-heading);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border-line);
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }
  
  .hero-subtitle {
    margin: 0 auto 34px;
  }
  
  .hero-cta-group {
    justify-content: center;
  }
  
  .hero-checks {
    justify-content: center;
  }
  
  .souls-layout {
    grid-template-columns: 1fr;
  }
  
  .features-container {
    grid-template-columns: 1fr;
  }
  
  .feature-panel.prominent {
    grid-column: span 1;
  }
  
  .safety-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
  
  .nav-badge-desktop {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-cta-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 96px 0 40px;
  }
  
  .hero-title {
    font-size: clamp(1.95rem, 6.8vw, 2.5rem);
    letter-spacing: -0.025em;
    line-height: 1.15;
  }
  
  .hero-subtitle {
    font-size: 1.02rem;
    line-height: 1.6;
    margin: 0 auto 24px;
  }
  
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 24px;
    gap: 10px;
  }
  
  .store-badge-btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 12px 18px;
    min-height: 52px;
  }
  
  .hero-checks {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    max-width: 320px;
    margin: 0 auto;
    font-size: 0.9rem;
  }
  
  .device-frame {
    max-width: min(326px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 8px;
    border-radius: 36px;
  }
  
  .device-screen {
    border-radius: 28px;
    min-height: 520px;
  }
  
  .segment-btn {
    min-height: 38px;
    font-size: 0.82rem;
  }
  
  .live-bar {
    padding: 14px 0;
  }
  
  .live-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .live-bar-label {
    justify-content: space-between;
    width: 100%;
  }
  
  .live-bar-event {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.88rem;
  }

  .live-bar-place {
    word-break: break-word;
  }
  
  .section {
    padding: 56px 0;
  }
  
  .section-head {
    margin-bottom: 36px;
  }
  
  .section-title {
    font-size: clamp(1.75rem, 5.8vw, 2.2rem);
    letter-spacing: -0.02em;
  }
  
  .section-desc {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .soul-column {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
  }
  
  .soul-title {
    font-size: 1.35rem;
  }
  
  .feature-panel {
    padding: 22px 18px;
    border-radius: var(--radius-lg);
  }
  
  .panel-title {
    font-size: 1.2rem;
  }
  
  .manifesto-box {
    padding: 32px 18px;
    margin: 40px 0;
    border-radius: var(--radius-lg);
  }
  
  .manifesto-quote {
    font-size: clamp(1.3rem, 4.8vw, 1.6rem);
    line-height: 1.35;
  }
  
  .manifesto-subtext {
    font-size: 0.95rem;
  }
  
  .safety-layout {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
    gap: 24px;
  }
  
  .safety-item {
    padding: 12px 10px;
    min-height: 48px;
  }
  
  .faq-card {
    border-radius: var(--radius-md);
  }
  
  .faq-question {
    padding: 16px 18px;
    font-size: 1.02rem;
    min-height: 48px;
  }
  
  .faq-content {
    font-size: 0.95rem;
    padding: 0 18px;
  }
  
  .faq-card.open .faq-content {
    padding: 0 18px 18px;
  }
  
  .download-block {
    padding: 36px 18px;
    border-radius: var(--radius-lg);
  }
  
  .download-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    margin-bottom: 16px;
  }
  
  .download-title {
    font-size: clamp(1.75rem, 5.8vw, 2.2rem);
  }
  
  .download-desc {
    font-size: 1rem;
    margin-bottom: 24px;
  }
  
  .download-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 20px;
    gap: 10px;
  }
  
  .download-buttons .btn {
    width: 100%;
    min-height: 50px;
    justify-content: center;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .footer-nav a, .footer-nav button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 0;
  }
  
  /* Mobile Cookie Banner Docked to Bottom */
  .cookie-banner {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 18px 20px max(18px, var(--safe-bottom)) !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    transform: translateY(100%) !important;
  }

  .cookie-banner.visible {
    transform: translateY(0) !important;
  }
  
  .cookie-banner-title {
    font-size: 1.05rem;
  }
  
  .cookie-banner-body {
    font-size: 0.86rem;
    line-height: 1.5;
  }
  
  .cookie-banner-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .cookie-action-btn {
    width: 100%;
    text-align: center;
    padding: 11px 12px;
    font-size: 0.86rem;
    min-height: 44px;
  }
  
  .cookie-btn-customize {
    grid-column: span 2;
    background: transparent;
    padding: 8px 12px;
    font-size: 0.84rem;
    text-decoration: underline;
  }

  /* Bottom sheet modal dialog for mobile */
  .cookie-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .cookie-modal-dialog {
    max-height: 85vh;
    border-radius: 24px 24px 0 0;
    padding: 22px 18px max(22px, var(--safe-bottom));
    border-bottom: none;
    border-left: none;
    border-right: none;
    transform: translateY(20px);
  }

  .cookie-modal-backdrop.open .cookie-modal-dialog {
    transform: translateY(0);
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .modal-actions .cookie-action-btn {
    width: 100%;
    min-height: 46px;
  }

  /* Legal Pages on Mobile */
  .legal-page {
    margin: 86px 16px 48px !important;
    padding: 28px 18px !important;
    border-radius: var(--radius-lg) !important;
  }

  .legal-page h1 {
    font-size: 1.85rem !important;
  }

  .cookie-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0 24px;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  .brand-text {
    font-size: 1.2rem;
  }

  .btn-theme-toggle, .nav-toggle {
    width: 36px;
    height: 36px;
  }

  .nav-cta-btn {
    padding: 7px 11px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   GDPR Cookie Consent Banner & Preferences Modal
   Crafted with Emil Kowalski motion principles
   ========================================================================== */

/* Floating Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 500px;
  width: calc(100vw - 48px);
  background-color: var(--surface-elevated);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  pointer-events: none;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}

.cookie-banner.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cookie-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-banner-title {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-heading);
}

.cookie-banner-body {
  font-size: 0.94rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.cookie-banner-body a {
  color: var(--primary-pine);
  text-decoration: underline;
  font-weight: 700;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cookie-action-btn {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-body);
  transition: transform 140ms var(--ease-out), background-color 140ms ease, border-color 140ms ease;
}

.cookie-action-btn:active {
  transform: scale(0.96);
}

.cookie-btn-accept {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
}

@media (hover: hover) {
  .cookie-btn-accept:hover {
    background: var(--btn-primary-hover-bg);
    color: var(--btn-primary-hover-color);
  }
}

.cookie-btn-reject {
  background: var(--surface-muted);
  color: var(--text-primary);
  border-color: var(--border-line);
}

.cookie-btn-reject:hover {
  background: var(--border-medium);
}

.cookie-btn-customize {
  background: transparent;
  color: var(--text-secondary);
  text-decoration: underline;
  border: none;
  padding: 10px 12px;
}

.cookie-btn-customize:hover {
  color: var(--text-heading);
}

/* Cookie Preferences Modal (Dialog) */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(19, 32, 26, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}

.cookie-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal-dialog {
  max-width: 580px;
  width: 100%;
  background-color: var(--surface-paper);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 34px 32px;
  box-shadow: 0 24px 60px -8px rgba(0, 0, 0, 0.20), 0 8px 20px rgba(0, 0, 0, 0.08);
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.cookie-modal-backdrop.open .cookie-modal-dialog {
  opacity: 1;
  transform: scale(1);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-heading);
}

.modal-close-btn {
  background: var(--surface-muted);
  border: 1px solid var(--border-line);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background-color 140ms ease, color 140ms ease;
}

.modal-close-btn:hover {
  background: var(--border-medium);
  color: var(--text-heading);
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 24px;
}

.cookie-category-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.cookie-category-item {
  background: var(--bg-pumice);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cookie-category-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-heading);
}

.cookie-category-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-pine);
  background: var(--primary-pale);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.cookie-category-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Accessible Toggle Switch */
.cookie-switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.cookie-switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-switch-slider {
  position: absolute;
  inset: 0;
  background-color: var(--border-medium);
  border-radius: 24px;
  transition: background-color 200ms var(--ease-out);
}

.cookie-switch-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 200ms var(--ease-out);
}

.cookie-switch-label input:checked + .cookie-switch-slider {
  background-color: var(--primary-pine);
}

.cookie-switch-label input:focus-visible + .cookie-switch-slider {
  outline: 2px solid var(--primary-volcanic);
  outline-offset: 2px;
}

.cookie-switch-label input:checked + .cookie-switch-slider::before {
  transform: translateX(20px);
}

.cookie-switch-label input:disabled + .cookie-switch-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

