/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* App colors - exact match from ScribrTheme.swift */
  --primary-color: #3bd1c7; /* accentColor1 - teal */
  --secondary-color: #ffc34d; /* accentColor2 - gold/amber */
  --dark-bg: #222426; /* backgroundColor */
  --darker-bg: #1c1e22; /* backgroundGradient end */
  --card-bg: #1a1c1f; /* cardBackgroundColor */
  --text-primary: #e6e6e6; /* textColor */
  --text-secondary: #a8a8a8; /* textColorSecondary */

  /* 6-color gradient from app header */
  --gradient-color-1: #5aeddb; /* 0% */
  --gradient-color-2: #3bd1c7; /* 20% */
  --gradient-color-3: #96e6c9; /* 40% */
  --gradient-color-4: #ffc34d; /* 65% */
  --gradient-color-5: #ffd78a; /* 85% */
  --gradient-color-6: #ffe1a8; /* 100% */
}

body {
  /* Match app's Alro font with fallback to system rounded (like the app) */
  font-family: "Alro", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI",
    sans-serif;
  background-color: var(--darker-bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

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

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.gradient-text {
  /* 6-color gradient matching app's headerGradient (90deg) */
  background: linear-gradient(
    90deg,
    var(--gradient-color-1) 0%,
    var(--gradient-color-2) 20%,
    var(--gradient-color-3) 40%,
    var(--gradient-color-4) 65%,
    var(--gradient-color-5) 85%,
    var(--gradient-color-6) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(19, 21, 28, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
}

.logo-live {
  /* Use the 6-color gradient for "Scribr" logo like in the app */
  background: linear-gradient(
    90deg,
    var(--gradient-color-1) 0%,
    var(--gradient-color-2) 20%,
    var(--gradient-color-3) 40%,
    var(--gradient-color-4) 65%,
    var(--gradient-color-5) 85%,
    var(--gradient-color-6) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Buttons */
.primary-button,
.secondary-button,
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.primary-button {
  /* Use app's choiceButtonBorderGradient style (135deg, teal to gold) */
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--darker-bg);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 209, 199, 0.3);
}

.secondary-button {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--primary-color);
}

.secondary-button:hover {
  background: var(--primary-color);
  color: var(--darker-bg);
}

.cta-button {
  background: var(--primary-color);
  color: var(--darker-bg);
}

.cta-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* Hero Section */
.hero {
  padding: 140px 0 100px;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  max-width: 600px;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.hero-feature svg {
  flex-shrink: 0;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  position: relative;
  width: 320px;
  height: 650px;
  background: linear-gradient(
    135deg,
    rgba(59, 209, 199, 0.1),
    rgba(255, 195, 77, 0.1)
  );
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(59, 209, 199, 0.3);
}

.phone-mockup .screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
}

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

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

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

.feature-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 12px 40px rgba(59, 209, 199, 0.2);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(
    135deg,
    rgba(59, 209, 199, 0.2),
    rgba(255, 195, 77, 0.2)
  );
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Screenshots Section */
.screenshots {
  padding: 100px 0;
  background: var(--darker-bg);
}

.screenshots-carousel {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 2rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screenshots-carousel::-webkit-scrollbar {
  height: 8px;
}

.screenshots-carousel::-webkit-scrollbar-track {
  background: var(--card-bg);
  border-radius: 4px;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.screenshot-card {
  flex: 0 0 300px;
  scroll-snap-align: center;
  text-align: center;
}

.screenshot-card img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  border-radius: 24px;
  margin-bottom: 1rem;
  border: 2px solid rgba(59, 209, 199, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.screenshot-card h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.screenshot-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* How It Works Section */
.how-it-works {
  padding: 100px 0;
  background: var(--dark-bg);
}

.steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
}

.step {
  flex: 1;
  text-align: center;
  padding: 2.5rem;
  background: var(--card-bg);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.step:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 12px 40px rgba(59, 209, 199, 0.2);
}

.step-number {
  width: 64px;
  height: 64px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  color: var(--darker-bg);
}

.step h3 {
  margin-bottom: 1rem;
}

.step p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-arrow {
  font-size: 2rem;
  color: var(--primary-color);
  flex: 0 0 auto;
}

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

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.pricing-card {
  background: var(--card-bg);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 12px 40px rgba(59, 209, 199, 0.2);
}

.pricing-card.featured {
  border-color: var(--primary-color);
  box-shadow: 0 12px 40px rgba(59, 209, 199, 0.3);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--darker-bg);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.pricing-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.price {
  margin-bottom: 2rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.amount {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.period {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  margin-bottom: 2.5rem;
  text-align: left;
}

.pricing-features li {
  padding: 0.75rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-button {
  width: 100%;
  justify-content: center;
}

.pricing-button.primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--darker-bg);
}

.pricing-button.secondary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--text-primary);
}

/* Privacy Section */
.privacy-section {
  padding: 100px 0;
  background: var(--dark-bg);
}

.privacy-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: center;
}

.privacy-text h2 {
  margin-bottom: 1.5rem;
}

.privacy-lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.8;
}

.privacy-features {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.privacy-feature {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.privacy-feature svg {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.privacy-feature h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.privacy-feature p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.privacy-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.privacy-badge {
  background: var(--card-bg);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  text-align: center;
  border: 2px solid var(--primary-color);
  box-shadow: 0 12px 40px rgba(59, 209, 199, 0.3);
}

.privacy-badge svg {
  margin-bottom: 1.5rem;
}

.privacy-badge h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.privacy-badge p {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1rem;
}

/* CTA Section */
.cta {
  padding: 100px 0;
  background: linear-gradient(
    135deg,
    rgba(59, 209, 199, 0.1),
    rgba(255, 195, 77, 0.1)
  );
}

.cta-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-content h2 {
  margin-bottom: 1.5rem;
}

.cta-content > p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.cta-note {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Footer */
.footer {
  background: var(--dark-bg);
  padding: 60px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
}

.footer-section h5 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-section a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

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

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-logo {
  font-size: 1.75rem;
  font-weight: 700;
}

.footer-logo .logo-live {
  /* Use the 6-color gradient for footer logo too */
  background: linear-gradient(
    90deg,
    var(--gradient-color-1) 0%,
    var(--gradient-color-2) 20%,
    var(--gradient-color-3) 40%,
    var(--gradient-color-4) 65%,
    var(--gradient-color-5) 85%,
    var(--gradient-color-6) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Responsive Design */
@media (max-width: 968px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
    flex-direction: column;
  }

  .hero-features {
    justify-content: center;
  }

  .phone-mockup {
    width: 280px;
    height: 570px;
  }

  .steps {
    flex-direction: column;
  }

  .step-arrow {
    transform: rotate(90deg);
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a:not(.cta-button) {
    display: none;
  }

  .privacy-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .privacy-feature {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }

  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-description {
    font-size: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .screenshot-card {
    flex: 0 0 260px;
  }

  .screenshot-card img {
    height: 520px;
  }
}

/* Legal Pages Styling */
.legal-content {
  padding: 140px 0 80px;
  background: var(--darker-bg);
  min-height: 100vh;
}

.legal-document {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-document h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    90deg,
    var(--gradient-color-1) 0%,
    var(--gradient-color-2) 20%,
    var(--gradient-color-3) 40%,
    var(--gradient-color-4) 65%,
    var(--gradient-color-5) 85%,
    var(--gradient-color-6) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-updated {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-intro {
  background: rgba(59, 209, 199, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
  margin-bottom: 3rem;
}

.legal-intro p {
  margin-bottom: 1rem;
}

.legal-intro p:last-child {
  margin-bottom: 0;
}

.privacy-highlight {
  background: rgba(255, 195, 77, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--secondary-color);
}

.legal-document h2 {
  font-size: 1.75rem;
  color: var(--primary-color);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-document h2:first-of-type {
  margin-top: 2rem;
  border-top: none;
  padding-top: 0;
}

.legal-document h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.legal-document p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-document ul,
.legal-document ol {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  margin-left: 1.5rem;
}

.legal-document li {
  margin-bottom: 0.75rem;
}

.legal-document strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-document a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.legal-document a:hover {
  border-bottom-color: var(--primary-color);
}

.contact-info {
  background: var(--dark-bg);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  border-left: 3px solid var(--primary-color);
}

.privacy-summary {
  background: linear-gradient(
    135deg,
    rgba(59, 209, 199, 0.1),
    rgba(255, 195, 77, 0.1)
  );
  padding: 2rem;
  border-radius: 16px;
  margin-top: 3rem;
  border: 2px solid var(--primary-color);
}

.privacy-summary h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.privacy-summary ul {
  margin-bottom: 1rem;
}

.privacy-summary p {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0;
}

/* Legal page responsive */
@media (max-width: 768px) {
  .legal-document {
    padding: 2rem 1.5rem;
  }

  .legal-document h1 {
    font-size: 2rem;
  }

  .legal-document h2 {
    font-size: 1.5rem;
  }

  .legal-document h3 {
    font-size: 1.125rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

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

.hero-content,
.feature-card,
.step,
.pricing-card {
  animation: fadeInUp 0.6s ease-out;
}
