:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #6366f1;
  --accent-soft: #e0e7ff;
  --danger: #ef4444;
  --success: #22c55e;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

/* Avoid global padding on semantic tags (breaks full-bleed hero) */
header, nav, main, footer { padding: 0; }

/* Shared width model (align with hero-inner) */
.public-wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0.6rem 0 0; }

.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 1.05rem; line-height: 1.7; margin-top: 0.6rem; }

button, input, select, textarea {
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  background: #fff;
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(99, 102, 241, 0.3);
  border-color: var(--accent);
}
button { cursor: pointer; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(99, 102, 241, 0.25); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.button.ghost:hover { box-shadow: none; background: #f1f5f9; }
.button.small { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.button.disabled { cursor: not-allowed; opacity: 0.6; filter: grayscale(0.3); pointer-events: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.badge.soft { background: var(--accent-soft); color: var(--accent); }

/* Alerts */
.alert{
  background: #fee2e2;
  color: #991b1b;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid #fecaca;
  font-weight: 700;
  margin-top: 1rem;
}
.alert.success{
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

/* =========================
   Public layout
   ========================= */
.public-body { background: linear-gradient(180deg, #f8f9ff 0%, #f1f5f9 100%); }

.app-download-banner{
  display: none; /* JS toggles on mobile */
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.app-download-title { font-weight: 800; }
.app-download-links { display:flex; gap: 0.6rem; flex-wrap: wrap; }
.app-download-dismiss{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
}

.public-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem;
  background: rgba(248, 249, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.public-header .brand { display: flex; flex-direction: column; gap: 0.2rem; }
.public-header .tag { color: var(--muted); font-size: 0.85rem; }

.public-nav { display: flex; align-items: center; gap: 0.8rem; }
.public-nav a { color: var(--muted); font-weight: 600; }
.public-nav a:hover { color: var(--text); }

.public-main { padding: 0 0 4rem; }

/* Footer */
.public-footer{
  display: grid;
  gap: 2rem;
  border-top: 1px solid var(--border);
  background: var(--panel);
  padding: 2rem 1rem;
}
.public-footer p { color: var(--muted); margin: 0.4rem 0 0; }

.footer-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.footer-columns {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.footer-columns h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.footer-columns a { color: var(--muted); font-size: 0.9rem; display: block; margin-bottom: 0.4rem; }
.footer-meta{
  display:flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-legal { display: flex; gap: 1rem; }

/* =========================
   Burger + overlay
   ========================= */
.menu-toggle{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #fff;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span{
  display:block;
  width: 18px;
  height: 2px;
  background: rgba(15,23,42,0.85);
  border-radius: 2px;
  transition: transform 160ms ease, opacity 160ms ease;
}
.nav-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  backdrop-filter: blur(2px);
  z-index: 49;
}
.public-nav.is-open{ display:flex; }

@media (max-width: 900px){
  .menu-toggle{ display:flex; }
  .app-download-banner{ display:flex; } /* JS may set display none if dismissed */

  .public-nav{
    display:none;
    position: fixed;
    top: 72px;
    right: 14px;
    left: 14px;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: 0 18px 60px rgba(15,23,42,0.18);
  }

  .public-nav a{
    padding: 12px 10px;
    border-radius: 12px;
  }

  body.nav-open{ overflow: hidden; }
  body.nav-open .menu-toggle span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  body.nav-open .menu-toggle span:nth-child(2){ opacity: 0; }
  body.nav-open .menu-toggle span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
}
@media (min-width: 901px){
  .app-download-banner{ display:none !important; }
}

/* =========================
   HERO CAROUSEL + progress
   ========================= */
.hero-carousel{
  position: relative;
  width: 100%;
  min-height: clamp(560px, 78vh, 820px);
  overflow: hidden;
  background: #fff;
}
.hero-slides{
  position: relative;
  height: 100%;
  min-height: inherit;
}
.hero-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}
.hero-slide.is-active{
  opacity: 1;
  pointer-events: auto;
}
.hero-bg{
  position:absolute;
  inset:0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: blur(2px) saturate(0.9);
  opacity: 0.65;
}
.hero-overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 600px at 20% 25%, rgba(255,255,255,0.18), rgba(255,255,255,0.15) 55%, rgba(255,255,255,0.18)),
    linear-gradient(to bottom, rgba(255,255,255,0.14), rgba(255,255,255,0.16));
}
.hero-slide::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(255,255,255,0.20);
}
.hero-inner{
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 54px) 18px;
  height: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
}
.hero-copy h1, .hero-copy h2{
  font-size: clamp(28px, 4vw, 52px);
  margin: 10px 0 12px;
}
.hero-copy p{
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  max-width: 54ch;
  color: rgba(15,23,42,0.82);
}
.hero-kicker{
  display:inline-flex;
  gap: 8px;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(99,102,241,0.10);
  color: rgba(15,23,42,0.88);
  border: 1px solid rgba(99,102,241,0.18);
  font-size: 13px;
  font-weight: 800;
}
.hero-cta{ margin-top: 18px; display:flex; flex-wrap: wrap; gap: 10px; }
.hero-trust{ margin-top: 16px; display:flex; flex-wrap: wrap; gap: 8px; }

.hero-media{ display:flex; justify-content: center; }
.hero-phone{
  width: min(360px, 92vw);
  aspect-ratio: 9/19.5;
  border-radius: 28px;
  border: 1px solid rgba(15,23,42,0.14);
  box-shadow: 0 26px 80px rgba(15,23,42,0.18);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
  overflow: hidden;
  position: relative;
}
.hero-app-img{ width: 100%; height: 100%; object-fit: cover; display:block; }

.hero-controls{
  position:absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 3;
  display:flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 14px;
}
.hero-control{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  cursor:pointer;
  display: grid;
  place-items: center;
  line-height: 1;
  font-size: 26px;
}
.hero-mid{
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: center;
}
.hero-dots{
  display:flex;
  gap: 8px;
  align-items:center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(10px);
}
.hero-dot{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.18);
  background: rgba(15,23,42,0.18);
  cursor:pointer;
}
.hero-dot[aria-selected="true"]{
  width: 26px;
  background: rgba(99,102,241,0.85);
  border-color: rgba(99,102,241,0.85);
}
.hero-progress{
  width: min(320px, 70vw);
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px);
}
.hero-progress-bar{
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: rgba(99,102,241,0.85);
}

@media (max-width: 900px){
  .hero-inner{
    grid-template-columns: 1fr;
    padding-bottom: 92px;
  }
}

/* =========================
   Landing + public sections
   ========================= */
.public-section{ padding: 56px 0; }
.section{ padding: 0; margin-top: 4rem; }

.section-heading{ margin-bottom: 1.2rem; }
.section-heading h2{ margin: 0.4rem 0 0; font-size: 2rem; }

.eyebrow{
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 800;
}

.feature-grid{
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.feature-card{
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 1.4rem;
  display: grid;
  gap: 0.6rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.split{
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
}

.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.steps li{
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  display: grid;
  gap: 0.4rem;
}

.insight-card{
  background: #1e1b4b;
  color: #e0e7ff;
  border-radius: 20px;
  padding: 2rem;
  display: grid;
  gap: 1.2rem;
}
.insight-card .button { justify-self: start; }
.insight-row{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.insight-row span{ color: #c7d2fe; font-size: 0.85rem; }

.stats-grid{
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1.4rem;
}
.stat-card{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}
.stat-label{ color: var(--muted); font-weight: 800; font-size: 0.9rem; }
.stat-value{ font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; margin-top: 0.45rem; }
.stat-foot{ margin-top: 0.4rem; font-size: 0.9rem; }
.stat-list{ margin: 0.7rem 0 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: 0.35rem; }

.empathy{
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}
.empathy-actions{ margin-top: 1rem; display:flex; flex-wrap: wrap; gap: 10px; }
.empathy-card{
  background: radial-gradient(circle at top, rgba(99,102,241,0.10), rgba(255,255,255,1) 55%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.4rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}
.empathy-list{ margin: 0.8rem 0 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: 0.45rem; }
.empathy-note{ margin-top: 1rem; font-size: 0.9rem; }

/* CTA */
.cta{ margin-top: 4rem; padding: 0; }
.cta-inner{
  padding: 2rem;
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* =========================
   Public page hero (Company, How it works, Features, Stories…)
   ========================= */
.page-hero{
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 18px 0;
  display: grid;
  gap: 1.5rem;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.page-hero-card{
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
.page-hero-card ul,
.page-hero-card ol{
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  display: grid;
  gap: 0.5rem;
}

/* =========================
   Auth pages (Login/Register/Forgot/Reset)
   ========================= */
.auth{
  display: grid;
  place-items: center;
  padding: 56px 18px;
  min-height: calc(100vh - 140px);
}
.auth-card{
  width: min(480px, 92vw);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: var(--shadow);
}
.auth-header { display: grid; gap: 0.45rem; }
.auth-header h1 { margin-top: 0.25rem; }
.auth-form { margin-top: 1rem; display: grid; gap: 0.9rem; }
.auth-form label { display: grid; gap: 0.45rem; font-weight: 800; color: var(--muted); }
.auth-form input { width: 100%; }
.auth-actions-row{
  display:flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-top: 0.2rem;
}
.checkbox{
  display:inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}
.checkbox input{
  width: 18px;
  height: 18px;
  padding: 0;
}

.auth-footer{
  margin-top: 1rem;
  color: var(--muted);
  font-weight: 600;
}
.auth-footer a{ color: var(--accent); }

.auth-divider{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.2rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after{
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-buttons{
  display: grid;
  gap: 0.6rem;
}
.button.social{
  width: 100%;
  border-radius: 14px;
  justify-content: center;
  box-shadow: none;
}
.button.social.facebook { background: #1877f2; }
.button.social.instagram { background: #e1306c; }
.button.social.linkedin { background: #0a66c2; }
.button.social.disabled{
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  * { scroll-behavior: auto !important; }
  .button, .hero-slide { transition: none !important; }
}
