/* ===== Design tokens (new teal palette, light + dark) ===== */
:root {
  --primary: #0e7c86;
  --primary-deep: #0b3c49;
  --primary-ink: #072a33;
  --accent: #5ed3c4;
  --accent-2: #f4b860;
  --soft: #e7f6f4;
  --bg: #f7fbfb;
  --surface: #ffffff;
  --surface-2: #eef7f6;
  --text: #12313a;
  --muted: #5b7680;
  --border: #d6e9e7;
  --shadow: 0 18px 50px -20px rgba(11, 60, 73, .28);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grad: linear-gradient(135deg, #0e7c86 0%, #0b3c49 100%);
  --grad-soft: linear-gradient(135deg, #5ed3c4 0%, #0e7c86 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg:#071c22; --surface:#0d2a32; --surface-2:#11343d; --text:#e4f3f2; --muted:#93b3b8; --border:#1d4651; --soft:#0f3039; --shadow:0 18px 50px -20px rgba(0,0,0,.6); }
}
:root[data-theme="dark"] { --bg:#071c22; --surface:#0d2a32; --surface-2:#11343d; --text:#e4f3f2; --muted:#93b3b8; --border:#1d4651; --soft:#0f3039; --shadow:0 18px 50px -20px rgba(0,0,0,.6); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Tajawal', sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; overflow-x: hidden; transition: background .4s var(--ease), color .4s var(--ease); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 700;
  background: var(--grad); color: #fff; position: relative; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); box-shadow: 0 10px 26px -10px rgba(14,124,134,.7); }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -12px rgba(14,124,134,.8); }
.btn:hover::after { transform: translateX(120%); }
.btn-ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-danger { background: linear-gradient(135deg,#e5636b,#b8323b); box-shadow: none; }

/* ===== Navbar ===== */
.navbar { position: fixed; inset: 14px 0 auto; z-index: 100; animation: navbar-enter .9s var(--ease) both; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px 10px 22px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(16px); border: 1px solid var(--border); box-shadow: var(--shadow); transition: padding .4s var(--ease); }
.navbar.scrolled .navbar-inner { padding-block: 6px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--primary-deep); }
:root[data-theme="dark"] .brand { color: var(--accent); }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 1.2rem; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; position: relative; transition: color .25s ease, background .25s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; transition: transform .45s var(--ease), color .2s; }
.icon-btn:hover { transform: rotate(25deg); color: var(--primary); }
.nav-cta i { animation: navbar-cta-icon-spin 6s linear infinite; }
.menu-toggle { display: none; }
@keyframes navbar-enter { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }
@keyframes navbar-cta-icon-spin { 0%, 85% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 140px 0 80px; overflow: hidden; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: hero-orb-float 12s ease-in-out infinite; }
.hero-orb.o1 { width: 420px; height: 420px; background: var(--accent); top: -120px; left: -120px; }
.hero-orb.o2 { width: 360px; height: 360px; background: var(--primary); bottom: -140px; right: 10%; animation-delay: -4s; }
.hero-orb.o3 { width: 220px; height: 220px; background: var(--accent-2); top: 40%; left: 40%; opacity: .25; animation-delay: -8s; }
.hero-ribbon { position: absolute; inset: auto -10% 12% -10%; height: 140px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 25%, transparent), transparent); transform: rotate(-6deg); animation: hero-ribbon-drift 14s ease-in-out infinite; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--soft); color: var(--primary); font-weight: 700; animation: hero-rise .9s var(--ease) both; }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse-badge 2.5s infinite; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); line-height: 1.25; margin: 18px 0; font-weight: 800; animation: hero-rise 1s .1s var(--ease) both; }
.hero h1 span { background: var(--grad-soft); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 1.15rem; max-width: 540px; animation: hero-rise 1s .2s var(--ease) both; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; animation: hero-rise 1s .3s var(--ease) both; }
.hero-trust { display: flex; gap: 28px; margin-top: 40px; animation: hero-rise 1s .4s var(--ease) both; }
.hero-trust b { display: block; font-size: 1.6rem; color: var(--primary); }
.hero-trust small { color: var(--muted); }
.hero-visual { position: relative; aspect-ratio: 1; animation: hero-visual-float 7s ease-in-out infinite; }
.hero-disc { position: absolute; inset: 8%; border-radius: 50%; background: var(--grad); box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; }
.hero-disc i { font-size: clamp(7rem, 14vw, 11rem); color: rgba(255,255,255,.92); filter: drop-shadow(0 20px 30px rgba(0,0,0,.25)); }
.hero-disc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0 45%, rgba(94,211,196,.55) 50%, transparent 55%); animation: hero-scan-sweep 4s var(--ease) infinite; }
.hero-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--primary) 40%, transparent); animation: qb-ring-spin 30s linear infinite; }
.hero-node { position: absolute; padding: 10px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: .9rem;
  animation: hero-rise .9s var(--ease) both, hero-node-pulse 5s ease-in-out infinite; animation-delay: calc(var(--node-i) * .15s + .5s), calc(var(--node-i) * -1.2s); }
