/* Afyvia website (home pages, content pages, legal pages). Light by default; every colour comes from ds.css, so the
   dark option restyles it without a second stylesheet. */
:root { --header-h: 72px; --section-space: clamp(52px, 6.4vw, 88px); --hero-wash: radial-gradient(1100px 520px at 88% -8%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%), radial-gradient(900px 480px at -8% 12%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 60%); scroll-padding-block-start: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font); letter-spacing: -.025em; color: var(--ink); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: var(--font-ar); letter-spacing: 0; }
.section-shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 14px; transition: top .15s; }
.skip-link:focus { top: 12px; }
.home-page main { overflow-x: clip; }

/* ---------- header ---------- */
.site-header-wrap, body > header.site-header { position: sticky; top: 0; z-index: 30; }
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; width: 100%; max-width: none; height: var(--header-h); padding-inline: max(24px, calc((100% - 1180px) / 2)); margin: 0; background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; flex: none; }
.header-menu { display: contents; }
.site-footer .afyvia-brand { --brand-size: 42px; }
.desktop-nav { display: flex; gap: 6px; margin-inline: 22px auto; }
.desktop-nav a { padding: 8px 12px; border-radius: 9px; color: var(--muted); font-size: 14.5px; font-weight: 500; transition: color .15s, background .15s; }
.desktop-nav a:hover { color: var(--ink); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.login-link { padding: 8px 12px; border-radius: 9px; color: var(--ink); font-size: 14.5px; font-weight: 600; transition: background .15s; }
.login-link:hover { background: var(--surface-2); }
.login-link span { color: var(--muted); }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--ink); font-size: 13.5px; font-weight: 600; transition: background .15s, border-color .15s; }
.lang-switch:hover { background: var(--primary-soft); border-color: var(--primary); }
.menu-toggle { display: none; padding: 8px; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; border-radius: 2px; background: var(--ink); }

