/* ==========================================================================
   Cbus Learning Center — site styles (v2: cinematic hero, film strip)
   Brand: navy + royal blue from the center's banner and crest, gold as the
   ONE accent, cool-white ground. Outfit throughout. Radius 14px everywhere.
   ========================================================================== */

:root {
  --c-ground: #f8fafd;
  --c-sky: #e6f0fb;
  --c-sky-deep: #cfe0f7;
  --c-navy: #14213d;
  --c-royal: #2446b8;
  --c-royal-deep: #1b3690;
  --c-ink: #14213d;
  --c-ink-soft: #4b5878;
  --c-line: #d6dfee;
  --c-gold: #d9a441;
  --c-white: #ffffff;

  --f: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 220ms;
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

html { color-scheme: light; scroll-behavior: smooth; }

body.site-body {
  background: var(--c-ground);
  color: var(--c-ink);
  font-family: var(--f);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.site img, .site video { display: block; max-width: 100%; height: auto; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.site h1, .site h2, .site h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
.site :focus-visible { outline: 3px solid var(--c-gold); outline-offset: 3px; border-radius: 4px; }
.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; }

/* --------------------------------------------------------------- Header -- */
/* Transparent over the hero, solid once scrolled (site.js-free: CSS only via
   position sticky + backdrop). */

.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  background: rgba(20, 33, 61, 0.82);
  backdrop-filter: blur(10px);
}
.hdr-in { display: flex; align-items: center; gap: 1.5rem; height: 80px; }

.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--c-white); margin-right: auto; }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3)); }
.brand span { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }

.hdr-nav { display: flex; gap: 1.6rem; }
.hdr-nav a {
  font-weight: 500;
  font-size: 0.97rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition: color var(--dur) var(--ease);
}
.hdr-nav a:hover { color: var(--c-gold); }

.hdr-call {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.2rem;
  background: var(--c-gold);
  color: var(--c-navy);
  font-weight: 700;
  font-size: 0.97rem;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.hdr-call:hover { background: #e2b04f; }
.hdr-call:active { transform: translateY(1px); }

/* ----------------------------------------------------------------- Hero -- */
/* Full-bleed video with the copy on top. The video wrapper overhangs the
   section so the parallax drift never exposes an edge. */

.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--c-navy);
  color: var(--c-white);
}
.hero-media {
  position: absolute;
  inset: -22% 0;
  z-index: 0;
  will-change: transform;
}
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(20, 33, 61, 0.25) 0%, rgba(20, 33, 61, 0) 35%, rgba(20, 33, 61, 0.78) 100%),
    linear-gradient(90deg, rgba(20, 33, 61, 0.45) 0%, rgba(20, 33, 61, 0) 60%);
}
.hero-in {
  position: relative;
  z-index: 2;
  padding-block: 9rem clamp(3rem, 7vh, 5.5rem);
  max-width: 44rem;
}
.hero h1 {
  font-size: clamp(2.75rem, 1.8rem + 4.6vw, 5.25rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero h1 em { font-style: normal; color: var(--c-gold); }
.hero-sub {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 42ch;
  margin-bottom: 1.75rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

.cta-call {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 1.7rem;
  background: var(--c-gold);
  color: var(--c-navy);
  font-weight: 700;
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  border-radius: var(--r);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.6);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.cta-call:hover { background: #e2b04f; transform: translateY(-2px); }
.cta-call:active { transform: translateY(0) scale(0.98); }

.cta-directions {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--c-white);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.45);
  transition: border-color var(--dur) var(--ease);
}
.cta-directions:hover { border-bottom-color: var(--c-gold); }

/* ----------------------------------------------------------------- Strip -- */
/* Four photos across the page at four parallax depths, staggered vertically
   so the band reads as a shelf of moments rather than a grid. */

.strip {
  position: relative;
  padding-block: clamp(3rem, 6vw, 5.5rem) 0;
  overflow: hidden;
}
.strip-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  align-items: start;
}
.strip-item {
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 24px 48px -30px rgba(20, 33, 61, 0.5);
  background: var(--c-sky-deep);
  will-change: transform;
}
.strip-item img { width: 100%; height: 100%; object-fit: cover; }
.strip-item:nth-child(2) { margin-top: 2.5rem; }
.strip-item:nth-child(3) { margin-top: 0.75rem; }
.strip-item:nth-child(4) { margin-top: 3.25rem; }

/* ---------------------------------------------------------------- About -- */

.section { padding-block: clamp(3.5rem, 7vw, 6rem); }

.about-in {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.about-in h2 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  color: var(--c-navy);
}
.lede { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); color: var(--c-ink-soft); max-width: 56ch; }
.lede + .lede { margin-top: 1rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--c-navy);
  list-style: none;
  padding-left: 0;
}
.facts li { font-weight: 600; font-size: 0.97rem; display: flex; align-items: center; gap: 0.6rem; }
.facts li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-gold); flex: none; }

/* ------------------------------------------------------------- Programs -- */

.programs {
  position: relative;
  background: var(--c-navy);
  color: var(--c-white);
  overflow: hidden;
}
.programs-depth {
  position: absolute;
  right: -10%;
  top: -20%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(36, 70, 184, 0.55), rgba(36, 70, 184, 0) 65%);
  will-change: transform;
  pointer-events: none;
}
.programs-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.programs h2 { color: var(--c-white); font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); margin-bottom: 0.75rem; }
.programs .lede { color: rgba(255, 255, 255, 0.72); }

