/* ==========================================================================
   MedCod RO — site de prezentare
   Stil „aero”: sticlă mată, straturi, lumină. Temă dublă (light/dark).
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light dark;

  --brand-1: #0891B2;
  --brand-2: #059669;
  --accent: #0891B2;
  --accent-ink: #0E7490; /* varianta pentru text mic: contrast AA pe fundalul deschis */

  --bg: #ECFEFF;
  --bg-solid: #F7FEFF;
  --ink: #164E63;
  --ink-2: #3B6B7F;
  --ink-3: #5C8699;
  --link: #0891B2;

  --glass: rgba(255, 255, 255, 0.58);
  --glass-2: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.9);
  --stroke: rgba(11, 16, 41, 0.1);
  --stroke-2: rgba(11, 16, 41, 0.16);
  --sheen: linear-gradient(155deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 42%);

  --shadow-s: 0 2px 8px rgba(19, 30, 82, 0.06), 0 12px 28px -18px rgba(19, 30, 82, 0.35);
  --shadow-m: 0 4px 14px rgba(19, 30, 82, 0.07), 0 26px 50px -26px rgba(19, 30, 82, 0.4);
  --shadow-l: 0 8px 24px rgba(19, 30, 82, 0.09), 0 48px 90px -40px rgba(19, 30, 82, 0.45);

  --ok: #059669;
  --warn: #c2410c;
  --pill: rgba(8, 145, 178, 0.1);

  --metal: linear-gradient(150deg, #e6eaf7 0%, #9aa3c0 26%, #f8faff 48%, #7d87a6 74%, #d5dcee 100%);
  --metal-edge: rgba(255, 255, 255, 0.9);

  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --r-xl: 34px;

  --maxw: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);

  --font-display: "Figtree", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1721;
    --bg-solid: #13222E;
    --ink: #DFF3F7;
    --ink-2: #9FC4CF;
    --ink-3: #7FA8B3;
    --link: #22D3EE;
    --accent: #22D3EE;
    --accent-ink: #22D3EE;

    --glass: rgba(255, 255, 255, 0.055);
    --glass-2: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.13);
    --stroke: rgba(255, 255, 255, 0.11);
    --stroke-2: rgba(255, 255, 255, 0.2);
    --sheen: linear-gradient(155deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 45%);

    --shadow-s: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-m: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
    --shadow-l: 0 36px 80px -40px rgba(0, 0, 0, 0.95);

    --ok: #34D399;
    --warn: #fb923c;
    --pill: rgba(34, 211, 238, 0.16);

    --metal: linear-gradient(150deg, #333b5c 0%, #131a33 26%, #525d84 48%, #0f1428 74%, #2a3150 100%);
    --metal-edge: rgba(255, 255, 255, 0.16);
  }
}

:root[data-theme="dark"] {
  --bg: #0B1721;
  --bg-solid: #13222E;
  --ink: #DFF3F7;
  --ink-2: #9FC4CF;
  --ink-3: #7FA8B3;
  --link: #22D3EE;
  --accent: #22D3EE;
  --accent-ink: #22D3EE;

  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.13);
  --stroke: rgba(255, 255, 255, 0.11);
  --stroke-2: rgba(255, 255, 255, 0.2);
  --sheen: linear-gradient(155deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 45%);

  --shadow-s: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-m: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
  --shadow-l: 0 36px 80px -40px rgba(0, 0, 0, 0.95);

  --ok: #34D399;
  --warn: #fb923c;
  --pill: rgba(34, 211, 238, 0.16);

  --metal: linear-gradient(150deg, #333b5c 0%, #131a33 26%, #525d84 48%, #0f1428 74%, #2a3150 100%);
  --metal-edge: rgba(255, 255, 255, 0.16);
}

/* ---------- 2. Bază ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  /* „clip” nu creează un container de derulare, deci position:sticky rămâne funcțional */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  line-height: 1.65;
  font-feature-settings: "cv02", "cv03", "cv04";
  -webkit-font-smoothing: antialiased;
}

/* straturile de lumină din fundal */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(58rem 42rem at 12% -8%, rgba(8, 145, 178, 0.24), transparent 62%),
    radial-gradient(46rem 38rem at 92% 6%, rgba(5, 150, 105, 0.22), transparent 60%),
    radial-gradient(52rem 44rem at 78% 88%, rgba(8, 145, 178, 0.16), transparent 64%),
    radial-gradient(40rem 34rem at 6% 74%, rgba(5, 150, 105, 0.14), transparent 62%);
}

:root[data-theme="dark"] body::before { opacity: 0.75; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before { opacity: 0.75; }
}