/* ---------- buttons: primary, outline, light (on the blue band) ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border: 1px solid transparent; border-radius: 11px; background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 15px; transition: background .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.button:hover { background: var(--primary-dark); box-shadow: var(--shadow); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button span { font-size: 17px; line-height: 1; }
.button-small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.button-ghost:hover { background: var(--surface-2); border-color: var(--primary); box-shadow: none; }
.button-light { background: var(--band-text); color: var(--band-ink); }
.button-light:hover { background: var(--band-muted); }
.button-light-outline { background: transparent; color: var(--band-text); border-color: var(--band-muted); }
.button-light-outline:hover { background: var(--band-tint); border-color: var(--band-text); }

/* ---------- common bits ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12.5px; font-weight: 650; letter-spacing: .01em; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.hero h1, .section-intro h2, .workflow h2, .audience h2, .cta h2, .pricing-band h2, .faq h2, .hub h2 { font-weight: 700; line-height: 1.12; }
em { font-style: normal; }
.hero h1 em, .section-intro h2 em, .workflow h2 em, .audience h2 em, .pricing-band h2 em, .faq h2 em { color: var(--primary); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  grid-template-rows: 1fr auto;
  min-block-size: calc(100vh - var(--header-h));
  min-block-size: calc(100dvh - var(--header-h));
  align-items: center;
  gap: 24px clamp(24px, 5vw, 64px);
  padding-block: clamp(42px, 5.5vw, 72px) 26px;
}
.hero::before { content: ""; position: absolute; inset: -72px calc(50% - 50vw) 0; z-index: -1; background: var(--hero-wash); pointer-events: none; }
.hero h1 { margin: 18px 0 16px; font-size: clamp(36px, 4.8vw, 61px); letter-spacing: -.035em; text-wrap: balance; }
.hero-text { max-width: 520px; margin: 0; color: var(--muted); font-size: 17.5px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 24px 0 0; padding: 0; }
.hero-points li { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink); font-weight: 500; }
.hero-points i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.hero-points svg { width: 12px; height: 12px; }
.hero-visual { position: relative; padding: 16px 16px 30px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(155deg, var(--primary-soft), var(--accent-soft)); }
.hero-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.main-card { padding: clamp(16px, 2.2vw, 24px); box-shadow: var(--shadow); }
.card-topline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.card-more { margin-inline-start: auto; font-size: 11.5px; font-weight: 600; }
.patient-heading { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; }
.patient-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; font-weight: 700; }
.patient-heading strong, .patient-heading small { display: block; }
.patient-heading strong { font-size: 14.5px; }
.patient-heading small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.trend { margin-inline-start: auto; padding: 3px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 650; }
.chart { position: relative; height: 170px; }
.chart-grid { position: absolute; inset: 8px 0 26px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, var(--line) 34px); }
.chart svg { position: relative; width: 100%; height: 145px; overflow: visible; }
[dir="rtl"] .chart svg { transform: scaleX(-1); }
.chart .area { fill: url(#chartFill); }
.chart .line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; }
.chart stop { stop-color: var(--primary); }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; }
.metric-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.metric-row small { display: block; color: var(--muted); font-size: 12px; }
.metric-row strong { font-size: 22px; font-weight: 700; }
.mini-progress { flex: 1; height: 7px; border-radius: 7px; background: var(--surface-2); }
.mini-progress i { display: block; width: 86%; height: 100%; border-radius: 7px; background: var(--primary); }
.metric-up { color: var(--ok); font-size: 12.5px; font-weight: 650; }
.exercise-card { position: absolute; z-index: 2; inset-inline-end: 24px; inset-block-end: -12px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; max-width: 236px; }
.exercise-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 17px; }
.exercise-card small, .exercise-card strong { display: block; }
.exercise-card small { color: var(--muted); font-size: 11.5px; }
.exercise-card strong { font-size: 14px; margin-top: 2px; }

/* ---------- sections ---------- */
.platform { padding-block: var(--section-space); border-top: 1px solid var(--line); }
.section-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px 56px; align-items: end; }
.section-intro h2 { font-size: clamp(30px, 3.8vw, 46px); margin: 16px 0 0; }
.section-intro p { margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.7; }
.section-intro .eyebrow { grid-column: 1 / -1; justify-self: start; }
.feature-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 20px; margin-top: clamp(26px, 4vw, 44px); }
.feature-card { position: relative; display: flex; flex-direction: column; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 0 18px; border-radius: 13px; }
.feature-icon svg { width: 22px; height: 22px; }
.feature-icon.teal { background: var(--accent-soft); color: var(--accent); }
.feature-icon.purple { background: var(--blue-soft); color: var(--blue); }
.feature-icon.coral { background: var(--purple-soft); color: var(--purple); }
.feature-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.feature-card > a { display: flex; justify-content: space-between; margin-top: 18px; color: var(--primary); font-weight: 600; font-size: 14.5px; }
.plan-preview { margin-top: 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.preview-head { display: flex; justify-content: space-between; padding-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 500; }
.preview-head > span:last-child { color: var(--accent); font-weight: 650; }
.preview-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.preview-line i { width: 10px; height: 10px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.preview-line i.done { background: var(--accent); border-color: var(--accent); }
.preview-line b { margin-inline-start: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 92px; margin-top: auto; padding-top: 28px; }
.bars span { flex: 1; border-radius: 6px 6px 0 0; background: color-mix(in srgb, var(--blue) 24%, var(--card)); }
.bars span.active { background: var(--blue); }
.message-preview { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.message-avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--purple-soft); color: var(--purple); font-size: 10px; font-weight: 700; }
.message-preview small { color: var(--purple); font-size: 12px; font-weight: 600; }
.message-preview p { margin: 3px 0 0; color: var(--ink); font-size: 13.5px; }
.message-time { margin-inline-start: auto; color: var(--muted); font-size: 11.5px; }

.workflow { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding: 96px 0; border-top: 1px solid var(--line); }
.workflow-visual { position: relative; }
.circle-core, .workflow-circle::before, .workflow-circle::after { display: none; }
.workflow-circle { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.flow-node { position: static; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 130px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); font-size: 17px; font-weight: 650; color: var(--ink); }
.flow-node span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); font-size: 13px; font-weight: 700; }
.flow-node:nth-child(2n) { transform: translateY(18px); }
.workflow h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 16px 0 18px; }
.workflow-copy > p { margin: 0; max-width: 480px; color: var(--muted); font-size: 16.5px; line-height: 1.7; }
.step-list { margin-top: 30px; display: grid; gap: 4px; }
.step { display: flex; gap: 16px; padding: 16px 18px; border-radius: 14px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.step.active, .step:hover { background: var(--card); border-color: var(--line); box-shadow: var(--shadow-sm); }
.step > span { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 700; }
.step strong, .step small { display: block; }
.step strong { font-size: 15.5px; }
.step small { margin-top: 3px; color: var(--muted); font-size: 14px; }

.audience { padding: 8px 0 100px; }
.audience-heading { margin-bottom: 40px; }
.audience h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 16px 0 0; }
.audience-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.audience-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: 22px; }
.doctor-card { background: linear-gradient(145deg, var(--primary-soft), var(--card)); }
.patient-card { background: linear-gradient(145deg, var(--accent-soft), var(--card)); }
.patient-card .audience-label, .patient-card > a { color: var(--accent); }
.audience-label { color: var(--primary-dark); font-size: 12.5px; font-weight: 650; letter-spacing: .02em; }
.audience-card h3 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; line-height: 1.15; margin: 16px 0 12px; }
.audience-card p { max-width: 330px; margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.audience-card > a { display: inline-flex; gap: 12px; margin-top: 18px; color: var(--primary-dark); font-weight: 650; font-size: 15px; }
.audience-art { display: none; }
.mock-doctor { align-self: center; width: min(100%, 330px); margin-block-start: 26px; padding: 16px 16px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-lg); }
.mock-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.mock-head b { font-size: 14px; }
.mock-head > span { padding: 3px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 11px; font-weight: 600; }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.mock-row strong, .mock-row small { display: block; }
.mock-row strong { font-size: 13px; }
.mock-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.mock-av { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft); color: var(--primary-dark); font-size: 10.5px; font-weight: 700; }
.mock-row em { margin-inline-start: auto; padding: 3px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 650; }
.mock-row em.ok { background: var(--ok-soft); color: var(--ok); }
.mock-row em.warn { background: var(--warn-soft); color: var(--warn); }
.mock-foot { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.mock-phone { position: relative; align-self: center; width: min(100%, 212px); margin-block-start: 26px; padding: 24px 14px 18px; border: 6px solid var(--ink); border-radius: 32px; background: var(--card); box-shadow: var(--shadow-lg); }
:root[data-theme="dark"] .mock-phone { border-color: #05101a; }
.phone-notch { position: absolute; top: 7px; inset-inline-start: 50%; width: 48px; height: 5px; border-radius: 5px; background: var(--ink); transform: translateX(-50%); }
[dir="rtl"] .phone-notch { transform: translateX(50%); }
.mock-phone > small { display: block; color: var(--muted); font-size: 11px; }
.mock-phone > strong { display: block; margin: 2px 0 9px; font-size: 18px; font-weight: 700; }
.phone-bar { height: 6px; margin-bottom: 11px; border-radius: 6px; background: var(--surface-2); }
.phone-bar i { display: block; width: 66%; height: 100%; border-radius: 6px; background: var(--accent); }
.phone-task { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 11.5px; }
.phone-task i { display: grid; place-items: center; flex: none; width: 17px; height: 17px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.phone-task.done { color: var(--muted); text-decoration: line-through; }
.phone-task.done i { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.phone-task svg { width: 10px; height: 10px; }
.phone-msg { margin-top: 10px; padding: 9px 10px; border-radius: 12px 12px 12px 4px; background: var(--primary-soft); color: var(--ink); font-size: 10.5px; line-height: 1.45; }
[dir="rtl"] .phone-msg { border-radius: 12px 12px 4px 12px; }
.phone-msg b { display: block; margin-bottom: 2px; color: var(--primary-dark); font-size: 10px; }

.pricing-band { padding: 0 0 100px; }
.pricing-band-inner { display: grid; grid-template-columns: 1.3fr 1fr auto; align-items: center; gap: 40px; padding: 44px 48px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.pricing-band h2 { font-size: clamp(28px, 3vw, 38px); margin: 16px 0 14px; }
.pricing-band-copy p { margin: 0; max-width: 480px; color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.pricing-band-points { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.pricing-band-points li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); }
.pricing-band-points b { min-width: 40px; font-size: 22px; font-weight: 700; color: var(--primary); }
.pricing-band-points span { font-size: 14.5px; }

.hub { padding: 8px 0 24px; }
.hub h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 16px 0 28px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 252px), 1fr)); gap: 16px; }
.hub-card { display: grid; gap: 8px; align-content: start; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s; }
.hub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.hub-card strong { font-size: 16px; line-height: 1.4; color: var(--ink); }
.hub-card span { color: var(--muted); font-size: 14px; line-height: 1.65; }

.faq { padding: 72px 0 100px; border-top: 1px solid var(--line); }
.faq h2 { font-size: clamp(30px, 3.6vw, 42px); margin: 16px 0 32px; }
.faq-list { display: grid; gap: 12px; max-width: 880px; }
.faq details, .seo-page details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; transition: border-color .2s, box-shadow .2s; }
.faq details[open], .seo-page details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq summary, .seo-page summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 0; list-style: none; cursor: pointer; font-size: 16px; font-weight: 650; }
.faq summary::-webkit-details-marker, .seo-page summary::-webkit-details-marker { display: none; }
.faq summary::after, .seo-page summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 10px no-repeat, var(--primary-soft); color: var(--primary-dark); }
.faq details[open] summary::after, .seo-page details[open] summary::after { background-size: 10px 2px, 0 0, auto; }
.faq details p, .seo-page details p { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.75; }