.prog-list { list-style: none; padding: 0; margin-top: 2rem; }
.prog-list li {
  padding: 1.15rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.2rem 0.9rem;
}
.prog-num { font-weight: 700; color: var(--c-gold); font-variant-numeric: tabular-nums; font-size: 0.95rem; padding-top: 0.2rem; }
.prog-list h3 { font-size: 1.2rem; margin: 0; letter-spacing: -0.02em; }
.prog-list p { grid-column: 2; margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 0.97rem; }

.programs-photo {
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  will-change: transform;
}
.programs-photo img { width: 100%; height: 100%; object-fit: cover; }

/* --------------------------------------------------------- Hours + Place -- */

.visit-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: stretch;
}
.visit-in h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); color: var(--c-navy); margin-bottom: 0.5rem; }

.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 1.5rem; }
.hours th, .hours td { text-align: left; padding: 0.7rem 0; border-bottom: 1px solid var(--c-line); }
.hours th { font-weight: 600; }
.hours td { color: var(--c-ink-soft); text-align: right; }
.hours .closed td { opacity: 0.7; }

.place {
  background: var(--c-navy);
  color: var(--c-white);
  border-radius: var(--r);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: grid;
  align-content: space-between;
  gap: 1.5rem;
}
.place h3 { font-size: 1.3rem; margin: 0; }
.place address { font-style: normal; color: rgba(255, 255, 255, 0.78); line-height: 1.7; }
.place-phone {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
  font-weight: 700;
  color: var(--c-gold);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.place-email { color: var(--c-white); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.place-email:hover { border-bottom-color: var(--c-gold); }

.cta-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.3rem;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: var(--c-white);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cta-map:hover { background: var(--c-white); color: var(--c-navy); border-color: var(--c-white); }

/* ------------------------------------------------------- Licence line -- */
/* One trust line, not a section. The crest watermark carries it. */

.licence {
  position: relative;
  background: var(--c-sky);
  overflow: hidden;
}
.licence-in {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 1.6rem;
  font-size: 0.97rem;
}
.licence-mark { width: 40px; height: 40px; flex: none; }
.licence-in strong { font-weight: 700; }
.licence-num { font-variant-numeric: tabular-nums; color: var(--c-ink-soft); }
.licence-link { color: var(--c-royal); text-decoration: underline; text-underline-offset: 0.2em; font-weight: 600; margin-left: auto; }
.licence-water {
  position: absolute;
  right: -3%;
  top: 50%;
  width: 260px;
  height: 260px;
  opacity: 0.07;
  transform: translateY(-50%);
  pointer-events: none;
}

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

.foot { background: var(--c-royal); color: var(--c-white); padding-block: clamp(3rem, 6vw, 5rem) 1.75rem; }
.foot-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}
.foot-crest { width: 88px; height: 88px; }
.foot h2 { color: var(--c-white); font-size: clamp(1.7rem, 1.2rem + 2vw, 2.8rem); margin-bottom: 0.5rem; }
.foot p { color: rgba(255, 255, 255, 0.78); max-width: 44ch; }

.cta-foot {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 1.75rem;
  background: var(--c-white);
  color: var(--c-royal);
  font-weight: 700;
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  border-radius: var(--r);
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cta-foot:hover { background: var(--c-sky); transform: translateY(-2px); }
.cta-foot:active { transform: translateY(0) scale(0.98); }

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
}
.foot-meta a { color: var(--c-white); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.foot-meta a:hover { border-bottom-color: var(--c-white); }

/* "Website by" credit. The animated logo sits in a white card so the mark
   keeps its own background on the royal footer; it plays once on scroll. */
.foot-by {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.foot-by-card {
  display: block;
  flex: none;
  width: 168px;
  background: var(--c-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.5);
  transition: transform var(--dur) var(--ease);
}
.foot-by-card:hover { transform: translateY(-2px); }
.foot-by-video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.foot-by-text { margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); display: grid; gap: 0.15rem; }
.foot-by-text a { color: var(--c-white); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.foot-by-text a:hover { border-bottom-color: var(--c-white); }
.foot-by-url { font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }

.callbar { display: none; }

/* ----------------------------------------------------------- Responsive -- */

@media (max-width: 960px) {
  .about-in, .programs-in, .visit-in { grid-template-columns: 1fr; }
  .programs-photo { max-width: 420px; }
  .strip-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-item:nth-child(3) { margin-top: 0; }
  .strip-item:nth-child(4) { margin-top: 2.5rem; }
  .hdr-nav { display: none; }
  .foot-top { grid-template-columns: auto 1fr; }
  .foot-top > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hdr-call { display: none; }
  .hdr-in { height: 68px; }
  .hero { min-height: 92dvh; }
  .hero-in { padding-top: 7rem; }
  .facts { grid-template-columns: 1fr; }
  .licence-link { margin-left: 0; }
  .licence-water { display: none; }
  .callbar {
    display: block;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 50;
    padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--c-navy);
  }
  .callbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    background: var(--c-gold);
    color: var(--c-navy);
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--r);
    font-variant-numeric: tabular-nums;
  }
  body.site-body { padding-bottom: 4.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site * { transition-duration: 0.01ms !important; }
  .hero-media, .strip-item, .programs-photo, .programs-depth { will-change: auto; }
}
