/* ==========================================================================
   MedPractice — landing page
   Palette derived from the product logo: navy / teal / coral.
   ========================================================================== */

:root {
  --navy:   #12314b;
  --navy-2: #1b4568;
  --teal:   #1fa8bd;
  --teal-2: #37c2d6;
  --coral:  #f4433c;

  --bg:        #ffffff;
  --bg-alt:    #f4f8fa;
  --surface:   #ffffff;
  --text:      #12314b;
  --text-soft: #5b7186;
  --border:    #dfe8ee;
  --shadow:    0 1px 2px rgba(18,49,75,.06), 0 8px 24px -12px rgba(18,49,75,.18);
  --shadow-lg: 0 2px 4px rgba(18,49,75,.06), 0 24px 48px -20px rgba(18,49,75,.28);

  --radius:   14px;
  --radius-s: 10px;
  --wrap:     1140px;
  --ease:     cubic-bezier(.22,.61,.36,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0b1c2b;
    --bg-alt:    #0f2537;
    --surface:   #13293c;
    --text:      #e8f1f6;
    --text-soft: #93aabd;
    --border:    #21445e;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px -20px rgba(0,0,0,.7);
  }
}

/* Explicit toggle wins over the OS preference, in both directions. */
:root[data-theme="light"] {
  --bg: #ffffff; --bg-alt: #f4f8fa; --surface: #ffffff;
  --text: #12314b; --text-soft: #5b7186; --border: #dfe8ee;
  --shadow: 0 1px 2px rgba(18,49,75,.06), 0 8px 24px -12px rgba(18,49,75,.18);
  --shadow-lg: 0 2px 4px rgba(18,49,75,.06), 0 24px 48px -20px rgba(18,49,75,.28);
}
:root[data-theme="dark"] {
  --bg: #0b1c2b; --bg-alt: #0f2537; --surface: #13293c;
  --text: #e8f1f6; --text-soft: #93aabd; --border: #21445e;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px -20px rgba(0,0,0,.7);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }

h1, h2, h3 { color: var(--text); line-height: 1.2; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }

svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--teal); color: #fff; padding: 10px 16px; border-radius: var(--radius-s);
}
.skip:focus { left: 16px; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

/* Theme-scoped logo swap */
:root[data-theme="dark"] .light-only { display: none; }
:root[data-theme="light"] .dark-only  { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .light-only { display: none; }
  :root:not([data-theme="light"]) .dark-only  { display: block; }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .dark-only  { display: none; }
  :root:not([data-theme="dark"]) .light-only { display: block; }
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: 0 0 auto; }
.brand-mark { width: 30px; height: 24px; color: var(--teal); flex: 0 0 auto; }
.brand-name { font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }

.nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav a {
  color: var(--text-soft); font-size: .95rem; font-weight: 500;
  transition: color .18s var(--ease);
}
.nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  background: transparent; color: var(--text-soft);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--text-soft); }
.icon-btn svg { width: 18px; height: 18px; }

.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

.lang {
  display: flex; padding: 3px;
  border: 1px solid var(--border); border-radius: var(--radius-s);
}
.lang button {
  padding: 3px 9px; min-width: 34px;
  background: transparent; color: var(--text-soft);
  border: 0; border-radius: 7px;
  font: inherit; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.lang button:hover { color: var(--text); }
.lang button.is-active { background: var(--teal); color: #fff; }

.menu-btn { display: none; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent; border-radius: var(--radius-s);
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn svg { width: 17px; height: 17px; stroke-width: 2; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 8px 15px; font-size: .9rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy-2) 130%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(18,49,75,.2), 0 10px 24px -12px var(--teal);
}
.btn-primary:hover { box-shadow: 0 2px 4px rgba(18,49,75,.22), 0 16px 32px -12px var(--teal); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.btn-invert { background: #fff; color: var(--navy); }
.btn-invert:hover { box-shadow: 0 16px 32px -14px rgba(0,0,0,.5); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; padding: 92px 0 84px; }

.hero-glow {
  position: absolute; inset: -30% -10% auto -10%; height: 620px;
  background:
    radial-gradient(46% 52% at 22% 34%, color-mix(in srgb, var(--teal) 26%, transparent) 0%, transparent 68%),
    radial-gradient(42% 46% at 78% 22%, color-mix(in srgb, var(--coral) 15%, transparent) 0%, transparent 66%);
  filter: blur(28px);
  pointer-events: none;
}

.hero-ecg {
  position: absolute; left: 0; right: 0; bottom: 30px; width: 100%; height: 120px;
  color: var(--teal); opacity: .16; pointer-events: none;
}
.hero-ecg path {
  stroke-width: 2; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1600; stroke-dashoffset: 1600;
  animation: trace 5s var(--ease) .3s forwards;
}
@keyframes trace { to { stroke-dashoffset: 0; } }

.hero-inner { position: relative; text-align: center; max-width: 820px; }

.eyebrow {
  display: inline-block; margin-bottom: 18px;
  color: var(--teal);
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 20px;
}

.lede {
  max-width: 640px; margin-inline: auto;
  color: var(--text-soft);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
}

.hero-cta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 34px;
}

.hero-note {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 26px;
  color: var(--text-soft); font-size: .87rem;
}
.hero-note svg { width: 16px; height: 16px; color: var(--teal); flex: 0 0 auto; }

/* ── Sections ────────────────────────────────────────────────────────────── */

.section { padding: 92px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section .eyebrow,
.section-title,
.section-lede { text-align: center; }
.section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 14px;
}
.section-lede {
  max-width: 620px; margin: 0 auto 52px;
  color: var(--text-soft);
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--teal) 45%, var(--border));
  box-shadow: var(--shadow-lg);
}
.card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 8px; }
.card p  { color: var(--text-soft); font-size: .95rem; }

