/* landing.css — public marketing landing page for MedKrul.
   Ported from the retired Remix site (archive_dont_touch/medkrul_web) into the
   new app's green design system. Self-contained: defines its own tokens so it
   does not depend on styles.css. No inline styles/scripts (strict CSP). */

:root {
  --font-ui: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-display: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  --bg: #FFFFFF;
  --muted-bg: #F3F6F4;
  --ink: #0C1A13;
  --ink-70: rgba(12, 26, 19, 0.70);
  --ink-60: rgba(12, 26, 19, 0.60);
  --ink-50: rgba(12, 26, 19, 0.50);
  --ink-40: rgba(12, 26, 19, 0.40);

  --border: #E2E9E4;
  --border-60: rgba(226, 233, 228, 0.6);
  --border-40: rgba(226, 233, 228, 0.9);

  --brand: #16A34A;
  --brand-strong: #117A38;
  --brand-05: rgba(22, 163, 74, 0.05);
  --brand-10: rgba(22, 163, 74, 0.10);
  --brand-15: rgba(22, 163, 74, 0.15);
  --brand-20: rgba(22, 163, 74, 0.20);

  --red: #D8453B;
  --red-tint: #FBE7E5;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --pill: 999px;

  --shadow-sm: 0 1px 2px rgba(13, 27, 20, .05), 0 1px 1px rgba(13, 27, 20, .04);
  --shadow: 0 4px 16px rgba(13, 27, 20, .06), 0 1px 3px rgba(13, 27, 20, .05);
  --shadow-lg: 0 18px 50px rgba(13, 27, 20, .13), 0 4px 12px rgba(13, 27, 20, .07);

  --maxw: 1120px;
}

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

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

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Scroll reveal ─────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease-out, transform .7s ease-out;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ─── Shared bits ───────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 860px; }
.wrap-tight { max-width: 620px; }

.overline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}

.section { padding: 72px 0; }
.section-muted { background: var(--muted-bg); }
@media (min-width: 1024px) { .section { padding: 96px 0; } }

.center { text-align: center; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }

.h2 {
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
}
.section-head { margin-bottom: 48px; }
.lede {
  font-size: 1rem;
  color: var(--ink-60);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto;
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: var(--pill);
  padding: 15px 30px;
  transition: transform .25s ease, box-shadow .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px var(--brand-20);
}
.btn-primary:hover {
  background: var(--brand-strong);
  box-shadow: 0 8px 22px var(--brand-20);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-70);
  border: 1px solid var(--border);
  padding: 13px 24px;
  font-size: .9rem;
}
.btn-ghost:hover { color: var(--brand); border-color: var(--brand); }