body::after {
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 100%);
}

img { max-width: 100%; display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.021em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 1.5rem + 4.1vw, 4.15rem); font-weight: 800; }
h2 { font-size: clamp(1.85rem, 1.3rem + 2.4vw, 2.9rem); font-weight: 800; }
h3 { font-size: clamp(1.15rem, 1.02rem + 0.6vw, 1.4rem); font-weight: 700; letter-spacing: -0.012em; }
h4 { font-size: 1.05rem; font-weight: 700; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

::selection { background: rgba(8, 145, 178, 0.22); }

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--bg-solid);
  color: var(--ink);
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-s);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 0.75rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- 3. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 46rem; }

section { position: relative; }
.section { padding-block: clamp(2.25rem, 4.5vw, 4rem); }
.section--tight { padding-block: clamp(1.5rem, 3vw, 2.5rem); }

.section-head { max-width: 44rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-2); font-size: 1.08em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
}
.section-head--center .eyebrow::before { display: none; }

.grad {
  background: linear-gradient(105deg, var(--brand-1) 8%, var(--brand-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme="dark"] .grad { background: linear-gradient(105deg, #22D3EE 5%, #34D399 95%); -webkit-background-clip: text; background-clip: text; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grad { background: linear-gradient(105deg, #22D3EE 5%, #34D399 95%); -webkit-background-clip: text; background-clip: text; }
}

/* ---------- 4. Sticlă ---------- */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-m);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sheen);
  pointer-events: none;
}
.glass > * { position: relative; }

/* ---------- 5. Antet ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 0.6rem;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.site-header.is-stuck {
  border-bottom-color: var(--stroke);
  box-shadow: 0 10px 30px -22px rgba(19, 30, 82, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand-icon { border-radius: 22%; display: block; box-shadow: var(--shadow-s); flex: none; }
.brand:hover { text-decoration: none; }

.site-nav { display: flex; align-items: center; gap: 0.2rem; }
.site-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--glass-2); }

.header-tools { display: flex; align-items: center; gap: 0.45rem; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--glass-2);
  border: 1px solid var(--stroke);
}
.lang-switch a {
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-3);
  text-decoration: none;
  transition: 0.2s;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 4px 12px -4px rgba(8, 145, 178, 0.7);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--glass-2);
  color: var(--ink-2);
  cursor: pointer;
  transition: 0.2s;
  flex: none;
}
.icon-btn:hover { color: var(--ink); border-color: var(--stroke-2); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .icon-moon { display: none; }
:root[data-theme="dark"] .icon-btn .icon-moon { display: block; }
:root[data-theme="dark"] .icon-btn .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .icon-moon { display: block; }
  :root:not([data-theme="light"]) .icon-btn .icon-sun { display: none; }
}

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: var(--gutter);
    left: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.6rem;
    border-radius: var(--r-m);
    /* meniul stă peste conținut: are nevoie de fundal aproape opac */
    background: var(--bg-solid);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-l);
    -webkit-backdrop-filter: blur(26px) saturate(1.7);
    backdrop-filter: blur(26px) saturate(1.7);
  }
  .site-nav[hidden] { display: none; }
  .site-nav a { padding: 0.7rem 0.85rem; font-size: 1rem; }
}

/* ---------- 6. Butoane ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1) 0%, #0D9488 45%, var(--brand-2) 100%);
  box-shadow: 0 10px 26px -10px rgba(8, 145, 178, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn--primary:hover { box-shadow: 0 16px 34px -12px rgba(8, 145, 178, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.4); }

.btn--ghost {
  color: var(--ink);
  background: var(--glass-2);
  border-color: var(--stroke-2);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.btn--block { width: 100%; }

/* badge-uri magazine */
.store-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 1.15rem 0.66rem;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(165deg, #23262f, #0a0c12);
  color: #fff;
  min-width: 12.6rem;
  box-shadow: var(--shadow-m);
  transition: transform 0.18s, box-shadow 0.22s;
}
.store-badge:hover { transform: translateY(-2px); text-decoration: none; }
.store-badge svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store-badge span { display: block; }
.store-badge .sb-top { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.78; line-height: 1.4; }
.store-badge .sb-main { font-family: var(--font-display); font-size: 1.16rem; font-weight: 700; line-height: 1.15; }
.store-badge--soon {
  background: var(--glass-2);
  color: var(--ink-2);
  border: 1px dashed var(--stroke-2);
  box-shadow: none;
}
.store-badge--soon .sb-main { color: var(--ink); }

