/* HBRMED — Clinical Precision (elegant expansion)
   Brand blues: #156082 (primary) · #2A7CA0 (secondary) · #4E96B4 (accent)
   Supporting: navy #0A2F42 · mist #E8F1F5 · cream #FAF7F2 · gold #E8B04C · slate #4B5B67 · hairline #DDE6EB */

:root {
  --primary:   #156082;
  --secondary: #2A7CA0;
  --accent:    #4E96B4;
  --navy:      #0A2F42;
  --mist:      #E8F1F5;
  --cream:     #FAF7F2;
  --gold:      #E8B04C;
  --slate:     #4B5B67;
  --hairline:  #DDE6EB;
  --ink:       #0F1719;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}

.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; }
.icon-fill { font-variation-settings: 'FILL' 1; }

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ============================================================
   Scroll progress
   ============================================================ */
.scroll-progress {
  position: fixed; inset: 0 auto auto 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--gold));
  z-index: 100;
  transition: width 0.15s linear;
}

/* ============================================================
   Cursor accent
   ============================================================ */
.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--gold);
  pointer-events: none;
  z-index: 101;
  mix-blend-mode: difference;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease);
  will-change: transform;
}
.cursor-dot.big { width: 36px; height: 36px; margin: -14px 0 0 -14px; background: rgba(232, 176, 76, 0.5); }
@media (hover: none), (prefers-reduced-motion: reduce) { .cursor-dot { display: none; } }

/* ============================================================
   Nav (Apple-style glass)
   ============================================================ */
.nav-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(10, 47, 66, 0.06);
  transition: all 0.5s var(--ease);
}
.nav-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 30px rgba(10, 47, 66, 0.06);
}
.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  padding: 6px 2px;
  transition: color 0.25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  right: 0; bottom: -2px;
  width: 0; height: 1.5px;
  background: var(--primary);
  transition: width 0.4s var(--ease);
}
.nav-link:hover { color: var(--navy); }
.nav-link:hover::after { width: 100%; }
.nav-link.is-current { color: var(--navy); font-weight: 600; }
.nav-link.is-current::after { width: 100%; background: var(--gold); }

/* ============================================================
   Buttons
   ============================================================ */
.btn-magnetic { transition: transform 0.35s var(--ease); will-change: transform; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn-primary:hover {
  background: var(--primary);
  box-shadow: 0 8px 24px rgba(21, 96, 130, 0.28);
}

.btn-hero-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--navy);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn-hero-primary:hover {
  background: var(--gold); color: var(--navy);
  box-shadow: 0 10px 30px rgba(232, 176, 76, 0.35);
}

.btn-hero-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.5); }
.gold-glyph { color: var(--gold); }

/* ============================================================
   Section padding
   ============================================================ */
.section-padding { padding-top: 140px; padding-bottom: 140px; }
@media (max-width: 768px) { .section-padding { padding-top: 88px; padding-bottom: 88px; } }

/* ============================================================
   Eyebrows (used sparingly on section leads)
   ============================================================ */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 20px;
  position: relative;
  padding-inline-end: 32px;
}
.eyebrow::after {
  content: "";
  position: absolute;
  top: 50%; left: 0;
  transform: translateY(-50%);
  width: 22px; height: 1px;
  background: var(--secondary);
}
.eyebrow-light { color: var(--gold); }
.eyebrow-light::after { background: var(--gold); }

/* ============================================================
   Hero — shader container, grain, eyebrow, word-mask reveal
   ============================================================ */
.hero-shader-container {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1; overflow: hidden;
  transform: translateY(var(--scroll-offset, 0));
  will-change: transform;
}
.grain {
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

.hero-eyebrow { transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transform: translateY(8px); }
.hero-eyebrow.on { opacity: 1; transform: translateY(0); }

/* Word-mask reveal: each word rises from a mask */
.mask-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: 0 0.08em 0.08em;
  margin: 0 0.02em;
}
.mask-word > span {
  display: inline-block;
  transform: translateY(105%) rotate(4deg);
  opacity: 0;
  transition:
    transform 1s var(--ease-out),
    opacity 0.6s var(--ease-out);
  transition-delay: calc(var(--i) * 90ms + 200ms);
}
.mask-word.on > span { transform: translateY(0) rotate(0); opacity: 1; }
.gold-word > span { color: var(--gold); font-style: italic; font-weight: 800; }

