/* ===== Custom Properties ===== */
:root {
  --primary: #1a5276;
  --primary-light: #2980b9;
  --primary-dark: #0e2f44;
  --secondary: #1e8449;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --bg-dark: #0e2f44;
  --text: #2c3e50;
  --text-light: #5d6d7e;
  --border-light: rgba(0,0,0,0.06);
  --border-faq: rgba(0,0,0,0.08);
  --card-hover-shadow: 0 8px 30px rgba(0,0,0,0.12);
  --table-border: #e0e0e0;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --primary: #3a9ad9;
  --primary-light: #5bb8f5;
  --primary-dark: #0e2f44;
  --secondary: #2ecc71;
  --bg: #121921;
  --bg-alt: #1a2332;
  --bg-dark: #0a1018;
  --text: #e0e6ed;
  --text-light: #9ba8b8;
  --border-light: rgba(255,255,255,0.08);
  --border-faq: rgba(255,255,255,0.1);
  --card-hover-shadow: 0 8px 30px rgba(0,0,0,0.3);
  --table-border: #2a3545;
  --shadow: 0 2px 16px rgba(0,0,0,0.25);
}

/* ===== Skip to Content ===== */
.skip-to-content {
  position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px; font-weight: 600; font-size: 0.95rem;
  z-index: 200; transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 0; outline: none; text-decoration: none; color: #fff;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, details:focus-visible {
  outline: 2px solid var(--primary-light); outline-offset: 2px; border-radius: 4px;
}
ul { list-style: none; }

/* ===== Typography ===== */
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.15; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.25; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

/* ===== Layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--bg-dark); color: #fff; }
.section--dark .section-subtitle { color: rgba(255,255,255,0.75); }
.section-title { text-align: center; margin-bottom: 0.75rem; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; font-size: 1.1rem; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 1.35rem; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 0.5rem;
}
.logo:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: var(--text); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--primary-light); text-decoration: none; }
.nav-links a.is-active { color: var(--primary-light); font-weight: 700; }
.nav-cta {
  background: var(--primary); color: #fff !important; padding: 0.5rem 1.25rem;
  border-radius: 8px; font-weight: 600; font-size: 0.9rem;
  transition: background var(--transition);
}
.nav-cta:hover { background: var(--primary-light); }

/* Hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--text);
  margin: 6px 0; transition: var(--transition);
}
.hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff; padding: 6rem 0 8rem; position: relative; overflow: hidden;
  text-align: center;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero p { font-size: 1.2rem; opacity: 0.9; max-width: 600px; margin: 0 auto 1rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 0.25rem; }
.hero-price-hint {
  font-size: 0.95rem; opacity: 0.65; margin-top: 1rem;
  margin-bottom: 0 !important;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; border-radius: 10px; font-weight: 600;
  font-size: 1rem; transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.2); text-decoration: none; }
.btn--primary { background: #fff; color: var(--primary); }
.btn--outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.5); }
.btn--outline:hover { border-color: #fff; }
.hero-wave {
  position: absolute; bottom: -1px; left: 0; width: 100%;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: auto; color: var(--bg); }

/* ===== Primary Features (alternating) ===== */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; margin-bottom: 4rem;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row--reverse .feature-text { order: 2; }
.feature-row--reverse .feature-image { order: 1; }
.feature-text h3 { font-size: 1.5rem; margin-bottom: 0.75rem; color: var(--primary); }
.feature-text p { color: var(--text-light); font-size: 1.05rem; }
.feature-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.feature-image img, .feature-image svg { width: 100%; }

/* ===== Secondary Features Grid ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  margin-top: 3rem;
}
.feature-card {
  background: var(--bg); border-radius: var(--radius); padding: 2rem;
  box-shadow: var(--shadow); text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--card-hover-shadow); }
.feature-card .icon { width: 56px; height: 56px; margin: 0 auto 1rem; }
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-light); font-size: 0.95rem; }

/* ===== Privacy & Security Highlight ===== */
.privacy-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #153d55 100%);
  color: #fff;
}
.privacy-section .section-title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.privacy-section .section-subtitle { color: rgba(255,255,255,0.7); max-width: 700px; }
.privacy-shield { text-align: center; margin-bottom: 1rem; }
.privacy-shield svg { width: 80px; height: 80px; margin: 0 auto; }

