/* ==========================================================================
   CareContinuum — marketing site
   Single stylesheet, no build step. Keep classes flat and semantic.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-soft: #334155;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #0ea5e9;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04),
                 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-float: 0 4px 12px rgba(15, 23, 42, 0.08),
                  0 18px 48px rgba(15, 23, 42, 0.12);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-phone: 40px;
  --container: 1200px;
  --container-narrow: 900px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ------- layout primitives -------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 88px 0;
}

@media (max-width: 720px) {
  section {
    padding: 56px 0;
  }
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

h1, h2, h3, h4 {
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.08;
}

h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
}

h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

h4 {
  font-size: 16px;
  font-weight: 700;
}

p {
  margin: 0 0 14px;
  color: var(--text-soft);
}

.lead {
  font-size: clamp(18px, 1.7vw, 21px);
  color: var(--text-soft);
  max-width: 62ch;
  line-height: 1.55;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

/* ------- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.42);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.btn-appstore {
  background: #000;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
}

.btn-appstore:hover {
  background: #1a1a1a;
  color: #fff;
}

.btn-appstore .apple-logo {
  width: 22px;
  height: 22px;
}

.btn-appstore .appstore-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1;
}

.btn-appstore .appstore-caption .small {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.9;
}

.btn-appstore .appstore-caption .big {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ------- navbar ------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px !important;
}

.nav-cta:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

@media (max-width: 820px) {
  .nav-links {
    gap: 18px;
  }
  .nav-links a:not(.nav-cta) {
    display: none;
  }
}

/* ------- hero --------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 72px 0 96px;
  background:
    radial-gradient(1200px 600px at 50% -200px,
      rgba(37, 99, 235, 0.12),
      transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.hero h1 {
  margin-bottom: 18px;
}

.hero .hero-sub {
  font-size: clamp(18px, 1.7vw, 20px);
  color: var(--text-soft);
  margin-bottom: 28px;
  max-width: 58ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.hero-microcopy {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-microcopy .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-weight: 600;
}

.hero-microcopy .pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* ------- hero stats strip --------------------------------------------------- */

.hero-stats {
  margin-top: 32px;
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02),
              0 8px 24px -12px rgba(15, 23, 42, 0.12);
  max-width: 560px;
}

.hero-stats .stat {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hero-stats .stat-value {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.hero-stats .stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  text-transform: none;
}

.hero-stats .stat-divider {
  flex: 0 0 1px;
  background: var(--border);
  align-self: stretch;
  margin: 2px 0;
}

/* Dynamic stat pulses once when the real value first arrives from the API. */
.hero-stats #stat-users.is-live {
  animation: statPop 0.5s ease-out both;
}

@keyframes statPop {
  0%   { transform: scale(0.985); opacity: 0.7; }
  60%  { transform: scale(1.02);  opacity: 1; }
  100% { transform: scale(1);     opacity: 1; }
}

@media (max-width: 560px) {
  .hero-stats {
    padding: 14px 16px;
    gap: 12px;
  }
  .hero-stats .stat-label {
    font-size: 11.5px;
  }
}

/* ------- phone mockup ------------------------------------------------------- */

.phone {
  position: relative;
  width: 290px;
  max-width: 100%;
  aspect-ratio: 1242 / 2688;
  margin: 0 auto;
  background: #0f172a;
  padding: 10px;
  border-radius: var(--radius-phone);
  box-shadow: var(--shadow-float);
}

.phone::before,
.phone::after {
  content: "";
  position: absolute;
  background: #0f172a;
  z-index: 2;
  pointer-events: none;
}

.phone::before {
  /* dynamic-island-ish notch */
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 22px;
  border-radius: 999px;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-phone) - 10px);
  background: #fff;
  display: block;
}

.phone-lg {
  width: 340px;
}

.phone-sm {
  width: 240px;
}

.phone-tilt-l {
  transform: rotate(-3deg);
}

