/* ==========================================================================
   components.css - navbar, nav drawer, badges, video facade, footer
   ========================================================================== */

/* ==========================================================================
   navbar
   Solid surface only - no backdrop blur, no glassmorphism. It starts
   transparent over the hero and turns opaque once the page scrolls.
   ========================================================================== */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background-color: transparent;
  transition: background-color var(--t-mid) var(--ease);
}

.navbar.is-solid {
  background-color: var(--bg-deep);
}

.navbar__inner {
  width: 100%;
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text);
}

.brand img {
  height: 34px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav-links a {
  position: relative;
  padding-block: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color var(--t-fast) var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--text);
}

/* ---------- mobile toggle ---------- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-sm);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  transition: transform var(--t-mid) var(--ease),
    opacity var(--t-fast) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   badges
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.35em 0.85em;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--live {
  color: var(--c-cyan);
  background: rgba(63, 224, 255, 0.1);
}

.badge--wip {
  color: var(--c-red);
  background: rgba(255, 77, 109, 0.1);
}

/* ==========================================================================
   video facade
   The YouTube iframe is heavy, so we ship a poster + play button and swap
   in the real player only after a click.
   ========================================================================== */

.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-md);
  background-color: var(--bg-deep);
}

.video iframe,
.video__thumb {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* absolute so their height resolves against the aspect-ratio box, and so a
   4:3 YouTube thumbnail crops cleanly to 16:9 instead of showing letterbox */
.video iframe,
.video__thumb,
.video__play {
  position: absolute;
  inset: 0;
}

.video__play {
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.video__play::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 17, 0.35);
  transition: background-color var(--t-mid) var(--ease);
}

.video__play:hover::after {
  background: rgba(4, 7, 17, 0.15);
}

.video__play-icon {
  position: relative;
  z-index: 1;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c-cyan);
  color: var(--text-ink);
  transition: transform var(--t-mid) var(--ease);
}

.video__play:hover .video__play-icon {
  transform: scale(1.08);
}

.video__play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid currentColor;
}

/* ==========================================================================
   footer
   ========================================================================== */

.footer {
  padding-block: var(--sp-7);
  background-color: var(--bg-deep);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.footer__brand img {
  height: 24px;
  width: auto;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  font-size: var(--fs-sm);
}

.footer__links a {
  color: var(--text-muted);
}

.footer__links a:hover {
  color: var(--c-cyan);
}

.footer__legal {
  width: 100%;
  padding-top: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}
