/* === RESET & BASE === */
*, *::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 { max-width: 100%; display: block; }
a { color: inherit; }

/* === VARIABLES === */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #3a3a5c;
  --border: #e0e0e5;
  --nav-height: 56px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  --radius: 18px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  --max-width: 1100px;
  --section-pad: 96px 24px;
}

/* === LAYOUT === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === NAV === */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.site-nav .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}
.nav-back {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--text); }
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  justify-content: center;
}
.nav-brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-cta { margin-left: auto; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 980px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }

/* === HERO === */
.hero {
  padding: 80px 24px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-icon-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 36px;
}
.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 27px;
  box-shadow: 0 8px 40px rgba(58, 58, 92, 0.2);
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.hero-icon.loaded { opacity: 1; transform: scale(1); }

/* Pulse rings */
.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1.5px solid rgba(58, 58, 92, 0.15);
  animation: pulse 3s ease-out infinite;
  pointer-events: none;
}
.pulse-ring:nth-child(1) { width: 160px; height: 160px; animation-delay: 0s;   transform: translate(-50%, -50%); }
.pulse-ring:nth-child(2) { width: 210px; height: 210px; animation-delay: 0.8s; transform: translate(-50%, -50%); }
.pulse-ring:nth-child(3) { width: 260px; height: 260px; animation-delay: 1.6s; transform: translate(-50%, -50%); }

@keyframes pulse {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}
.hero-headline.loaded { opacity: 1; transform: none; }

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease 0.35s, transform 0.6s ease 0.35s;
}
.hero-sub.loaded { opacity: 1; transform: none; }

.app-store-btn {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}
.app-store-btn.loaded { opacity: 1; transform: none; }
.app-store-btn svg { display: block; transition: opacity 0.2s; }
.app-store-btn:hover svg { opacity: 0.85; }

/* === SECTION BASE === */
section { padding: var(--section-pad); }
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 56px;
}

/* === FEATURES === */
.features { background: var(--bg-alt); text-align: center; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: left;
  box-shadow: var(--shadow);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* === SCREENSHOTS === */
.screenshots { text-align: center; }
.screenshots-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  max-width: var(--max-width);
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
}
.screenshots-row::-webkit-scrollbar { height: 4px; }
.screenshots-row::-webkit-scrollbar-track { background: var(--border); border-radius: 2px; }
.screenshots-row::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }
.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 220px;
}
.screenshot-item img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.15));
}

/* === PRICING === */
.pricing { background: var(--bg-alt); text-align: center; }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  text-align: left;
  border: 2px solid transparent;
}
.pricing-card.featured { border-color: var(--accent); }
.pricing-tier {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}
.pricing-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.pricing-features li {
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pricing-features li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.pricing-options {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.pricing-cta {
  display: block;
  margin-top: 24px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  transition: opacity 0.2s;
}
.pricing-cta:hover { opacity: 0.85; }
.pricing-cta.secondary { background: var(--text-secondary); }

/* === FAQ === */
.faq { text-align: center; }
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list details:first-child { border-top: 1px solid var(--border); }
.faq-list summary {
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 16px;
  line-height: 1;
}
.faq-list details[open] > summary::after { transform: rotate(45deg); }
.faq-answer {
  padding: 4px 0 24px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.faq-answer p + p { margin-top: 12px; }
.faq-answer ol {
  margin: 12px 0 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.faq-answer strong { color: var(--text); }

/* === FOOTER === */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.6);
  padding: 48px 24px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  filter: brightness(0) invert(1);
}
.footer-brand span { font-weight: 600; color: #fff; font-size: 1rem; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 0.8rem; color: rgba(255, 255, 255, 0.35); }

/* === PROSE PAGE (privacy.html) === */
.prose-page { padding: 64px 24px 96px; }
.prose-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 80px;
  align-items: start;
}
.prose-toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}
.prose-toc h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.prose-toc nav { display: flex; flex-direction: column; gap: 8px; }
.prose-toc nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  padding: 2px 0;
}
.prose-toc nav a:hover { color: var(--accent); }
.prose-header { margin-bottom: 40px; }
.prose-meta { font-size: 0.85rem; color: var(--text-secondary); margin-top: 8px; }
.prose-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.prose-body h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}
.prose-body h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 48px 0 12px;
  scroll-margin-top: calc(var(--nav-height) + 16px);
}
.prose-body p {
  font-size: 0.975rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.prose-body a { color: var(--accent); }

/* === SUPPORT PAGE === */
.support-hero {
  padding: 80px 24px 64px;
  background: var(--bg-alt);
  text-align: center;
}
.support-faq { padding: 64px 24px 96px; }
.support-faq .faq-list { max-width: 720px; margin: 0 auto; }
.support-contact {
  max-width: 720px;
  margin: 56px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.support-contact h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: 12px; }
.support-contact > p { font-size: 0.975rem; color: var(--text-secondary); margin-bottom: 24px; }
.support-contact a { color: var(--accent); text-decoration: none; }
.support-links { display: flex; gap: 24px; }
.support-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.support-links a:hover { color: var(--accent); }

/* === SCROLL REVEAL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-left.visible { opacity: 1; transform: none; }
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-right.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-icon, .hero-headline, .hero-sub, .app-store-btn,
  .reveal, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  :root { --section-pad: 64px 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .screenshot-item { width: 180px; }
  .prose-container { grid-template-columns: 1fr; gap: 32px; }
  .prose-toc { position: static; }
}
@media (max-width: 480px) {
  .hero { padding: 56px 20px 72px; }
  .hero-icon { width: 96px; height: 96px; border-radius: 22px; }
}