.phone-tilt-r {
  transform: rotate(3deg);
}

/* Hero-specific: a little trio arrangement */

.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 620px;
}

.phone-stage .phone {
  position: relative;
}

@media (max-width: 560px) {
  .phone {
    width: 240px;
  }
  .phone-lg {
    width: 260px;
  }
  .phone-stage {
    min-height: 520px;
  }
}

/* ------- section: problem --------------------------------------------------- */

.problem {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.problem-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 820px) {
  .problem-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 14px;
}

/* ------- section: feature (alternating) ------------------------------------ */

.feature {
  border-bottom: 1px solid var(--border);
}

.feature:last-of-type {
  border-bottom: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.feature-grid.reverse .feature-copy {
  order: 2;
}

@media (max-width: 900px) {
  .feature-grid,
  .feature-grid.reverse {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .feature-grid.reverse .feature-copy {
    order: 0;
  }
}

.feature-copy h2 {
  margin-bottom: 14px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.feature-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--text-soft);
  line-height: 1.5;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feature-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

/* ------- section: video ----------------------------------------------------- */

.videosec {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.video-wrap {
  position: relative;
  margin: 36px auto 0;
  aspect-ratio: 9 / 19.5;
  width: min(340px, 80vw);
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-float);
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-wrap .video-poster-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  background: none;
  padding: 0;
}

.video-wrap .video-poster-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.video-wrap .play-badge {
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 30px;
  padding-left: 6px;
}

.video-wrap.playing .video-poster-btn {
  display: none;
}

/* ------- section: vision roadmap ------------------------------------------- */

.vision {
  background: #0b1220;
  color: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.vision::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 400px at 80% 0%, rgba(37, 99, 235, 0.25), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(14, 165, 233, 0.18), transparent 60%);
  pointer-events: none;
}

.vision .eyebrow {
  color: #93c5fd;
}

.vision h2 {
  color: #f8fafc;
}

.vision p {
  color: #cbd5e1;
}

.vision-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
  position: relative;
}

.phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}

@media (max-width: 900px) {
  .phases {
    grid-template-columns: 1fr;
  }
}

.phase {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(10px);
}

.phase .phase-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
  font-weight: 700;
  margin-bottom: 14px;
}

.phase.is-now .phase-tag {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
}

.phase h3 {
  color: #f8fafc;
  margin-bottom: 8px;
}

.phase ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.phase ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 15px;
}

.phase ul li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  position: absolute;
  left: 0;
  top: 9px;
}

.phase.is-now ul li::before {
  background: #22c55e;
}

/* ------- section: team / founders ------------------------------------------ */

.team {
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 44px;
  max-width: 880px;
  margin-inline: auto;
}

@media (max-width: 720px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 380px;
  }
}

.team-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

.team-photo {
  width: 168px;
  height: 168px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-muted);
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.team-name {
  margin: 0 0 4px;
  font-size: clamp(18px, 1.6vw, 20px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.team-role {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.team-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.team-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.team-link:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.linkedin-logo {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ------- section: trust ----------------------------------------------------- */

.trust {
  background: var(--bg-soft);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 32px;
}

@media (max-width: 900px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

.trust-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.trust-item h4 {
  margin-bottom: 6px;
}

.trust-item p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ------- section: CTA / download ------------------------------------------- */

.cta-final {
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  text-align: center;
}

.cta-final h2 {
  max-width: 720px;
  margin: 0 auto 14px;
}

.cta-final p {
  max-width: 560px;
  margin: 0 auto 28px;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ------- footer ------------------------------------------------------------- */

footer {
  background: #0b1220;
  color: #94a3b8;
  padding: 36px 0 48px;
}

footer a {
  color: #cbd5e1;
}

footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  align-items: flex-start;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 800;
}

.footer-note {
  font-size: 13px;
  color: #64748b;
  margin-top: 8px;
  max-width: 48ch;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
  font-size: 15px;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
}

/* ------- reveal-on-scroll --------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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