/* ===================================================================
   HK Hitech Global — institutional design system (B-hybrid)
   Light, trustworthy base · navy headings · blue CTAs · mono data accents
   =================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --panel: #ffffff;
  --ink: #0f1e36;          /* near-navy headings */
  --ink-strong: #0a1526;
  --body: #46566e;         /* body text */
  --muted: #7787a0;        /* secondary text */
  --line: #e5ebf3;
  --line-strong: #d4dded;
  --brand: #2563eb;        /* primary blue */
  --brand-d: #1d4ed8;
  --navy: #0f2a52;
  --tint: #eef4ff;         /* blue tint surface */
  --accent: #0f766e;       /* teal — data / secure ticks */
  --accent-tint: #e6f4f1;
  --ok: #15803d;
  --amber: #b45309;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 54, .05);
  --shadow: 0 1px 2px rgba(15, 30, 54, .04), 0 10px 28px rgba(15, 30, 54, .07);
  --shadow-lg: 0 2px 6px rgba(15, 30, 54, .06), 0 24px 48px rgba(15, 30, 54, .12);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1180px;

  /* legacy aliases used by booking modal + JS-generated markup */
  --heading: #0f1e36;
  --text-muted: #7787a0;
  --surface: #ffffff;
  --surface-hover: #f1f5fb;
  --accent-cyan: #2563eb;
  --accent-purple: #1e3a8a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }

::selection { background: #cfe0ff; color: var(--navy); }

/* ---------- layout helpers ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 0; }
.section--soft { background: var(--bg-soft); }
.center { text-align: center; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 12px;
  font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 16px;
}
.section-head { max-width: 640px; margin: 0 auto 56px; }
.section-title { font-size: clamp(28px, 4vw, 40px); }
.section-desc { color: var(--body); font-size: 17px; margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .25); }
.btn--primary:hover { background: var(--brand-d); }
.btn--ghost { background: #fff; color: var(--navy); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--lg { padding: 15px 28px; font-size: 16px; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 900; background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo-text {
  font-size: 20px; font-weight: 700; color: var(--navy); letter-spacing: -.02em;
  display: inline-flex; align-items: center; gap: 8px;
}
.logo-text .logo-mark { width: 26px; height: 26px; }
.desktop-nav { display: flex; align-items: center; gap: 30px; }
.nav-link { font-size: 15px; color: var(--body); font-weight: 500; transition: color .15s ease; }
.nav-link:hover, .nav-link.active { color: var(--brand); }

.mobile-menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger { width: 24px; height: 16px; position: relative; }
.hamburger span {
  position: absolute; left: 0; width: 100%; height: 2px; background: var(--navy);
  border-radius: 2px; transition: transform .25s ease, opacity .25s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 7px; }
.hamburger span:nth-child(3) { top: 14px; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 4px; padding: 12px 24px 20px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.mobile-nav.active { display: flex; }
.mobile-nav .nav-link { padding: 10px 0; border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: 10px; justify-content: center; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 72px; background:
    radial-gradient(1100px 460px at 70% -10%, var(--tint), transparent 60%); }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--navy);
  background: #fff; border: 1px solid var(--line-strong); padding: 7px 14px;
  border-radius: 999px; margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); letter-spacing: -.03em; }
.hero h1 .grad { color: var(--brand); }
.hero p.lead { font-size: 19px; color: var(--body); margin: 22px 0 30px; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* hero stats panel */
.stats-panel { background: var(--navy); border-radius: 18px; padding: 8px; box-shadow: var(--shadow-lg); }
.stats-panel .stats-bar {
  display: flex; align-items: center; gap: 7px; padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08); font-family: var(--font-mono);
  font-size: 12px; color: #9fb3d6;
}
.stats-panel .stats-bar i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat-cell { padding: 22px 20px; border-right: 1px solid rgba(255, 255, 255, .07); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.stat-cell:nth-child(2n) { border-right: 0; }
.stat-cell:nth-last-child(-n+2) { border-bottom: 0; }
.stat-number { font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: #fff; letter-spacing: -.02em; }
.stat-cell p { font-size: 13px; color: #9fb3d6; margin-top: 2px; }

/* ---------- trust strip ---------- */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.trust .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 34px; padding: 18px 24px; }
.trust-item { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--body); font-weight: 500; }
.trust-item svg { width: 18px; height: 18px; }
.trust-item .ic-ok { color: var(--ok); }
.trust-item .ic-brand { color: var(--brand); }
.trust-item .ic-amber { color: var(--amber); }

/* ---------- generic cards ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--body); }

.icon-tile {
  width: 50px; height: 50px; border-radius: 12px; background: var(--tint);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.icon-tile svg { width: 30px; height: 30px; }
.icon-tile--navy { background: var(--navy); }

.chip {
  display: inline-block; font-size: 13px; font-weight: 500; color: var(--navy);
  background: var(--tint); border: 1px solid #d9e6ff; padding: 5px 12px; border-radius: 999px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- about / practitioner ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.author {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-top: 26px;
}
.author .avatar {
  width: 54px; height: 54px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none;
}
.author .who { font-weight: 600; color: var(--ink); }
.author .role { font-size: 13.5px; color: var(--muted); }
.principles { display: grid; gap: 16px; }
.principle { display: flex; gap: 14px; align-items: flex-start; }
.principle .tick {
  flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-tint);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.principle strong { color: var(--ink); font-weight: 600; }
.principle p { font-size: 14.5px; }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { position: relative; padding-top: 8px; }
.step .num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--brand);
  border: 1px solid #d9e6ff; background: var(--tint); width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 14.5px; }

/* ---------- testimonials ---------- */
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.stars { color: #f5a623; letter-spacing: 2px; font-size: 14px; margin-bottom: 12px; }
.tcard p.quote { color: var(--ink); font-size: 15.5px; line-height: 1.7; }
.tauthor { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tauthor .avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--tint); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex: none;
}
.tauthor .who { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.tauthor .role { font-size: 12.5px; color: var(--muted); }

/* ---------- faq ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); overflow: hidden; }
.faq-item.active { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq-question {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-sans); font-size: 16px; font-weight: 600; color: var(--ink);
  padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-icon { font-size: 22px; color: var(--brand); font-weight: 400; transition: transform .2s ease; flex: none; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-item.active .faq-answer { max-height: 420px; }
.faq-answer p { padding: 0 20px 18px; font-size: 15px; color: var(--body); }

/* ---------- CTA ---------- */
.cta { background: var(--navy); border-radius: 24px; padding: 64px 32px; text-align: center; position: relative; overflow: hidden; }
.cta::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 240px at 50% -20%, rgba(37, 99, 235, .35), transparent 70%); pointer-events: none;
}
.cta h2 { color: #fff; font-size: clamp(28px, 4vw, 40px); position: relative; }
.cta p { color: #b8c6df; font-size: 17px; max-width: 560px; margin: 16px auto 28px; position: relative; }
.cta .btn--primary { position: relative; }
.cta .fineprint { color: #8aa0c4; font-size: 13.5px; margin-top: 18px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer p { font-size: 14.5px; color: var(--muted); max-width: 320px; }
.footer h4 { font-size: 14px; color: var(--ink); margin-bottom: 14px; }
.footer .flinks { display: flex; flex-direction: column; gap: 10px; }
.footer .flinks a { font-size: 14.5px; color: var(--body); }
.footer .flinks a:hover { color: var(--brand); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 22px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 14px; font-size: 13.5px; color: var(--muted);
}
.footer-bottom .legal { display: flex; gap: 22px; }

/* ---------- floating + utility buttons ---------- */
.floating-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 950; display: inline-flex; align-items: center;
  gap: 9px; background: var(--brand); color: #fff; padding: 13px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px; box-shadow: 0 10px 26px rgba(37, 99, 235, .4);
  transition: transform .15s ease, background .15s ease;
}
.floating-btn:hover { transform: translateY(-2px); background: var(--brand-d); }
.util-stack { position: fixed; left: 18px; bottom: 18px; z-index: 940; display: flex; flex-direction: column; gap: 8px; }
.util-chip {
  background: #fff; color: var(--navy); border: 1px solid var(--line-strong); padding: 9px 15px;
  border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 500; font-family: var(--font-sans);
  box-shadow: var(--shadow-sm); transition: border-color .15s ease, color .15s ease;
}
.util-chip:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ===================================================================
   Booking modal + lookup (light restyle, IDs/classes preserved)
   =================================================================== */
.booking-overlay {
  position: fixed; inset: 0; z-index: 1000; display: none; align-items: flex-start;
  justify-content: center; padding: 40px 16px; overflow-y: auto;
  background: rgba(15, 30, 54, .45); backdrop-filter: blur(4px);
}
.booking-overlay.active { display: flex; }
.booking-modal, .booking-container {
  background: #fff; width: 100%; max-width: 540px; border-radius: 18px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden;
}
.booking-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.booking-header h2 { font-size: 18px; color: var(--ink); }
.booking-close {
  background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px; line-height: 1;
}
.booking-close:hover { background: var(--bg-soft); color: var(--ink); }
.booking-steps { display: flex; gap: 8px; padding: 18px 24px 0; }
.step-dot { flex: 1; height: 4px; border-radius: 4px; background: var(--line-strong); transition: background .2s ease; }
.step-dot.active { background: var(--brand); }
.step-dot.done { background: var(--accent); }
.booking-body { padding: 22px 24px 26px; }
.booking-step { display: none; }
.booking-step.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* calendar */
.calendar-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-nav-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--navy); font-size: 18px; cursor: pointer;
}
.calendar-nav-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.calendar-nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.calendar-month-year { font-weight: 600; color: var(--ink); }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-weekday { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 0; }
.calendar-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative;
  border-radius: 9px; font-size: 14px; color: var(--ink); cursor: pointer; border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease;
}
.calendar-day:hover:not(.disabled):not(.empty) { background: var(--tint); border-color: #cfe0ff; }
.calendar-day.today { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.calendar-day.selected { background: var(--brand); color: #fff; border-color: var(--brand); }
.calendar-day.disabled, .calendar-day.empty { color: #c2ccdb; cursor: default; }
.calendar-day.fully-booked { color: #c2ccdb; }
.booked-label { position: absolute; bottom: 2px; font-size: 8px; color: var(--amber); }

/* slots */
#slotsContainer { margin-top: 20px; }
.slots-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot-btn {
  padding: 9px 8px; border: 1px solid var(--line-strong); background: #fff; border-radius: 9px;
  font-size: 13px; color: var(--ink); cursor: pointer; font-family: var(--font-sans);
  transition: border-color .12s ease, background .12s ease;
}
.slot-btn:hover { border-color: var(--brand); color: var(--brand); }
.slot-btn.selected { background: var(--brand); color: #fff; border-color: var(--brand); }
/* Taken slots stay on the grid so the day reads as busy, not short. */
.slot-btn.booked {
  background: var(--bg-soft); color: var(--muted); border-style: dashed;
  cursor: not-allowed; text-decoration: line-through;
}
.slot-btn.booked:hover { border-color: var(--line-strong); color: var(--muted); }
.slot-btn .slot-tag {
  display: block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; margin-top: 2px;
}
.no-slots-msg { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 14px; padding: 14px; }

/* form */
.booking-form-group { margin-bottom: 16px; }
.booking-form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.required { color: #dc2626; }
.booking-input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 15px; font-family: var(--font-sans); color: var(--ink); background: #fff; transition: border-color .12s ease, box-shadow .12s ease;
}
.booking-input::placeholder { color: #9aa6ba; }
.booking-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.booking-input.error { border-color: #dc2626; }
.booking-textarea { min-height: 92px; resize: vertical; }
.form-error { display: none; color: #dc2626; font-size: 12.5px; margin-top: 5px; }
.form-error.visible { display: block; }

/* summary */
.booking-summary { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; gap: 12px; }
.summary-label { font-size: 14px; color: var(--muted); }
.summary-value { font-size: 14px; font-weight: 600; color: var(--ink); text-align: right; }
.summary-divider { height: 1px; background: var(--line); margin: 8px 0; }
.summary-total .summary-label { color: var(--ink); font-weight: 600; }
.summary-total .summary-value { font-size: 18px; color: var(--brand); }

/* actions */
.booking-actions { display: flex; gap: 10px; margin-top: 22px; }
.booking-btn {
  flex: 1; padding: 12px 16px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; font-family: var(--font-sans); transition: background .15s ease, border-color .15s ease;
}
.booking-btn-next { background: var(--brand); color: #fff; }
.booking-btn-next:hover:not(:disabled) { background: var(--brand-d); }
.booking-btn-next:disabled { background: #b9c6dc; cursor: not-allowed; }
.booking-btn-back { background: #fff; color: var(--navy); border-color: var(--line-strong); flex: 0 0 auto; }
.booking-btn-back:hover { border-color: var(--brand); color: var(--brand); }

/* success */
.booking-success { text-align: center; padding: 20px 8px; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent-tint); color: var(--ok);
  display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 18px;
}
.booking-success h3 { font-size: 20px; margin-bottom: 10px; }
.booking-success p { color: var(--body); font-size: 15px; margin-bottom: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .hero .container, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid--3, .grid--4, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4, .steps, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .floating-btn .btn-label { display: none; }
  .cta { padding: 48px 22px; }
}

/* ===================================================================
   Interactive polish (interactive.js) — decorative, additive, degrades
   to the plain layout under prefers-reduced-motion / on touch.
   =================================================================== */
.card, .tcard { position: relative; }
.card > *, .tcard > * { position: relative; z-index: 1; }
.card::before, .tcard::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 99, 235, .10), transparent 45%);
  opacity: 0; transition: opacity .3s ease;
}
.card.tilting, .tcard.tilting { transition: transform .1s ease, box-shadow .18s ease, border-color .18s ease; }
.card.tilting::before, .tcard.tilting::before { opacity: 1; }

/* scroll-drawn connector through the Process steps (desktop only) */
.steps { position: relative; }
.steps .step { z-index: 1; }
.steps .pipeline-track {
  position: absolute; top: 25px; left: 6%; right: 6%; height: 2px; z-index: 0;
  background: var(--line-strong); border-radius: 2px; overflow: hidden;
}
.steps .pipeline-fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  box-shadow: 0 0 10px rgba(37, 99, 235, .55);
}
@media (max-width: 900px) { .steps .pipeline-track { display: none; } }

/* hero stats panel keeps its subtle navy gradient (the hero3d terminal was removed) */
.stats-panel { position: relative; overflow: hidden; background: radial-gradient(130% 120% at 100% 0%, #16386b, var(--navy) 60%); }
.stats-panel .stats-bar, .stats-panel .stats-grid { position: relative; z-index: 1; }

/* ---- Full-page 3D market background (market3d.js): fixed, rotates on scroll ----
   Two looks by theme (dark glass / light matte); shows in BOTH themes. */
#marketBg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
:root[data-theme="dark"] #marketBg { background: #04060c; }
:root[data-theme="light"] #marketBg { background: #f7f9fc; }
#marketBg canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s ease; }
#marketBg.live canvas { opacity: 1; }
#marketBg .mkt-poster { display: none; position: absolute; inset: 0; background-position: center; background-size: cover; background-repeat: no-repeat; }
:root[data-theme="dark"] #marketBg .mkt-poster { background-image: url('images/preview_nifty.png'); }
:root[data-theme="light"] #marketBg .mkt-poster { background-image: url('images/preview_light4.png'); }
#marketBg.poster .mkt-poster { display: block; }
#marketBg .mkt-scrim { position: absolute; inset: 0; }
/* readability veil over the chart — per theme */
:root[data-theme="dark"] .mkt-scrim { background: linear-gradient(rgba(8, 11, 20, .5), rgba(8, 11, 20, .34)); }
:root[data-theme="light"] .mkt-scrim { background: linear-gradient(rgba(247, 249, 252, .5), rgba(247, 249, 252, .35)); }

/* the chart shows through the whole page in both themes; opaque content surfaces stay readable */
body.has-bg3d { background: transparent; }
body.has-bg3d .hero { background: none; }
body.has-bg3d .section--soft,
body.has-bg3d .trust,
body.has-bg3d .footer { background: transparent; }

/* ---------- legal / document pages ---------- */
.doc-header { border-bottom: 1px solid var(--line); background: #fff; }
.doc-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.doc { max-width: 760px; margin: 0 auto; padding: 48px 24px 88px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.doc h1 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 6px; }
.doc h2 { font-size: 19px; margin: 32px 0 10px; }
.doc p, .doc li { color: var(--body); font-size: 15.5px; line-height: 1.75; }
.doc ul { padding-left: 22px; margin: 8px 0; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--brand); }
.doc .note {
  background: #fdf4e3; border: 1px solid #f3dba8; border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 14px; color: #6b4e12; margin: 20px 0;
}

/* ===================================================================
   Dark theme — the toggle sets data-theme="dark" on <html>.
   Most of the page reads CSS vars, so these overrides do most of the work;
   the rest patch hardcoded-#fff surfaces. The 3D "screens" stay dark in both.
   =================================================================== */
:root[data-theme="dark"] {
  --bg: #0a0e17;
  --bg-soft: #0f1420;
  --panel: #121826;
  --ink: #eaf0fb;
  --ink-strong: #f6f9ff;
  --body: #aeb9cf;
  --muted: #8593ad;
  --line: #1e2636;
  --line-strong: #2b3446;
  --brand: #3b82f6;
  --brand-d: #60a5fa;
  --navy: #0b1a33;
  --tint: #16233d;
  --accent: #2dd4bf;
  --accent-tint: #10241f;
  --ok: #22c55e;
  --amber: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .5);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 48px rgba(0, 0, 0, .62);
  --heading: #eaf0fb;
  --text-muted: #8593ad;
  --surface: #121826;
  --surface-hover: #1a2233;
  --accent-cyan: #3b82f6;
  --accent-purple: #1e3a8a;
}
:root[data-theme="dark"] .header { background: rgba(10, 14, 23, .82); }
:root[data-theme="dark"] .header .logo-text { color: #fff; }
:root[data-theme="dark"] .mobile-nav,
:root[data-theme="dark"] .hero-badge,
:root[data-theme="dark"] .btn--ghost,
:root[data-theme="dark"] .util-chip,
:root[data-theme="dark"] .calendar-nav-btn,
:root[data-theme="dark"] .slot-btn,
:root[data-theme="dark"] .booking-btn-back,
:root[data-theme="dark"] .booking-modal,
:root[data-theme="dark"] .booking-container,
:root[data-theme="dark"] .author { background: var(--panel); color: var(--ink); }
/* the rule above is more specific than .slot-btn.booked, so restate it here */
:root[data-theme="dark"] .slot-btn.booked { background: var(--bg-soft); color: var(--muted); }
:root[data-theme="dark"] .booking-input,
:root[data-theme="dark"] .booking-summary { background: var(--bg-soft); color: var(--ink); }
:root[data-theme="dark"] .icon-tile { background: var(--tint); }
:root[data-theme="dark"] .chip { background: var(--tint); border-color: var(--line-strong); color: var(--ink); }
:root[data-theme="dark"] ::selection { background: #24406e; color: #eaf0fb; }
body, .header, .card, .tcard, .booking-modal { transition: background-color .3s ease, border-color .3s ease, color .3s ease; }

/* theme toggle chip */
.util-chip.theme-toggle { font-size: 15px; line-height: 1; padding: 8px 12px; }