.btn-dark {
  background: var(--ink);
  color: #fff;
  border-radius: var(--pill);
  padding: 9px 20px;
  font-size: .875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.btn-dark:hover { background: #16281d; }

/* ─── Nav ───────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: calc(100% - 32px);
  max-width: 1024px;
}
.nav-inner {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-60);
  border-radius: var(--pill);
  padding: 8px 16px;
  box-shadow: 0 6px 24px rgba(13, 27, 20, .06);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }

.nav-links { display: none; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-60);
  border-radius: var(--pill);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: rgba(12, 26, 19, .05); }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-signin {
  display: none;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-ui);
  padding: 8px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-60);
}
.nav-signin:hover { color: var(--ink); }

.nav-burger {
  display: inline-flex;
  background: none; border: none; cursor: pointer;
  color: var(--ink-60);
  padding: 6px;
}
.nav-burger:hover { color: var(--ink); }

.nav-mobile { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-60); }
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  padding: 10px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-60);
  border-radius: var(--radius-sm);
}
.nav-mobile a:hover { color: var(--ink); background: rgba(12, 26, 19, .05); }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-signin { display: block; }
  .nav-burger { display: none; }
}

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 128px 0 72px;
  text-align: center;
}
.hero-glow {
  position: absolute;
  width: 900px; height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.06) 0%, transparent 65%);
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 24px;
}
.hero h1 .accent { color: var(--brand); }
.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--ink-70);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.65;
}
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }
.trust-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap;
  font-size: .875rem;
  color: var(--ink-50);
}
.trust-bar .sep { color: var(--border); }

/* ─── Stats ─────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border-40);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  height: 100%;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.stat-desc { font-size: .875rem; color: var(--ink-60); line-height: 1.45; }
.stat-footer { text-align: center; font-size: 1rem; font-weight: 600; color: var(--ink-70); }

/* ─── Callout / cards ───────────────────────────────────────────── */
.callout {
  background: var(--brand-05);
  border: 1px solid var(--brand-15);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
.callout p { font-size: 1rem; color: var(--ink-70); line-height: 1.7; }

.body-copy { font-size: 1rem; color: var(--ink-60); line-height: 1.7; max-width: 640px; margin: 0 auto 24px; }
.scope-note { font-size: .875rem; font-weight: 600; color: var(--ink-50); }

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
@media (min-width: 768px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.info-card {
  background: var(--muted-bg);
  border: 1px solid var(--border-40);
  border-radius: var(--radius);
  padding: 26px;
  height: 100%;
}
.section-muted .info-card { background: var(--bg); }
.info-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand-10);
  display: grid; place-items: center;
  margin-bottom: 16px;
  color: var(--brand);
}
.info-icon svg { width: 18px; height: 18px; }
.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.info-card p { font-size: .875rem; color: var(--ink-60); line-height: 1.6; margin-bottom: 12px; }
.info-card .footnote { font-size: .8rem; color: var(--ink-40); font-style: italic; line-height: 1.55; margin-bottom: 0; }

.statement {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px 20px;
  background: var(--brand-05);
  border: 1px solid var(--brand-15);
  border-radius: var(--radius);
  max-width: 640px;
  margin: 0 auto;
}
.statement svg { width: 20px; height: 20px; color: var(--brand); flex-shrink: 0; }
.statement p { font-size: .875rem; font-weight: 500; color: var(--ink-70); text-align: center; }

/* ─── Final CTA ─────────────────────────────────────────────────── */
.final-cta { text-align: center; }
.final-cta h2 { margin-bottom: 16px; }
.final-cta .lede { margin-bottom: 32px; }
.final-cta .trust-note { font-size: .8rem; color: var(--ink-40); margin-top: 16px; }

/* ─── Footer ────────────────────────────────────────────────────── */
.footer { padding: 56px 0; border-top: 1px solid var(--border-60); }
.footer-top { display: flex; flex-direction: column; gap: 40px; margin-bottom: 40px; }
@media (min-width: 768px) { .footer-top { flex-direction: row; justify-content: space-between; } }
.footer-brand { max-width: 300px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: .875rem; color: var(--ink-50); line-height: 1.6; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-col h4 { font-size: .875rem; font-weight: 700; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .875rem; color: var(--ink-50); transition: color .2s; }
.footer-col a:hover { color: var(--ink); }
.footer-divider { height: 1px; background: var(--border-60); margin: 24px 0; }
.footer-bottom {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: .8rem; color: var(--ink-40);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-bottom button {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-ui);
  font-size: .8rem; color: var(--ink-40);
}
.footer-bottom button:hover { color: var(--ink-60); }

/* ─── Sign-in modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  z-index: 50;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 22px 8px; }
.modal-head h2 { font-size: 1.15rem; font-weight: 700; }
.modal-head p { font-size: .875rem; color: var(--ink-50); margin-top: 4px; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--ink-50);
  padding: 6px; border-radius: var(--pill);
  display: grid; place-items: center;
}
.modal-close:hover { background: var(--muted-bg); color: var(--ink); }
.modal-close svg { width: 20px; height: 20px; }
.modal-body { padding: 16px 22px 22px; }
.modal-field { margin-bottom: 16px; }
.modal-field label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; }
.modal-input-wrap { position: relative; }
.modal input {
  width: 100%;
  font-family: var(--font-ui);
  font-size: .95rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  transition: box-shadow .2s, border-color .2s;
}
.modal input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-15); }
.modal-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--ink-50); display: grid; place-items: center;
}
.modal-eye:hover { color: var(--ink); }
.modal-eye svg { width: 18px; height: 18px; }
.modal-error {
  display: none;
  align-items: flex-start; gap: 8px;
  padding: 12px;
  background: var(--red-tint);
  border: 1px solid rgba(216, 69, 59, .2);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: var(--red);
  margin-bottom: 16px;
}
.modal-error.show { display: flex; }
.modal .btn-primary { width: 100%; justify-content: center; }
.modal .btn-primary[disabled] { opacity: .6; cursor: default; }
.modal-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-60); text-align: center; }
.modal-foot p { font-size: .8rem; color: var(--ink-50); }
.modal-foot a { color: var(--brand); font-weight: 600; }
.modal-foot a:hover { text-decoration: underline; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
