/* Reset & Custom Properties */
:root {
  /* Harmonious Color Palette (OKLCH tailored and HSL) */
  --bg-primary: #08080a;
  --bg-secondary: #0f0f14;
  --bg-tertiary: #161622;
  
  --color-primary: #8b5cf6; /* Vibrant violet */
  --color-secondary: #06b6d4; /* Vibrant cyan */
  --color-success: #10b981; /* Emerald green */
  --color-danger: #ef4444; /* Rose red */
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-inverse: #08080a;
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.3) var(--bg-primary);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
}

/* Custom Scrollbar fallback for macOS & other browsers */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-primary);
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
  }
}

/* Common Layout Elements */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
  border: none;
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
  background: linear-gradient(135deg, #9b6bf7 0%, #8b5cf6 100%);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(8, 8, 10, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  height: 80px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-main);
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  font-family: var(--font-display);
}

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

/* Hero Section */
.hero-section {
  padding-top: 180px;
  padding-bottom: 100px;
  overflow: hidden;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge {
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  font-family: var(--font-display);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 520px;
}

/* Download Platforms Section (Antigravity 2.0 Style) */
.download-platforms-section {
  padding: 80px 0;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-glass);
}

.download-section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  text-align: left;
  margin-bottom: 40px;
  color: var(--text-main);
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.platform-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 32px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.platform-col:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-glass-hover);
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.platform-logo {
  width: 24px;
  height: 24px;
  color: var(--text-main);
}

.platform-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-platform-dark {
  background-color: #18181b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
}

.btn-platform-dark:hover {
  background-color: #27272a;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-platform-light {
  background-color: #f4f4f5;
  color: #18181b;
  border: none;
  border-radius: 99px;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
}

.btn-platform-light:hover {
  background-color: #e4e4e7;
  transform: translateY(-1px);
}

/* Piattaforma non ancora pubblicata: bottone spento, non cliccabile. */
.btn-platform-soon {
  background-color: transparent;
  color: #71717a;
  border: 1px dashed rgba(113, 113, 122, 0.5);
  border-radius: 99px;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  cursor: default;
  display: block;
}

/* Responsive grid for platforms */
@media (max-width: 968px) {
  .platforms-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Hero Visual & Glassmorphism App Container */
.hero-visual {
  position: relative;
  width: 100%;
}

.glow-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.visual-container {
  position: relative;
  z-index: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.5s ease;
}

.visual-container:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mockup-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* Section Common */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Features Section */
.features-section {
  padding: 100px 0;
  background-color: var(--bg-secondary);
}

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

.feature-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-glass-hover);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.feature-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon-wrapper.purple { background: rgba(139, 92, 246, 0.15); color: var(--color-primary); }
.feature-icon-wrapper.blue { background: rgba(6, 182, 212, 0.15); color: var(--color-secondary); }
.feature-icon-wrapper.red { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.feature-icon-wrapper.green { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }

.feature-icon {
  width: 26px;
  height: 26px;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Pricing Section */
.pricing-section {
  padding: 100px 0;
  background-color: var(--bg-primary);
}

.pricing-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.pricing-card {
  background: var(--bg-tertiary);
  border: 2px solid var(--color-primary);
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  padding: 6px 20px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-display);
}

.pricing-plan-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
}

.price-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 8px;
}

.price {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
}

.price-period {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.price-sub {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding: 0 16px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
}

.check-icon {
  width: 20px;
  height: 20px;
  color: var(--color-success);
  flex-shrink: 0;
}

/* Footer */
.footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-glass);
  padding: 40px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 12px;
  border-radius: 99px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-success);
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Responsive Utilities */
@media (max-width: 968px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-content {
    align-items: center;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-description {
    max-width: 100%;
  }
  .visual-container {
    transform: none;
    max-width: 600px;
    margin: 0 auto;
  }
  .visual-container:hover {
    transform: none;
  }
  .header-container {
    padding: 0 16px;
  }
  .nav {
    display: none;
  }
}

/* Recommended Platform highlight */
.platform-col.recommended-platform {
  border-color: var(--color-primary);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15), inset 0 0 0 1px rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.04);
}

.recommended-badge {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-display);
  margin-left: auto;
}

/* Bottone del DMG giusto per il chip rilevato (script.js, rilevaChipMac):
   veste da protagonista e sale sopra l'altro. L'altro resta cliccabile per
   chi scarica per un secondo Mac diverso dal suo. */
.btn-chip-detected {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
}

.btn-chip-detected:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Riga di aiuto sotto i due DMG mac: guida chi non sa che chip ha; quando il
   chip viene riconosciuto, script.js la riscrive con l'esito. */
.chip-hint {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #71717a;
  text-align: center;
  line-height: 1.4;
}

/* Guida "che Mac ho?" sotto i bottoni di download: <details> nativo aperto al
   click, per chi non conosce il proprio chip (caso Fabio). */
.chip-guide {
  margin-top: 12px;
  border: 1px solid rgba(113, 113, 122, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.chip-guide summary {
  cursor: pointer;
  padding: 12px 16px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: #a1a1aa;
  list-style: none;
  text-align: center;
}

.chip-guide summary::-webkit-details-marker { display: none; }

.chip-guide summary:hover { color: #e4e4e7; }

.chip-guide[open] summary { border-bottom: 1px solid rgba(113, 113, 122, 0.25); }

.chip-guide-body {
  padding: 14px 18px 16px;
  font-size: 0.85rem;
  color: #d4d4d8;
  line-height: 1.65;
  text-align: left;
}

.chip-guide-body p { margin: 0 0 8px; }

.chip-guide-row {
  background: rgba(139, 92, 246, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
}

.chip-guide-note {
  color: #71717a;
  font-size: 0.78rem;
  margin-bottom: 0 !important;
}
