/* ===== APP PAGE STYLES ===== */
@import url('./main.css');

/* ===== APP NAV ===== */
.app-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 48px);
  max-width: 900px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 200ms var(--ease), gap 200ms var(--ease);
}
.back-link:hover { color: var(--text); gap: 10px; }

.back-link-brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.025em;
}
.back-link-brand span { color: var(--text-muted); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-legal-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-legal-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 200ms var(--ease);
}
.nav-legal-link:hover,
.nav-legal-link--active { color: var(--text); }

.nav-badge-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.nav-badge-link:hover { opacity: 0.82; transform: translateY(-1px); }

.nav-appstore-badge {
  height: 45px;
  width: auto;
  display: block;
  filter: invert(1);
}

/* ===== APP HERO ===== */
.app-hero {
  min-height: 44vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 88px 32px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.app-hero::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 65% 55% at 88% 8%,  color-mix(in srgb, var(--hero-to)   55%, transparent), transparent 58%),
    radial-gradient(ellipse 55% 65% at 8%  92%,  color-mix(in srgb, var(--hero-from) 50%, transparent), transparent 58%),
    radial-gradient(ellipse 45% 40% at 50% 50%,  color-mix(in srgb, var(--hero-to)   20%, transparent), transparent 60%);
  filter: blur(56px);
  pointer-events: none;
}

.app-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 38% at 50% 100%, color-mix(in srgb, var(--bg) 98%, transparent), transparent),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E"),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 100% 100%, 200px 200px, 40px 40px, 40px 40px;
  pointer-events: none;
}

.app-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.app-hero-icon {
  width: 165px;
  height: 165px;
  border-radius: 25px;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  margin-bottom: 28px;
}

.app-hero-name {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  margin-bottom: 16px;
  text-shadow: 0 4px 40px rgba(0,0,0,0.3);
}

.app-hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.75);
  max-width: 480px;
  line-height: 1.55;
  margin-bottom: 40px;
}

/* ===== DOWNLOAD BUTTON ===== */
.download-btn {
  display: inline-block;
  text-decoration: none;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}
.download-btn:hover { transform: translateY(-2px); opacity: 0.88; }

.appstore-badge {
  display: block;
  height: 81px;
  width: auto;
}

/* ===== APP CONTENT ===== */
.app-content {
  background: var(--bg);
  position: relative;
  z-index: 1;
}

/* ===== FEATURES ===== */
.features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 32px;
}

.features-heading {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.features-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 36px;
}

/* Bento grid: zigzag wide–narrow pattern */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* F1: wide left  |  F2: narrow right */
.feature-card:nth-child(1) { grid-column: span 2; }
/* F3: narrow left  |  F4: wide right */
.feature-card:nth-child(4) { grid-column: 2 / span 2; }
/* F5: wide left  |  F6: narrow right */
.feature-card:nth-child(5) { grid-column: span 2; }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
  transition: border-color 280ms var(--ease), transform 280ms var(--ease), box-shadow 280ms var(--ease);
}

/* Top sheen line */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1) 50%, transparent);
}

.feature-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* Wide cards — more breathing room */
.feature-card:nth-child(1),
.feature-card:nth-child(4),
.feature-card:nth-child(5) {
  padding: 36px 32px;
}

/* First card: subtle accent tint to anchor the section */
.feature-card:nth-child(1) {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  display: block;
  line-height: 1;
}

/* Bigger emoji on wide cards */
.feature-card:nth-child(1) .feature-icon,
.feature-card:nth-child(4) .feature-icon,
.feature-card:nth-child(5) .feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.feature-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== DIVIDER SECTION ===== */
.app-divider {
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 32px;
}

.app-divider-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.app-divider-text h3 {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.app-divider-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ===== PRICING BADGE ===== */
.pricing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}

/* ===== FOOTER (app page) ===== */
.app-footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.app-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 200ms var(--ease);
}
.app-footer a:hover { color: var(--text); }

.app-footer-links { display: flex; gap: 20px; }

/* ===== ACCENT-DRIVEN THEMING (--accent set per-app via inline style on <html>) ===== */
.pricing-badge { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }

/* ===== SPLIT HERO (with screenshots) ===== */
.app-hero--split {
  min-height: 600px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 140px 60px 80px;
  gap: 0 40px;
  text-align: left;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.app-hero--split .app-hero-icon { margin-bottom: 24px; }
.app-hero--split .app-hero-name { margin-bottom: 14px; }
.app-hero--split .app-hero-tagline { margin-bottom: 32px; }

.hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.ss-hero-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px;
  margin-top: 12px;
}

