/* ============================================================
   LatentLens — Shared Stylesheet
   Brand primary: #5B5EE6
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --brand:       #5B5EE6;
  --brand-dark:  #4245C0;
  --brand-light: #7B7EF0;
  --brand-wash:  #EEEEFF;
  --surface:     #FFFFFF;
  --surface-alt: #F5F5F7;
  --text:        #1C1C1E;
  --text-2:      #636366;
  --text-3:      #AEAEB2;
  --border:      rgba(0,0,0,0.08);
  --r:           16px;
  --r-sm:        10px;
  --r-xs:        6px;
  --shadow:      0 2px 16px rgba(0,0,0,0.06);
  --shadow-lg:   0 8px 48px rgba(0,0,0,0.12);
  --transition:  0.2s ease;
  --max:         1080px;

  /* pillar colours */
  --foundation: #F59E0B;
  --ml:         #10B981;
  --dl:         #3B82F6;
  --nlp:        #8B5CF6;
  --applied:    #F97316;
  --ethics:     #EF4444;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout helpers ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: 88px; }
.section-alt { background: var(--surface-alt); }

/* ── Typography ─────────────────────────────────────────── */
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-2); line-height: 1.7; }
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.section-title { text-align: center; margin-bottom: 16px; }
.section-sub   { text-align: center; color: var(--text-2); max-width: 560px; margin-inline: auto; margin-bottom: 56px; }

/* ── Header / Nav ───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.nav-logo-text { color: var(--text); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  transition: background var(--transition) !important;
}
.nav-cta:hover { background: var(--brand-dark) !important; text-decoration: none !important; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #3a3da8 0%, #5B5EE6 50%, #7B5CF0 100%);
  color: #fff;
  padding-block: 96px 80px;
  text-align: center;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  margin-inline: auto;
  margin-bottom: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  position: relative;
  background: var(--brand-wash);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-icon img { width: 120px; height: 120px; border-radius: 28px; }
.hero-icon-fallback {
  font-size: 56px;
  line-height: 1;
}
.hero h1 { color: #fff; margin-bottom: 16px; position: relative; }
.hero .hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.80);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: 36px;
  position: relative;
}
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  position: relative;
}
.hero-badge {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 40px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
}
.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border-radius: 13px;
  padding: 11px 22px;
  text-decoration: none;
  transition: background var(--transition);
  position: relative;
}
.appstore-btn:hover { background: #222; text-decoration: none; }
.appstore-btn svg { width: 22px; height: 22px; fill: #fff; flex-shrink: 0; }
.appstore-btn-text { text-align: left; line-height: 1.2; }
.appstore-btn-text small { display: block; font-size: 0.68rem; letter-spacing: 0.04em; }
.appstore-btn-text strong { font-size: 1.05rem; font-weight: 600; }
.hero-disclaimer {
  margin-top: 20px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.50);
  position: relative;
}

/* ── Stats bar ──────────────────────────────────────────── */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: 24px;
}
.stats-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
  padding: 8px 36px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num { font-size: 1.6rem; font-weight: 700; color: var(--brand); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-3); margin-top: 2px; }

/* ── How it works — 7-step arc ──────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.step-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-wash);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-card h4 { margin-bottom: 4px; }
.step-card p  { font-size: 0.9rem; }

/* ── Pillars ─────────────────────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}
.pillar-card {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--border);
  padding: 24px 24px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.pillar-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pillar-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pillar-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pillar-card h3 { margin-bottom: 0; }
.pillar-tagline { font-size: 0.88rem; color: var(--text-2); margin-bottom: 14px; }
.pillar-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.topic-chip {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 40px;
  background: var(--surface-alt);
  color: var(--text-2);
}

/* ── Screenshots placeholder ────────────────────────────── */
.screenshots-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: none;
}
.screenshots-scroll::-webkit-scrollbar { display: none; }
.screenshot-frame {
  flex: 0 0 220px;
  background: var(--surface-alt);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  aspect-ratio: 9/19.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  position: relative;
}
.screenshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
}
.screenshot-placeholder {
  text-align: center;
  padding: 24px;
}
.screenshot-placeholder .ph-icon { font-size: 2rem; margin-bottom: 8px; }
.screenshot-placeholder p { font-size: 0.78rem; color: var(--text-3); line-height: 1.4; }

