/* ================================================================
   J.S. Blackbelt Academy — styles.css
   Mobile-first  ·  Accessible  ·  Bold martial-arts aesthetic
================================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --black:      #09090b;
  --dark:       #111215;
  --surface:    #18191f;
  --surface-2:  #20222a;
  --border:     #2c2e38;
  --red:        #c8102e;
  --red-dark:   #9e0c23;
  --gold:       #c9910a;
  --white:      #f4f2ed;
  --muted:      #7a7d8a;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Barlow', sans-serif;

  --nav-h:    66px;
  --radius:   5px;
  --ease:     0.24s ease;
  --shadow:   0 6px 30px rgba(0,0,0,0.55);
  --max-w:    1080px;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a          { color: inherit; text-decoration: none; }
ul         { list-style: none; }
address    { font-style: normal; }
figure     { margin: 0; }

/* Utility: visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── CONTAINER ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}


/* ================================================================
   NAVBAR
================================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1.25rem;
  background: var(--black);
  border-bottom: 2px solid var(--red);
  box-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

/* Brand logo */
.brand-logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  transition: opacity var(--ease);
}
.brand-logo:hover img,
.brand-logo:focus-visible img { opacity: 0.75; }

/* ── Hamburger button ── */
.nav-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
  transform-origin: center;
}

/* Morph to × */
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile dropdown ── */
.navbar-links {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--black);
  border-bottom: 2px solid var(--red);
  padding-block: 0.75rem;
  /* Slide-in animation */
  animation: navSlide 0.22s ease forwards;
}
@keyframes navSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.navbar-links.open { display: block; }

.navbar-links ul {
  display: flex;
  flex-direction: column;
}

.navbar-links a {
  display: block;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  border-left: 3px solid transparent;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}
.navbar-links a:hover,
.navbar-links a:focus-visible,
.navbar-links a.active {
  color: var(--red);
  background: rgba(200,16,46,0.07);
  border-left-color: var(--red);
  outline: none;
}
.navbar-links a.nav-cta {
  color: var(--red);
  font-weight: 700;
}
.navbar-links a.nav-cta:hover,
.navbar-links a.nav-cta:focus-visible {
  color: var(--white);
  background: var(--red);
  border-left-color: var(--red-dark);
}

/* ── Desktop nav (≥ 768px) ── */
@media (min-width: 768px) {
  .nav-toggle { display: none; }

  .navbar-links {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    padding: 0;
    animation: none;
    margin-left: auto;
  }
  .navbar-links ul {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }
  .navbar-links a {
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    border-left: none;
    border-radius: var(--radius);
  }
  .navbar-links a:hover,
  .navbar-links a:focus-visible,
  .navbar-links a.active {
    border-left: none;
    background: rgba(200,16,46,0.1);
  }
  .navbar-links a.nav-cta {
    border: 1.5px solid var(--red);
    padding: 0.4rem 1rem;
  }
  .navbar-links a.nav-cta:hover,
  .navbar-links a.nav-cta:focus-visible {
    background: var(--red);
  }
}


/* ================================================================
   HERO  —  full-screen video background
================================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 100svh respects mobile browser chrome (address bar) */
  min-height: 100svh;
  min-height: 100vh; /* fallback for older browsers */
  overflow: hidden;
  text-align: center;
  background: var(--black);
}

/* ── Video layer ── */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Hide video for users who prefer reduced motion; poster shows instead */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-video { display: none; }
}

/* Gradient overlay — top darkens nav area, bottom darkens scroll zone */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0,0,0,0.65)  0%,
    rgba(0,0,0,0.25) 45%,
    rgba(0,0,0,0.72) 100%
  );
}

/* ── Foreground content ── */
.hero-content {
  position: relative;
  z-index: 1;
  padding: 7rem 1.5rem 6rem;
  max-width: 800px;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(0,0,0,0.45);
  padding: 0.3rem 0.9rem;
  border-radius: 2px;
  margin-bottom: 1.1rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.15s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 16vw, 9rem);
  line-height: 0.88;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 4px 32px rgba(0,0,0,0.7);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.3s forwards;
}
.hero-title span {
  display: block;
  color: var(--red);
}

.hero-sub {
  font-size: clamp(0.9rem, 2.8vw, 1.1rem);
  font-weight: 300;
  line-height: 1.9;
  color: rgba(244,242,237,0.85);
  margin-bottom: 2.25rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.45s forwards;
}
.hero-sub em {
  font-style: italic;
  color: rgba(244,242,237,0.65);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.6s forwards;
}
@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ── Scroll cue ── */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 13px;
}
.scroll-dot {
  display: block;
  width: 4px;
  height: 9px;
  background: var(--white);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scrollBounce 1.8s ease infinite;
}
@keyframes scrollBounce {
  0%, 100% { opacity: 1; transform: translateY(0); }
  60%       { opacity: 0.2; transform: translateY(14px); }
}


/* ================================================================
   BUTTONS
================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  min-height: 48px;         /* accessible tap target */
  min-width: 154px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background var(--ease),
    color      var(--ease),
    transform  var(--ease),
    box-shadow var(--ease),
    border-color var(--ease);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,16,46,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.45);
}
.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}


/* ================================================================
   SECTION SHARED
================================================================ */
.section { padding-block: 4.5rem; }

.section-header { text-align: center; margin-bottom: 2.75rem; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

.section-sub {
  margin-top: 0.45rem;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}


/* ================================================================
   CAROUSEL
================================================================ */
.section-carousel { background: var(--surface); }

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--black);
  user-select: none;
  touch-action: pan-y;   /* allow vertical scroll, handle horizontal in JS */
}