/* ===== HERO CANVAS (particles) ===== */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ===== SCREENSHOTS CAROUSEL ===== */
.ss-arrows { display: flex; gap: 8px; }

.ss-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms var(--ease), border-color 200ms var(--ease), opacity 200ms var(--ease);
}
.ss-arrow:hover:not(:disabled) {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}
.ss-arrow:disabled { opacity: 0.3; cursor: default; }

/* Carousel viewport */
.ss-carousel {
  overflow: visible;
  padding: 32px 0 24px;
  margin: -32px 0 -24px;
  cursor: grab;
}
.ss-carousel:active { cursor: grabbing; }

.ss-track {
  display: flex;
  gap: 20px;
  will-change: transform;
  transition: transform 380ms cubic-bezier(0.25, 1, 0.5, 1);
}

.ss-slide {
  flex: 0 0 360px;
  cursor: pointer;
  transition:
    transform 380ms cubic-bezier(0.25, 1, 0.5, 1),
    opacity   380ms cubic-bezier(0.25, 1, 0.5, 1),
    filter    380ms cubic-bezier(0.25, 1, 0.5, 1);
  transform-origin: center center;
  will-change: transform, opacity, filter;
}

.ss-slide[data-pos="0"] { transform: scale(1);    opacity: 1;    filter: brightness(1); }
.ss-slide[data-pos="1"] { transform: scale(0.91); opacity: 0.65; filter: brightness(0.75) blur(3px); }
.ss-slide[data-pos="2"] { transform: scale(0.83); opacity: 0.35; filter: brightness(0.55) blur(6px); }

.ss-slide img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 40px rgba(0,0,0,0.5));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}


/* Lightbox */
.ss-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  align-items: center;
  justify-content: center;
}
.ss-lightbox.open { display: flex; }

.ss-lightbox-img {
  max-width: min(88vw, 360px);
  max-height: 88vh;
  object-fit: contain;
  animation: lb-in 0.22s ease;
}

@keyframes lb-in {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

.ss-lb-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.65;
  padding: 0.5rem;
  transition: opacity 0.2s;
}
.ss-lb-close:hover { opacity: 1; }

.ss-lb-prev,
.ss-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  line-height: 1;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.2s, background 0.2s;
}
.ss-lb-prev { left: 1rem; }
.ss-lb-next { right: 1rem; }
.ss-lb-prev:hover, .ss-lb-next:hover { opacity: 1; background: rgba(255,255,255,0.18); }

@media (prefers-reduced-motion: reduce) {
  .ss-track, .ss-slide, .ss-dot { transition: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .app-hero--split {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 100px 32px 48px;
    min-height: auto;
    gap: 40px 0;
    overflow: hidden;
  }
  .hero-left { align-items: center; }
  .ss-slide { flex: 0 0 300px; }
}

@media (max-width: 600px) {
  .app-nav { top: 12px; width: calc(100% - 24px); padding: 10px 18px; }
  .features { padding: 56px 20px; }
  .app-divider { padding: 48px 20px; }
  .app-footer { padding: 24px 20px; }
  .app-divider-inner { flex-direction: column; align-items: flex-start; }

  /* Stack bento to single column */
  .features-grid { grid-template-columns: 1fr; }
  .feature-card:nth-child(1),
  .feature-card:nth-child(4),
  .feature-card:nth-child(5) { grid-column: 1; padding: 28px 24px; }
  .feature-card:nth-child(4) { grid-column: 1; }
  .feature-card:nth-child(1) .feature-icon,
  .feature-card:nth-child(4) .feature-icon,
  .feature-card:nth-child(5) .feature-icon { font-size: 2.2rem; margin-bottom: 14px; }

  .app-hero--split { padding: 88px 20px 48px; }
  .ss-slide { flex: 0 0 260px; }
  .nav-legal-links { display: none; }
}

/* ===== LEGAL PAGES ===== */
.legal-main {
  padding: 120px 24px 80px;
  display: flex;
  justify-content: center;
}

.legal-content {
  width: 100%;
  max-width: 680px;
  color: var(--text);
}

.legal-content h1 {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.legal-content h2 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 10px;
  color: var(--text);
}

.legal-content h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
}

.legal-content p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.legal-content li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.legal-content a {
  color: var(--accent);
  text-decoration: none;
}
.legal-content a:hover { text-decoration: underline; }

.legal-content strong { color: var(--text); font-weight: 600; }