/* ── Gamification ────────────────────────────────────────── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.game-icon { font-size: 2.4rem; margin-bottom: 12px; }
.game-card h3 { margin-bottom: 6px; }
.game-card p  { font-size: 0.9rem; }

/* ── Pricing ─────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.plan-card:hover { box-shadow: var(--shadow-lg); }
.plan-card.featured {
  border-color: var(--brand);
  border-width: 2px;
  box-shadow: 0 4px 24px rgba(91,94,230,0.18);
}
.plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 40px;
  white-space: nowrap;
}
.plan-name { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.plan-price-num { font-size: 2.4rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.plan-price-unit { font-size: 0.9rem; color: var(--text-2); }
.plan-sub { font-size: 0.82rem; color: var(--text-3); margin-bottom: 20px; min-height: 18px; }
.plan-features { list-style: none; margin-bottom: 24px; }
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 10px;
}
.plan-features li::before { content: "✓"; color: var(--brand); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.plan-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.plan-btn-primary { background: var(--brand); color: #fff; }
.plan-btn-primary:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.plan-btn-outline { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.plan-btn-outline:hover { background: var(--brand-wash); text-decoration: none; }
.pricing-note {
  text-align: center;
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--text-3);
  max-width: 560px;
  margin-inline: auto;
  margin-top: 28px;
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-list { max-width: 680px; margin-inline: auto; }
details {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
details:first-child { border-top: 1px solid var(--border); }
summary {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; font-weight: 300; color: var(--text-3); flex-shrink: 0; transition: transform var(--transition); }
details[open] summary::after { content: "−"; }
details p { margin-top: 12px; font-size: 0.95rem; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: #1C1C1E;
  color: rgba(255,255,255,0.6);
  padding-block: 56px 36px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}
.footer-brand-name { font-weight: 700; font-size: 1rem; color: #fff; margin-bottom: 6px; }
.footer-brand p { font-size: 0.85rem; max-width: 240px; line-height: 1.6; }
.footer-col h5 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.88rem; color: rgba(255,255,255,0.6); text-decoration: none; transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}
.footer-legal-links { display: flex; gap: 20px; }
.footer-legal-links a { color: rgba(255,255,255,0.45); text-decoration: none; transition: color var(--transition); }
.footer-legal-links a:hover { color: rgba(255,255,255,0.8); }

/* ── Policy / Legal pages ───────────────────────────────── */
.policy-hero {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding-block: 48px;
}
.policy-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 8px; }
.policy-hero .effective { font-size: 0.88rem; color: var(--text-3); }
.policy-body {
  max-width: 740px;
  margin-inline: auto;
  padding: 56px 24px 96px;
}
.policy-body h2 { font-size: 1.35rem; margin-top: 40px; margin-bottom: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.policy-body h2:first-of-type { margin-top: 0; border-top: none; }
.policy-body h3 { font-size: 1.05rem; margin-top: 24px; margin-bottom: 8px; }
.policy-body p, .policy-body li { font-size: 0.97rem; color: var(--text-2); margin-bottom: 12px; }
.policy-body ul { padding-left: 20px; list-style: disc; }
.policy-body ul li { margin-bottom: 6px; }
.policy-body table { width: 100%; border-collapse: collapse; margin-block: 20px; font-size: 0.9rem; }
.policy-body th { background: var(--surface-alt); font-weight: 600; color: var(--text); text-align: left; padding: 10px 14px; border: 1px solid var(--border); }
.policy-body td { padding: 10px 14px; border: 1px solid var(--border); color: var(--text-2); vertical-align: top; }
.policy-toc { background: var(--surface-alt); border-radius: var(--r); padding: 20px 24px; margin-bottom: 40px; border: 1px solid var(--border); }
.policy-toc h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 10px; }
.policy-toc ul { padding-left: 0; list-style: none; }
.policy-toc li { margin-bottom: 5px; }
.policy-toc a { font-size: 0.88rem; color: var(--brand); }
.notice-box { background: var(--brand-wash); border-left: 4px solid var(--brand); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 16px 20px; margin-block: 20px; }
.notice-box p { color: var(--text); margin-bottom: 0; font-size: 0.92rem; }

/* ── Support page ────────────────────────────────────────── */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.support-card .s-icon { font-size: 2rem; margin-bottom: 12px; }
.support-card h3 { margin-bottom: 8px; }
.support-card a { font-weight: 600; color: var(--brand); }
.contact-form { max-width: 560px; margin-inline: auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.97rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--brand); }
.form-group textarea { min-height: 130px; resize: vertical; }
.submit-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 13px 32px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background var(--transition);
}
.submit-btn:hover { background: var(--brand-dark); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .section { padding-block: 60px; }
  .stat { padding-inline: 20px; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero { padding-block: 64px 56px; }
  .screenshots-scroll { padding-inline: 24px; }
  .screenshot-frame { flex: 0 0 180px; }
}
@media (max-width: 480px) {
  .stats-row { flex-direction: column; gap: 0; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .pricing-grid { grid-template-columns: 1fr; }
}
