/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --bg-card: #f7f7f8;
  --bg-card-hover: #f0f0f2;
  --bg-section-alt: #fafafa;
  --text-primary: #000000;
  --text-secondary: #6b6b6b;
  --accent: #FF5FA2;
  --accent-light: rgba(255, 95, 162, 0.1);
  --border: #e8e8e8;
  --radius: 16px;
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

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

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s;
}

.nav.scrolled {
  padding: 10px 0;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand .logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Hero (merged with Try It) ===== */
.hero {
  padding: 120px 0 60px;
  background: var(--bg);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.accent {
  background-color: var(--accent);
  color: #ffffff;
  padding: 2px 12px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ===== Try It Content ===== */
.try-it-content {
  max-width: 480px;
  margin: 0 auto;
}

/* Animated dashed border */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderPulse {
  0%, 100% { border-color: var(--border); }
  50% { border-color: var(--accent); }
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
  animation: none;
}

.upload-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--accent);
}

.upload-icon svg {
  width: 100%;
  height: 100%;
}

.upload-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.upload-browse {
  color: var(--accent);
  font-weight: 600;
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Camera button */
.camera-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.camera-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.camera-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (hover: none) and (pointer: coarse) {
  .camera-btn {
    display: flex;
  }
}

/* Sample photos */
.sample-photos {
  margin-top: 24px;
  text-align: center;
}

.sample-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.sample-grid {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.sample-thumb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.sample-thumb:hover {
  border-color: var(--accent);
  transform: scale(1.08);
}

/* Privacy note */
.privacy-note {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Photo counter */
.photo-counter {
  margin-top: 32px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.photo-counter span {
  font-weight: 700;
  color: var(--accent);
}

/* Processing state */
.processing-state {
  text-align: center;
  padding: 60px 0;
}

.processing-state p {
  color: var(--text-secondary);
  margin-top: 16px;
  font-size: 0.95rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Compare slider */
.compare-container {
  display: grid;
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.compare-img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
}

.compare-before {
  -webkit-clip-path: inset(0 50% 0 0);
  clip-path: inset(0 50% 0 0);
}

.compare-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: white;
  transform: translateX(-50%);
  z-index: 10;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-handle svg {
  width: 14px;
  height: 14px;
  fill: var(--text-secondary);
}

.compare-label {
  position: absolute;
  bottom: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  z-index: 5;
}

.compare-label-before { left: 12px; }
.compare-label-after { right: 12px; }

.try-again-btn {
  display: block;
  margin: 20px auto 0;
  padding: 10px 28px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.try-again-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.download-btn:hover {
  background: #e8528f;
  border-color: #e8528f;
  color: white;
}

.error-state {
  text-align: center;
  padding: 48px 0;
}

.error-state p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ===== Sections shared ===== */
section {
  padding: 80px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: transform 0.25s, background 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--accent);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ===== Filters ===== */
.filters {
  background: var(--bg-section-alt);
}

.filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}

.filter-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.filter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-custom {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.filter-custom strong {
  color: var(--accent);
}

/* ===== Video Teaser CTA ===== */
.video-cta {
  background: var(--bg);
}

.video-teaser {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.video-card {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  background: var(--bg);
  animation: borderPulse 2s ease-in-out infinite;
}

.video-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
}

.video-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--accent);
}

.video-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.video-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

.video-card .btn-appstore {
  display: inline-flex;
}

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--text-primary);
  color: var(--bg);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-appstore:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.btn-appstore svg {
  width: 22px;
  height: 22px;
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ===== FAQ ===== */
.faq-section {
  background: var(--bg-section-alt);
}

.faq-list {
  max-width: 680px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 20px 0;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item p {
  padding: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

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

  .hero {
    padding: 110px 0 48px;
  }

  section {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 90px 0 32px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  section {
    padding: 48px 0;
  }

  .try-it-content {
    max-width: 100%;
  }

  .upload-area {
    padding: 32px 16px;
  }

  .sample-grid {
    gap: 8px;
  }

  .sample-thumb {
    width: 52px;
    height: 52px;
  }

  .filter-grid {
    gap: 8px;
  }

  .filter-badge {
    padding: 7px 14px;
    font-size: 0.82rem;
  }

  .video-teaser {
    max-width: 100%;
  }

  .video-card {
    padding: 36px 20px;
  }

  .btn-appstore {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .compare-label {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .compare-slider {
    width: 4px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}
