/* ============================================
   Smart FM — "Segnale" Theme (Restyle 1a)
   Editorial minimal · Sora + Inter + IBM Plex Mono
   Accent red/orange aligned to logo
   ============================================ */

:root {
  --primary: #D93A14;
  --primary-dark: #B01E10;
  --secondary: #16A34A;
  --accent: #FF6A3D;

  --bg: #FBFAF8;
  --bg-secondary: #F5F1EB;
  --bg-tertiary: #EFE9E1;
  --surface: #FFFFFF;

  --ink: #1A1613;
  --text-primary: #1A1613;
  --text-secondary: #6E6862;
  --text-muted: #A79F96;
  --text-inverse: #FBFAF8;

  --border: #ECE7E1;
  --border-light: #F2EDE6;

  --tint: #FBECE6;

  --shadow-sm: 0 1px 2px 0 rgb(40 25 15 / 0.05);
  --shadow-md: 0 6px 16px -6px rgb(40 25 15 / 0.12);
  --shadow-lg: 0 18px 40px -20px rgb(40 25 15 / 0.22);
  --shadow-xl: 0 26px 60px -28px rgb(40 25 15 / 0.30);

  --radius-sm: 0.5rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);

  --font-display: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

[data-theme="dark"] {
  --primary: #FF6A3D;
  --primary-dark: #FF8054;
  --accent: #FF6A3D;

  --bg: #14110E;
  --bg-secondary: #1A1613;
  --bg-tertiary: #221D18;
  --surface: #1E1A17;

  --text-primary: #F4EFE9;
  --text-secondary: #B3AA9F;
  --text-muted: #7E756B;
  --text-inverse: #14110E;

  --border: #2E2823;
  --border-light: #262019;

  --tint: #2A1B14;

  --shadow-md: 0 6px 16px -6px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 18px 40px -20px rgb(0 0 0 / 0.6);
  --shadow-xl: 0 26px 60px -28px rgb(0 0 0 / 0.7);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.6rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.35rem); }
h4 { font-size: 1.0625rem; }

p { color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.7; }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

::selection { background: var(--primary); color: #fff; }

/* Lucide icon sizing */
[data-lucide] { width: 22px; height: 22px; stroke-width: 1.75; display: block; }

/* Container */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 640px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 3rem; } }

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-md); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo img { display: block; }

.nav-desktop { display: none; }
@media (min-width: 1024px) { .nav-desktop { display: flex; align-items: center; gap: 2.25rem; } }

.nav-link {
  font-family: var(--font-display);
  font-size: 0.9375rem; font-weight: 500;
  color: var(--text-secondary); position: relative; padding: 0.4rem 0;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--primary); transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--primary); }

.header-controls { display: flex; align-items: center; gap: 0.875rem; }

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.85rem;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-md); font-family: var(--font-mono);
  font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
}
.lang-btn:hover { border-color: var(--primary); color: var(--text-primary); }
.lang-dropdown {
  position: absolute; top: calc(100% + 0.5rem); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  padding: 0.4rem; min-width: 150px; opacity: 0; visibility: hidden;
  transform: translateY(-8px); transition: var(--transition); z-index: 1001;
}
.lang-switcher:hover .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: block; padding: 0.55rem 0.85rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); transition: var(--transition);
}
.lang-option:hover { background: var(--bg-secondary); color: var(--text-primary); }
.lang-option.active { background: var(--tint); color: var(--primary); }

/* Theme Toggle */
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: transparent; color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* Mobile Menu Button */
.mobile-menu-btn { display: flex; flex-direction: column; gap: 5px; padding: 0.5rem; background: none; border: none; cursor: pointer; z-index: 1002; }
@media (min-width: 1024px) { .mobile-menu-btn { display: none; } }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
  position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: var(--bg);
  padding: 2rem; transform: translateX(100%); transition: var(--transition-slow);
  z-index: 999; overflow-y: auto;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-nav-link {
  display: block; padding: 1rem 0; font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 600; color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}
.mobile-nav-link.active { color: var(--primary); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer;
  transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.0625rem; }

/* ============================================
   HERO
   ============================================ */
.hero { position: relative; padding: 9.5rem 0 5.5rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; background: var(--bg); }
.hero-bg::before {
  content: ''; position: absolute; top: -30%; right: -15%; width: 780px; height: 780px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 12%, transparent) 0%, transparent 68%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border-light) 1px, transparent 1px), linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 64px 64px; opacity: 0.5; mask-image: radial-gradient(circle at 70% 20%, #000, transparent 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 5rem; } }

/* Kicker (badge / section label) */
.hero-badge, .section-label {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.85rem;
  background: var(--tint); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: 100px; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); margin-bottom: 1.5rem;
}
.hero-badge [data-lucide], .section-label [data-lucide] { width: 15px; height: 15px; }

