/* Modern CamperNav Design System - Clean Unified Deep Obsidian & Sunset Accents */

:root {
  --bg-main: #0c1017;        /* Clean Unified Deep Obsidian */
  --bg-surface: #141a24;     /* Refined Dark Surface */
  --bg-card: #1c2433;        /* Sleek Card Background */
  --bg-card-hover: #242f42;  /* Card Hover State */

  --primary: #ff5722;        /* Sunset Terracotta Flame */
  --primary-glow: rgba(255, 87, 34, 0.25);
  --accent: #f59e0b;         /* Sunburst Gold */
  --accent-glow: rgba(245, 158, 11, 0.2);
  --coral: #f43f5e;          /* Energetic Coral Rose */

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 87, 34, 0.35);

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-main: #fafaf9;        /* Clean Crisp Light Background */
    --bg-surface: #ffffff;
    --bg-card: #f4f4f5;
    --bg-card-hover: #e4e4e7;

    --primary: #ea580c;        /* Deep Sunset Terracotta */
    --primary-glow: rgba(234, 88, 12, 0.15);
    --accent: #d97706;
    --accent-glow: rgba(217, 119, 6, 0.15);
    --coral: #e11d48;

    --text-main: #18181b;
    --text-muted: #52525b;
    --text-dim: #71717a;

    --border: rgba(0, 0, 0, 0.08);
    --border-highlight: rgba(234, 88, 12, 0.4);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  opacity: 0.85;
}

/* Language Visibility */
[lang="en"] .it-only { display: none !important; }
[lang="it"] .en-only { display: none !important; }

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Floating Glass Header */
.header-wrapper {
  position: sticky;
  top: 1rem;
  z-index: 100;
  margin-bottom: 2rem;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20, 26, 36, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.brand .badge {
  font-size: 0.7rem;
  background: var(--primary-glow);
  color: #ff7849;
  border: 1px solid var(--border-highlight);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Modern Language Switcher Pill Control */
.lang-switcher {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-full);
  padding: 0.2rem;
  gap: 0.2rem;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.flag-icon {
  width: 18px;
  height: 13.5px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.lang-pill:hover {
  color: var(--text-main);
}

.lang-pill.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--coral) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Hero Section */
.hero {
  padding: 3.5rem 0 5.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 20%, #ff7849 70%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lede {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--coral) 100%);
  color: #ffffff;
  font-weight: 800;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px var(--primary-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px var(--primary-glow);
  color: #ffffff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-highlight);
  font-weight: 700;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.stat-item h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-item p {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* Hero Visual / Mockup */
.hero-visual {
  position: relative;
}

.visual-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.visual-card img {
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
  border: 1px solid var(--border);
}

.floating-badge {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  background: rgba(20, 26, 36, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.floating-badge .icon {
  font-size: 1.8rem;
}

.floating-badge .text h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.floating-badge .text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Story Section - Clean Unified Dark Section */
.section-story {
  padding: 6rem 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.story-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.story-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.story-container {
  max-width: 850px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  position: relative;
}

.story-container::before {
  content: "“";
  position: absolute;
  top: -1.5rem;
  left: 2rem;
  font-size: 8rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.25;
  font-family: Georgia, serif;
}

.story-content p {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.story-content ul {
  list-style: none;
  margin: 1.5rem 0;
  padding-left: 0;
}

.story-content ul li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.story-content ul li::before {
  content: "➔";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.story-callout {
  background: var(--primary-glow);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2rem;
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Features Grid Section */
.section-features {
  padding: 6rem 0;
  background-color: var(--bg-main);
}

.features-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.features-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 15px 35px var(--primary-glow);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
  display: inline-block;
  background: var(--bg-card);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-highlight);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Screenshots Gallery Section */
.section-gallery {
  padding: 5.5rem 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
}

.gallery-item img {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  margin-bottom: 0.75rem;
}

.gallery-item figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Install Section */
.section-install {
  padding: 6.5rem 0;
  background-color: var(--bg-main);
}

.install-card {
  background: var(--bg-surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px var(--primary-glow);
}

/* Footer */
.footer {
  background: #080b10;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  color: var(--text-muted);
}

.footer-col ul li a:hover {
  color: var(--text-main);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
