/* MedRep website styles */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --surface: #ffffff;
  --text: #0f1b2d;
  --text-muted: #53627a;
  --border: #e1e8f0;
  --primary: #3b6db4;
  --primary-dark: #2d5792;
  --primary-soft: #e8eff9;
  --accent: #05cdb9;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 27, 45, 0.08);
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1520;
    --bg-soft: #111c2b;
    --surface: #15222f;
    --text: #e8eef6;
    --text-muted: #9aabc0;
    --border: #243447;
    --primary: #6b9be0;
    --primary-dark: #4f82cf;
    --primary-soft: #16294a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; text-decoration: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: block; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--text-muted); font-weight: 500; font-size: .95rem;
}
.nav-links a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); color: var(--text);
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; margin: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 12px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .steps li::before { color: #0d1520; } }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn svg { width: 20px; height: 20px; }

/* Hero */
.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, var(--primary-soft), transparent 70%),
    var(--bg);
  padding: 72px 0 80px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: .85rem; margin-bottom: 18px;
}
.hero h1 span { color: var(--primary); }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }

.stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; padding: 0; list-style: none; }
.stats strong { display: block; font-size: 1.5rem; font-weight: 800; }
.stats span { color: var(--text-muted); font-size: .88rem; }

.phone {
  width: min(250px, 100%); margin: 0 auto; padding: 10px;
  background: #0f1b2d; border-radius: 34px; box-shadow: var(--shadow);
}
.phone img { border-radius: 25px; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; background: #fff; }

/* Sections */
section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--text-muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; }
.card p { color: var(--text-muted); margin: 0; font-size: .96rem; }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.shot { margin: 0; }
.shot .phone { width: min(230px, 100%); }
.shot figcaption { text-align: center; margin-top: 14px; font-weight: 600; font-size: .95rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
}
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; margin-bottom: 14px;
  background: var(--primary); color: #fff; font-weight: 700;
}
.steps p { color: var(--text-muted); margin: 0; font-size: .96rem; }

/* CTA */
.cta {
  background: linear-gradient(135deg, #3b6db4, #2d5792);
  color: #fff; border-radius: 22px; padding: 56px 32px; text-align: center;
}
.cta p { color: rgba(255,255,255,.85); max-width: 520px; margin: 0 auto 24px; }
.cta .btn { background: #fff; color: #2d5792; }

/* Page header (inner pages) */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 56px 0 44px; }
.page-hero p { color: var(--text-muted); margin: 0; }

/* Prose (policy pages) */
.prose { max-width: 780px; padding: 56px 0 80px; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.note {
  background: var(--primary-soft); border-left: 4px solid var(--primary);
  padding: 16px 20px; border-radius: 8px; margin: 1.5em 0;
}
.note p:last-child { margin: 0; }

/* Footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer p { color: var(--text-muted); font-size: .95rem; }
.copyright {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .stats { justify-content: center; }
  .cards, .steps { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: grid; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; padding: 12px 20px 18px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Auth pages (register / reset password) */
.auth { background: var(--bg-soft); padding: 56px 0 80px; min-height: 70vh; }
.auth-card {
  max-width: 480px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; padding: 36px; box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.6rem; margin-bottom: .4em; }
.auth-card .sub { color: var(--text-muted); margin-bottom: 1.4em; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field .hint { color: var(--text-muted); font-size: .82rem; margin-top: 4px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--primary); font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; padding: 6px 8px;
}
.code-input { text-align: center; letter-spacing: .5em; font-size: 1.5rem; font-weight: 700; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn[disabled] { color: var(--text-muted); cursor: not-allowed; }
.auth-foot { margin-top: 20px; text-align: center; color: var(--text-muted); font-size: .92rem; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .94rem; }
.alert[hidden] { display: none; }
.alert-error { background: #fdecea; color: #8a1c13; border: 1px solid #f5c2bd; }
.alert-success { background: #e6f6ee; color: #14532d; border: 1px solid #b7e4c7; }
.alert-info { background: var(--primary-soft); color: var(--text); border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) {
  .alert-error { background: #3a1a18; color: #ffb4ab; border-color: #5c2a26; }
  .alert-success { background: #12301f; color: #a6e3bd; border-color: #1f4d32; }
}
.done { text-align: center; }
.done .tick {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
  background: #e6f6ee; color: #14804a;
}
.done .tick svg { width: 32px; height: 32px; }
.nav-links .nav-cta a { background: var(--primary); color: #fff; }
.nav-links .nav-cta a:hover { background: var(--primary-dark); color: #fff; }
@media (prefers-color-scheme: dark) { .nav-links .nav-cta a, .nav-links .nav-cta a:hover { color: #0d1520; } }
@media (max-width: 480px) { .auth-card { padding: 26px 20px; } }