.cta { padding-bottom: 96px; }
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 60px 64px; overflow: hidden; border-radius: 24px; background: linear-gradient(120deg, var(--band-start), var(--band-end)); color: var(--band-text); }
.cta-inner::after { content: ""; position: absolute; width: 380px; height: 380px; inset-inline-end: -110px; top: -170px; border-radius: 50%; background: var(--band-tint); pointer-events: none; }
.cta .eyebrow { background: var(--band-tint); color: var(--band-text); }
.cta :focus-visible { outline-color: var(--band-accent); }
.cta .eyebrow-dot { background: var(--band-accent); box-shadow: none; }
.cta h2 { position: relative; z-index: 1; margin: 18px 0 0; font-size: clamp(28px, 3.4vw, 42px); color: var(--band-text); }
.cta h2 em { color: var(--band-accent); }
.cta-side { position: relative; z-index: 1; max-width: 440px; }
.cta-side p { margin: 0 0 22px; color: var(--band-muted); font-size: 15px; line-height: 1.65; }
.cta-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cta-secondary { flex-basis: 100%; color: var(--band-text); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- footer ---------- */
.site-footer { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px 28px; padding: 36px 0 44px; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer p { margin: 0; font-size: 14px; }
.footer-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; }
.footer-links a { color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--primary); }
.site-footer > small { grid-column: 1 / -1; font-size: 13px; }

