/* style.css - CSS per la landing page SaaS di Copyatrix */

:root {
  /* Variabili Tema Oscuro (Default) */
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-2: #172033;
  --panel-hover: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #2563eb;
  --accent-2: #3b82f6;
  --danger: #dc2626;
  --shadow: rgba(0, 0, 0, 0.4);
  --header-glass: rgba(15, 23, 42, 0.82);
  --card-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --hero-glow: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
  --mockup-bg: #1e293b;
  --mockup-bar: #0f172a;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
  /* Variabili Tema Chiaro */
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --panel-hover: #e2e8f0;
  --border: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #3b82f6;
  --danger: #dc2626;
  --shadow: rgba(148, 163, 184, 0.15);
  --header-glass: rgba(248, 250, 252, 0.82);
  --card-gradient: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  --hero-glow: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.06) 0%, transparent 60%);
  --mockup-bg: #f1f5f9;
  --mockup-bar: #e2e8f0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Header & Navbar */
header.navbar-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand .logo-cube {
  font-size: 26px;
  color: var(--accent-2);
  font-weight: bold;
  animation: pulse-logo 3s infinite ease-in-out;
}

@keyframes pulse-logo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.brand h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}

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

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

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

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

/* Interruttore Tema Oscuro/Chiaro */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--panel-2);
  border-color: var(--accent-2);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Selettore Lingua Custom Dropdown */
.lang-selector-container {
  position: relative;
}