.hero-node i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--primary); }
.hero-node.n1 { top: 6%; right: -4%; } .hero-node.n2 { bottom: 18%; right: -8%; } .hero-node.n3 { bottom: 4%; left: 2%; } .hero-node.n4 { top: 22%; left: -6%; }

@keyframes hero-rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes hero-orb-float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,30px) scale(1.12); } }
@keyframes hero-ribbon-drift { 0%,100% { transform: rotate(-6deg) translateX(0); } 50% { transform: rotate(-3deg) translateX(-60px); } }
@keyframes hero-visual-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes hero-scan-sweep { 0% { transform: translateY(-60%); } 100% { transform: translateY(60%); } }
@keyframes hero-node-pulse { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes qb-ring-spin { to { transform: rotate(360deg); } }
@keyframes pulse-badge { 0% { box-shadow: 0 0 0 0 rgba(14,124,134,.6); } 70% { box-shadow: 0 0 0 10px rgba(14,124,134,0); } 100% { box-shadow: 0 0 0 0 rgba(14,124,134,0); } }

/* ===== Sections ===== */
section { padding: 100px 0; position: relative; }
.masthead { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.eyebrow { display: inline-block; color: var(--primary); font-weight: 800; letter-spacing: .5px; padding: 6px 16px; border-radius: 999px; background: var(--soft); margin-bottom: 14px; }
.masthead h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.3; }
.masthead p { color: var(--muted); margin-top: 12px; }

/* Scroll reveal (staggered via --i) */
.reveal { opacity: 0; transform: translateY(48px); transition: opacity .75s var(--ease), transform .75s var(--ease); transition-delay: calc(var(--i, 0) * 75ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal-fold { opacity: 0; transform: perspective(900px) rotateX(var(--fold, 30deg)) translateY(40px); transform-origin: bottom; transition: all 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal-fold.in { opacity: 1; transform: none; }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; position: relative; overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 35%, color-mix(in srgb, var(--accent) 22%, transparent) 50%, transparent 65%); transform: translateX(-110%); transition: transform .9s var(--ease); pointer-events: none; }
.card:hover::before { transform: translateX(110%); }
.service-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem; background: var(--soft); color: var(--primary); margin-bottom: 18px; transition: transform .65s var(--ease), background .3s, color .3s; }
.card:hover .service-icon { transform: rotate(-10deg) scale(1.1); background: var(--grad); color: #fff; }
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card p { color: var(--muted); }
.card .price { margin-top: 16px; font-weight: 800; color: var(--primary); }
.card-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 14px; color: var(--primary); font-weight: 700; }
.card-link i { transition: transform .28s var(--ease); }
.card:hover .card-link i { transform: translateX(-6px); }

/* Numbers */
.numbers { background: var(--grad); color: #fff; border-radius: 36px; padding: 60px 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; overflow: hidden; }
.numbers::before { content: ""; position: absolute; inset: 50% 0 auto; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); transform-origin: right; animation: numbers-draw-thread 2.4s var(--ease) both; }
.number-node { text-align: center; position: relative; }
.number-node b { display: block; font-size: 2.8rem; font-weight: 800; }
.number-node span { opacity: .85; }
@keyframes numbers-draw-thread { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Doctors */
.doctor-card { text-align: center; padding: 0; }
.doctor-photo { height: 230px; background: var(--grad-soft); display: grid; place-items: center; position: relative; overflow: hidden; }
.doctor-photo i { font-size: 6rem; color: rgba(255,255,255,.9); transition: transform .65s var(--ease); }
.doctor-card:hover .doctor-photo i { transform: scale(1.12) translateY(-6px); }
.doctor-body { padding: 22px; }
.doctor-body .spec { color: var(--primary); font-weight: 700; }
.stars { color: var(--accent-2); font-size: .9rem; margin-top: 6px; }

/* Offers */
.offer-card { border: 0; background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%); }
.offer-tag { position: absolute; top: 18px; left: 18px; background: var(--accent-2); color: #3a2400; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; animation: pulse-badge 2.5s infinite; }
.offer-price { display: flex; gap: 12px; align-items: baseline; margin-top: 16px; }
.offer-price b { font-size: 2rem; color: var(--primary); }
.offer-price s { color: var(--muted); }

/* Testimonials */
.testimonial { position: relative; }
.testimonial .quote { font-size: 3rem; color: var(--accent); line-height: 1; animation: ts-quote-breathe 4s ease-in-out infinite; }
.testimonial .who { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
@keyframes ts-quote-breathe { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.12); opacity: 1; } }

/* Booking */
.booking { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 36px; padding: 50px; box-shadow: var(--shadow); }
.booking-visual { position: relative; aspect-ratio: 1.1; border-radius: 28px; background: var(--grad); display: grid; place-items: center; overflow: hidden; animation: booking-visual-float 6s ease-in-out infinite; }
.booking-visual i.big { font-size: 7rem; color: #fff; animation: booking-heart-beat 1.6s ease-in-out infinite; }
.booking-visual svg { position: absolute; bottom: 18%; width: 90%; }
.booking-visual svg path { stroke: var(--accent); stroke-width: 3; fill: none; stroke-dasharray: 600; animation: booking-heart-ecg 3s linear infinite; }
@keyframes booking-visual-float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes booking-heart-beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(.98); } 45% { transform: scale(1.06); } }
@keyframes booking-heart-ecg { from { stroke-dashoffset: 600; } to { stroke-dashoffset: -600; } }