/* ---------- content and legal pages ---------- */
.seo-page { max-width: 820px; padding: 56px 0 96px; }
.seo-page .crumbs { margin-bottom: 26px; color: var(--muted); font-size: 13.5px; }
.seo-page .crumbs a { color: var(--primary); }
.seo-page h1 { margin: 0 0 20px; font-size: clamp(32px, 4.6vw, 48px); font-weight: 700; line-height: 1.15; letter-spacing: -.03em; }
.seo-page .lead { margin: 0 0 40px; color: var(--ink); font-size: 18.5px; line-height: 1.75; }
.seo-page section { margin: 0 0 40px; }
.seo-page h2 { margin: 0 0 14px; font-size: clamp(22px, 2.8vw, 27px); font-weight: 700; line-height: 1.3; }
.seo-page p { margin: 0 0 14px; color: var(--muted); font-size: 16.5px; line-height: 1.8; }
.seo-page ul { margin: 0 0 6px; padding-inline-start: 22px; color: var(--muted); line-height: 1.8; }
.seo-page li { margin-bottom: 6px; }
.seo-page li::marker { color: var(--accent); }
.seo-page .faq-block { padding-top: 28px; border-top: 1px solid var(--line); }
.seo-page .faq-list { display: grid; gap: 12px; }
.seo-page .related ul { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; list-style: none; }
.seo-page .related a { display: inline-block; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--primary-dark); font-weight: 600; transition: border-color .15s, background .15s; }
.seo-page .related a:hover { border-color: var(--primary); background: var(--primary-soft); }
.seo-page .seo-cta { padding: 34px 30px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(130deg, var(--primary-soft), var(--accent-soft)); }
.seo-page .seo-cta p { margin-bottom: 20px; color: var(--ink); }
[dir="rtl"] .seo-page h1, [dir="rtl"] .seo-page h2 { line-height: 1.4; letter-spacing: 0; }
[dir="rtl"] .seo-page .lead, [dir="rtl"] .seo-page p, [dir="rtl"] .seo-page ul { line-height: 1.95; }
[dir="rtl"] .hero h1, [dir="rtl"] .section-intro h2, [dir="rtl"] .workflow h2, [dir="rtl"] .audience h2, [dir="rtl"] .cta h2, [dir="rtl"] .pricing-band h2 { line-height: 1.35; letter-spacing: 0; }
[dir="rtl"] .eyebrow { letter-spacing: 0; }