.lang-btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.lang-btn:hover {
  border-color: var(--accent-2);
  background: var(--panel-hover);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  box-shadow: 0 10px 25px var(--shadow);
  z-index: 101;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-dropdown.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.lang-option:hover {
  background: var(--panel-2);
  color: var(--accent-2);
}

.lang-option.selected {
  font-weight: 600;
  color: var(--accent-2);
  background: var(--panel-2);
}

/* Mobile Menu Button */
.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

/* Buttons */
.btn {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn:hover {
  background: var(--panel-hover);
  border-color: var(--accent-2);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-1px);
}

/* Sections */
section {
  padding: 80px 24px;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  position: relative;
  background-image: var(--hero-glow);
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto 50px;
}

.badge-tag {
  display: inline-flex;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 24px;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero-title {
  font-size: 48px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-title span {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Mockup UI Browser */
.mockup-container {
  max-width: 960px;
  margin: 0 auto;
  perspective: 1000px;
}

.browser-mockup {
  background: var(--mockup-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: rotateX(5deg);
  transition: transform 0.5s ease;
}

.browser-mockup:hover {
  transform: rotateX(0deg);
}

.browser-bar {
  background: var(--mockup-bar);
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.browser-dots .dot-r { background: #ef4444; }
.browser-dots .dot-y { background: #f59e0b; }
.browser-dots .dot-g { background: #10b981; }

.browser-address {
  background: var(--bg);
  flex: 1;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-size: 11px;
  color: var(--muted);
}

.browser-content {
  position: relative;
  height: 480px;
  background: var(--bg);
  overflow: hidden;
  padding: 24px;
  text-align: left;
}

/* Copia dell'effetto overlay di Copyatrix in CSS grafico */
.mock-webpage {
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  -webkit-user-select: none;
  user-select: none;
}

.mock-article-title {
  font-size: 22px;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.mock-article-meta {
  font-size: 11px;
  color: var(--accent-2);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.mock-article-p {
  line-height: 1.6;
  margin-bottom: 14px;
}

.mock-article-p.faded {
  opacity: 0.4;
}

/* Area Trasparente overlay attiva */
.copyatrix-overlay-mock {
  position: absolute;
  top: 70px;
  left: 60px;
  right: 60px;
  bottom: 80px;
  border: 2px dashed var(--accent-2);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.04);
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45);
  pointer-events: none;
  animation: glow-border 2s infinite ease-in-out;
}

html[data-theme="light"] .copyatrix-overlay-mock {
  box-shadow: 0 0 0 9999px rgba(248, 250, 252, 0.45);
}

@keyframes glow-border {
  0%, 100% { border-color: var(--accent-2); box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45), 0 0 15px rgba(37, 99, 235, 0.3); }
  50% { border-color: #10b981; box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45), 0 0 5px rgba(16, 185, 129, 0.1); }
}

html[data-theme="light"] @keyframes glow-border {
  0%, 100% { border-color: var(--accent-2); box-shadow: 0 0 0 9999px rgba(248, 250, 252, 0.45), 0 0 15px rgba(37, 99, 235, 0.3); }
  50% { border-color: #10b981; box-shadow: 0 0 0 9999px rgba(248, 250, 252, 0.45), 0 0 5px rgba(16, 185, 129, 0.1); }
}

/* Barra fluttuante comandi overlay */
.copyatrix-toolbar-mock {
  position: absolute;
  top: -46px;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  pointer-events: none;
}

.toolbar-title-mock {
  font-weight: 700;
  font-size: 11px;
  color: var(--accent-2);
  margin-right: 6px;
  text-transform: uppercase;
}

.toolbar-btn-mock {
  font-size: 11px;
  padding: 4px 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
}

.toolbar-btn-mock.primary-mock {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Features Section */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-pretitle {
  color: var(--accent-2);
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--muted);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

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

.feature-card {
  background: var(--card-gradient);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow);
  border-color: var(--accent-2);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Privacy Preview Section */
.privacy-preview-section {
  background: var(--panel-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.privacy-preview-card {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 40px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 10px 20px var(--shadow);
}

.privacy-preview-icon {
  font-size: 40px;
  color: #10b981;
  margin-bottom: 16px;
}

.privacy-preview-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.privacy-preview-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Promo Footer - Preso fedelmente da notes.css */
.promo-footer {
  max-width: 1200px;
  margin: 80px auto 40px;
  padding: 0 24px;
  border-top: 1px solid var(--border);
  padding-top: 50px;
}

.promo-header {
  text-align: center;
  margin-bottom: 32px;
}

.promo-header h2 {
  font-size: 24px;
  margin: 0 0 10px;
  color: var(--accent-2);
  font-weight: 800;
}

.promo-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.promo-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 4px 6px -1px var(--shadow);
}

.promo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--shadow);
  border-color: var(--accent-2);
}

@media (min-width: 768px) {
  .promo-card.desktop-app {
    grid-column: span 2;
  }
}

.promo-card.desktop-app {
  border-color: #10b981;
}

.promo-card.desktop-app:hover {
  border-color: #34d399;
}

.promo-card.desktop-app h3 {
  color: #10b981;
}

html[data-theme="light"] .promo-card.desktop-app h3 {
  color: #059669;
}

.promo-content h3 {
  font-size: 17px;
  margin: 0 0 10px;
  line-height: 1.4;
  font-weight: 700;
}

.promo-content p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.promo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.promo-actions a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Footer Bottom */
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

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

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

/* Privacy Page Specifics */
.privacy-page-container {
  max-width: 800px;
  margin: 40px auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 12px 24px var(--shadow);
}

.privacy-page-container h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
}

.privacy-page-container h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text);
}

.privacy-page-container p {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.privacy-page-container ul {
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--muted);
}

.privacy-page-container li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.privacy-meta {
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-2);
}

.privacy-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* Responsive Utilities */
@media (max-width: 992px) {
  .hero-title {
    font-size: 40px;
  }
  .browser-content {
    height: 400px;
  }
  .copyatrix-overlay-mock {
    top: 50px;
    left: 40px;
    right: 40px;
    bottom: 60px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--panel);
    flex-direction: column;
    padding: 40px 24px;
    align-items: flex-start;
    gap: 32px;
    z-index: 999;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    transition: left 0.4s ease;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .mobile-toggle-btn {
    display: block;
  }
  
  .hero {
    padding: 80px 16px 50px;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .hero-subtitle {
    font-size: 15px;
  }
  
  .browser-content {
    height: 300px;
  }
  
  .copyatrix-overlay-mock {
    top: 30px;
    left: 20px;
    right: 20px;
    bottom: 40px;
  }
  
  .copyatrix-toolbar-mock {
    top: -40px;
    padding: 4px 8px;
  }
  
  .toolbar-title-mock {
    font-size: 9px;
  }
  
  .toolbar-btn-mock {
    font-size: 9px;
    padding: 2px 6px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .privacy-page-container {
    padding: 24px;
    margin: 20px 12px;
  }
  
  .privacy-page-container h1 {
    font-size: 24px;
  }
}
