/*
 * Jim AI — public site.
 *
 * A dark, consumer-app landing aesthetic. Two readers have to be served at
 * once and they want different things: someone deciding whether to sign up,
 * and a carrier reviewer checking that specific required sentences are present.
 * The design leans marketing, but every compliance block (`.notice`) is given
 * its own high-contrast surface rather than being softened into the page —
 * required language that is hard to find is the one failure mode that matters.
 *
 * Committed to a single dark theme rather than following the system: the
 * policy pages and the landing page have to look like one product, and a
 * half-inherited light mode on a document page is where that falls apart.
 */

:root {
  --bg: #08090c;
  --bg-raised: #0e1016;
  --surface: rgba(255, 255, 255, 0.038);
  --surface-strong: rgba(255, 255, 255, 0.065);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --ink: #f3f5f8;
  --ink-soft: #9ea6b5;
  --ink-dim: #6c7484;

  --accent: #34d399;
  --accent-soft: #a7f3d0;
  --accent-ink: #04150f;
  --accent-glow: rgba(52, 211, 153, 0.10);

  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.07);
  --warn-line: rgba(251, 191, 36, 0.26);
  --error: #f87171;

  --r-sm: 5px;
  --r-md: 7px;
  --r-lg: 10px;
  --r-xl: 14px;

  --measure: 46rem;
  --page: 68rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* The ambient glow behind the hero. Fixed so it does not scroll away oddly. */
body::before {
  content: "";
  position: fixed;
  top: -30vh;
  left: 50%;
  width: min(120rem, 190vw);
  height: 70vh;
  transform: translateX(-50%);
  background: radial-gradient(
    50% 50% at 50% 50%,
    var(--accent-glow) 0%,
    rgba(52, 211, 153, 0.025) 45%,
    transparent 72%
  );
  pointer-events: none;
  z-index: 0;
}

main, .nav, .footer { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }

p { margin: 0 0 1rem; }

/* --- Navigation --------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.brand:hover { color: var(--ink); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 6px;
  background: linear-gradient(150deg, var(--accent), #14b880);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 1rem;
}

.brand-ai { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
  font-size: 0.92rem;
}
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.88rem; border-radius: 4px; }
.btn-block { width: 100%; }

/* --- Layout primitives -------------------------------------------------- */

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6.5rem) 1.25rem;
}

.section-head { max-width: 38rem; margin-bottom: 2.75rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 550;
  letter-spacing: 0.01em;
}
.eyebrow .dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.22);
}

h2.section-title { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
.section-head p { margin-top: 0.9rem; color: var(--ink-soft); font-size: 1.05rem; }

/* --- Hero --------------------------------------------------------------- */

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 1.25rem clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.03;
}

.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-soft) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 1.35rem;
  max-width: 30rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.6;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero-proof div { min-width: 6rem; }
.hero-proof dt { color: var(--ink-dim); font-size: 0.82rem; }
.hero-proof dd {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- Phone mockup ------------------------------------------------------- */

.phone {
  justify-self: center;
  width: min(20rem, 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, #12151c, #0b0d12);
  padding: 0.75rem;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8);
}

.phone-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.9rem;
}
.phone-avatar {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--accent), #14b880);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 800;
}
.phone-who { font-size: 0.9rem; font-weight: 600; }
.phone-when { margin-left: auto; color: var(--ink-dim); font-size: 0.75rem; }

.thread { display: flex; flex-direction: column; gap: 0.5rem; padding: 0 0.25rem 0.5rem; }

