/* ── Manrope Font (self-hosted) ── */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/Manrope-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Manrope-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Manrope-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Manrope-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Manrope-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/Manrope-800.woff2') format('woff2');
}

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

:root {
  --sand: #F8F3E9;
  --sand-dark: #EDE6D6;
  --mint: #7ECFB3;
  --mint-hover: #6BC0A3;
  --mint-dark: #5BAF92;
  --lavender: #B8A9D4;
  --lavender-light: #D4C9E8;
  --apricot: #F4A97B;
  --apricot-glow: rgba(244, 169, 123, 0.35);
  --text-primary: #2D2A26;
  --text-secondary: #6B6560;
  --text-light: #9A948D;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', -apple-system, sans-serif;
  background: var(--sand);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-variant-ligatures: no-common-ligatures;
  font-feature-settings: "liga" 0, "clig" 0;
  opacity: 0;
}

body.ready {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ── Shared: Page Header (subpages) ── */
.page-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.page-header a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

.page-header a:hover { color: var(--mint-dark); }

/* ── Shared: Content (subpages) ── */
.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.content p, .content li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.content ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.content li { margin-bottom: 0.35rem; }
.content a { color: var(--mint-dark); }

.updated {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
}

/* ── Shared: Footer ── */
footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

.footer-links a:hover {
  color: var(--mint-dark);
}

.footer-copy {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-shader {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
}

.hero-shader canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, var(--sand));
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 680px;
}

.logo-wrap {
  margin-bottom: 1.5rem;
}

.logo-wrap img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

.app-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 0.75rem;
  color: var(--text-primary);
}

.headline {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-top: 1.5rem;
  color: var(--text-primary);
}

.highlight {
  color: #682f8d;
}

.subline {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 1rem;
  line-height: 1.5;
}

/* ── Store Buttons ── */
.store-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.75rem;
  border-radius: 14px;
  background: #60daa2;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(126, 207, 179, 0.3);
  border: none;
  cursor: pointer;
}

.store-btn:hover {
  background: var(--mint-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(126, 207, 179, 0.4);
}

.store-btn:active {
  transform: translateY(0);
}

.store-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.store-btn-text small {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.85;
}

.store-btn-text span {
  font-size: 1.05rem;
  font-weight: 700;
}

.share-hint {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.share-hint svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

/* ── Screenshots ── */
.screenshots {
  padding: 4rem 0;
  overflow: hidden;
}

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

.screenshots-track::-webkit-scrollbar { display: none; }

.screen-card {
  flex-shrink: 0;
  width: 260px;
  height: 530px;
  border-radius: 32px;
  background: var(--sand-dark);
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
  overflow: hidden;
  scroll-snap-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-card::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: rgba(0,0,0,0.06);
  border-radius: 12px;
}

.screen-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.screen-placeholder {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Features ── */
.features {
  padding: 3rem 1.5rem 5rem;
  max-width: 960px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card:nth-child(1) .feature-icon {
  background: rgba(126, 207, 179, 0.15);
  color: var(--mint-dark);
}

.feature-card:nth-child(2) .feature-icon {
  background: rgba(184, 169, 212, 0.2);
  color: var(--lavender);
}

.feature-card:nth-child(3) .feature-icon {
  background: rgba(244, 169, 123, 0.15);
  color: var(--apricot);
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Language Picker ── */
.lang-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.75rem;
  margin-top: 1.25rem;
  padding: 0 1rem;
}

.lang-option {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.lang-option:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}

.lang-option.active {
  color: var(--mint-dark);
  font-weight: 700;
}

/* ── RTL Support ── */
[dir="rtl"] .store-btn-text { align-items: flex-end; }
[dir="rtl"] .share-hint { direction: rtl; }

/* ── Staggered Hero Entrance ── */
.stagger {
  opacity: 0;
  transform: translateY(20px);
}

body.ready .stagger {
  animation: fadeUp 0.6s ease forwards;
}

body.ready .stagger:nth-child(1) { animation-delay: 0.1s; }
body.ready .stagger:nth-child(2) { animation-delay: 0.25s; }
body.ready .stagger:nth-child(3) { animation-delay: 0.4s; }
body.ready .stagger:nth-child(4) { animation-delay: 0.55s; }
body.ready .stagger:nth-child(5) { animation-delay: 0.7s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { min-height: 100svh; padding: 2rem 1.25rem 3rem; }
  .store-buttons { flex-direction: column; align-items: center; }
  .store-btn { width: 100%; max-width: 280px; justify-content: center; }
  .features-grid { grid-template-columns: 1fr; gap: 1rem; }
  .feature-card { padding: 2rem 1.25rem; }
  .screen-card { width: 220px; height: 450px; }
}

@media (max-width: 480px) {
  .logo-wrap img { width: 72px; height: 72px; border-radius: 18px; }
  .headline { margin-top: 1rem; }
}
