/* Question Nova - the site's one stylesheet: header, footer, and the 404 page */

:root {
  --bg-primary: #031427;
  --bg-header: rgba(2, 11, 22, 0.88);
  --border-subtle: #1b2b3f;
  --border-hover: #29405d;
  --text-primary: #ffffff;
  --text-body: #cbd5e1;
  --text-muted: #8fa5bf;
  --header-h: 72px;
}

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

body {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #7dd3fc; outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: var(--bg-header);
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.header-inner {
  max-width: 1200px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-logo { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-logo img { width: 40px; height: 40px; border-radius: 9px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.qn-word-a, .qn-word-b { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.qn-word-a { background-image: linear-gradient(180deg, #1a8fe0 0%, #00d4f0 100%); }
.qn-word-b { background-image: linear-gradient(180deg, #ffffff 0%, #c4cad3 100%); }

/* ---- Page ---- */
.page-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 96px;
  flex: 1 0 auto;
}

/* ---- Home ---- */
.home-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
  padding: 24px;
  background: #071a30;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.home-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.home-card-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #38bdf8; }
.home-card-title { font-size: 22px; font-weight: 800; }
.home-card-text { font-size: 15px; line-height: 1.6; color: var(--text-body); }

/* ---- 404 ---- */
.not-found { max-width: 780px; text-align: center; }
.page-title { margin-bottom: 24px; font-size: clamp(28px, 4.6vw, 46px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.not-found p { margin-bottom: 16px; font-size: 17px; line-height: 1.8; color: var(--text-body); }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 800;
  color: #fff;
  background-image: linear-gradient(110deg, #1a56db, #0b6fb3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 20px -10px rgba(0, 184, 224, 0.7);
}
.btn:hover { filter: brightness(1.1); }

/* ---- Footer ---- */
.site-footer { width: 100%; margin-top: auto; padding: 40px 32px; background: #020c18; border-top: 1px solid var(--border-subtle); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-name { font-size: 17px; }
.footer-copy { font-size: 13px; color: var(--text-muted); }

@media (max-width: 1024px) {
  :root { --header-h: 62px; }
  .header-inner { padding: 0 20px; }
  .page-main { padding: 36px 20px 72px; }
}

@media (max-width: 720px) {
  :root { --header-h: 56px; }
  .header-inner { padding: 0 14px; }
  .brand-logo img { width: 34px; height: 34px; }
  .brand-name { font-size: 16px; }
  .page-main { padding: 28px 16px 60px; }
  .not-found p { font-size: 16px; line-height: 1.75; }
  .site-footer { padding: 32px 16px; }
}
