:root {
  --primary: #1a1a2e;
  --primary-dark: #0d0d1a;
  --accent: #2563eb;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --text: #1a1a2e;
  --text-muted: #555;
  --border: #e0e0e0;
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0 2rem;
}
nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  position: relative;
}
nav .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
nav .logo img {
  height: 32px;
  width: 32px;
}
nav .logo .logo-dark {
  display: block;
}
nav .logo .logo-light {
  display: none;
}
.dark nav .logo .logo-dark {
  display: none;
}
.dark nav .logo .logo-light {
  display: block;
}
nav .nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}
nav .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 2rem;
  font-size: 0.95rem;
}
nav .nav-links a:hover {
  color: var(--primary);
}
nav .nav-links a.nav-cta {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: 1.5rem;
  transition: background 0.2s;
}
nav .nav-links a.nav-cta:hover {
  background: var(--primary-dark);
  color: #fff;
}
.dark nav .nav-links a.nav-cta {
  color: #1a1a2e;
}

/* Sections */
section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
section:first-of-type {
  padding-top: 8rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
}
h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  text-align: left;
}
p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* Hero */
.hero {
  text-align: center;
}
.hero p.lead {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}
.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.hero-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.hero .cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.hero .cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* CTA button (reusable) */
.cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.cta-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.cta-secondary:hover {
  background: var(--primary);
  color: #fff;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.feature {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.feature .icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
  color: var(--primary-dark);
}
.feature-link {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.feature-link:hover {
  text-decoration: underline;
}

/* Why Optymate */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}
.why-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}
.why-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.why-card h3 {
  margin-top: 0.75rem;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.step {
  text-align: center;
  padding: 1.5rem;
}
.step-number {
  display: inline-flex;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* Architecture */
.architecture-section {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 2.5rem;
}
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.pillar {
  background: var(--bg);
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pillar:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.pillar .pillar-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
  color: var(--primary);
}
.pillar h3 {
  margin-bottom: 0.75rem;
}
.pillar ul {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.pillar ul li {
  margin-bottom: 0.35rem;
}

/* Pricing */
.pricing-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  position: relative;
}
.trial-badge {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 1rem 0 0.25rem;
}
.pricing-card .price-period {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
}
.pricing-card ul li {
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing-card ul li iconify-icon {
  color: var(--primary-dark);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.pricing-card .pricing-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* Privacy content */
.privacy-content h3 {
  margin-top: 1.5rem;
}
.privacy-content p {
  font-size: 0.95rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}
.contact-card {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.contact-card a {
  color: var(--primary);
  text-decoration: none;
}
.contact-card a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text);
  display: flex;
  align-items: center;
  margin-left: 2rem;
}
.theme-toggle:hover {
  background: var(--bg-alt);
}
.theme-toggle iconify-icon {
  display: block;
}

/* Dark theme */
.dark {
  --primary: #e0e0e0;
  --primary-dark: #ffffff;
  --accent: #60a5fa;
  --bg: #1a1a2e;
  --bg-alt: #22223a;
  --text: #e0e0e0;
  --text-muted: #aaa;
  --border: #333;
}
.dark nav {
  background: rgba(26, 26, 46, 0.95);
}
.dark .feature {
  background: var(--bg);
}
.dark .feature:hover,
.dark .pillar:hover,
.dark .why-card:hover,
.dark .contact-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.dark .step-number {
  color: #1a1a2e;
}
/* Dark mode CTA - ensure readable contrast */
.dark .cta {
  background: #e0e0e0;
  color: #1a1a2e;
}
.dark .cta:hover {
  background: #ffffff;
  color: #1a1a2e;
}
.dark .cta-secondary {
  background: transparent;
  color: #e0e0e0;
  border-color: #e0e0e0;
}
.dark .cta-secondary:hover {
  background: #e0e0e0;
  color: #1a1a2e;
}
.dark nav .nav-links a.nav-cta {
  background: #e0e0e0;
  color: #1a1a2e;
}
.dark nav .nav-links a.nav-cta:hover {
  background: #ffffff;
}
.dark .trial-badge {
  background: #22c55e;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Detail page */
.detail-hero {
  text-align: center;
  padding-top: 8rem;
}
.detail-hero p.lead {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}
.feature-detail {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.feature-detail:last-child {
  border-bottom: none;
}
.feature-detail .icon {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  display: block;
}
.feature-detail h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.feature-detail ul {
  margin: 0.5rem 0 0 1.25rem;
  color: var(--text-muted);
}
.feature-detail ul li {
  margin-bottom: 0.35rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.back-link:hover {
  color: var(--primary);
}

/* Screenshots */
.screenshots-section {
  text-align: center;
}
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}
.screenshot-item {
  text-align: center;
}
.screenshot-item img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.screenshot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 220px;
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.screenshot-placeholder iconify-icon {
  font-size: 2.5rem;
}
.screenshot-caption {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* FAQ */
.faq-list {
  max-width: 750px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: "-";
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item p {
  padding: 0 0 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-item a {
  color: var(--primary);
}

/* Mobile */
@media (max-width: 600px) {
  h1 {
    font-size: 1.75rem;
  }
  section {
    padding: 3rem 1.25rem;
  }
  .hamburger {
    display: flex;
  }
  nav .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 2rem;
  }
  nav .nav-links.open {
    display: flex;
  }
  nav .nav-links a {
    margin-left: 0;
    padding: 0.5rem 0;
    font-size: 1rem;
  }
  .theme-toggle {
    margin-left: 0;
    margin-top: 0.5rem;
    align-self: flex-start;
  }
  nav .nav-links a.nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
    text-align: center;
  }
  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  .architecture-section {
    padding: 1.5rem;
  }
}

/* Tablet */
@media (max-width: 768px) and (min-width: 601px) {
  h1 {
    font-size: 2rem;
  }
  .screenshots-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pillars {
    grid-template-columns: 1fr;
  }
  .architecture-section {
    padding: 2rem;
  }
}
