/* ===== reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }

:root {
  --deep: #0B1030;
  --midnight: #151C4A;
  --violet: #8B5CF6;
  --cyan: #22D3EE;
  --orange: #FF7A1A;
  --stone: #2A2F45;
  --cream: #F3EFE6;
  --moss: #6BAE8E;
  --clay: #C1663F;
  --white: #FFFFFF;

  --ink: #F3EFE6;
  --ink-dim: rgba(243, 239, 230, 0.76);
  --ink-faint: rgba(243, 239, 230, 0.54);

  --font-sans: "HarmonyOS Sans", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  --shell: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 70px;
  --shadow-hard: 6px 6px 0 rgba(139, 92, 246, 0.3);
  --ease: cubic-bezier(0.22, 0.68, 0.36, 1);
}

body {
  background-color: var(--deep);
  background-image:
    radial-gradient(900px 520px at 88% -10%, rgba(139, 92, 246, 0.22), transparent 62%),
    radial-gradient(720px 460px at -8% 18%, rgba(34, 211, 238, 0.14), transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 { line-height: 1.25; color: var(--white); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 5.4vw, 64px); font-weight: 900; }
h2 { font-size: clamp(24px, 3.4vw, 40px); }
h3 { font-size: clamp(19px, 2.2vw, 24px); }
p { text-wrap: pretty; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

::selection { background: var(--violet); color: var(--white); }

/* ===== skip link ===== */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--orange);
  color: #180A02;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--deep);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ===== scroll progress ===== */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--violet), var(--cyan) 52%, var(--orange));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
  z-index: 90;
  pointer-events: none;
}

/* ===== header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 16, 48, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stone);
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.site-header.is-condensed {
  background: rgba(11, 16, 48, 0.99);
  border-bottom-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 12px 34px rgba(4, 6, 22, 0.72);
}
.header-inner {
  height: var(--header-h);
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: height 0.25s var(--ease);
}
.site-header.is-condensed .header-inner { height: 58px; }

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  background: linear-gradient(140deg, var(--violet), var(--cyan) 72%);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.8);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-name { font-size: 17px; font-weight: 800; color: var(--white); letter-spacing: 0.02em; }
.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
}

/* mobile nav panel */
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: min(84vw, 340px);
  height: 100dvh;
  z-index: 70;
  padding: 96px var(--gutter) 36px;
  overflow-y: auto;
  background: var(--midnight);
  border-left: 1px solid rgba(139, 92, 246, 0.55);
  box-shadow: -18px 0 50px rgba(4, 6, 22, 0.8);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0.3s var(--ease);
}
.site-header[data-open="true"] .site-nav { transform: none; visibility: visible; }

.nav-list { list-style: none; display: grid; gap: 4px; }
.nav-item { display: block; }
.nav-link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 14px;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-link:hover,
.nav-link:focus-visible {
  border-color: var(--violet);
  background: rgba(139, 92, 246, 0.14);
  color: var(--white);
}
.nav-link[aria-current="page"] {
  color: var(--white);
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  box-shadow: inset 3px 0 0 var(--orange);
}
.nav-index {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.06em;
}
.nav-link[aria-current="page"] .nav-index { color: var(--orange); }

.header-actions { margin-left: auto; display: flex; align-items: center; }
.header-actions .btn { padding: 10px 14px; font-size: 12px; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  background: transparent;
  border: 1px solid var(--stone);
  color: var(--ink-dim);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan); color: var(--white); }
.site-header[data-open="true"] .nav-toggle { border-color: var(--violet); color: var(--white); }
.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cyan);
  transition: background-color 0.2s var(--ease);
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--cyan);
  transition: transform 0.22s var(--ease), top 0.22s var(--ease);
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.site-header[data-open="true"] .nav-toggle-bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    transform: none;
    visibility: visible;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    margin-left: auto;
  }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-link { padding: 9px 12px; font-size: 15px; gap: 8px; border-bottom: 2px solid transparent; }
  .nav-link[aria-current="page"] { box-shadow: none; border-color: transparent; border-bottom-color: var(--cyan); background: rgba(34, 211, 238, 0.08); }
  .header-actions { margin-left: 14px; }
  .header-actions .btn { padding: 11px 16px; font-size: 12.5px; }
}

