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

:root {
  --bg: #090B10;
  --surface: #10141D;
  --glass: rgba(16, 20, 29, 0.65);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  
  --accent: #D4A847;
  --accent-glow: rgba(212, 168, 71, 0.4);
  --accent-dim: rgba(212, 168, 71, 0.1);
  
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Background Glowing Orbs */
body::before, body::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.15;
}

body::before {
  background: var(--accent);
  top: -200px;
  left: -200px;
}

body::after {
  background: #3B82F6;
  bottom: 20%;
  right: -200px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-top: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 11, 16, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a.nav-item {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a.nav-item:hover {
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--text-primary);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

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

.btn-primary:hover {
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background-color: var(--border);
  box-shadow: none;
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  background: linear-gradient(180deg, #FFFFFF 0%, #9CA3AF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 .highlight {
  background: linear-gradient(180deg, #FCD34D 0%, #D4A847 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  max-width: 640px;
  margin: 0 auto 40px;
}

/* App Screenshots */
.hero-screenshot {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  display: block;
  margin: 0 auto;
}

.spotlight-img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  display: block;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(212, 168, 71, 0.2);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 24px;
  margin-top: 60px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}

.bento-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.bento-card .icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: inline-block;
  opacity: 0.9;
}

.bento-card h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.bento-card p {
  font-size: 1rem;
  margin-bottom: 0;
  color: var(--text-secondary);
}

.bento-wide {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-wide {
    grid-column: span 1;
  }
}

/* CTA Section */
.cta-section {
  margin-top: 80px;
  padding: 60px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 400px;
  background: var(--accent);
  filter: blur(150px);
  opacity: 0.1;
  pointer-events: none;
}

/* Legal Pages Hub Layout */
.hub-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  padding: 60px 0;
}

.hub-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.hub-sidebar h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hub-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-nav a {
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.hub-nav a:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.hub-nav a.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.hub-content {
  max-width: 720px;
}

.hub-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.last-updated {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 99px;
  margin-bottom: 40px;
}

.hub-content h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.hub-content p, .hub-content li {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.hub-content ul {
  padding-left: 20px;
  margin-bottom: 1.5rem;
}

.hub-content li {
  margin-bottom: 10px;
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  background: var(--surface);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 20px 24px;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-icon {
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 24px 24px 24px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
  margin-top: 80px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 40px;
  text-align: center;
}

/* Responsive */
@media (max-width: 800px) {
  .hub-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 0;
  }
  .hub-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 10px;
    min-width: 0;
    width: 100%;
  }
  .hub-content {
    min-width: 0;
    width: 100%;
  }
  .hub-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .hub-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
  .hub-nav a {
    white-space: nowrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 8px 18px;
    font-size: 0.9rem;
  }
  .hub-nav a.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
  }
}

@media (max-width: 600px) {
  /* Prevent horizontal overflow strictly */
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  /* Force long text to wrap */
  p, li, h1, h2, h3, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Typography Scaling */
  h1 { font-size: 2.4rem; line-height: 1.1; margin-bottom: 1rem; }
  h2 { font-size: 1.8rem; margin-bottom: 1rem; }
  p { font-size: 1rem; margin-bottom: 1.25rem; }

  /* Layout and Padding Adjustments */
  .container { padding: 0 16px; }
  .hero { padding: 50px 0 30px; }
  
  /* Header & Nav (Premium Clean Look) */
  .header-inner { 
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap;
  }
  .nav-links { 
    display: none; /* Hide links on mobile for clean SaaS look */
  }
  .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Feature Grids */
  .glass-card, .bento-card { padding: 20px; border-radius: 16px; }
  
  /* Spotlight Layouts - Fix min-width overflow */
  div[style*="display: flex; gap: 32px;"] {
    gap: 20px !important;
    margin-bottom: 40px !important;
  }
  div[style*="min-width: 300px"] {
    min-width: 100% !important;
    width: 100% !important;
  }
  .spotlight-img {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
  }

  /* CTA Section */
  .cta-section { padding: 32px 20px; margin-top: 40px; border-radius: 16px; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
}
