/* Molarion homepage. One idea carries the page: a real clinic day, told with the real product. */
@font-face { font-family: "Changa"; src: url("../fonts/changa-700.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Changa"; src: url("../fonts/changa-800.woff") format("woff"); font-weight: 800; font-display: swap; }
@font-face { font-family: "NotoAr"; src: url("../fonts/noto-ar-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "NotoAr"; src: url("../fonts/noto-ar-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "NotoAr"; src: url("../fonts/noto-ar-600.woff") format("woff"); font-weight: 600 700; font-display: swap; }

.home-body {
  /* light */
  --h-fg: #10213A; --h-fg2: #44546A; --h-bg: #FFFFFF; --h-alt: #EEF3F7; --h-line: #D9E2EA;
  --h-brand: #0A6FB0; --h-brand-hover: #075A90; --h-link: #0A6FB0; --h-ok: #12A37A;
  --h-frame: #10213A; --h-band: #10213A; --h-band-line: #2A3B55; --h-band-fg: #FFFFFF; --h-band-fg2: #B8C7D8;
  --h-top: rgba(255,255,255,.94); --h-shadow: rgba(16,33,58,.32); --h-chip-bg: #FFFFFF;
  --h-display: "Changa", "NotoAr", system-ui, sans-serif; --h-text: "NotoAr", system-ui, sans-serif;
  margin: 0; background: var(--h-bg); color: var(--h-fg); font-family: var(--h-text); font-size: 18px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.home-body *, .home-body *::before, .home-body *::after { box-sizing: border-box; }
.home-body img { max-width: 100%; height: auto; display: block; }
.home-body a:where(:not(.btn):not(.h-btn)) { color: var(--h-link); }
.home-body h1, .home-body h2, .home-body h3 { font-family: var(--h-display); color: var(--h-fg); margin: 0; letter-spacing: 0; }
.home-body p { margin: 0; }
.h-wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--h-band); color: #fff !important; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
.home-body :focus-visible { outline: 3px solid var(--h-brand); outline-offset: 3px; border-radius: 6px; }

/* header */
.h-top { position: sticky; top: 0; z-index: 40; background: var(--h-top); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--h-line); }
.h-top-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.h-brand img { height: 36px; width: auto; }
.h-nav { display: flex; gap: 26px; margin-inline-start: 12px; }
.h-nav a, .h-link { color: var(--h-fg2); text-decoration: none; font-weight: 500; font-size: 16px; }
.h-nav a:hover, .h-link:hover { color: var(--h-fg); }
.h-top-actions { display: flex; align-items: center; gap: 20px; margin-inline-start: auto; }

/* buttons: one shape, used the same way everywhere */
.h-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 10px;
  background: var(--h-brand); color: #fff !important; font-family: var(--h-display); font-weight: 700; font-size: 18px; text-decoration: none; border: 2px solid var(--h-brand); }
.h-btn:hover { background: var(--h-brand-hover); border-color: var(--h-brand-hover); }
.h-btn-sm { min-height: 42px; padding: 0 18px; font-size: 16px; }
.h-btn-quiet { background: transparent; color: var(--h-fg) !important; border-color: var(--h-line); }
.h-btn-quiet:hover { background: var(--h-alt); border-color: var(--h-line); }
.h-btn-light { background: #fff; color: var(--h-fg) !important; border-color: #fff; }
.h-btn-light:hover { background: var(--h-alt); border-color: var(--h-alt); }
.h-btn-ghost-light { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.45); }
.h-btn-ghost-light:hover { background: rgba(255,255,255,.08); border-color: #fff; }
.h-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* hero: the words on one side, the real calendar running off the edge of the screen on the other */
.h-hero { padding: 64px 0 56px; }
.h-hero-in { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 52px; align-items: center; }
.h-hero h1 { font-size: clamp(34px, 3.7vw, 52px); line-height: 1.18; font-weight: 800; max-width: 14em; text-wrap: balance; }
.h-lead { margin-top: 22px; font-size: 20px; color: var(--h-fg2); max-width: 34em; }
.h-hero .h-actions { margin-top: 32px; }
.h-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15.5px; color: var(--h-fg2); }
.h-facts li { display: flex; align-items: center; gap: 8px; }
.h-facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--h-ok); flex: none; }
.h-hero-shot { position: relative; margin: 0 0 24px; padding-inline-start: 36px; }
.h-shot-desk { border-radius: 14px; border: 1px solid var(--h-line); box-shadow: 0 30px 60px -28px var(--h-shadow); }
.h-shot-phone { position: absolute; width: 26%; bottom: -24px; inset-inline-start: 0; border-radius: 26px; border: 6px solid var(--h-frame); box-shadow: 0 24px 50px -20px var(--h-shadow); }

/* section heads */
.h-head { max-width: 760px; margin-bottom: 48px; }
.h-head h2 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.2; font-weight: 800; }
.h-head p { margin-top: 14px; font-size: 19px; color: var(--h-fg2); }