/* ---------- 7. Erou ---------- */
.hero { padding-block: clamp(2rem, 4.5vw, 4rem) clamp(1.5rem, 3.5vw, 3rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  margin-bottom: 0.45em;
  /* Titlul are două rânduri fixate cu <br>; al doilea nu se mai rupe singur,
     iar mărimea coboară puțin pe ecrane înguste ca să încapă. */
  font-size: clamp(2.05rem, 1.05rem + 3.4vw, 3.6rem);
  text-wrap: balance;
}
.hero h1 .grad { white-space: nowrap; }
.hero-lead { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.24rem); color: var(--ink-2); max-width: 34rem; }
.hero-sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.12rem, 1rem + 0.7vw, 1.45rem);
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: -0.15rem 0 0.85rem;
}
.hero .store-row { margin-top: 1.8rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.6rem; list-style: none; padding: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  background: var(--glass-2);
  border: 1px solid var(--stroke);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-2);
}
.tag svg { width: 14px; height: 14px; color: var(--ok); flex: none; }

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.5rem;
  border-radius: 999px;
  background: var(--pill);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent-ink);
  font-size: 0.83rem;
  font-weight: 700;
  margin-bottom: 1.3rem;
}
.pill-badge b {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- 8. Telefon (ramă desenată în CSS) ---------- */
.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding-block: 1rem;
}