.bubble {
  max-width: 84%;
  padding: 0.55rem 0.8rem;
  border-radius: 9px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.bubble.them {
  align-self: flex-start;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-bottom-left-radius: 2px;
  color: var(--ink);
}
.bubble.me {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-right-radius: 2px;
  font-weight: 500;
}

/* --- Signup card -------------------------------------------------------- */

.signup-wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 1.25rem clamp(3rem, 7vw, 5rem);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.card h2 { font-size: 1.5rem; }
.card > p { color: var(--ink-soft); margin-top: 0.6rem; }

.field-label {
  display: block;
  margin: 1.6rem 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

input[type="tel"] {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
}
input[type="tel"]::placeholder { color: var(--ink-dim); }
input[type="tel"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.22);
}

.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1.35rem 0 0;
  padding: 0.95rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.consent input {
  flex: none;
  margin: 0.2rem 0 0;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}
.consent label { font-size: 0.87rem; line-height: 1.55; color: var(--ink-soft); }

.fine {
  margin: 0.9rem 0 0;
  color: var(--ink-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}

.result { margin: 0.9rem 0 0; font-size: 0.92rem; color: var(--accent-soft); min-height: 1.2rem; }
.result.error { color: var(--error); }

/* --- Feature and step grids --------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.tile {
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.tile h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.tile p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.tile-num {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  border-radius: 5px;
  background: rgba(52, 211, 153, 0.13);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.msg-list { display: grid; gap: 0.75rem; }
.msg-item {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.msg-item strong { font-weight: 650; white-space: nowrap; }
.msg-item span { color: var(--ink-soft); font-size: 0.95rem; }

/* --- Compliance notice -------------------------------------------------- */

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-left-width: 3px;
  border-radius: var(--r-md);
  padding: 1.25rem 1.4rem;
  margin: 1.75rem 0;
}
.notice h3 { font-size: 1rem; margin-bottom: 0.6rem; color: var(--warn); }
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--ink); }

/* --- FAQ ---------------------------------------------------------------- */

.faq { display: grid; gap: 0.6rem; max-width: var(--measure); margin: 0 auto; }

details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.05rem 1.3rem;
}
details[open] { background: var(--surface-strong); }
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
  flex: none;
}
details[open] summary::after { content: "−"; }
details p { margin: 0.85rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* --- Document pages (privacy, terms) ------------------------------------ */

.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem clamp(3rem, 7vw, 5rem);
}
.doc h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); letter-spacing: -0.03em; }
.doc h2 {
  font-size: 1.25rem;
  margin: 2.75rem 0 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.doc h3 { font-size: 1.02rem; margin: 1.6rem 0 0.5rem; }
.doc p, .doc li { color: var(--ink-soft); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 1.15rem; margin: 0 0 1rem; }
.doc li { margin-bottom: 0.6rem; }
.doc .meta { color: var(--ink-dim); font-size: 0.9rem; margin-top: 0.75rem; }
.doc .lede { color: var(--ink); font-size: 1.08rem; margin-top: 1.5rem; }
.doc .notice h3 { margin-top: 0; }
.doc .notice p { color: var(--ink-soft); }

/* --- Result page -------------------------------------------------------- */

.result-page {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(4rem, 12vw, 7rem) 1.25rem;
  text-align: center;
}
.result-page h1 { font-size: clamp(1.9rem, 4.5vw, 2.5rem); }
.result-page .lede { margin-top: 1.1rem; color: var(--ink-soft); font-size: 1.08rem; }

/* --- Footer ------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line); background: var(--bg-raised); }

.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 3.5rem) 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 2.5rem;
}

.footer-tagline { margin: 0.85rem 0 0; color: var(--ink-dim); font-size: 0.92rem; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.75rem;
}
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-dim);
  margin-bottom: 0.9rem;
  font-weight: 600;
}
.footer-col a, .footer-static {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.footer-col a:hover { color: var(--ink); }
.footer-static { color: var(--ink-dim); }

.footer-legal {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}
.footer-legal p { margin: 0; color: var(--ink-dim); font-size: 0.82rem; }
.footer-sms { max-width: 34rem; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-proof { justify-content: center; }
  .section-head { margin-left: auto; margin-right: auto; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav-links { display: none; }
  .msg-item { flex-direction: column; gap: 0.3rem; }
  .msg-item strong { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
