/* ============================================================
   FamilyLine Landing — Design System
   Palette: Navy #0f1629 | Blue #3b82f6 | Light #f0f4ff | White #fff
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0f1629;
  --navy2:   #1a2340;
  --blue:    #3b82f6;
  --blue2:   #2563eb;
  --sky:     #e0eaff;
  --text:    #1e293b;
  --muted:   #64748b;
  --card-bg: #ffffff;
  --bg:      #f8faff;
  --radius:  12px;
  --shadow:  0 2px 16px rgba(15,22,41,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

/* ---- NAV ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.nav-logo { font-size: 1.2rem; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 12px; }
.nav-login {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 8px;
  transition: color 0.2s;
}
.nav-login:hover { color: #fff; }
.nav-cta {
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 9px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.3);
  transition: background 0.2s;
}
.nav-cta:hover { background: rgba(255,255,255,0.25); }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, #1e3a6e 100%);
  color: #fff;
  padding-bottom: 80px;
}
.hero-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 24px 0;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(59,130,246,0.25);
  border: 1px solid rgba(59,130,246,0.5);
  color: #93c5fd;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.btn-hero {
  background: var(--blue);
  color: #fff;
  padding: 15px 34px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
}
.btn-hero:hover { background: var(--blue2); transform: translateY(-1px); }
.btn-hero-outline {
  background: transparent;
  color: #fff;
  padding: 15px 34px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.35);
  transition: border-color 0.2s;
}
.btn-hero-outline:hover { border-color: rgba(255,255,255,0.7); }
.hero-note { font-size: 0.82rem; color: rgba(255,255,255,0.5); }

/* ---- TRUST STRIP ---- */
.trust-strip {
  background: var(--card-bg);
  border-bottom: 1px solid #e8edf5;
  padding: 20px 24px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.trust-icon { font-size: 1.1rem; }

/* ---- COMMON SECTION ---- */
.section-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 80px 24px;
}
section h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 48px;
}

