/* ============================================================
   AnkerLabs Design System — index.css
   Global tokens, reset, components, utilities
   ============================================================ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --cyan:             #5fcff6;
  --cyan-dim:         #3da8cc;
  --cyan-glow:        rgba(95, 207, 246, 0.35);
  --cyan-subtle:      rgba(95, 207, 246, 0.08);
  --purple:           #a963f0;
  --purple-dim:       #8a4fd0;
  --purple-glow:      rgba(169, 99, 240, 0.3);
  --green:            #57bc90;
  --yellow:           #fcdf5d;
  --warning:          #ff6b6b;

  /* Surfaces */
  --bg-dark:          #1b1e26;
  --bg-darker:        #14161c;
  --card-bg:          #252b3b;
  --card-bg-hover:    #2c3347;
  --card-border:      #323a4b;
  --card-border-hover:#4a5568;
  --glass-bg:         rgba(37, 43, 59, 0.65);
  --glass-border:     rgba(95, 207, 246, 0.12);

  /* Text */
  --text-primary:     #ffffff;
  --text-secondary:   #a0aec0;
  --text-muted:       #5a6577;

  /* Typography */
  --font-display:     'Space Grotesk', system-ui, sans-serif;
  --font-body:        'Inter', system-ui, sans-serif;

  /* Spacing Scale */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;
  --space-3xl:  4rem;
  --space-4xl:  6rem;
  --space-5xl:  8rem;

  /* Sizing */
  --max-width:  1200px;
  --nav-height: 72px;

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.25);
  --shadow-glow-cyan: 0 0 30px rgba(95,207,246,0.15), 0 0 60px rgba(95,207,246,0.05);
  --shadow-glow-purple: 0 0 30px rgba(169,99,240,0.15), 0 0 60px rgba(169,99,240,0.05);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  overflow-x: hidden;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--text-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ── Custom Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  max-width: 65ch;
}

.text-gradient {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--cyan);
  color: var(--bg-dark) !important;
  box-shadow: 0 0 20px rgba(95,207,246,0.2);
}
.btn-primary:hover {
  background: #7ddcfa;
  color: var(--bg-dark) !important;
  box-shadow: 0 0 35px rgba(95,207,246,0.35);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}
.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--cyan);
  padding: 10px 20px;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--cyan-subtle);
}

.btn .price-strike {
  text-decoration: line-through;
  opacity: 0.6;
  font-weight: 400;
  font-size: 0.85em;
}

/* ── Glassmorphism Utilities ───────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
}
.glass-card:hover {
  border-color: var(--card-border-hover);
  background: var(--card-bg-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--duration-normal) var(--ease-out);
}

.nav.scrolled {
  background: rgba(27, 30, 38, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width var(--duration-normal) var(--ease-out);
  border-radius: var(--radius-full);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  margin-left: var(--space-lg);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Section Headers ───────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 16px;
  background: var(--cyan-subtle);
  border: 1px solid rgba(95,207,246,0.15);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--card-border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand p {
  font-size: 0.9rem;
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-brand img {
  height: 160px;
  width: auto;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-col a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--card-border);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: var(--space-md);
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}

.footer-socials a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-subtle);
}

/* ── Reveal Animations ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Noise Texture Overlay ─────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
  .hero h1 { padding: 0 var(--space-sm); }

  /* Mobile Nav */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: var(--bg-darker);
    padding: var(--space-3xl);
    gap: var(--space-xl);
    transition: right var(--duration-slow) var(--ease-out);
    border-left: 1px solid var(--card-border);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: var(--space-md);
  }

  .nav-toggle {
    display: flex;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }

  .footer-brand img {
    margin: 0 auto;
    display: block;
  }

  .footer-brand p {
    margin: var(--space-md) auto 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.85rem;
  }

  .hero-actions .btn,
  .cta-box .btn,
  .bundle-cta-box .btn,
  .faq-cta .btn,
  .pricing-card .btn {
    width: 100%;
    justify-content: center;
  }
}


/* -- SVG Animations & Sizing -------------------------------------- */
.laptop-demo-svg {
  width: 100%;
  max-width: 100%;
  margin: 0 auto var(--space-3xl);
  display: block;
  overflow: visible;
}

.app-icon img,
.app-section-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.2));
}

@media (max-width: 768px) {
  .laptop-demo-svg {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .laptop-demo-svg {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: var(--space-lg);
  }
}
