/* ==========================================================================
   HKBIT — shared styles
   Brand colors
     --ink      #0B1B2B  headings / main text
     --body     #3B4C5C  paragraph text
     --muted    #4F6070  small labels
     --blue     #0369A1  primary accent
     --green    #047857  secondary accent
     --orange   #C2410C  emergency
     --bg       #F5F8FB  page background
     --line     #DCE6EE  borders
   Most section layout lives inline in each page; shared pieces live here.
   ========================================================================== */

:root {
  --ink: #0B1B2B;
  --body: #3B4C5C;
  --muted: #4F6070;
  --blue: #0369A1;
  --blue-dark: #075985;
  --green: #047857;
  --orange: #C2410C;
  --bg: #F5F8FB;
  --line: #DCE6EE;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Chakra Petch', 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-logo: 'Orbitron', 'Chakra Petch', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

img, svg { max-width: 100%; }

a { color: var(--blue); transition: filter .15s ease, box-shadow .15s ease, background-color .15s ease; }
a:hover { color: var(--blue-dark); filter: brightness(.94); }

:focus-visible { outline: 3px solid #0284C7; outline-offset: 2px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #0284C7; outline-offset: 1px; }

.page { font-family: var(--font-body); color: var(--ink); background: var(--bg); line-height: 1.6; overflow-x: clip; } /* clip (not hidden) keeps the sticky header working */

.container { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Skip link (keyboard users) */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 16px; color: #fff; }

/* ---------- Emergency bar ---------- */
.emergency-bar {
  background: #FFF1E7; border-bottom: 1px solid #F6CBAE;
  font-family: var(--font-mono); font-size: 14px;
}
.emergency-bar__inner {
  display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; justify-content: space-between;
  padding-top: 8px; padding-bottom: 8px;
}
.emergency-bar__link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 32px;
  color: #9A3412; font-weight: 500; text-decoration: none;
}
.emergency-bar__link:hover { color: #7C2D12; text-decoration: underline; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #EA580C; box-shadow: 0 0 8px #FB923C;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.logo {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration: none;
  font-family: var(--font-logo); font-weight: 800; font-size: 24px; letter-spacing: .06em;
}
.logo:hover { filter: none; }
.logo__hk { color: #5B6B7A; }
.logo__bit { color: var(--blue); text-shadow: 0 0 12px rgba(3, 105, 161, .25); }

.site-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.site-nav ul {
  display: flex; flex-wrap: wrap; gap: 2px 22px; align-items: center;
  margin: 0; padding: 0; list-style: none;
  font-family: var(--font-head); font-size: 15px; font-weight: 600; letter-spacing: .04em;
}
.site-nav ul a {
  display: inline-block; padding: 10px 0 8px; color: var(--body); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav ul a:hover { color: var(--blue); border-bottom-color: rgba(3, 105, 161, .35); filter: none; }
.site-nav ul a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }

.nav-toggle {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  background: #fff; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s ease;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons (shared) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px;
  font-family: var(--font-head); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 4px 16px rgba(3, 105, 161, .2); }
.btn--primary:hover { color: #fff; }
.btn--sm { font-size: 15px; }

/* ---------- FAQ ---------- */
details > summary { cursor: pointer; list-style: none; position: relative; padding-right: 32px !important; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 22px; color: var(--blue);
}
details[open] > summary::after { content: "−"; }

/* ---------- Forms ---------- */
input, select, textarea { max-width: 100%; }
button[type="submit"]:hover { filter: brightness(.94); }

/* ---------- Mobile ---------- */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding: 8px 0 12px; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; font-size: 17px; }
  .site-nav ul a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav ul a[aria-current="page"] { border-bottom: 1px solid var(--line); border-left: 3px solid var(--blue); padding-left: 12px; }
  .site-nav .btn { width: 100%; min-height: 52px; }
}

@media (max-width: 560px) {
  .emergency-bar { font-size: 12px; }
}