/* a clinic day: real times down a rail, the real screen beside each moment */
.h-day { padding: 110px 0 60px; }
.h-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.h-timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; inset-inline-start: 46px; width: 2px; background: var(--h-line); }
.h-step { display: grid; grid-template-columns: 94px minmax(0, 5fr) minmax(0, 6fr); gap: 0 40px; align-items: start; padding: 0 0 84px; position: relative; }
.h-time { position: relative; z-index: 1; justify-self: start; background: var(--h-chip-bg); font-family: var(--h-display); font-weight: 700; font-size: 17px;
  color: var(--h-brand); padding: 4px 0; direction: ltr; width: 94px; text-align: center; border: 2px solid var(--h-line); border-radius: 999px; }
.h-step-text h3 { font-size: 27px; line-height: 1.3; font-weight: 700; }
.h-step-text p { margin-top: 10px; color: var(--h-fg2); max-width: 30em; }
.h-checks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; font-size: 16.5px; }
.h-checks li { position: relative; padding-inline-start: 26px; }
.h-checks li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .62em; width: 12px; height: 7px; border: solid var(--h-ok);
  border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
html[dir="ltr"] .h-checks li::before { transform: rotate(-45deg); }
.h-step-media figure { margin: 0; }
.h-step-media img { border-radius: 12px; border: 1px solid var(--h-line); box-shadow: 0 22px 44px -26px var(--h-shadow); }
.h-step-media.is-desk img { width: 100%; }
.h-step-media.is-phone { display: flex; gap: 18px; }
.h-step-media.is-phone figure { width: min(240px, 46%); }
.h-step-media.is-phone img { border-radius: 22px; border: 5px solid var(--h-frame); }
.h-step-media.is-xray { display: block; }
.h-step-media.is-xray img { border-radius: 10px; border: 0; background: #000; }
.h-step-media figcaption { margin-top: 8px; font-size: 14.5px; color: var(--h-fg2); font-weight: 600; text-align: center; }

/* who does what: three plain lists, not a wall of cards */
.h-roles { padding: 100px 0; background: var(--h-alt); }
.h-role-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; }
.h-role { border-top: 3px solid var(--h-brand); padding-top: 22px; }
.h-role h3 { font-size: 24px; font-weight: 700; margin-bottom: 18px; }
.h-role ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.h-role li b { display: block; font-weight: 600; font-size: 17px; color: var(--h-fg); }
.h-role li span { display: block; color: var(--h-fg2); font-size: 16px; line-height: 1.65; margin-top: 2px; }

/* everywhere: the one dark band on the page */
.h-platform { padding: 100px 0; background: var(--h-band); color: var(--h-band-fg2); overflow: hidden; border-block: 1px solid var(--h-band-line); }
.h-platform-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.h-platform h2 { color: var(--h-band-fg); font-size: clamp(30px, 3.2vw, 42px); line-height: 1.2; font-weight: 800; }
.h-platform-text > p { margin-top: 14px; font-size: 19px; color: var(--h-band-fg2); max-width: 34em; }
.h-plat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; margin: 40px 0 0; }
.h-plat-list dt { font-family: var(--h-display); font-weight: 700; font-size: 19px; color: var(--h-band-fg); }
.h-plat-list dd { margin: 4px 0 0; font-size: 16px; color: var(--h-band-fg2); line-height: 1.65; }
.h-platform-shots { display: flex; gap: 18px; justify-content: center; }
.h-platform-shots img { width: min(230px, 48%); border-radius: 24px; border: 6px solid var(--h-band-line); }
.h-platform-shots img:last-child { margin-top: 64px; }

/* pricing (the shared cards, toned to this page) */
.h-pricing { padding: 110px 0 80px; }
.h-pricing .plan-badge { font-family: var(--h-display); }
.h-pricing .plan h3 { font-family: var(--h-display); }
.h-price-note { margin-top: 26px; color: var(--h-fg2); font-size: 16px; }

/* questions */
.h-faq { padding: 60px 0 110px; }
.h-faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.h-faq details { border-bottom: 1px solid var(--h-line); padding: 4px 0; }
.h-faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; }
.h-faq summary::-webkit-details-marker { display: none; }
.h-faq summary::after { content: "+"; font-family: var(--h-display); font-weight: 700; color: var(--h-brand); font-size: 24px; line-height: 1; }
.h-faq details[open] summary::after { content: "−"; }
.h-faq details p { padding: 0 0 20px; color: var(--h-fg2); font-size: 16.5px; max-width: 34em; }

