/* ============================================================
   NeuraLocal Website — Apple Liquid Glass Design System
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  
  /* Light mode */
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  
  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --glass-blur: 20px;
  
  /* Cards */
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(0, 0, 0, 0.06);
  --card-hover: rgba(255, 255, 255, 0.85);
  
  /* Sections */
  --section-separator: rgba(0, 0, 0, 0.06);
  
  /* Radius */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 40px;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #1c1c1e;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #6e6e73;
  --accent: #2997ff;
  --accent-hover: #4bb0ff;
  
  --glass-bg: rgba(28, 28, 30, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  
  --card-bg: rgba(44, 44, 46, 0.5);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-hover: rgba(44, 44, 46, 0.8);
  
  --section-separator: rgba(255, 255, 255, 0.06);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

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

/* ── Glass Card ── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all 0.3s ease;
}
.card:hover {
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
[data-theme="dark"] .card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 0;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-btn {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  padding: 8px 16px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toggle-btn:hover {
  background: var(--card-hover);
}
.toggle-btn .icon {
  font-size: 1rem;
}

/* Mobile menu */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    padding: 20px;
    gap: 16px;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-hamburger {
    display: block;
  }
}

/* ── Hero ── */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(41, 151, 255, 0.1) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.3);
}
.hero-cta:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 113, 227, 0.4);
}

/* ── Mockup Display (Apple style) ── */
.mockup-section {
  padding: 80px 0;
  text-align: center;
}

.mockup-showcase {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 40px;
  margin-top: 60px;
  perspective: 1200px;
}

.mockup-phone {
  width: 280px;
  border-radius: 36px;
  overflow: hidden;
  transition: transform 0.5s ease;
  transform: rotateY(-5deg) rotateX(2deg);
}
.mockup-phone:nth-child(2) {
  transform: rotateY(5deg) rotateX(2deg);
  width: 260px;
}
.mockup-phone:hover {
  transform: rotateY(0) rotateX(0) scale(1.04);
}
.mockup-phone img {
  width: 100%;
  display: block;
}

@media (max-width: 640px) {
  .mockup-showcase {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .mockup-phone, .mockup-phone:nth-child(2) {
    width: 220px;
    transform: none;
  }
}

/* ── Section Title ── */
.section-title {
  text-align: center;
  margin-bottom: 56px;
}
.section-title h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.section-title p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Features Section ── */
.features {
  padding: 100px 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  text-align: center;
  padding: 40px 28px;
}
.feature-icon {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ── Models Section ── */
.models {
  padding: 100px 0;
}
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.model-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
}
.model-card img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}
.model-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.model-info p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* ── FAQ Section ── */
.faq {
  padding: 100px 0;
}
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.faq-question:hover {
  background: var(--card-hover);
}
.faq-question .arrow {
  font-size: 1.25rem;
  transition: transform 0.3s;
  color: var(--text-tertiary);
}
.faq-item.open .faq-question .arrow {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px;
}
.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  padding-top: 8px;
}

/* ── Footer ── */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--section-separator);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.footer-brand span {
  font-size: 1.125rem;
  font-weight: 700;
}
.footer-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 320px;
}
.footer h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--text);
}
.footer-bottom {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  padding-top: 24px;
  border-top: 1px solid var(--section-separator);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ── Legal Pages ── */
.legal {
  padding: 140px 0 80px;
  max-width: 780px;
  margin: 0 auto;
}
.legal h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.legal .last-updated {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.legal h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal p, .legal li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal ul {
  padding-left: 24px;
  margin-bottom: 16px;
}
.legal a {
  color: var(--accent);
}

/* ── Contact Form ── */
.contact-form {
  margin: 2rem 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 500px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-group label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}
.form-control {
  padding: 0.875rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
  background: var(--bg-alt);
}
textarea.form-control {
  resize: vertical;
  min-height: 120px;
}
.form-submit {
  padding: 1rem 2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}
.form-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }
.stagger.visible > *:nth-child(9) { transition-delay: 0.45s; }
.stagger.visible > *:nth-child(10) { transition-delay: 0.5s; }
.stagger.visible > *:nth-child(11) { transition-delay: 0.55s; }
.stagger.visible > *:nth-child(12) { transition-delay: 0.6s; }
.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}
