/* Shared GAIMAN.IO header, footer and Masterclass banner.
   Used by the React app and by the standalone content pages.
   All selectors are gx- prefixed so page styles and shell styles do not collide. */

:root {
  --gx-blue: #2563eb;
  --gx-blue-dark: #1d4ed8;
  --gx-ink: #18181b;
  --gx-muted: #52525b;
  --gx-line: #e4e4e7;
  --gx-paper: #fafaf9;
  --gx-dark: #09090b;
  --gx-header-h: 64px;
}

.gx-header, .gx-header *, .gx-footer, .gx-footer *, .gx-banner, .gx-banner * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.4;
  text-shadow: none;
}
.gx-header :where(a), .gx-footer :where(a), .gx-banner :where(a) { text-decoration: none; color: inherit; background: none; border: 0; }
.gx-header :where(button) { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
.gx-header svg, .gx-footer svg { display: block; }

/* ---------- Header ---------- */
.gx-header {
  position: sticky;
  top: 0;
  z-index: 40; /* below modal dialogs (z-50) */
  width: 100%;
  color: var(--gx-ink);
  background: rgba(250, 250, 249, 0.97);
  border-bottom: 1px solid var(--gx-line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.gx-header--overlay { position: fixed; left: 0; right: 0; }
.gx-header--overlay:not(.is-scrolled):not(.is-open) { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.gx-header.is-scrolled { box-shadow: 0 1px 12px rgba(0, 0, 0, .06); }

.gx-header__bar {
  max-width: 1400px;
  margin: 0 auto;
  height: var(--gx-header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.gx-logo {
  font-family: "Oswald", "Inter", sans-serif !important;
  font-weight: 700;
  font-size: 21px;
  text-transform: uppercase !important;
  color: var(--gx-ink);
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .2s;
}
.gx-logo:hover { opacity: .7; }
.gx-logo--light { color: #fff; font-size: 24px; }

.gx-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.gx-nav__item { position: relative; display: flex; align-items: center; }
.gx-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gx-muted);
  white-space: nowrap;
  transition: color .15s, background-color .15s;
}
.gx-nav__link:hover { color: var(--gx-ink); background: rgba(0, 0, 0, .04); }
.gx-nav__link[aria-current="page"] { color: var(--gx-ink); }
.gx-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gx-blue);
}
.gx-nav__item--menu .gx-nav__link { padding-right: 4px; }
.gx-nav__item--menu .gx-nav__link[aria-current="page"]::after { right: 4px; }
.gx-nav__caret { padding: 8px 8px 8px 2px; color: var(--gx-muted); border-radius: 6px; }
.gx-nav__caret:hover { color: var(--gx-ink); }
.gx-nav__caret svg { transition: transform .2s; }
.gx-nav__item--menu.is-open .gx-nav__caret svg { transform: rotate(180deg); }

.gx-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--gx-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.gx-dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.gx-nav__item--menu:hover .gx-dropdown,
.gx-nav__item--menu:focus-within .gx-dropdown,
.gx-nav__item--menu.is-open .gx-dropdown { opacity: 1; visibility: visible; transform: none; }
.gx-dropdown__link { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--gx-muted); }
.gx-dropdown__link:hover { background: #f4f4f5; color: var(--gx-ink); }
.gx-dropdown__link--lead { font-weight: 700; color: var(--gx-ink); border-bottom: 1px solid var(--gx-line); border-radius: 8px 8px 0 0; margin-bottom: 4px; }

.gx-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.gx-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--gx-blue);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .15s;
}
.gx-cta:hover { background: var(--gx-blue-dark); }
.gx-cta__short { display: none; }
.gx-burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 8px; }
.gx-burger:hover { background: rgba(0, 0, 0, .05); }
.gx-burger__close { display: none !important; }
.gx-header.is-open .gx-burger__open { display: none !important; }
.gx-header.is-open .gx-burger__close { display: block !important; }

