:root {
  --bg: #0b0f14;
  --fg: #e6eef7;
  --muted: #9aa9b8;
  --panel: #121821;
  --line: #1e2732;
  --brand: #e6eef7;
  --accent: #9bd2ff;
  --focus: #8fb7ff;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Open Sans', system-ui, sans-serif;
  line-height: 1.5;
}

h1, h2, h3, nav a.brand, .nav-link, .btn, .menu-title, .brand-text {
  font-family: 'Baloo 2', system-ui, sans-serif;
}

/* Link reset + states */
a { color: var(--fg); text-decoration: none; }
a:visited { color: var(--fg); }
a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Nav link polish */
.nav-link, .mobile-link { text-decoration: none; }
.nav-link:hover, .mobile-link:hover { color: var(--accent); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
}
.brand img { height: 36px; width: 36px; }
.brand-text { color: var(--brand); }

.nav-links { display: none; gap: 24px; }
.nav-link { font-weight: 700; font-size: 1.05rem; }

.nav-toggle {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: transparent;
  color: var(--fg);
}

.mobile-panel-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  z-index: 1000;            /* ensure backdrop above page, below panel */
}
.mobile-panel {
  position: fixed; top: 0; right: -320px;
  width: 80vw; max-width: 320px; height: 100vh;
  background: var(--panel);
  border-left: 1px solid var(--line);
  transition: right .25s;
  display: flex; flex-direction: column;
  z-index: 1100;            /* ensure panel above everything else */
}

.mobile-panel header {
  display: flex; justify-content: space-between;
  align-items: center; padding: 18px;
  border-bottom: 1px solid var(--line);
}
.mobile-panel nav {
  display: grid; gap: 4px;
  padding: 10px 12px;
}
.mobile-link {
  padding: 14px 12px;
  border-radius: 12px;
  font-size: 1.1rem;
}

.mobile-open .mobile-panel { right: 0; }
.mobile-open .mobile-panel-backdrop { opacity: 1; pointer-events: auto; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle, .mobile-panel, .mobile-panel-backdrop { display: none; }
}

/* Footer */
.site-footer {
  margin-top: 24px;              /* tighter spacing from content */
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;                      /* less gap between rows */
  padding: 8px 0;                /* less vertical padding */
  text-align: center;
}

.socials {
  display: flex;
  gap: 10px;                     /* smaller gap between icons */
  justify-content: center;
}

.socials a {
  height: 32px;                  /* smaller box */
  width: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.socials svg {
  width: 18px;                   /* smaller glyph */
  height: 18px;
  fill: var(--fg);               /* keep icons white */
  opacity: 0.95;
  transition: fill 0.2s ease;
}

.socials a:hover svg {
  fill: var(--accent);
}

.tagline {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;                     /* remove default paragraph margins */
}

/* Smoke */
.smoke-mask {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 20% 0%, rgba(255,255,255,0.08), rgba(255,255,255,0) 60%),
    radial-gradient(50% 70% at 80% 0%, rgba(255,255,255,0.05), rgba(255,255,255,0) 60%);
  filter: blur(10px);
}

/* Demo */
main { 
  min-height: 0;                 /* was 50vh */
  padding: 16px 0;               /* keep a little breathing room */
}
.demo-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

/* ===============================
   Hero section
   =============================== */
.hero {
  background: var(--bg);
  text-align: center;
  padding: 4rem 1rem 3rem;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--fg);
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

@media (max-width: 600px) {
  .hero {
    padding: 3rem 1rem 2rem;
  }
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

/* Latest video */
.video-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }

/* Keep the frame at a sane aspect so nothing squishes */
.video-media {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;          /* default: 16:9 */
  overflow: hidden;              /* clip rounded corners & overlays */
  border-bottom: 1px solid var(--line);
}

/* Make both the <video> and the poster fill the frame */
.video-media video,
.video-media .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;             /* no squish; crop if needed */
  display: block;
}

/* Center the play button */
.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--fg);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.play-btn:hover { transform: translate(-50%, -50%) scale(1.05); background: rgba(255,255,255,0.12); }

.video-meta { padding: 1rem; text-align: center; }
.video-name { font-family: 'Baloo 2', system-ui, sans-serif; margin: 0 0 .25rem; }
.video-sub  { color: var(--muted); margin: 0; }

/* Upcoming Rides */
.upcoming { padding: 2rem 1rem 1.5rem; }
.upcoming-list { display: grid; gap: .75rem; }
.upcoming-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem 1rem;
  display: grid;
  gap: .2rem;
}
.upcoming-item .ride-title {
  font-family: 'Baloo 2', system-ui, sans-serif;
  margin: 0;
}
.upcoming-item .ride-meta { color: var(--muted); margin: 0; }
.upcoming-item a { text-decoration: none; }
.upcoming-footer { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }

/* Upcoming Events */
.events { padding: 1rem 1rem 3rem; }
.events-list { display: grid; gap: 1rem; }

.event-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1rem;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem;
}

.event-logo {
  width: 92px; height: 92px; border-radius: 8px; object-fit: cover; background: #000;
}

.event-title {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: clamp(1.2rem, 2.3vw, 1.6rem);
  margin: 0 0 .25rem 0;
  line-height: 1.1;
}

.event-title a { color: var(--fg); text-decoration: none; }
.event-title a:hover { color: var(--accent); }

.event-meta { margin: 0; color: var(--muted); }

@media (min-width: 700px) {
  .event-row { grid-template-columns: 120px 1fr; padding: 1rem 1.1rem; }
  .event-logo { width: 120px; height: 120px; }
}
