/* ==========================================================================
   Motos America Academy — Hub Site
   Directory of all MAU academies. Static, no login, no database.
   Shares the brand token system used across every academy site.
   ========================================================================== */

:root {
  --brand-black: #000000;
  --brand-red: #e70033;    /* Pantone 185 — primary accent */
  --brand-blue: #0039a6;   /* Pantone 286 — secondary accent */
  --brand-white: #ffffff;

  --ink: #17181a;
  --charcoal: #000000;
  --steel: #5b6570;
  --hairline: #dfe2e6;
  --cream: #f6f7f9;
  --white: #ffffff;

  --font-display: 'Montserrat', 'Arial Narrow', sans-serif;
  --font-body: 'Montserrat', -apple-system, 'Segoe UI', Arial, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(20, 20, 18, 0.08), 0 1px 2px rgba(20, 20, 18, 0.06);
  --shadow-lg: 0 8px 30px rgba(20, 20, 18, 0.12);

  --max-width: 920px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body { min-height: 100vh; }

a { color: var(--brand-red); text-decoration: none; }

/* ---------- Header ---------- */

.topbar {
  background: var(--brand-black);
  color: var(--white);
  padding: 22px 20px 20px;
}

.topbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__logo {
  height: 30px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.topbar__title {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding-left: 16px;
}

.topbar__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar__tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfd6db;
  margin-top: 3px;
}

/* ---------- Page / intro ---------- */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}

.intro__text {
  font-size: 15px;
  color: var(--steel);
  margin: 0;
  max-width: 480px;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.view-toggle__btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--white);
  color: var(--steel);
  border: none;
  padding: 9px 16px;
  cursor: pointer;
}

.view-toggle__btn + .view-toggle__btn { border-left: 1px solid var(--hairline); }

.view-toggle__btn.is-active {
  background: var(--brand-black);
  color: var(--white);
}

/* ---------- Overview banner (umbrella video, sits above the grid) ---------- */

.overview-banner {
  display: block;
  background: var(--brand-black);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.overview-banner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(to right, var(--brand-red) 50%, var(--brand-blue) 50%);
}

.overview-banner:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.overview-banner__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--white);
}

.overview-banner__label::before {
  content: "▶";
  display: inline-block;
  margin-right: 10px;
  font-size: 13px;
  color: var(--brand-red);
}

.overview-banner__sub {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cfd6db;
  margin-top: 4px;
}

/* ---------- Card header (black bar + red/blue underline) ---------- */

.academy-card__header {
  background: var(--brand-black);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 20px;
  position: relative;
}

.academy-card__header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(to right, var(--brand-red) 50%, var(--brand-blue) 50%);
}

/* ---------- Grid view ---------- */

.academies--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .academies--grid { grid-template-columns: 1fr 1fr; }
}

.academies--grid .academy-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.academies--grid .academy-card:hover {
  border-color: var(--brand-red);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.academies--grid .academy-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px 0;
}

/* ---------- List view ---------- */

.academies--list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.academies--list .academy-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.academies--list .academy-card:hover {
  border-color: var(--brand-red);
  box-shadow: var(--shadow);
}

.academies--list .academy-card__header {
  border-radius: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 40%;
  max-width: 220px;
}

.academies--list .academy-card__header::after {
  top: 0;
  bottom: auto;
  left: auto;
  right: -3px;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--brand-red) 50%, var(--brand-blue) 50%);
}

.academies--list .academy-card__body {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 12px 16px;
}

.academies--list .academy-card__tagline { display: none; }

.academies--list .academy-card__actions {
  margin-top: 0;
  flex-shrink: 0;
  flex-direction: row;
}

@media (min-width: 640px) {
  .academies--list .academy-card__body {
    grid-template-columns: 1fr 1fr;
    align-items: baseline;
    gap: 10px;
  }
  .academies--list .academy-card__tagline {
    display: block;
    color: var(--steel);
    font-size: 13px;
    margin: 0;
  }
}

/* ---------- Shared card content ---------- */

.academy-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  margin: 0;
}

.academy-card__audience {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-red);
  margin: 0;
}

.academy-card__tagline {
  font-size: 14px;
  color: var(--steel);
  margin: 2px 0 0;
}

.academy-card__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.academy-card__link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--brand-black);
  border-bottom: 2px solid var(--brand-red);
  padding-bottom: 1px;
}

.academy-card__link:hover { color: var(--brand-red); }

.academy-card__link--soon {
  color: #a8afb6;
  font-style: italic;
  border-bottom: none;
  padding-bottom: 0;
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: 24px 18px 40px;
  font-size: 12px;
  color: var(--steel);
}

/* ---------- Accessibility ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Video modal ---------- */

.video-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.video-modal[hidden] { display: none; }

.video-modal__backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.82);
}

.video-modal__box {
  position: relative;
  width: 100%;
  max-width: 900px;
  z-index: 1;
}

.video-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

.video-modal__close:hover { color: var(--brand-red); }

.video-modal__frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: var(--brand-black);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.video-modal__frame iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
