/* =========================================================
   HEADER — glass topbar over the hero, Explore mega menu,
   mobile drawer, counselling modal. (Template look kept.)
   Fixes: readable on light pages (.topbar--solid), working
   stream tabs, [hidden]-driven open states, focus styles.
========================================================= */

/* --- Topbar --- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  background: linear-gradient(180deg, rgba(8,12,20,.55), rgba(8,12,20,.08));
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background-color .2s ease, backdrop-filter .2s ease;
}
.topbar.scrolled, .topbar--solid {
  background: rgba(10,13,20,.92);
  border-bottom-color: rgba(0,0,0,.25);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}
.nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; height: 64px; }
.nav-left { display: flex; align-items: center; gap: 12px; }
.logo-link { display: inline-flex; }
.logo { height: 36px; width: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }

/* --- Explore + mega --- */
.explore-wrap { position: relative; display: flex; justify-content: center; }
.explore-btn {
  width: min(560px, 48vw); height: 44px; padding: 0 1.2rem;
  border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: .95rem; font-weight: 600;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 6px 16px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.10);
  transition: background .18s ease, border-color .18s ease;
}
.explore-btn:hover, .explore-btn[aria-expanded="true"] { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.55); }
.explore-btn .grid, .explore-btn .chev { width: 18px; height: 18px; }
.explore-btn .chev { transition: transform .18s ease; }
.explore-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.mega {
  position: absolute; left: 50%; transform: translateX(-50%); top: 54px;
  width: min(1020px, 96vw);
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-l); z-index: 140; overflow: hidden;
}
.mega-grid { display: grid; grid-template-columns: 220px 1fr; }
.mega-side { padding: 10px; background: #f7f9fd; border-right: 1px solid var(--line); display: grid; align-content: start; gap: 2px; }
.mega-tab {
  text-align: left; border: 0; background: transparent; cursor: pointer;
  padding: .5rem .7rem; border-radius: 8px; color: #243142; font-weight: 600; font-size: .93rem;
}
.mega-tab:hover, .mega-tab.active { background: #eaf1ff; }
.mega-tab.active { color: var(--brand-ink); box-shadow: inset 3px 0 0 var(--brand); }
.mega-main { padding: 14px 18px; display: flex; flex-direction: column; }
.mega-cols { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 18px; }
.mega-cols h5 { margin: .2rem 0 .5rem; font-size: .94rem; font-weight: 700; color: #2a3342; }
.mega-cols a { display: block; margin: .28rem 0; color: #364254; font-size: .88rem; line-height: 1.3rem; }
.mega-cols a:hover { color: var(--brand-ink); }
.mega-more { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.mega-more a { display: inline-flex; align-items: center; gap: 4px; padding: .38rem .7rem; border-radius: 999px; background: #fff3ee; color: var(--brand-ink); font-weight: 600; font-size: .86rem; }
.mega-more a .ico { width: 14px; height: 14px; }
.mega-more a:hover { background: #ffe5da; }
@media (max-width: 1000px) { .mega-cols { grid-template-columns: repeat(3, 1fr); } }

/* --- CTA --- */
.btn-cta {
  background: linear-gradient(180deg, #ff834f 0%, var(--brand) 100%); color: #fff;
  height: 42px; padding: 0 1rem; border-radius: 999px; font-weight: 600;
  box-shadow: 0 10px 18px rgba(241,94,55,.25);
}
.btn-cta:hover { filter: brightness(1.04); }
.btn-cta .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: .9; animation: ctaPulse 2.4s ease-in-out infinite; }
@keyframes ctaPulse { 0%, 100% { opacity: .9; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .btn-cta .dot { animation: none; } }
.cta-short { display: none; }
.topbar.scrolled .btn-cta, .topbar--solid .btn-cta { box-shadow: none; }

/* --- Hamburger --- */
.hamburger {
  display: none; width: 42px; height: 42px; border-radius: 10px; cursor: pointer; place-items: center;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: #fff;
}
.hamburger .ico { width: 22px; height: 22px; }
@media (max-width: 768px) {
  .nav { grid-template-columns: minmax(0, 1fr) auto; }
  .explore-wrap { display: none; }
  .logo { max-width: none; }
  .hamburger { display: grid; }
  .logo { height: 30px; }
}
@media (max-width: 480px) {
  .nav { gap: 8px; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .btn-cta { height: 38px; padding: 0 .8rem; font-size: .88rem; }
}

/* =========================================================
   DRAWER (mobile)
========================================================= */
.drawer-wrap { position: fixed; inset: 0; z-index: 300; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.48); }
.drawer {
  position: absolute; top: 0; left: 0; height: 100%; width: min(92vw, 560px);
  background: #fff; box-shadow: 24px 0 64px rgba(0,0,0,.32);
  display: flex; flex-direction: column; animation: drawerIn .22s ease;
}
@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #0f1420; }
.drawer-head .drawer-close { color: #fff; }
.drawer-logo { height: 28px; width: auto; }
.drawer-close { background: transparent; border: 0; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.drawer-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 130px 1fr; }
.drawer-side { background: #f5f7fb; border-right: 1px solid #e6ecf3; overflow-y: auto; padding: 8px 0; display: flex; flex-direction: column; }
.drawer-side button {
  text-align: left; border: 0; background: none; cursor: pointer;
  padding: .72rem .9rem; border-left: 3px solid transparent; color: #2c3a4a; font-weight: 600; font-size: .92rem;
}
.drawer-side button.active { background: #fff; border-left-color: var(--brand); color: var(--brand-ink); }
.drawer-main { overflow-y: auto; padding: 4px 14px 20px; }
.drawer-more { display: grid; gap: 2px; margin-top: 14px; padding-top: 10px; border-top: 1px solid #eef2f8; }
.drawer-more a { padding: .55rem 0; color: var(--ink); font-weight: 600; }

/* --- Accordion --- */
.acc { border-bottom: 1px solid #eef2f8; }
.acc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 0; border: 0; background: none; cursor: pointer; font-weight: 700; font-size: .96rem; color: var(--ink); text-align: left;
}
.acc-head .chev { width: 18px; height: 18px; color: #384457; transition: transform .18s ease; }
.acc-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.acc-panel { display: none; padding: 0 0 10px; }
.acc-head[aria-expanded="true"] + .acc-panel { display: block; }
.acc-panel a { display: block; padding: .4rem 0; color: #2f3b4e; }
.acc-panel a:hover { color: var(--brand-ink); }

/* =========================================================
   COUNSELLING MODAL
========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,12,.58); padding: 16px;
}
.dialog {
  width: min(1000px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  border-radius: 16px; background: #fff; box-shadow: var(--shadow-l);
  animation: dlgIn .18s ease;
}
@keyframes dlgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dialog { animation: none; } }
.dialog { position: relative; }
.dialog-head--cd { position: absolute; top: 10px; right: 10px; z-index: 2; }
.btn-x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f2f4f7; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.dialog-body--cd { display: grid; grid-template-columns: 320px 1fr; }
@media (max-width: 860px) { .dialog-body--cd { grid-template-columns: 1fr; } .cd-left { display: none; } }

.cd-left { background: #fafbff; border-right: 1px solid #eef2f8; padding: 22px 18px; }
.cd-h { margin: 4px 0 12px; font-size: 1.02rem; }
.cd-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cd-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px;
  background: #fff; border: 1px solid #e9eef6; border-radius: 12px; padding: 14px 10px;
}
.cd-ico { width: 34px; height: 34px; border-radius: 10px; background: #fff3ee; color: var(--brand-ink); display: grid; place-items: center; }
.cd-ico .ico { width: 18px; height: 18px; }
.cd-txt { font-weight: 600; font-size: .88rem; color: var(--ink); line-height: 1.25; }
.cd-sep { height: 1px; background: #eef2f8; margin: 16px 0; }
.cd-promise { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .88rem; color: #4a5566; }
.cd-promise li { display: flex; gap: 8px; align-items: flex-start; }
.cd-promise .ico { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; }

.cd-right { padding: 22px 60px 22px 22px; }
.cd-title { margin: 0 0 16px; font-size: 1.35rem; }
.cd-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
@media (max-width: 600px) { .cd-form { grid-template-columns: 1fr; } .cd-right { padding: 18px 16px; } .cd-title { padding-right: 44px; } }
.span-2 { grid-column: 1 / -1; }

/* Floating labels (CSS only, works without JS) */
.fl { position: relative; border: 1px solid #d4dce7; border-radius: 10px; background: #fff; }
.fl:focus-within { border-color: #7aa7f7; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.fl input, .fl select {
  width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink);
  font-size: 1rem; padding: 20px 12px 8px; min-height: 52px; -webkit-appearance: none; appearance: none;
}
.fl select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23556' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; padding-right: 36px; }
.fl label {
  position: absolute; left: 12px; top: 15px; color: #6b7380; pointer-events: none;
  transition: transform .15s ease, color .15s ease; transform-origin: left top; font-size: .98rem;
}
.fl input:focus + label, .fl input:not(:placeholder-shown) + label,
.fl select:focus + label, .fl select.filled + label { transform: translateY(-9px) scale(.78); color: #42526d; }
.fl.is-invalid { border-color: #dc2626; }
.cd-terms { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: #566077; }
.cd-terms input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--brand-ink); }
.cd-err { margin: 0; color: #b91c1c; font-size: .88rem; }
.cd-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.cd-login { color: var(--brand-ink); font-weight: 600; font-size: .94rem; }
.btn-submit {
  background: linear-gradient(180deg, #ff8a5c 0%, var(--brand) 100%); color: #fff; border: 0; border-radius: 12px;
  min-width: 160px; height: 48px; padding: 0 1.4rem; font-weight: 800; letter-spacing: .02em; cursor: pointer;
  box-shadow: 0 12px 22px rgba(241,94,55,.24);
}
.btn-submit:hover { filter: brightness(1.04); }
.btn-submit.is-busy { opacity: .7; pointer-events: none; }
.cd-done { text-align: center; padding: 28px 10px 18px; }
.cd-done-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: inline-grid; place-items: center; }
.cd-done-ico .ico { width: 28px; height: 28px; }
.cd-done h3 { margin: 12px 0 6px; font-size: 1.2rem; }
.cd-done p { margin: 0 auto; max-width: 420px; color: var(--muted); }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