.hero-title { margin-bottom: 1.5rem; }
.hero-title .gradient-text, .text-gradient { color: var(--primary); background: none; -webkit-text-fill-color: currentColor; }

.hero-description { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 2.25rem; max-width: 520px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 5.5rem 0; position: relative; }
@media (min-width: 1024px) { .section { padding: 7rem 0; } }
.section-header { max-width: 680px; margin: 0 0 3.5rem; }
.section-header[style*="center"], .section-header.text-center { margin-left: auto; margin-right: auto; }
.section-label { margin-bottom: 1rem; }
.section-title { margin-bottom: 1rem; }
.section-description { font-size: 1.125rem; color: var(--text-secondary); }

/* ============================================
   FEATURES
   ============================================ */
.features-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.75rem; transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--tint);
  display: flex; align-items: center; justify-content: center; color: var(--primary);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  margin-bottom: 1.35rem; transition: var(--transition);
}
.feature-card:hover .feature-icon { background: var(--primary); color: #fff; }
.feature-card:hover .feature-icon [data-lucide] { stroke: #fff; }
.feature-card h3 { margin-bottom: 0.6rem; }
.feature-card p { font-size: 0.98rem; color: var(--text-secondary); line-height: 1.65; }

/* ============================================
   PRODUCTS
   ============================================ */
.products-grid { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
@media (min-width: 768px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }

.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-2xl);
  overflow: hidden; transition: var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }

.product-image {
  height: 220px; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background-image: repeating-linear-gradient(135deg, var(--bg-secondary) 0 16px, var(--bg-tertiary) 16px 32px);
  border-bottom: 1px solid var(--border);
}
.product-image-icon { color: var(--primary); z-index: 1; }
.product-image-icon [data-lucide] { width: 60px; height: 60px; stroke-width: 1.5; }

.product-content { padding: 1.75rem; }
.product-tag {
  display: inline-block; padding: 0.35rem 0.8rem; background: var(--tint); color: var(--primary);
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; border-radius: 100px;
  margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.product-card h3 { margin-bottom: 0.6rem; }
.product-card p { font-size: 0.98rem; margin-bottom: 1.25rem; }
.product-features { list-style: none; margin-bottom: 1.5rem; }
.product-features li { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0; font-size: 0.9375rem; color: var(--text-secondary); }
.product-features li::before {
  content: ''; width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  background: var(--tint); border: 1.5px solid var(--primary);
}

/* ============================================
   STATS
   ============================================ */
.stats-section { background: var(--ink); padding: 3.5rem 0; position: relative; overflow: hidden; }
[data-theme="dark"] .stats-section { background: #0E0B09; }
.stats-section::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; position: relative; z-index: 1; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-item { text-align: left; color: #F4EFE9; padding-left: 1.25rem; border-left: 1px solid rgba(255,255,255,0.12); }
.stat-number { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; line-height: 1; margin-bottom: 0.5rem; color: var(--accent); }
.stat-label { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.04em; color: #B3AA9F; }

/* ============================================
   CONTACT
   ============================================ */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.contact-info h2 { margin-bottom: 1.5rem; }
.contact-info > p { margin-bottom: 2rem; font-size: 1.125rem; }
.contact-methods { display: flex; flex-direction: column; gap: 1.35rem; margin-bottom: 2.5rem; }
.contact-method { display: flex; align-items: flex-start; gap: 1rem; }
.contact-method-icon {
  width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--tint);
  display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0;
}
.contact-method h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.contact-method p { font-size: 0.9375rem; color: var(--text-secondary); }

.contact-form-wrapper { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 2.25rem; }
.form-group { margin-bottom: 1.35rem; }
.form-label { display: block; font-size: 0.8125rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.5rem; }
.form-input, .form-textarea {
  width: 100%; padding: 0.8rem 1rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 1rem; color: var(--text-primary); transition: var(--transition); font-family: inherit;
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.form-textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1.35rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* ============================================
   FOOTER
   ============================================ */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9375rem; color: var(--text-secondary); max-width: 300px; }
.footer-title { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 1.25rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.7rem; }
.footer-links a { font-size: 0.9375rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 2rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-bottom p { font-size: 0.8125rem; color: var(--text-muted); }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--surface);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-social a:hover [data-lucide] { stroke: #fff; }

/* ============================================
   ANIMATIONS
   ============================================ */
.animate-on-scroll { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1023px) { .hero { padding: 8rem 0 4rem; } }
@media (max-width: 639px) {
  .btn { width: 100%; }
  .hero-buttons { flex-direction: column; }
  .stat-item { padding-left: 0; border-left: none; }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-8 { margin-top: 2rem; }