.gx-mobile {
  border-top: 1px solid var(--gx-line);
  background: var(--gx-paper);
  padding: 12px 20px 20px;
  max-height: calc(100vh - var(--gx-header-h));
  overflow-y: auto;
}
.gx-mobile[hidden] { display: none; }
.gx-mobile__link { display: block; padding: 12px 8px; border-radius: 8px; font-size: 17px; font-weight: 700; color: var(--gx-ink); }
.gx-mobile__link[aria-current="page"] { color: var(--gx-blue); }
.gx-mobile__link:hover { background: #f4f4f5; }
.gx-mobile__sub { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 10px; }
.gx-mobile__sub a { padding: 6px 12px; border-radius: 999px; background: #f4f4f5; font-size: 13.5px; font-weight: 600; color: var(--gx-muted); }
.gx-mobile__contact { margin-top: 12px; padding: 14px 8px 0; border-top: 1px solid var(--gx-line); font-size: 14px; color: var(--gx-muted); }
.gx-mobile__contact a { font-weight: 600; color: var(--gx-ink); }
.gx-mobile__cta { display: block; margin-top: 14px; padding: 14px; border-radius: 8px; background: var(--gx-blue); color: #fff !important; text-align: center; font-weight: 700; font-size: 15px; }

@media (max-width: 1080px) {
  .gx-nav { display: none; }
  .gx-burger { display: inline-flex; }
}
@media (max-width: 520px) {
  .gx-header__bar { padding: 0 16px; gap: 12px; }
  .gx-logo { font-size: 19px; }
  .gx-cta { padding: 0 14px; height: 38px; font-size: 13.5px; }
  .gx-cta__long { display: none; }
  .gx-cta__short { display: inline; }
}

/* ---------- Footer ---------- */
.gx-footer { background: var(--gx-dark); color: #a1a1aa; padding: 72px 0 40px; }
.gx-footer__inner { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.gx-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.gx-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.gx-footer__name { font-size: 14px; color: #71717a; margin-bottom: 10px; }
.gx-footer__about { font-size: 14px; line-height: 1.6; max-width: 320px; margin-bottom: 12px; }
.gx-footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.gx-footer__title { color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase !important; letter-spacing: .1em !important; margin-bottom: 6px; }
.gx-footer__link { font-size: 14px; color: #a1a1aa; transition: color .15s; }
.gx-footer__link:hover { color: #fff; }
.gx-footer__link--strong { color: #fff; font-weight: 600; }
.gx-footer__link--strong:hover { color: #93c5fd; }
.gx-footer__bottom { margin-top: 56px; padding-top: 28px; border-top: 1px solid #27272a; font-size: 12.5px; color: #71717a; }
@media (max-width: 900px) {
  .gx-footer__grid { grid-template-columns: 1fr 1fr; }
  .gx-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .gx-footer { padding-top: 56px; }
  .gx-footer__inner { padding: 0 20px; }
  .gx-footer__grid { gap: 32px 20px; }
}

/* ---------- Masterclass banner ---------- */
.gx-banner { background: var(--gx-blue); color: #fff; padding: 44px 24px; }
.gx-banner__inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.gx-banner__eyebrow { font-size: 12px; font-weight: 800; text-transform: uppercase !important; letter-spacing: .12em !important; color: rgba(255, 255, 255, .78); margin-bottom: 8px; }
.gx-banner__title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em !important; color: #fff; margin-bottom: 8px; }
.gx-banner__text { font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .86); max-width: 620px; }
.gx-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 52px;
  padding: 0 26px;
  border-radius: 8px;
  background: #fff;
  color: var(--gx-blue) !important;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  transition: background-color .15s;
}
.gx-button:hover { background: #eef2ff; }
@media (max-width: 760px) {
  .gx-banner__inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .gx-button { width: 100%; }
}

/* ---------- Content pages: shared typography ---------- */
.gx-page { font-family: "Inter", system-ui, -apple-system, sans-serif; }
.gx-page h1, .gx-page h2 { font-family: "Inter", system-ui, sans-serif; text-transform: none; font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; }
.gx-page h3 { font-family: "Inter", system-ui, sans-serif; text-transform: none; letter-spacing: -0.01em; }

/* Early-bird labels are removed by site-shell.js after the deadline. */
[data-gx-until].is-expired { display: none !important; }
.gx-earlybird { font-weight: 700; white-space: nowrap; }