/* Security Banner */
.security-banner {
  display: flex; align-items: flex-start; gap: 1.5rem;
  background: rgba(30, 132, 73, 0.15); border: 1px solid rgba(30, 132, 73, 0.3);
  border-radius: var(--radius); padding: 2rem;
  margin-bottom: 3rem; max-width: 800px; margin-left: auto; margin-right: auto;
}
.security-banner-icon { flex-shrink: 0; margin-top: 0.25rem; }
.security-banner-content h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: #2ecc71; }
.security-banner-content p { font-size: 0.95rem; opacity: 0.85; line-height: 1.7; }

.privacy-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.privacy-card {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
  transition: background var(--transition);
}
.privacy-card:hover { background: rgba(255,255,255,0.14); }
.privacy-card .icon { width: 56px; height: 56px; margin: 0 auto 0.75rem; }
.privacy-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.privacy-card p { font-size: 0.9rem; opacity: 0.75; }

/* ===== App Store / CTA Section ===== */
.cta-section { text-align: center; }
.cta-section .app-preview { max-width: 700px; margin: 2rem auto 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.app-store-badge { height: 52px; margin: 0 auto; }
.cta-price-hint {
  text-align: center; color: var(--text-light); font-size: 1rem;
  font-weight: 500; margin-bottom: 2rem;
}

/* ===== FAQ Section ===== */
.faq-section .section-title { margin-bottom: 2.5rem; }
.faq-list { max-width: 750px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border-faq); border-radius: var(--radius);
  margin-bottom: 0.75rem; background: var(--bg);
  overflow: hidden;
}
.faq-item summary {
  padding: 1.25rem 1.5rem; cursor: pointer;
  font-weight: 600; font-size: 1.05rem; color: var(--text);
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  transition: background var(--transition);
}
.faq-item summary:hover { background: var(--bg-alt); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; content: ""; }
.faq-item summary::after {
  content: '+'; font-size: 1.4rem; font-weight: 400; color: var(--primary-light);
  transition: transform var(--transition);
  flex-shrink: 0; margin-left: 1rem;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p {
  padding: 0 1.5rem 1.25rem; color: var(--text-light);
  font-size: 0.95rem; line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark); color: rgba(255,255,255,0.7);
  padding: 2.5rem 0; text-align: center; font-size: 0.9rem;
}
.footer a { color: rgba(255,255,255,0.85); }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.75rem; }

/* ===== Content Pages ===== */
.content-page { max-width: 750px; margin: 0 auto; padding: 3rem 1.5rem; }
.content-page h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
.content-page .subtitle { color: var(--text-light); margin-bottom: 2.5rem; }
.content-page h2 { font-size: 1.4rem; margin-top: 2.5rem; margin-bottom: 0.75rem; color: var(--primary); }
.content-page h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.content-page p, .content-page li { margin-bottom: 0.75rem; color: var(--text-light); }
.content-page ul { padding-left: 1.5rem; list-style: disc; }
.content-page strong { color: var(--text); }
.content-page table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.content-page th, .content-page td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--table-border); }
.content-page th { font-weight: 600; color: var(--text); background: var(--bg-alt); }
.content-page td { color: var(--text-light); }