/* ---------- tablet and phone ---------- */
@media (max-width: 1000px) {
  .site-header { padding-inline: 20px; gap: 10px; }
  .site-header .desktop-nav, .site-header .header-actions { display: none; }
  .menu-toggle { display: block; margin-inline-start: 4px; }
  .lang-switch { margin-inline-start: auto; }
  .mobile-open .desktop-nav, .mobile-open .header-actions { display: flex; }
  .mobile-open .desktop-nav { position: absolute; top: 100%; inset-inline: 0; margin: 0; flex-direction: column; gap: 0; padding: 10px 20px 4px; background: var(--card); border-bottom: 1px solid var(--line); }
  .mobile-open .desktop-nav a { padding: 13px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .mobile-open .header-actions { position: absolute; top: calc(100% + 150px); inset-inline: 0; padding: 14px 20px 18px; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); justify-content: space-between; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; align-content: center; gap: 22px; padding-block: 32px 26px; }
  .hero-visual { max-width: 560px; width: 100%; margin-inline: auto; }
  .section-intro { grid-template-columns: 1fr; gap: 18px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-large { grid-column: 1 / -1; }
  .workflow { grid-template-columns: 1fr; gap: 40px; padding: 72px 0; }
  .pricing-band-inner { grid-template-columns: 1fr; gap: 26px; padding: 34px 28px; }
  .pricing-band-inner .button { justify-self: start; }
  .cta-inner { flex-direction: column; align-items: flex-start; padding: 44px 36px; }
}
@media (max-width: 680px) {
  .section-shell { width: calc(100% - 36px); }
  :root { --header-h: 64px; }
  .site-header .afyvia-brand { --brand-size: 44px; }
  .mobile-open .header-actions { flex-wrap: wrap; gap: 10px; }
  .hero h1 { font-size: clamp(32px, 8vw, 42px); }
  .hero-text { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .hero-points { flex-direction: column; margin-top: 28px; gap: 10px; }
  .hero-visual { padding: 10px; border-radius: 20px; }
  .hero-visual .chart { height: 132px; }
  .hero-visual .chart svg { height: 108px; }
  .main-card { width: 100%; }
  .exercise-card { display: none; }
  .platform { padding: 64px 0; }
  .feature-grid { grid-template-columns: 1fr; margin-top: 32px; }
  .workflow-circle { grid-template-columns: 1fr 1fr; gap: 12px; }
  .flow-node { min-height: 104px; padding: 16px; font-size: 15px; }
  .flow-node:nth-child(2n) { transform: none; }
  .audience { padding-bottom: 64px; }
  .audience-cards { grid-template-columns: 1fr; }
  .audience-card { height: auto; padding: 28px 24px 30px; }
  .mock-doctor, .mock-phone { position: relative; inset: auto; bottom: auto; margin: 26px auto 0; }
  .mock-doctor { width: 100%; max-width: 330px; }
  .mock-phone { width: 210px; }
  .pricing-band { padding-bottom: 64px; }
  .faq { padding: 56px 0 72px; }
  .faq summary, .seo-page summary { font-size: 15px; }
  .cta { padding-bottom: 64px; }
  .cta-inner { padding: 36px 24px; }
  .cta-buttons, .cta-buttons .button { width: 100%; }
  .site-footer { grid-template-columns: 1fr; }
  .seo-page { padding: 36px 0 64px; }
}

/* very small phones: the header (logo, language, theme, menu) must fit in one row */
@media (max-width: 420px) {
  .site-header { padding-inline: 14px; gap: 6px; }
  .site-header .afyvia-brand { --brand-size: 40px; }
  .lang-switch { height: 36px; padding: 0 11px; font-size: 13px; }
  .theme-toggle { width: 36px; height: 36px; }
  .menu-toggle { padding: 6px; margin-inline-start: 0; }
}
@media (max-width: 350px) {
  .site-header .afyvia-brand { --brand-size: 36px; }
  .lang-switch { padding: 0 9px; font-size: 12.5px; }
  .site-header { padding-inline: 10px; }
}
/* ---------- home page flow ---------- */
.scroll-cue { grid-column: 1 / -1; justify-self: center; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; color: var(--primary-dark); font-size: 14px; font-weight: 650; }
.scroll-cue svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scroll-cue:hover { text-decoration: underline; }
.home-page .workflow, .home-page .faq { position: relative; isolation: isolate; border: 0; }
.home-page .workflow::before, .home-page .faq::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: var(--bg-alt); border-block: 1px solid var(--line); }
.home-page .platform, .home-page .workflow, .home-page .audience, .home-page .hub, .home-page .faq { padding-block: var(--section-space); }
.home-page .pricing-band { padding-block: 0 var(--section-space); }
.home-page .cta { padding-block: var(--section-space); }
.home-page .feature-card > a:hover, .home-page .audience-card > a:hover { text-decoration: underline; }


@media (max-width: 1000px) {
  .home-page .header-menu { display: none; }
  .home-page .mobile-open .header-menu { position: absolute; display: grid; gap: 10px; inset-block-start: calc(100% + 8px); inset-inline: 12px; max-height: calc(100dvh - var(--header-h) - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow-lg); }
  .home-page .mobile-open .desktop-nav, .home-page .mobile-open .header-actions { position: static; min-width: 0; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
  .home-page .mobile-open .desktop-nav a { border: 0; border-radius: 9px; }
  .home-page .mobile-open .header-actions { padding-block-start: 10px; border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .home-page .hero { gap: 20px; padding-block-start: 28px; }
  .home-page .feature-card { padding: 22px; }
  .home-page .workflow-copy { grid-row: 1; }
  .home-page .scroll-cue { margin-block-start: -4px; }
}
@media (max-width: 680px) and (max-height: 1050px) {
  .home-page .hero { gap: 16px; padding-block: 20px; }
  .hero h1 { margin-block: 12px; }
  .hero-actions, .hero-points { margin-block-start: 16px; }
  .hero-points { flex-direction: row; gap: 8px 14px; }
  .hero-visual .patient-heading, .hero-visual .chart { display: none; }
}
@media (max-width: 680px) and (max-height: 660px) {
  .hero-visual { display: none; }
}

/* The homepage uses short, one-time transitions to introduce its content. */
.home-page main { animation: none; }
.counting { display: inline-grid; font-variant-numeric: tabular-nums; }
.counting > span { grid-area: 1 / 1; }
.counting > span:first-child { color: transparent; }
.counting > [aria-hidden] { justify-self: end; }

@media (prefers-reduced-motion: no-preference) {
  .home-page .hero-copy { animation: home-enter .44s var(--ease); }
  .home-page .hero-visual { animation: home-enter .58s var(--ease); }
  .home-page .hero-visual .line { animation: home-chart .85s var(--ease); }
  .home-page .mini-progress i {
    transform-origin: left;
    animation: home-metric .62s var(--ease) .15s backwards;
  }
  [dir="rtl"] .home-page .mini-progress i { transform-origin: right; }
  .home-page .reveal-pending:not(:focus-within) { opacity: 0; translate: 0 14px; }
  .home-page .reveal.visible { animation: home-reveal .7s var(--ease); }
  .home-page .feature-card.visible .bars span {
    transform-origin: bottom;
    animation: home-bars .66s var(--ease) var(--bar-delay, .14s) backwards;
  }
  .home-page .bars span:nth-child(2) { --bar-delay: .18s; }
  .home-page .bars span:nth-child(3) { --bar-delay: .22s; }
  .home-page .bars span:nth-child(4) { --bar-delay: .26s; }
  .home-page .bars span:nth-child(5) { --bar-delay: .3s; }
  .home-page .bars span:nth-child(6) { --bar-delay: .34s; }
  .home-page .mobile-open .header-menu { animation: home-menu .2s var(--ease); }
  .home-page .scroll-cue svg { transition: transform .2s var(--ease); }
  .home-page .scroll-cue:focus-visible svg { transform: translateY(3px); }

  @keyframes home-enter {
    from { opacity: .86; translate: 0 8px; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes home-reveal {
    from { opacity: 0; translate: 0 14px; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes home-chart {
    from { stroke-dasharray: 1; stroke-dashoffset: 1; }
    to { stroke-dasharray: 1; stroke-dashoffset: 0; }
  }
  @keyframes home-metric { from { transform: scaleX(0); } }
  @keyframes home-bars { from { transform: scaleY(0); } }
  @keyframes home-menu {
    from { opacity: .86; translate: 0 -4px; }
    to { opacity: 1; translate: 0 0; }
  }
}
@media (min-width: 1001px) and (prefers-reduced-motion: no-preference) {
  .home-page .reveal-delay.visible { animation-delay: .07s; animation-fill-mode: backwards; }
  .home-page .reveal-delay-two.visible { animation-delay: .14s; animation-fill-mode: backwards; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .home-page .scroll-cue:hover svg { transform: translateY(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .home-page .button:hover,
  .home-page .feature-card:hover,
  .home-page .hub-card:hover { transform: none; }
}
