/* ==========================================================================
   MediScribe Flow — shared design system
   Clinical documentation workflow platform. Calm, professional, healthcare-grade.
   ========================================================================== */

/* ----- Fonts (self-hosted Inter variable; no third-party request) --------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable.woff2") format("woff2");
}

/* ----- Tokens ------------------------------------------------------------- */
:root {
  --ink: #0d2230;            /* headings */
  --text: #38505e;          /* body */
  --muted: #5f7682;         /* secondary text */
  --brand: #0e8f88;         /* teal */
  --brand-strong: #0c6f73;
  --blue: #2563eb;
  --grad: linear-gradient(135deg, #14b8a6 0%, #2563eb 100%);
  --grad-soft: linear-gradient(135deg, #e7faf6 0%, #eaf1ff 100%);

  --bg: #ffffff;
  --bg-soft: #f4f8fa;
  --bg-deep: #0b2735;        /* dark sections */
  --bg-deep-2: #0e3a4d;

  --line: #e3ebf0;
  --line-strong: #d3dee5;
  --card: #ffffff;

  --shadow-sm: 0 1px 2px rgba(13, 34, 48, .06), 0 2px 8px rgba(13, 34, 48, .05);
  --shadow: 0 10px 30px rgba(13, 34, 48, .08);
  --shadow-lg: 0 30px 70px rgba(13, 34, 48, .14);

  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
}

/* ----- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -.025em; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 1rem; }

/* ----- Accessibility helpers --------------------------------------------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; outline: 3px solid #7dd3c8; }
:focus-visible { outline: 3px solid rgba(37,99,235,.55); outline-offset: 2px; border-radius: 6px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----- Layout ------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
section { padding-block: clamp(48px, 8vw, 96px); }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-strong); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }
.lede { font-size: 1.12rem; color: var(--muted); line-height: 1.7; }

/* ----- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: .98rem; padding: 13px 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 24px rgba(37,99,235,.20); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 16px 30px rgba(37,99,235,.28); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--ink); border-color: var(--brand); transform: translateY(-1px); }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-on-dark { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-on-dark:hover { color: #fff; background: rgba(255,255,255,.18); }

/* ----- Header / nav ------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-size: 1.08rem; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a.nav-link { padding: 9px 13px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav-links a.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }
@media (max-width: 920px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
}

/* ----- Hero --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(20,184,166,.10), transparent 60%),
    radial-gradient(50% 50% at 12% 8%, rgba(37,99,235,.08), transparent 55%),
    linear-gradient(180deg, #f7fbfc, #ffffff 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(28px, 5vw, 56px); align-items: center; padding-block: clamp(40px, 6vw, 72px); }
.hero h1 { margin-bottom: 18px; }
.hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 36ch; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.trust-item { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.trust-item svg { width: 18px; height: 18px; color: var(--brand); flex: none; }

/* device / screenshot frames */
.frame {
  border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.frame-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fbfdfe; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d7e0e6; display: block; }
.frame img { width: 100%; height: auto; }
.frame-float { transform: perspective(1400px) rotateY(-4deg) rotateX(1.5deg); transition: transform .4s ease; }
.frame-float:hover { transform: perspective(1400px) rotateY(0deg) rotateX(0deg); }

/* ----- Logo / credibility strip ------------------------------------------ */
.strip { background: var(--bg-soft); border-block: 1px solid var(--line); }
.strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 32px; padding-block: 22px; text-align: center; }
.strip-inner .pill { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink); font-size: .95rem; }
.strip-inner .pill svg { width: 19px; height: 19px; color: var(--brand); }

/* Clinical-responsibility callout band */
.callout { background: var(--grad-soft); border-block: 1px solid var(--line); }
.callout-inner { display: flex; align-items: flex-start; gap: 16px; max-width: 900px; margin-inline: auto; padding-block: clamp(22px, 3.2vw, 34px); }
.callout-inner > svg { width: 30px; height: 30px; flex: 0 0 auto; color: var(--brand-strong); margin-top: 3px; }
.callout-inner p { margin: 0; color: var(--ink); font-size: 1.02rem; line-height: 1.6; }
.callout-inner strong { color: var(--ink); }