/* ===== Theme Toggle ===== */
.theme-toggle {
  background: none; border: none; cursor: pointer; padding: 0.4rem;
  color: var(--text); display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: background var(--transition);
}
.theme-toggle:hover { background: var(--bg-alt); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ===== Dark Mode Overrides ===== */
[data-theme="dark"] .header {
  background: rgba(18,25,33,0.85);
}
[data-theme="dark"] .hero-wave svg path { fill: var(--bg); }
[data-theme="dark"] .btn--primary { background: var(--primary); color: #fff; }
[data-theme="dark"] .feature-image { box-shadow: 0 2px 16px rgba(0,0,0,0.3); }

@media (max-width: 768px) {
  [data-theme="dark"] .nav-links {
    background: rgba(18,25,33,0.97);
  }
}

/* ===== Contact Form ===== */
.contact-hint {
  margin-bottom: 1.5rem; color: var(--muted); font-size: 0.95rem;
}
.contact-form {
  max-width: 600px; margin-bottom: 3rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.95rem;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 0.65rem 0.85rem; border: 1px solid var(--border-faq);
  border-radius: 8px; background: var(--bg-alt); color: var(--text);
  font-family: inherit; font-size: 1rem; transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--primary-light);
}
.form-group textarea {
  resize: vertical;
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll { opacity: 1; transform: none; transition: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .feature-row { gap: 2rem; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .privacy-grid { grid-template-columns: repeat(2, 1fr); }
  .security-banner { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(12px);
    flex-direction: column; justify-content: center; gap: 2rem;
    opacity: 0; pointer-events: none; transition: opacity var(--transition);
  }
  .nav-links.is-open { opacity: 1; pointer-events: all; }
  .nav-links a { font-size: 1.2rem; }
  .hamburger { display: block; }

  .hero { padding: 4rem 0 6rem; }
  .feature-row { grid-template-columns: 1fr; gap: 2rem; }
  .feature-row--reverse .feature-text { order: 1; }
  .feature-row--reverse .feature-image { order: 2; }
  .features-grid { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .security-banner { padding: 1.5rem; }
  .section { padding: 3.5rem 0; }

  .faq-item summary { font-size: 0.95rem; padding: 1rem 1.25rem; }
  .faq-item p { padding: 0 1.25rem 1rem; }

  .content-page table, .guide-section table { display: block; overflow-x: auto; }
}

/* ===== Support Page ===== */
.support-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff; padding: 3rem 0; text-align: center;
}
.support-hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
.support-hero p { opacity: 0.85; font-size: 1.1rem; max-width: 550px; margin: 0 auto; }

.support-toc {
  max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem;
}
.support-toc h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.support-toc-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 2rem;
}
.support-toc a {
  display: block; padding: 0.4rem 0; font-size: 0.95rem;
  color: var(--text-light); border-bottom: 1px solid var(--border-light);
}
.support-toc a:hover { color: var(--primary-light); text-decoration: none; }

@media (max-width: 768px) {
  .support-toc-grid { grid-template-columns: 1fr; }
}

/* FAQ Categories */
.faq-category { margin-bottom: 2.5rem; }
.faq-category h3 {
  font-size: 1.15rem; margin-bottom: 1rem; color: var(--primary);
  padding-bottom: 0.5rem; border-bottom: 2px solid var(--border-light);
}

/* Guide Section */
.guide-section {
  max-width: 900px; margin: 0 auto; padding: 0 1.5rem;
}
.guide-section h2 {
  font-size: 1.4rem; margin-top: 3rem; margin-bottom: 0.75rem;
  color: var(--primary); padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
}
.guide-section h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.guide-section h4 { margin-top: 1rem; margin-bottom: 0.4rem; font-size: 1rem; }
.guide-section p, .guide-section li { margin-bottom: 0.75rem; color: var(--text-light); line-height: 1.7; }
.guide-section ul, .guide-section ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.guide-section ul { list-style: disc; }
.guide-section ol { list-style: decimal; }
.guide-section strong { color: var(--text); }
.guide-section table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.guide-section th, .guide-section td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--table-border); }
.guide-section th { font-weight: 600; color: var(--text); background: var(--bg-alt); }
.guide-section td { color: var(--text-light); }

/* Callout boxes */
.callout {
  background: var(--bg-alt); border-left: 3px solid var(--primary-light);
  padding: 1rem 1.25rem; margin: 1rem 0; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem; color: var(--text-light); line-height: 1.7;
}
.callout strong { color: var(--text); }
.callout--warning { border-left-color: #e67e22; }

/* Theme-aware screenshots */
.screenshot-light { display: block; }
.screenshot-dark { display: none; }
[data-theme="dark"] .screenshot-light { display: none; }
[data-theme="dark"] .screenshot-dark { display: block; }

/* Guide screenshots */
.guide-screenshot {
  max-width: 100%; margin: 1.5rem auto;
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* Feature screenshots */
.feature-image .screenshot-light,
.feature-image .screenshot-dark {
  width: 100%; border-radius: var(--radius);
}

/* Support page FAQ link on main page */
.faq-more-link {
  text-align: center; margin-top: 2rem; font-size: 1.05rem;
}
.faq-more-link a { font-weight: 600; }

/* ===== Content Page TOC ===== */
.content-toc {
  background: var(--bg-alt); border-radius: var(--radius); padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.content-toc h2 { font-size: 1.1rem; margin: 0 0 0.75rem; color: var(--text); }
.content-toc ol { padding-left: 1.25rem; list-style: decimal; margin: 0; }
.content-toc li { margin-bottom: 0.3rem; }
.content-toc a { font-size: 0.9rem; color: var(--text-light); }
.content-toc a:hover { color: var(--primary-light); text-decoration: none; }