.phone {
  position: relative;
  width: 100%;
  max-width: 292px;
  aspect-ratio: 620 / 1348;
  padding: 9px;
  border-radius: 13.4%/6.2%;
  background: var(--metal);
  box-shadow:
    0 0 0 1px var(--metal-edge) inset,
    var(--shadow-l);
  flex: 0 1 auto;
}
.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(148deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0) 66%, rgba(255, 255, 255, 0.22) 100%);
  pointer-events: none;
}
.phone__screen {
  position: relative;
  height: 100%;
  width: 100%;
  border-radius: 12.4%/5.7%;
  overflow: hidden;
  background: #f2f2f7;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.phone__side,
.phone__side--b {
  position: absolute;
  right: -2px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #aeb6cd, #6f789a);
  opacity: 0.85;
}
.phone__side { top: 22%; height: 9%; }
.phone__side--b { top: 15%; height: 5%; left: -2px; right: auto; }

.phone--sm { max-width: 216px; margin-bottom: 6%; }
.phone--tilt-l { transform: rotate(-3.2deg); }
.phone--tilt-r { transform: rotate(3deg); }

/* cardul plutitor de notificare */
.float-card {
  position: absolute;
  z-index: 3;
  padding: 0.85rem 1.05rem;
  border-radius: var(--r-m);
  /* aproape opac: cardul stă peste captura de ecran, deci textul trebuie să rămână lizibil */
  background: color-mix(in srgb, var(--bg-solid) 88%, transparent);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-l);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 17.5rem;
  animation: float 7s ease-in-out infinite;
}
.float-card--tl { top: 6%; left: -6%; }
.float-card--br { bottom: 11%; right: -5%; animation-delay: -3.5s; }
.float-card .fc-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--brand-1), var(--brand-2));
  color: #fff;
}
.float-card .fc-icon svg { width: 20px; height: 20px; }
.float-card .fc-t { font-weight: 700; font-size: 0.9rem; line-height: 1.3; }
.float-card .fc-s { font-size: 0.78rem; color: var(--ink-3); line-height: 1.35; }
.float-card .fc-s b { color: var(--warn); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@media (max-width: 1080px) {
  .float-card--tl { left: -2%; }
  .float-card--br { right: -1%; }
}

/* ---------- 9. Bandă de cifre ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.25rem;
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
}
.stat { text-align: center; padding: 0.7rem 0.6rem; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat span { display: block; margin-top: 0.3rem; font-size: 0.85rem; line-height: 1.35; color: var(--ink-3); font-weight: 500; }

/* ---------- 10. Funcții ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: clamp(0.85rem, 1.8vw, 1.35rem);
}

/* Varianta „un card pe rând”: fiecare card își pune textul lângă captură.
   Fără ea, șase capturi portret una sub alta fac secțiunea de două ori mai
   înaltă decât restul paginii la un loc. */
.card-grid--rows { grid-template-columns: minmax(0, 1fr); }

.feature {
  padding: clamp(1.35rem, 2.4vw, 1.85rem);
  border-radius: var(--r-l);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* Numai cardurile-rând poartă captură; cardurile scurte de pe pagina de
   suport folosesc tot `.feature`, dar rămân blocuri obișnuite. */
.card-grid--rows > .feature {
  display: flex;
  /* implicit (ecrane înguste): textul deasupra, captura dedesubt — captura
     stă prima în marcaj ca să rămână lângă <picture>, deci se inversează aici */
  flex-direction: column-reverse;
  align-items: center;
  gap: 1.4rem;
}
.feature__media { display: flex; justify-content: center; padding-block: 0.4rem; }
/* lățime explicită: în cardul centrat pe coloană, `width: 100%` din .phone
   s-ar raporta la un părinte care se strânge după conținut și ar ieși 0 */
.feature__media .phone { width: min(190px, 58vw); max-width: none; margin: 0; }
.feature__body { min-width: 0; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.feature h3 { margin-bottom: 0.45rem; }
.feature p { color: var(--ink-2); font-size: 0.96rem; margin: 0; }

.f-icon {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  margin-bottom: 1.05rem;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(140deg, var(--brand-1), #0D9488 55%, var(--brand-2));
  box-shadow: 0 10px 22px -12px rgba(8, 145, 178, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.f-icon svg { width: 26px; height: 26px; }

@media (min-width: 900px) {
  .card-grid--rows > .feature {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 5vw, 4.5rem);
    /* pe rânduri, înălțimea o dă captura: marginea de sus/jos se strânge ca
       secțiunea să nu depășească ~4.100px pe un ecran de 1280px */
    padding-block: clamp(0.9rem, 1.4vw, 1.25rem);
  }
  .card-grid--rows { gap: 1rem; }
  /* rândurile alternează partea pe care stă telefonul */
  .card-grid--rows > .feature:nth-child(even) { flex-direction: row; }
  .card-grid--rows > .feature > .feature__media { flex: 0 0 auto; }
  .feature__media .phone { width: 210px; }
  .feature__body { flex: 0 1 30rem; }
  /* pe un rând întreg, paragraful ar ajunge la peste 100 de caractere pe rând */
  .feature__body p { max-width: 46ch; }
}

/* ---------- 11. Showcase (text + telefoane) ---------- */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.showcase--flip .showcase__media { order: -1; }
.showcase__media { display: flex; justify-content: center; gap: clamp(0.75rem, 2vw, 1.4rem); }

.check-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.check-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-2); }
.check-list svg { width: 20px; height: 20px; flex: none; margin-top: 0.18rem; color: var(--accent); }
.check-list b { color: var(--ink); font-weight: 700; }


/* ---------- 12. Utilitare de text ---------- */
.fine-print { margin-top: 1.4rem; max-width: 34rem; font-size: 0.83rem; color: var(--ink-3); }
.center { text-align: center; }
.mt-l { margin-top: 1.5rem; }
.mt-xl { margin-top: 1.75rem; }

/* ---------- 13. Descărcare + QR ---------- */
.download-card { padding: clamp(1.6rem, 4vw, 3rem); }
.download-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}
.qr-row { display: flex; gap: clamp(0.85rem, 2vw, 1.35rem); flex-wrap: wrap; justify-content: center; }
.qr-slot {
  width: 10.5rem;
  padding: 0.85rem;
  border-radius: var(--r-m);
  background: var(--glass-2);
  border: 1px solid var(--stroke);
  text-align: center;
  box-shadow: var(--shadow-s);
}
.qr-frame {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-s);
  border: 2px dashed color-mix(in srgb, var(--accent) 58%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--accent) 80%, var(--ink));
  margin-bottom: 0.65rem;
}
.qr-frame svg { width: 44%; height: 44%; opacity: 0.55; }
.qr-frame::before,
.qr-frame::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
}
.qr-frame::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.qr-frame::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }
.qr-slot b { display: block; font-size: 0.88rem; font-family: var(--font-display); }
.qr-slot span { display: block; font-size: 0.76rem; color: var(--ink-3); }

/* ---------- 14. FAQ ---------- */
.faq { display: grid; gap: 0.7rem; }
.faq details {
  border-radius: var(--r-m);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-s);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  overflow: hidden;
}
.faq summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.3rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  margin-left: auto;
  width: 11px; height: 11px;
  flex: none;
  border-right: 2.2px solid var(--accent);
  border-bottom: 2.2px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq summary:hover { background: var(--glass-2); }
.faq .faq-body { padding: 0 1.3rem 1.25rem; color: var(--ink-2); font-size: 0.98rem; }
.faq .faq-body > :first-child { margin-top: 0; }

/* ---------- 15. Pagini de text ---------- */
.page-hero { padding-block: clamp(2.5rem, 5vw, 4.25rem) clamp(1.25rem, 2.5vw, 2rem); }
.page-hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.15rem); }
.page-hero p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 42rem; }
.updated {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.83rem;
  color: var(--ink-3);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--glass-2);
}
.updated svg { width: 15px; height: 15px; flex: none; color: var(--accent); }