/* ---- HOW IT WORKS ---- */
.how-it-works { background: var(--bg); }
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  text-align: center;
  padding: 24px 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.step-icon { font-size: 2rem; margin-bottom: 10px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.step h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.step p { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.step-arrow {
  align-self: center;
  font-size: 1.5rem;
  color: var(--blue);
  padding: 0 8px;
  flex-shrink: 0;
}
@media (max-width: 680px) {
  .step-arrow { display: none; }
  .steps { gap: 16px; }
  .step { max-width: 100%; }
}

/* ---- FEATURES ---- */
.features { background: var(--card-bg); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid #e8edf5;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow); border-color: #c7d7f7; }
.feature-icon { font-size: 1.8rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* ---- PLANS ---- */
.plans { background: var(--bg); }
.plan-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.plan-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 32px 28px;
  width: 240px;
  text-align: center;
  border: 2px solid #e8edf5;
  position: relative;
  transition: box-shadow 0.2s;
}
.plan-card.featured {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}
.plan-card.coming-soon { opacity: 0.75; }
.plan-badge {
  display: inline-block;
  background: var(--sky);
  color: var(--blue2);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-badge.popular {
  background: var(--blue);
  color: #fff;
}
.plan-icon { font-size: 2rem; margin-bottom: 10px; }
.plan-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }
.plan-slots { color: var(--blue); font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; }
.plan-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ---- BETA CTA ---- */
.beta {
  background: linear-gradient(135deg, #1a2f5e 0%, #0f1629 100%);
  padding: 80px 24px;
}
.beta-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
}
.beta-badge {
  display: inline-block;
  background: rgba(59,130,246,0.2);
  border: 1px solid rgba(59,130,246,0.4);
  color: #93c5fd;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.beta h2 { font-size: clamp(1.6rem, 4vw, 2rem); margin-bottom: 14px; color: #fff; }
.beta > .beta-inner > p { color: rgba(255,255,255,0.7); margin-bottom: 28px; }
.btn-beta {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 16px 40px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 24px;
  display: block;
  max-width: 320px;
  margin: 0 auto 24px;
}
.btn-beta:hover { background: var(--blue2); transform: translateY(-1px); }
.beta-list {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* ---- DOWNLOAD ---- */
.download { background: var(--card-bg); }
.download-box {
  background: var(--bg);
  border: 1px solid #e8edf5;
  border-radius: 16px;
  padding: 36px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto 20px;
}
.btn-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--navy);
  color: #fff;
  padding: 18px 32px;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 24px;
  transition: background 0.2s, transform 0.1s;
}
.btn-download:hover { background: var(--navy2); transform: translateY(-1px); }
.dl-icon { font-size: 1.5rem; }
.dl-label { font-weight: 700; font-size: 1rem; }
.dl-note { font-size: 0.78rem; color: rgba(255,255,255,0.55); }
.mirrors-label { font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.mirrors { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mirror-link { color: var(--blue); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.mirror-link:hover { text-decoration: underline; }
.mirror-status { font-size: 0.8rem; color: var(--muted); min-height: 18px; }
.download-help { text-align: center; font-size: 0.85rem; color: var(--muted); max-width: 480px; margin: 0 auto; }

/* ---- FOOTER ---- */
.footer {
  background: var(--navy);
  padding: 32px 24px;
  color: rgba(255,255,255,0.5);
}
.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { font-size: 1rem; font-weight: 700; color: rgba(255,255,255,0.8); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: rgba(255,255,255,0.85); }
.footer-copy { font-size: 0.8rem; }

/* ============================================================
   TEST INIT PAGE — styles shared via this file
   ============================================================ */
.container {
  max-width: 600px;
  margin: 40px auto;
  padding: 24px;
}
.container h1 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--blue2);
  font-size: 1.6rem;
}
.hidden { display: none !important; }
.note { font-size: 0.88rem; color: var(--muted); margin-top: 12px; }
.warning { color: #dc2626; font-weight: 600; margin: 12px 0; }
.error { background: #fef2f2; color: #b91c1c; padding: 14px; border-radius: 8px; margin: 12px 0; border: 1px solid #fecaca; }
#qr-image { max-width: 240px; display: block; margin: 20px auto; border-radius: 8px; }
.token-display { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.token-display code { background: #f1f5f9; padding: 10px 18px; border-radius: 6px; font-size: 1rem; font-family: monospace; border: 1px solid #e2e8f0; }
#copy-btn { background: var(--blue); color: #fff; border: none; padding: 10px 18px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
#copy-btn:hover { background: var(--blue2); }
#result h2, #result h3 { color: var(--text); margin: 20px 0 10px; }
#result ol { margin-left: 20px; }
#result ol li { margin: 7px 0; font-size: 0.95rem; }
.form-group { margin: 14px 0; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: var(--text); font-size: 0.9rem; }
.form-group input { width: 100%; padding: 11px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.95rem; }
.form-group input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.checkbox-group { margin: 18px 0; }
.consent-required {
  background: #f0f7ff;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 12px 14px;
}
.consent-required .checkbox-label {
  color: var(--text);
  font-weight: 500;
}
.consent-required .checkbox-label a {
  color: var(--blue);
  text-decoration: underline;
}
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 0.9rem; color: var(--muted); }
.checkbox-label input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; cursor: pointer; }
#generate-btn { display: block; width: 100%; max-width: 300px; margin: 20px auto; padding: 14px; font-size: 1rem; font-weight: 700; background: var(--blue); color: #fff; border: none; border-radius: 8px; cursor: pointer; }
#generate-btn:hover { background: var(--blue2); }
#generate-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.btn-primary { display: inline-block; background: var(--blue); color: #fff; padding: 13px 32px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 0.95rem; cursor: pointer; border: none; transition: background 0.2s; }
.btn-primary:hover { background: var(--blue2); }