[data-hero="sub"], [data-hero="ctas"], [data-hero="cue"] {
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transform: translateY(12px);
}
[data-hero="sub"].on, [data-hero="ctas"].on, [data-hero="cue"].on {
  opacity: 1; transform: translateY(0);
}

/* Scroll cue */
.mouse-cue {
  width: 22px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.55);
  border-radius: 12px;
  position: relative;
}
.mouse-cue::after {
  content: "";
  position: absolute;
  left: 50%; top: 6px;
  width: 2px; height: 8px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: cueDrop 1.6s ease-in-out infinite;
}
@keyframes cueDrop {
  0%,100% { transform: translate(-50%, 0); opacity: 0.85; }
  60%     { transform: translate(-50%, 12px); opacity: 0; }
}

/* ============================================================
   Marquee band
   ============================================================ */
.marquee-band {
  background: var(--navy);
  color: rgba(255,255,255,0.72);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 22px 0;
  overflow: hidden;
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: 40px;
  align-items: center;
  white-space: nowrap;
  animation: marqueeSlide 42s linear infinite;
  font-size: 15px;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding-inline-start: 40px;
}
.marquee-track .dot { color: var(--gold); font-size: 10px; }
@keyframes marqueeSlide {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ============================================================
   Vision section (orb + rings + nodes)
   ============================================================ */
.vision-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  margin: 0 auto;
}
.vision-orb {
  position: absolute; inset: 22%;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--primary) 55%, var(--navy) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    inset 0 0 60px rgba(255,255,255,0.15),
    0 30px 80px rgba(21, 96, 130, 0.25);
  animation: orbFloat 8s ease-in-out infinite;
}
@keyframes orbFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}

.vision-ring {
  position: absolute;
  border-radius: 999px;
  border: 1px dashed rgba(21, 96, 130, 0.28);
  animation: ringSpin 40s linear infinite;
}
.vision-ring-1 { inset: 8%; }
.vision-ring-2 { inset: 0%; border-color: rgba(78, 150, 180, 0.22); animation-duration: 60s; animation-direction: reverse; }
.vision-ring-3 { inset: -8%; border-color: rgba(232, 176, 76, 0.22); animation-duration: 90s; }
@keyframes ringSpin { to { transform: rotate(360deg); } }

.vision-node {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 176, 76, 0.18);
}
.vision-node-1 { top: 0;   left: 50%; transform: translateX(-50%); }
.vision-node-2 { top: 50%; right: 0;  transform: translateY(-50%); background: var(--accent); box-shadow: 0 0 0 4px rgba(78,150,180,0.22); }
.vision-node-3 { bottom: 0; left: 50%; transform: translateX(-50%); background: var(--primary); box-shadow: 0 0 0 4px rgba(21,96,130,0.22); }
.vision-node-4 { top: 50%; left: 0;   transform: translateY(-50%); background: var(--secondary); box-shadow: 0 0 0 4px rgba(42,124,160,0.22); }

@media (prefers-reduced-motion: reduce) {
  .vision-orb, .vision-ring { animation: none; }
}

/* Line-draw SVG */
.draw-line line {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s var(--ease-out);
}
.draw-line.on line { stroke-dashoffset: 0; }
.draw-line { width: 260px; height: 8px; display: block; }

/* ============================================================
   Numbers section
   ============================================================ */
.numbers-section {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.numbers-section::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 15% 20%, rgba(78,150,180,0.18), transparent 60%),
    radial-gradient(500px 260px at 85% 80%, rgba(232,176,76,0.10), transparent 60%);
  pointer-events: none;
}
.stat-card {
  position: relative;
  padding: 28px 20px;
  text-align: start;
}
.stat-value {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}
.stat-line {
  height: 1px;
  background: linear-gradient(to left, rgba(255,255,255,0.4), transparent);
  margin: 20px 0 14px;
}
.stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
}

