/* ============================================================
   landing.css - itsBillTime public landing page
   Light marketing theme (separate from theme.css / Midnight Ledger).
   Do NOT load theme.css on the same page: class names overlap.
   ============================================================ */

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

:root {
  --navy: #0f1b2d;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --green: #10b981;
  --green-pale: #ecfdf5;
  --amber: #f59e0b;
  --red: #ef4444;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 40px rgba(15,27,45,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* anchor targets clear the sticky nav */
section[id] { scroll-margin-top: 76px; }

/* ---- NAV ---- */
nav.landing-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--navy);
  letter-spacing: -.02em;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 800;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border: none;
}
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); }
.btn-outline {
  background: white;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: var(--blue-pale); }
.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: 10px;
}
.btn-full { width: 100%; }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(160deg, #0f1b2d 0%, #1a3a6e 60%, #1e40af 100%);
  color: white;
  padding: 96px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,.4) 0%, transparent 70%);
}
.hero-content { position: relative; max-width: 740px; margin: 0 auto; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .02em;
  margin-bottom: 28px;
  color: #bfdbfe;
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}
.hero h1 span { color: #60a5fa; }
.hero-sub {
  font-size: 1.125rem;
  color: #93c5fd;
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-hero-primary {
  background: white;
  color: var(--navy);
  font-weight: 700;
}
.btn-hero-primary:hover {
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.btn-hero-ghost {
  background: rgba(255,255,255,.1);
  color: white;
  border: 1.5px solid rgba(255,255,255,.2);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.18); }

/* ---- SOCIAL PROOF BAR ---- */
.proof-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}
.proof-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.proof-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: var(--muted);
}
.proof-item strong { color: var(--text); font-weight: 700; }
.proof-icon { font-size: 1rem; }

/* ---- SECTION BASE ---- */
.section { padding: 88px 24px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
}
.section-header { margin-bottom: 56px; }

/* ---- PROBLEM ---- */
.problem { background: var(--surface); }
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.problem-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow .2s;
}
.problem-card:hover { box-shadow: var(--shadow); }
.problem-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.icon-red { background: #fef2f2; }
.icon-amber { background: #fffbeb; }
.icon-purple { background: #f5f3ff; }
.problem-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.problem-card p { font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* ---- HOW IT WORKS ---- */
.how { background: var(--bg); }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  position: relative;
}
.step { text-align: center; }
.step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-weight: 800;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
}
.step-num::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: calc(100% + 80px);
  height: 1px;
  background: var(--border);
}
.step:last-child .step-num::after { display: none; }
.step-icon { font-size: 2rem; margin-bottom: 14px; }
.step h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.step p { font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* ---- FEATURES ---- */
.features { background: var(--surface); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  background: var(--bg);
  transition: all .2s;
}
.feature-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 24px rgba(37,99,235,.08);
  transform: translateY(-2px);
}
.feature-icon { font-size: 1.75rem; margin-bottom: 16px; }
.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.feature-card p { font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* ---- DEMO PREVIEW ---- */
.demo-cta {
  background: linear-gradient(135deg, var(--blue-pale) 0%, #e0f2fe 100%);
  border-top: 1px solid #bfdbfe;
  border-bottom: 1px solid #bfdbfe;
}
.demo-cta-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.demo-cta-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 14px;
}
.demo-cta-text p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 28px;
  line-height: 1.7;
}
.demo-preview {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.demo-preview-header {
  background: var(--navy);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }
.demo-preview-body { padding: 20px; }
.demo-preview-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.mini-bill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg);
  margin-bottom: 10px;
  gap: 12px;
}
.mini-bill:last-child { margin-bottom: 0; }
.mini-bill-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.mini-bill-amount {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}
.mini-bill-total {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mini-bill-total-label { font-size: .8rem; color: var(--muted); }
.mini-bill-total-value { font-size: 1rem; font-weight: 800; color: var(--text); }
.badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: .02em;
}
.badge-red { background: #fef2f2; color: #dc2626; }
.badge-amber { background: #fffbeb; color: #d97706; }
.badge-grey { background: #f1f5f9; color: #64748b; }
.badge-green { background: #ecfdf5; color: #059669; }

/* ---- CREDIBILITY ---- */
.credibility { background: var(--surface); text-align: center; }
.cred-card {
  background: var(--blue);
  color: white;
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.cred-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 180px;
  font-weight: 900;
  color: rgba(255,255,255,.07);
  line-height: 1;
  font-family: Georgia, serif;
}
.cred-quote {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 28px;
  position: relative;
}
.cred-stat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: .9rem;
  font-weight: 600;
}

/* ---- SIGN-IN SECTION ---- */
.signin-section {
  background: var(--bg);
  padding: 88px 24px;
}
.signin-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}
.auth-card-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 6px;
}
.auth-card-sub {
  font-size: .875rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 28px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="password"],
.field input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9375rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
}
.remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.remember-row label {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.btn-row { margin-top: 20px; margin-bottom: 20px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider span.line {
  height: 1px;
  flex: 1;
  background: var(--border);
}
.forgot-row { text-align: center; margin-top: 14px; }
.forgot-row a { font-size: 12px; color: var(--muted); }
.forgot-row a:hover { color: var(--blue); }
.msg-error {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: .8125rem;
  text-align: center;
}
.pwa-row { text-align: center; margin-top: 20px; }
#pwa-install-btn {
  align-items: center;
  gap: 6px;
  background: orangered;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  letter-spacing: .03em;
}

/* ---- CTA FOOTER ---- */
.cta-footer {
  background: var(--navy);
  color: white;
  text-align: center;
  padding: 88px 24px;
}
.cta-footer-content { max-width: 600px; margin: 0 auto; }
.cta-footer h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}
.cta-footer p { color: #93c5fd; margin-bottom: 36px; font-size: 1rem; }
.cta-footer-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-white { background: white; color: var(--navy); font-weight: 700; }
.btn-white:hover { background: #f0f9ff; }
.btn-ghost-white {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,.3);
}
.btn-ghost-white:hover { background: rgba(255,255,255,.1); }

/* ---- FOOTER ---- */
footer.landing-footer {
  background: #080f1a;
  color: #475569;
  padding: 32px 24px;
  text-align: center;
  font-size: .8125rem;
  line-height: 1.8;
}
footer.landing-footer a { color: #64748b; }
footer.landing-footer a:hover { color: #94a3b8; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .section { padding: 64px 20px; }
  .hero { padding: 72px 20px 64px; }
  .demo-cta-inner { grid-template-columns: 1fr; gap: 36px; }
  .step-num::after { display: none; }
  .proof-bar-inner { gap: 24px; }
  .signin-section { padding: 64px 20px; }
}
@media (max-width: 480px) {
  .nav-inner { padding: 0 16px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .cta-footer-actions { flex-direction: column; align-items: center; }
  .auth-card { padding: 32px 24px; }
}

/* ---- ANIMATIONS ---- */
@media (prefers-reduced-motion: no-preference) {
  .feature-card, .problem-card { transition: all .2s cubic-bezier(.22,.61,.36,1); }
}