.card-flat { box-shadow: none; }

.card-ico {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 18px;
  border-radius: 12px;
}
.card-ico svg { width: 22px; height: 22px; }
.ico-teal  { background: color-mix(in srgb, var(--teal) 14%, transparent);  color: var(--teal); }
.ico-navy  { background: color-mix(in srgb, var(--navy-2) 14%, transparent); color: var(--navy-2); }
.ico-coral { background: color-mix(in srgb, var(--coral) 13%, transparent); color: var(--coral); }
:root[data-theme="dark"] .ico-navy { color: #7fb4d8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico-navy { color: #7fb4d8; }
}

/* ── Split (platform) ────────────────────────────────────────────────────── */

.split {
  display: grid; gap: 56px; align-items: center;
  grid-template-columns: 1fr 1fr;
}
.split-copy .eyebrow,
.split-copy .section-title,
.split-copy .section-lede { text-align: start; }
.split-copy .section-lede { margin: 0 0 26px; }

.ticks { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 12px; }
.ticks li {
  position: relative; padding-inline-start: 30px;
  color: var(--text-soft); font-size: .97rem;
}
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 18px; height: 18px; border-radius: 50%;
  background:
    color-mix(in srgb, var(--teal) 16%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231fa8bd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

/* App mock */
.split-visual { display: grid; place-items: center; }
.mock {
  width: 100%; max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(2deg);
  transition: transform .5s var(--ease);
}
.mock:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(0); }

.mock-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 14px;
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.mock-bar span:first-child { background: color-mix(in srgb, var(--coral) 60%, transparent); }

.mock-body { display: flex; min-height: 250px; }

.mock-side {
  flex: 0 0 62px; padding: 16px 12px;
  display: grid; gap: 10px; align-content: start;
  background: var(--bg-alt); border-inline-end: 1px solid var(--border);
}
.mock-side i { height: 9px; border-radius: 3px; background: var(--border); }
.mock-side i:first-child { background: var(--teal); opacity: .7; }

.mock-main { flex: 1; padding: 18px 16px; display: grid; gap: 12px; align-content: start; }
.mock-row { height: 9px; border-radius: 4px; background: var(--border); }
.mock-row.wide  { width: 62%; height: 12px; background: color-mix(in srgb, var(--navy-2) 45%, var(--border)); }
.mock-row.short { width: 45%; }

.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-card {
  padding: 10px; border: 1px solid var(--border); border-radius: 8px;
  display: grid; gap: 6px;
}
.mock-card b { display: block; height: 7px; width: 60%; border-radius: 3px; }
.mock-card em { display: block; height: 5px; border-radius: 3px; background: var(--border); }
.mock-card b.teal  { background: var(--teal); }
.mock-card b.coral { background: var(--coral); }
.mock-card b.navy  { background: var(--navy-2); }

.mock-chart { width: 100%; height: 62px; color: var(--teal); opacity: .8; }
.mock-chart path { stroke-width: 2; vector-effect: non-scaling-stroke; }

/* ── CTA band ────────────────────────────────────────────────────────────── */

.cta-band {
  padding: 66px 0;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 55%, var(--teal) 165%);
  color: #fff;
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 800; margin-bottom: 6px; }
.cta-band p  { color: rgba(255,255,255,.78); }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer { padding: 48px 0; background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-brand .brand-mark { width: 36px; height: 29px; }
.footer-brand strong { display: block; font-size: 1rem; }
.footer-brand span { color: var(--text-soft); font-size: .87rem; }

.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-soft); font-size: .92rem; transition: color .18s var(--ease); }
.footer-links a:hover { color: var(--teal); }

/* Co-branding credit — sits to the right of our own mark, behind a vertical rule.
   The two Διάπλαση files are a light/dark pair: diaplasis-light.png is dark
   artwork on an OPAQUE white background, so mix-blend-mode dissolves that box
   into the light footer; diaplasis-dark.png is white artwork with real
   transparency and needs no such treatment. */
.credit-divider {
  align-self: stretch;
  width: 1px; min-height: 42px;
  margin-inline: 6px;
  background: var(--border);
}

.credit { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.credit-label { color: var(--text-soft); font-size: .78rem; line-height: 1.3; }

.credit-logo {
  display: block; line-height: 0;
  opacity: .9;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.credit-logo:hover { opacity: 1; transform: translateY(-1px); }
.credit-logo img { width: auto; height: 38px; }
.credit-logo .light-only { mix-blend-mode: multiply; }

.copy { width: 100%; color: var(--text-soft); font-size: .84rem; padding-top: 20px; border-top: 1px solid var(--border); }

/* ── Reveal on scroll ────────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .split { grid-template-columns: 1fr; gap: 44px; }
  .split-visual { order: -1; }
  .mock { transform: none; }
}

@media (max-width: 820px) {
  .menu-btn { display: grid; }

  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    display: none; flex-direction: column; gap: 0;
    padding: 8px 24px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: 0; }

  .header-inner { gap: 12px; }
  .header-actions { margin-inline-start: auto; }
  .header-actions .btn { display: none; }

  .hero { padding: 62px 0 66px; }
  .section { padding: 68px 0; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  /* The brand row wraps here; a stranded vertical rule reads as a glitch. */
  .credit-divider { display: none; }
  .credit { width: 100%; }
}

@media (max-width: 420px) {
  .hero-cta .btn { width: 100%; }
}