/* Forms */
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.input { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); transition: border-color .25s, box-shadow .25s; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea.input { min-height: 100px; resize: vertical; }

/* Footer */
.footer { background: var(--primary-ink); color: #cfe7e6; padding: 70px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a:hover { color: var(--accent); }
.footer .brand { color: #fff; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); transition: transform .35s var(--ease), background .3s; }
.socials a:hover { transform: translateY(-4px); background: var(--primary); color: #fff; }
.copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; text-align: center; opacity: .7; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 120px); background: var(--primary-deep); color: #fff; padding: 14px 24px; border-radius: 14px; box-shadow: var(--shadow); z-index: 999; transition: transform .5s var(--ease); }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: #b8323b; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .booking { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; margin-inline: auto; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: grid; }
  .nav-links { position: absolute; top: calc(100% + 10px); inset-inline: 0; flex-direction: column; background: var(--surface); border-radius: 24px; padding: 14px; box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transform: translateY(-10px); transition: all .4s var(--ease); }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-cta span { display: none; }
}
@media (max-width: 600px) {
  section { padding: 70px 0; }
  .grid-3, .grid-4, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .booking { padding: 24px; }
  .hero-node.n2, .hero-node.n4 { display: none; }
  .hero-trust { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal, .reveal-fold { opacity: 1; transform: none; } }

/* Demo accounts */
.demo-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.demo-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 12px;border-radius:18px;border:1.5px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;text-align:center;transition:transform .45s var(--ease),border-color .3s,box-shadow .45s var(--ease)}
.demo-card i{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:var(--grad);color:#fff;font-size:1.2rem;margin-bottom:6px;transition:transform .65s var(--ease)}
.demo-card:hover{transform:translateY(-6px);border-color:var(--primary);box-shadow:var(--shadow)}
.demo-card:hover i{transform:rotate(-10deg) scale(1.1)}
.demo-card small{color:var(--muted);direction:ltr;line-height:1.5}
.demo-band{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:20px;align-items:stretch}
.demo-band .demo-card{padding:28px 18px}
@media(max-width:860px){.demo-band{grid-template-columns:1fr}}