/* close */
.h-final { padding: 72px 0; background: var(--h-brand); color: #fff; }
.h-final-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.h-final h2 { color: #fff; font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1.2; }
.h-final p { margin-top: 10px; color: #DCEBF7; font-size: 18px; max-width: 36em; }
.h-foot { padding: 64px 0 28px; background: var(--h-bg); border-top: 1px solid var(--h-line); font-size: 16px; }
.h-foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.h-foot-brand img { height: 34px; width: auto; }
.h-foot-brand p { margin-top: 14px; color: var(--h-fg2); max-width: 26em; }
.h-foot-col { display: flex; flex-direction: column; gap: 10px; }
.h-foot-col h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.h-foot-col a { color: var(--h-fg2); text-decoration: none; }
.h-foot-col a:hover { color: var(--h-fg); }
.h-foot-legal { display: flex; gap: 22px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--h-line); color: var(--h-fg2); font-size: 14.5px; }
.h-foot-legal a { color: var(--h-fg2); }

/* tablets */
@media (max-width: 1000px) {
  .h-nav { display: none; }
  .h-hero-in, .h-platform-in { grid-template-columns: 1fr; }
  .h-hero-shot { margin-top: 8px; }
  .h-step { grid-template-columns: 76px minmax(0, 1fr); gap: 18px 24px; }
  .h-time { width: 76px; font-size: 15px; }
  .h-timeline::before { inset-inline-start: 37px; }
  .h-step-media { grid-column: 2; }
  .h-role-cols { grid-template-columns: 1fr; gap: 36px; }
  .h-foot-in { grid-template-columns: 1fr 1fr; }
}
/* phones */
@media (max-width: 620px) {
  .home-body { font-size: 17px; }
  .h-wrap { width: calc(100% - 36px); }
  .h-top-in { height: 64px; gap: 12px; }
  .h-top-actions .h-link:first-child { display: none; }
  .h-top-actions { gap: 12px; }
  .h-brand img { height: 30px; }
  .h-hero { padding-top: 40px; }
  .h-lead { font-size: 18px; }
  .h-actions .h-btn { flex: 1 1 100%; }
  .h-shot-phone { width: 34%; bottom: -18px; }
  .h-day, .h-roles, .h-platform, .h-pricing { padding-top: 72px; padding-bottom: 56px; }
  .h-step { grid-template-columns: 1fr; padding-bottom: 60px; }
  .h-timeline::before { display: none; }
  .h-time { width: auto; padding: 2px 14px; justify-self: start; }
  .h-step-media { grid-column: 1; }
  .h-plat-list, .h-faq-list { grid-template-columns: 1fr; }
  .h-platform-shots img:last-child { margin-top: 40px; }
  .h-final-in { flex-direction: column; align-items: stretch; }
  .h-foot-in { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .home-body * { scroll-behavior: auto !important; } }
html:has(.home-body) { scroll-behavior: smooth; scroll-padding-top: 84px; }

/* ===== dark (the homepage default) ===== */
[data-theme="dark"] .home-body {
  --h-fg: #E8EEF5; --h-fg2: #A9B8CA; --h-bg: #0B1627; --h-alt: #0F1D31; --h-line: #22344D;
  --h-brand: #1A86CF; --h-brand-hover: #2E97DD; --h-link: #5DB6EE; --h-ok: #34C79A;
  --h-frame: #1D2E46; --h-band: #08111F; --h-band-line: #1B2B42; --h-band-fg: #FFFFFF; --h-band-fg2: #A9B8CA;
  --h-top: rgba(11,22,39,.9); --h-shadow: rgba(0,0,0,.55); --h-chip-bg: #0B1627;
  color-scheme: dark;
}
[data-theme="dark"] .h-shot-desk, [data-theme="dark"] .h-step-media.is-desk img { border-color: #2A3E5A; }
[data-theme="dark"] .h-brand img, [data-theme="dark"] .h-foot-brand img { filter: none; }
.h-theme { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--h-line); background: transparent; color: var(--h-fg2); cursor: pointer; }
.h-theme:hover { color: var(--h-fg); background: var(--h-alt); }

/* ===== X-ray before / after: one picture, a line you drag (or that sweeps by itself until you do) ===== */
.h-compare { --p: 50%; position: relative; margin: 0; width: min(560px, 100%); aspect-ratio: 560 / 600; border-radius: 14px; overflow: hidden;
  background: #000; box-shadow: 0 26px 50px -26px var(--h-shadow); touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.h-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; pointer-events: none; }
/* Arabic reads right to left: "before" on the right, "after" on the left; English the other way round */
[dir="rtl"] .h-cmp-after { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
[dir="ltr"] .h-cmp-after { clip-path: inset(0 0 0 var(--p)); }
.h-cmp-line { position: absolute; top: 0; bottom: 0; left: var(--p); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 0 18px rgba(0,0,0,.45); pointer-events: none; }
.h-cmp-knob { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #fff; color: #10213A;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: transform .15s; }
.h-compare.is-dragging .h-cmp-knob { transform: scale(1.12); }
.h-cmp-tag { position: absolute; top: 14px; padding: 6px 14px; border-radius: 999px; font-family: var(--h-display); font-weight: 700; font-size: 15px; pointer-events: none;
  background: rgba(8,17,31,.78); color: #fff; backdrop-filter: blur(4px); transition: opacity .2s; }
.h-cmp-tag.is-before { inset-inline-start: 14px; }
.h-cmp-tag.is-after { inset-inline-end: 14px; background: #12A37A; }
.h-cmp-range { position: absolute; inset: auto 0 0 0; width: 100%; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.h-compare:has(.h-cmp-range:focus-visible) { outline: 3px solid var(--h-brand); outline-offset: 4px; }
.h-cmp-hint { margin-top: 10px; font-size: 14.5px; color: var(--h-fg2); }
.h-cmp-hint::before { content: "⟷ "; }