/* ── Track ── */
.carousel-track {
  display: flex;
  will-change: transform;
  transition: transform 0.52s cubic-bezier(0.76, 0, 0.24, 1);
}

/* ── Individual slide ── */
.carousel-slide {
  flex: 0 0 100%;
  position: relative;
}

.carousel-slide figure {
  position: relative;
  line-height: 0;
}

.carousel-slide img {
  width: 100%;
  height: clamp(230px, 52vw, 520px);
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Caption overlay */
.carousel-slide figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
  padding: 2.5rem 1.5rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  line-height: 1;
}

.slide-year {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 5rem);
  color: var(--red);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.slide-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.75;
}

/* ── Arrow buttons ── */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(9,9,11,0.65);
  border: 1.5px solid rgba(255,255,255,0.18);
  color: var(--white);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
  /* Keep arrows inside on small screens */
  margin-top: -24px; /* half of figcaption area to centre on image */
}
.carousel-btn:hover,
.carousel-btn:focus-visible {
  background: var(--red);
  border-color: var(--red);
  outline: none;
}
.carousel-btn:active { transform: translateY(-50%) scale(0.92); }

.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }

/* Slightly larger arrows on desktop */
@media (min-width: 600px) {
  .carousel-btn { width: 52px; height: 52px; }
  .carousel-prev { left: 1.25rem; }
  .carousel-next { right: 1.25rem; }
}

/* ── Dot indicators ── */
.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  background: var(--black);
}

.carousel-dot {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--ease), width var(--ease);
  /* Larger tap target via pseudo-element */
  position: relative;
}
.carousel-dot::after {
  content: '';
  position: absolute;
  inset: -10px -6px;
}
.carousel-dot.active {
  background: var(--red);
  width: 42px;
}
.carousel-dot:hover,
.carousel-dot:focus-visible {
  background: rgba(200,16,46,0.55);
  outline: none;
}
.carousel-dot.active:hover,
.carousel-dot.active:focus-visible {
  background: var(--red);
}


/* ================================================================
   INFO STRIP
================================================================ */
.section-info {
  background: var(--black);
  padding-block: 3.5rem;
  border-top: 1px solid var(--border);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
@media (min-width: 580px) {
  .info-grid { grid-template-columns: repeat(3, 1fr); }
}

.info-card {
  background: var(--surface);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: background var(--ease);
}
.info-card:hover { background: var(--surface-2); }

.info-icon {
  font-size: 1.6rem;
  color: var(--red);
  margin-bottom: 0.85rem;
}

.info-card h3 {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.info-card address,
.info-card a {
  font-size: 0.95rem;
  color: var(--white);
  line-height: 1.75;
}
.info-card a {
  transition: color var(--ease);
  text-decoration-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  transition: color var(--ease), text-decoration-color var(--ease);
}
.info-card a:hover,
.info-card a:focus-visible {
  color: var(--gold);
  text-decoration-color: var(--gold);
  outline: none;
}


/* ================================================================
   FOOTER
================================================================ */
.footer {
  background: var(--black);
  border-top: 2px solid var(--red);
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    gap: 1rem;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.footer-brand span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-copy {
  font-size: 0.76rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.footer-social {
  display: flex;
  gap: 0.65rem;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 0.95rem;
  transition: background var(--ease), border-color var(--ease);
}
.footer-social a:hover,
.footer-social a:focus-visible {
  background: var(--red);
  border-color: var(--red);
  outline: none;
}


/* ================================================================
   ANIMATIONS
================================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Global focus ring ── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ── Reduced motion override ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-bg-video { display: none; }
}


/* ================================================================
   NAV DROPDOWN  —  Students › Student Registration
================================================================ */
.nav-has-sub {
  position: relative;
}

/* ── Sub-menu ── */
.nav-sub {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--black);
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.55);
  z-index: 300;
  padding-block: 0.4rem;
  list-style: none;
  animation: navSlide 0.18s ease forwards;
}

/* Show on hover (desktop) */
@media (min-width: 768px) {
  .nav-has-sub:hover .nav-sub,
  .nav-has-sub:focus-within .nav-sub {
    display: block;
  }
}

.nav-sub li a {
  display: block;
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  border-left: 3px solid transparent;
  white-space: nowrap;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
  border-radius: 0;
}
.nav-sub li a:hover,
.nav-sub li a:focus-visible {
  color: var(--red);
  background: rgba(200,16,46,0.07);
  border-left-color: var(--red);
  outline: none;
}

/* Small caret indicator on the parent Students link */
@media (min-width: 768px) {
  .nav-has-sub > a::after {
    content: ' \f0d7';
    font-family: FontAwesome;
    font-size: 0.55rem;
    opacity: 0.6;
    margin-left: 3px;
    vertical-align: middle;
  }
}

/* ── Mobile: show sub-menu inline, indented ── */
@media (max-width: 767px) {
  .nav-sub {
    display: block;
    position: static;
    transform: none;
    min-width: unset;
    background: var(--surface);
    border: none;
    border-top: none;
    border-left: 3px solid var(--red);
    border-radius: 0;
    box-shadow: none;
    margin-left: 1.5rem;
    padding-block: 0;
    animation: none;
  }
  .nav-sub li a {
    padding: 0.6rem 1.25rem;
    font-size: 0.88rem;
    border-left: none;
    color: var(--muted);
  }
  .nav-sub li a:hover { color: var(--red); background: rgba(200,16,46,0.06); }
}