/* ----- Steps (How it works) ---------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad-soft); color: var(--brand-strong); font-weight: 800; font-size: .95rem; margin-bottom: 14px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .96rem; margin: 0; }
.step-shot { margin-top: 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.step-shot img { width: 100%; height: auto; }

/* ----- Cards (capabilities) ---------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 13px; background: var(--grad-soft); margin-bottom: 16px; }
.card-icon svg { width: 24px; height: 24px; color: var(--brand-strong); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ----- Split showcase ----------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.split.reverse .split-media { order: -1; }
.feature-list { list-style: none; margin: 18px 0 0; padding: 0; }
.feature-list li { display: flex; gap: 12px; padding: 9px 0; color: var(--text); }
.feature-list svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 3px; }

/* ----- Mobile section ----------------------------------------------------- */
.mobile { background: var(--bg-soft); border-block: 1px solid var(--line); }
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.store-badge { display: inline-flex; align-items: center; gap: 11px; padding: 11px 18px 11px 15px; background: #0d2230; color: #fff; border-radius: 13px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.store-badge:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.store-badge svg { width: 22px; height: 22px; flex: none; }
.store-badge .t { display: grid; line-height: 1.2; }
.store-badge .t small { font-size: .68rem; opacity: .85; font-weight: 500; }
.store-badge .t strong { font-size: .98rem; font-weight: 700; }
.store-badge[aria-disabled="true"] { opacity: .9; cursor: default; }
.store-badge[aria-disabled="true"]:hover { transform: none; box-shadow: var(--shadow-sm); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 700; }
.status-pill.live { background: #e7f8f1; color: #0b7a52; }
.status-pill.soon { background: #eef2ff; color: #3a4ec0; }
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.app-note { color: var(--muted); font-size: .9rem; margin-top: 14px; }

/* ----- Security (dark) ---------------------------------------------------- */
.security { background: linear-gradient(160deg, var(--bg-deep), var(--bg-deep-2)); color: #cfe0e8; }
.security h2, .security h3 { color: #fff; }
.security .eyebrow { color: #6fe3d4; }
.security .eyebrow::before { background: #6fe3d4; }
.security .lede { color: #b6cdd7; }
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 14px; }
.sec-item { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 22px; }
.sec-item h3 { font-size: 1.05rem; margin-bottom: 7px; display: flex; align-items: center; gap: 10px; }
.sec-item h3 svg { width: 20px; height: 20px; color: #6fe3d4; flex: none; }
.sec-item p { color: #adc6d1; margin: 0; font-size: .94rem; }
.sec-note { margin-top: 26px; font-size: .86rem; color: #8fadb9; max-width: 70ch; }

/* ----- Value highlights (replaces testimonials) -------------------------- */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; background: var(--card); box-shadow: var(--shadow-sm); }
.value .stat { font-size: 1.05rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-bottom: 8px; }
.value p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ----- FAQ (native accordion, no JS) ------------------------------------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--brand); line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 22px 20px; color: var(--muted); }
.faq .faq-body p { margin: 0; }

/* ----- CTA band ----------------------------------------------------------- */
.cta-band { background: linear-gradient(135deg, #0f766e, #1e40af); color: #fff; border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px); text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d6e4f5; max-width: 56ch; margin-inline: auto; margin-bottom: 24px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Demo / contact form (lives inside the dark .cta-band — light inputs, white labels) */
.demo-form { max-width: 640px; margin: 8px auto 0; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-full { margin-bottom: 14px; }
.form-field > span { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,.94); }
.form-field > span em { font-style: normal; font-weight: 400; color: rgba(255,255,255,.66); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 11px 13px; font-size: 0.95rem; font-family: inherit;
  color: #0d2230; background: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 12px;
}
.form-field textarea { resize: vertical; min-height: 96px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid #14b8a6; outline-offset: 1px; border-color: #14b8a6;
}
/* Honeypot — off-screen, not announced, not tabbable */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.form-status { margin: 12px 0 0; min-height: 1.2em; font-size: 0.9rem; color: rgba(255,255,255,.92); }
.form-status-ok { color: #d1fae5; font-weight: 600; }
.form-status-err { color: #fde68a; }
.form-status-err a { color: #fff; text-decoration: underline; }
.form-fallback { margin: 10px 0 0; font-size: 0.85rem; color: rgba(255,255,255,.8); }
.form-fallback a { color: #fff; text-decoration: underline; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ----- Footer ------------------------------------------------------------- */
.site-footer { background: var(--bg-deep); color: #aac3cf; padding-block: clamp(40px, 6vw, 64px) 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: .92rem; color: #8fadb9; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a, .footer-col span { display: block; color: #aac3cf; font-size: .94rem; padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.10); font-size: .86rem; color: #8fadb9; }

/* ----- Responsive --------------------------------------------------------- */
@media (max-width: 980px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .steps, .grid-3, .sec-grid, .value-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-media { max-width: 560px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .steps, .grid-3, .sec-grid, .value-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .frame-float { transform: none; }
}

/* ----- Motion preferences ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .frame-float { transform: none !important; }
}

/* ----- Legal / content pages (privacy, account-deletion, security) -------- */
.prose { max-width: 800px; margin-inline: auto; }
.prose h1 { margin-bottom: 10px; }
.prose .meta { color: var(--muted); font-size: .92rem; margin-bottom: 28px; }
.prose h2 { font-size: 1.35rem; margin-top: 36px; }
.prose h3 { margin-top: 24px; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