/* ============================================================
   Product 1 — Labib Care screen mockup
   ============================================================ */
.inline-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid rgba(21,96,130,0.25);
  padding-bottom: 4px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.inline-link:hover { color: var(--navy); border-color: var(--gold); gap: 14px; }

.screen-wrap {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
  will-change: transform;
}
.screen-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hairline);
  box-shadow:
    0 40px 80px -30px rgba(10, 47, 66, 0.35),
    0 20px 40px -20px rgba(10, 47, 66, 0.18);
}
.screen-chrome {
  height: 32px;
  background: var(--mist);
  border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px;
}
.screen-chrome span {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--hairline);
}
.screen-chrome span:nth-child(1) { background: #E86B5F; }
.screen-chrome span:nth-child(2) { background: #E8B04C; }
.screen-chrome span:nth-child(3) { background: #6AB56A; }

.screen-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 360px;
}
@media (max-width: 640px) {
  .screen-body { grid-template-columns: 1fr; }
  .screen-side { display: none; }
}
.screen-side {
  background: #fbfcfd;
  border-inline-end: 1px solid var(--hairline);
  padding: 20px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.screen-side-item {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--slate);
  border-radius: 8px;
  cursor: default;
  transition: background 0.25s var(--ease);
}
.screen-side-item:hover { background: var(--mist); }
.screen-side-item.is-current { background: var(--primary); color: #fff; font-weight: 600; }

.screen-main { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.screen-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) { .screen-metrics { grid-template-columns: 1fr; } }
.screen-metric {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}
.screen-metric .k { font-size: 12px; color: var(--slate); margin-bottom: 6px; }
.screen-metric .v { font-size: 24px; font-weight: 700; color: var(--navy); font-family: "Plus Jakarta Sans", sans-serif; letter-spacing: -0.01em; }
.screen-metric .trend { font-size: 11px; margin-top: 4px; font-weight: 600; }
.trend.up { color: #2E8558; }
.trend.neutral { color: var(--slate); }

.screen-chart {
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  height: 160px;
}
.screen-chart svg path:nth-child(2) {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: chartDraw 2.2s var(--ease-out) forwards;
  animation-delay: 0.4s;
}
@keyframes chartDraw { to { stroke-dashoffset: 0; } }

.screen-glow {
  position: absolute; inset: -10% 5% -25% 5%;
  background: radial-gradient(closest-side, rgba(21,96,130,0.20), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}

/* ============================================================
   Product 2 — Isgaa orbit
   ============================================================ */
.isgaa-visual { position: relative; aspect-ratio: 1 / 1; max-width: 480px; margin: 0 auto; }
.isgaa-orbit {
  position: absolute; inset: 6%;
  border-radius: 999px;
  border: 1px dashed rgba(21,96,130,0.22);
  display: flex; align-items: center; justify-content: center;
  animation: ringSpin 60s linear infinite;
}
.isgaa-orbit::before {
  content: "";
  position: absolute; inset: 12%;
  border-radius: 999px;
  border: 1px dashed rgba(232,176,76,0.22);
}
.isgaa-center {
  width: 44%; height: 44%;
  border-radius: 999px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 40px -12px rgba(21,96,130,0.25);
  border: 1px solid var(--hairline);
  animation: ringSpin 60s linear infinite reverse;
}
.isgaa-satellite {
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(21,96,130,0.15);
  transform: rotate(var(--a)) translate(46%) rotate(calc(-1 * var(--a))) translate(-50%, -50%);
}
.isgaa-satellite:nth-child(2) { background: var(--accent); box-shadow: 0 0 0 5px rgba(78,150,180,0.15); }
.isgaa-satellite:nth-child(3) { background: var(--secondary); box-shadow: 0 0 0 5px rgba(42,124,160,0.15); }
.isgaa-satellite:nth-child(4) { background: var(--gold); box-shadow: 0 0 0 5px rgba(232,176,76,0.18); }
.isgaa-satellite:nth-child(5) { background: var(--navy); box-shadow: 0 0 0 5px rgba(10,47,66,0.15); }
@media (prefers-reduced-motion: reduce) { .isgaa-orbit, .isgaa-center { animation: none; } }

.isgaa-features {
  display: flex; flex-direction: column; gap: 12px;
}
.isgaa-features li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  font-size: 15px;
  color: var(--navy);
  font-weight: 500;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.isgaa-features li:hover { transform: translateX(-4px); border-color: var(--secondary); }
.isgaa-features li .material-symbols-outlined { color: var(--primary); font-size: 22px; }

/* ============================================================
   Services list
   ============================================================ */
.services-list { border-top: 1px solid var(--hairline); }
.svc-row {
  display: grid;
  grid-template-columns: 64px 1fr 44px;
  gap: 24px;
  align-items: center;
  padding: 32px 8px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  transition: padding-inline 0.4s var(--ease), background 0.4s var(--ease);
}
.svc-row::before {
  content: "";
  position: absolute;
  right: 0; top: 0;
  height: 100%; width: 0%;
  background: linear-gradient(to left, rgba(21,96,130,0.04), transparent);
  transition: width 0.5s var(--ease);
  pointer-events: none;
}
.svc-row:hover { padding-inline: 20px 4px; }
.svc-row:hover::before { width: 100%; }
.svc-num {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: 0.02em;
}
.svc-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}
.svc-desc { color: var(--slate); font-size: 15px; line-height: 1.6; }
.svc-arrow {
  color: var(--secondary);
  transition: transform 0.4s var(--ease), color 0.4s var(--ease);
}
.svc-row:hover .svc-title { color: var(--primary); }
.svc-row:hover .svc-arrow { transform: translateX(-8px); color: var(--gold); }

@media (max-width: 640px) {
  .svc-row { grid-template-columns: 40px 1fr 32px; gap: 16px; padding: 24px 4px; }
  .svc-title { font-size: 18px; }
}

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  background:
    radial-gradient(800px 400px at 30% 20%, rgba(78,150,180,0.4), transparent 60%),
    radial-gradient(600px 300px at 80% 80%, rgba(232,176,76,0.15), transparent 60%),
    linear-gradient(180deg, var(--navy), #061e2c);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   Footer
   ============================================================ */
.footer-heading {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.95;
}
.footer-list { display: flex; flex-direction: column; gap: 10px; }
.footer-list a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: color 0.25s var(--ease);
}
.footer-list a:hover { color: var(--gold); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: transform, opacity;
}
.reveal-up.on { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal-up, .mask-word > span,
  [data-hero="sub"], [data-hero="ctas"], [data-hero="cue"], .hero-eyebrow {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .draw-line line { stroke-dashoffset: 0 !important; }
  .screen-chart svg path:nth-child(2) { stroke-dashoffset: 0 !important; animation: none !important; }
}

/* ============================================================
   Method (3-step)
   ============================================================ */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
@media (max-width: 900px) { .method-grid { grid-template-columns: 1fr; } }
.method-step {
  background: #fff;
  padding: 40px 32px;
  display: flex; flex-direction: column;
  gap: 14px;
  transition: background 0.35s var(--ease);
}
.method-step:hover { background: #fbfcfd; }
.method-mark {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 20px;
  margin-bottom: 6px;
}
.method-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.method-desc { color: var(--slate); font-size: 15px; line-height: 1.7; }
.method-meta {
  margin-top: auto;
  padding-top: 20px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
}

/* Work-tag: short kicker under selected-work titles */
.work-tag {
  display: inline-block;
  color: var(--secondary);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 500;
  padding: 4px 12px;
  background: var(--mist);
  border-radius: 999px;
}

/* ============================================================
   Focus
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 2px;
}
