/* MediKeep landing — follows docs/visual-guide.md (v2.0): Warm Canvas, AnthoDevs gradient, glass, 26/20 radii. */
:root {
  --blue: #0A84F0; --indigo: #4560F0; --violet: #7C45E8;
  --grad: linear-gradient(90deg, #0A84F0, #4560F0 50%, #7C45E8);
  --grad-diag: linear-gradient(135deg, #0A84F0, #4560F0 50%, #7C45E8);
  --canvas: #F8F7F2; --card: #FFFFFF; --lilac: #EDF0FF; --chip: #F1EFE8;
  --ink: #202C2B; --muted: #5E6967; --accent: #4560F0;
  --ok-bg: #DDF3E4; --ok: #14602F; --warn-bg: #FFF1D6; --warn: #7A4A06;
  --glass: rgba(255,255,255,.62); --glass-edge: rgba(255,255,255,.9);
  --shadow: 0 18px 50px rgba(69,96,240,.16);
  --radius: 26px; --radius-sm: 20px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #000818; --card: #000C24; --lilac: #0F1B45; --chip: #0A1636;
    --ink: #EEF0F4; --muted: #9AA6D6; --accent: #6C84FF;
    --ok-bg: #0E3B24; --ok: #7FE0A6; --warn-bg: #3A2A0A; --warn: #FFD28A;
    --glass: rgba(0,12,36,.58); --glass-edge: rgba(255,255,255,.14);
    --shadow: 0 18px 50px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: var(--font-text); line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, .brand { font-family: var(--font); letter-spacing: -.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Living backdrop: brand orbs */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.orb.a { width: 520px; height: 520px; background: #8DC3F7; top: -160px; left: -160px; animation: drift 22s ease-in-out infinite alternate; }
.orb.b { width: 560px; height: 560px; background: #CDB6F2; top: 38%; right: -200px; animation: drift 28s ease-in-out infinite alternate-reverse; }
.orb.c { width: 420px; height: 420px; background: #A9B6F7; bottom: -120px; left: 20%; opacity: .4; animation: drift 25s ease-in-out infinite alternate; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .orb { opacity: .28; } }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.08); } }

/* Glass */
.glass {
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: var(--shadow);
}

/* Nav */
.nav { position: sticky; top: 12px; z-index: 10; margin-top: 12px; }
.nav-inner { display: flex; align-items: center; gap: 18px; padding: 10px 14px 10px 12px; border-radius: 999px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand:hover { text-decoration: none; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-links a { color: var(--ink); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav-links a:hover { background: var(--lilac); text-decoration: none; }
.nav-links .lang { border: 1px solid var(--glass-edge); background: var(--glass); }
@media (max-width: 720px) { .nav-links a.hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 28px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  font-family: var(--font); border: 0; cursor: pointer; text-decoration: none !important;
}
.btn.primary {
  color: #fff; background: var(--grad);
  box-shadow: 0 10px 28px rgba(69,96,240,.45), inset 0 1px 0 rgba(255,255,255,.55);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.glass-btn { color: var(--ink); background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: 0 8px 22px rgba(69,96,240,.1); }
.btn[aria-disabled="true"] { cursor: default; }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 72px 0 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: .85rem; margin-bottom: 20px; }
.hero h1 .grad, h2 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); margin: 20px 0 30px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.note { margin-top: 14px; color: var(--muted); font-size: .9rem; }
.phones { position: relative; height: 640px; }
.phone {
  position: absolute; width: 270px; border-radius: 44px; padding: 9px; background: #0d1020;
  box-shadow: 0 30px 70px rgba(30,40,120,.35), inset 0 0 0 2px #2a2f4a;
}
.phone img { border-radius: 36px; width: 100%; }
.phone.front { right: 8%; top: 0; z-index: 2; animation: float 7s ease-in-out infinite; }
.phone.back { left: 2%; top: 70px; transform: rotate(-5deg); animation: float 8s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-12px); } }
.phone.back { --r: -5deg; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; text-align: left; }
  .phones { height: 560px; }
  .phone { width: 230px; }
}
@media (prefers-reduced-motion: reduce) { .phone, .orb { animation: none !important; } html { scroll-behavior: auto; } }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-top: 14px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { padding: 26px; border-radius: var(--radius); }
.card .ico {
  width: 52px; height: 52px; border-radius: 16px; background: var(--grad-diag); display: grid; place-items: center;
  margin-bottom: 18px; box-shadow: 0 10px 22px rgba(69,96,240,.35);
}
.card .ico svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card p { color: var(--muted); margin-top: 8px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }
.step { text-align: center; }
.step .num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-family: var(--font); margin-bottom: 14px; }
.step p { color: var(--muted); margin: 8px auto 22px; max-width: 22em; }
.step .phone { position: relative; width: 240px; margin-inline: auto; animation: none; }

/* Privacy band */
.band { background: #000818; color: #EEF0F4; border-radius: 40px; padding: 56px clamp(24px, 5vw, 64px); position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; width: 480px; height: 480px; right: -120px; top: -160px; border-radius: 50%; background: var(--grad-diag); filter: blur(100px); opacity: .55; }
.band > * { position: relative; }
.band p { color: #9AA6D6; max-width: 40em; margin-top: 14px; font-size: 1.08rem; }
.ticks { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
@media (max-width: 700px) { .ticks { grid-template-columns: 1fr; } }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.ticks svg { flex: none; width: 24px; height: 24px; stroke: #7FE0A6; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.band .btn.glass-btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 30px; border-radius: var(--radius); }
.plan.pro { border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; }
.plan h3 { font-size: 1.4rem; }
.plan .tag { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: var(--lilac); color: var(--accent); font-weight: 700; font-size: .85rem; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; color: var(--muted); }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 800; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
details { padding: 6px 22px; border-radius: var(--radius-sm); }
summary { cursor: pointer; font-weight: 700; padding: 16px 0; font-family: var(--font); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 18px; }

/* Disclaimer + footer */
.disclaimer { padding: 20px 24px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); font-size: .95rem; }
footer { padding: 40px 0 56px; color: var(--muted); font-size: .92rem; }
.foot { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; margin-top: 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.signature { font-weight: 600; }

/* Legal pages */
.legal { max-width: 780px; padding: 56px 0 40px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal .meta { color: var(--muted); margin: 12px 0 32px; }
.legal h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; }
.legal .sum { padding: 22px 24px; border-radius: var(--radius-sm); margin-bottom: 8px; }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--glass-edge); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 700; }
.todo { background: #FFF1D6; color: #7A4A06; padding: 2px 8px; border-radius: 8px; font-weight: 700; }

@media (max-width: 600px) {
  .phones { height: auto; }
  .phone.back { display: none; }
  .phone.front { position: relative; right: auto; margin-inline: auto; width: 250px; }
}

@media (max-width: 600px) {
  .legal table { table-layout: fixed; font-size: .85rem; }
  .legal th, .legal td { padding: 8px 6px; overflow-wrap: anywhere; }
}