/* ===== footer ===== */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--deep);
  border-top: 1px solid var(--stone);
}
.footer-rule {
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan) 46%, var(--orange) 88%);
}
.footer-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1.15fr 1.35fr; gap: 40px; }
}
.footer-brand { display: grid; gap: 10px; align-content: start; }
.footer-logo { font-size: 22px; font-weight: 900; color: var(--white); letter-spacing: 0.02em; }
.footer-slogan {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-transform: uppercase;
}
.footer-note { font-size: 14px; line-height: 1.8; color: var(--ink-faint); max-width: 34ch; }
.footer-col { display: grid; gap: 14px; align-content: start; }
.footer-heading {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stone);
}
.footer-links { list-style: none; display: grid; gap: 10px; }
.footer-links--inline { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 4px; }
.footer-links a {
  color: var(--ink-dim);
  font-size: 14.5px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-links a:hover,
.footer-links a:focus-visible { color: var(--cyan); border-bottom-color: var(--cyan); }
.footer-meta { list-style: none; display: grid; gap: 9px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-dim); }
.footer-meta li { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-meta-key { color: var(--moss); flex: none; }
.footer-bottom {
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 18px;
  border-top: 1px solid var(--stone);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
}
.footer-legal { font-size: 12.5px; color: var(--ink-faint); }
.footer-legal--mono { font-family: var(--font-mono); letter-spacing: 0.06em; }

/* ===== buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  background: transparent;
  border: 1px solid var(--stone);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { border-color: var(--cyan); color: var(--white); box-shadow: var(--shadow-hard); }
.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #1A0B02;
  box-shadow: 4px 4px 0 rgba(139, 92, 246, 0.4);
}
.btn-primary:hover {
  color: #1A0B02;
  border-color: var(--orange);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(139, 92, 246, 0.5);
}
.btn-ghost { border-color: rgba(34, 211, 238, 0.6); color: var(--cyan); }

/* ===== layout primitives ===== */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { position: relative; padding-block: clamp(48px, 8vw, 96px); }
.section--tight { padding-block: clamp(28px, 4vw, 48px); }
.section-header { display: grid; gap: 10px; max-width: 760px; margin-bottom: clamp(24px, 4vw, 42px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ===== prose ===== */
.prose { max-width: 720px; color: var(--ink-dim); font-size: 17px; line-height: 1.85; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { color: var(--white); font-size: clamp(22px, 3vw, 32px); margin-top: 1.9em; }
.prose h3 { color: var(--cream); font-size: clamp(18px, 2.2vw, 23px); margin-top: 1.7em; }
.prose strong { color: var(--white); }
.prose a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(34, 211, 238, 0.5); }
.prose a:hover { color: var(--white); border-bottom-color: var(--orange); }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 0.5em; }
.prose li::marker { color: var(--orange); font-family: var(--font-mono); }

/* ===== breadcrumbs ===== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.breadcrumbs a { color: var(--ink-dim); text-decoration: none; }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs span[aria-hidden="true"] { color: var(--violet); }

/* ===== media ===== */
.media-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(34, 211, 238, 0.14) 55%, rgba(11, 16, 48, 0) 100%),
    var(--midnight);
  border: 1px solid var(--stone);
  box-shadow: var(--shadow-hard);
}
.media-frame > img,
.media-frame > video,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* ===== tabs ===== */
.tabs { display: grid; gap: 20px; }
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stone);
}
.tab {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--stone);
  color: var(--ink-dim);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.tab:hover { color: var(--white); border-color: var(--violet); }
.tab[aria-selected="true"] {
  color: var(--white);
  border-color: var(--violet);
  background: rgba(139, 92, 246, 0.18);
  box-shadow: inset 0 -2px 0 var(--orange);
}
.tab-panel { padding-top: 6px; }
.tab-panel[hidden] { display: none; }

/* ===== status pills ===== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill--open { color: var(--moss); }
.status-pill--live { color: var(--cyan); }
.status-pill--closed { color: var(--clay); }

/* ===== reveal ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--delay, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ===== motion safety ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .scroll-progress { display: none; }
}