.prose { max-width: 46rem; }
.prose h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  margin-top: 2.6rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--stroke);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { margin-top: 1.7rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.05em; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); }

.callout {
  padding: 1.25rem 1.4rem;
  border-radius: var(--r-m);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow: var(--shadow-s);
  margin-bottom: 2rem;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.callout h2, .callout h3 { margin-top: 0; padding-top: 0; border-top: 0; }
.callout h2 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem); }
.callout > :last-child { margin-bottom: 0; }
.callout ul, .callout ol { padding-left: 1.2rem; margin-bottom: 0; }
.callout li { margin-bottom: 0.45rem; color: var(--ink-2); }
.callout li::marker { color: var(--accent); }
.callout--accent { border-left: 4px solid var(--accent); }

.toc {
  padding: 1.15rem 1.35rem;
  border-radius: var(--r-m);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  margin-bottom: 2.25rem;
}
.toc b { display: block; font-family: var(--font-display); margin-bottom: 0.5rem; font-size: 0.95rem; }
.toc ol { margin: 0; padding-left: 1.15rem; columns: 2; column-gap: 1.75rem; font-size: 0.92rem; }
.toc li { margin-bottom: 0.3rem; break-inside: avoid; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* grupurile de întrebări de pe pagina de suport */
.support-groups > section + section { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.support-groups h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.85vw, 1.6rem);
  margin-bottom: 1rem;
}
.faq-body ol, .faq-body ul { padding-left: 1.2rem; margin: 0 0 0.9em; }
.faq-body li { margin-bottom: 0.45rem; }
.faq-body li::marker { color: var(--accent); }
.faq-body p:last-child, .faq-body ol:last-child, .faq-body ul:last-child { margin-bottom: 0; }

/* ---------- 16. Formular de contact ---------- */
.form-grid { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; align-content: start; }
.field label { font-size: 0.88rem; font-weight: 700; color: var(--ink); }
.field input, .field textarea, .field select {
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  padding: 0.75rem 0.95rem;
  border-radius: var(--r-s);
  border: 1px solid var(--stroke-2);
  background: var(--glass-2);
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  outline: none;
}
.field .hint { font-size: 0.8rem; color: var(--ink-3); }
@media (min-width: 640px) { .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } }

/* ---------- 17. Subsol ---------- */
.site-footer {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-block: clamp(2rem, 4vw, 3rem) 1.75rem;
  border-top: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.footer-brand p { color: var(--ink-3); font-size: 0.92rem; max-width: 22rem; margin-top: 0.9rem; }
.footer-col h2 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); margin-bottom: 0.8rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-col a { color: var(--ink-2); text-decoration: none; font-size: 0.93rem; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom p:last-child { max-width: none; flex: 1 1 100%; }
.footer-bottom {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.35rem;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-3);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- 18. Animații la scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.d1.is-in { transition-delay: 0.08s; }
.js .reveal.d2.is-in { transition-delay: 0.16s; }
.js .reveal.d3.is-in { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .float-card { animation: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- 19. Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .showcase { grid-template-columns: 1fr; }
  .showcase--flip .showcase__media { order: 0; }
  .hero-lead { max-width: none; }
  .download-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .phone { max-width: 240px; }
  .phone--sm { display: none; }
  /* pe ecrane mici cardurile plutitoare ar acoperi captura, deci dispar */
  .float-card { display: none; }
  .store-badge { min-width: 0; flex: 1 1 100%; }
  .phone-stage { flex-direction: column; align-items: center; }
  .phone--tilt-l, .phone--tilt-r { transform: none; }
}

/* Telefoane foarte înguste (≤ 380px, ex. 320–360): „MedCod RO” nu mai are loc
   lângă RO/EN + temă + meniu și s-ar rupe pe două rânduri. Antetul se strânge
   puțin ca logo-ul să rămână pe un singur rând, fără derulare laterală. */
@media (max-width: 380px) {
  .site-header .header-inner { gap: 0.4rem; padding-inline: 0.85rem; }
  .brand { white-space: nowrap; font-size: 1.02rem; gap: 0.4rem; }
  .brand-icon { width: 30px; height: 30px; }
  .header-tools { gap: 0.25rem; }
  .site-header .icon-btn { width: 34px; height: 34px; }
}

@media print {
  .site-header, .site-footer, .phone-stage, .qr-row { display: none; }
  body::before, body::after { display: none; }
  body { background: #fff; color: #000; }
}
