/* Shared RAV footer. Self-contained: works on the home page (own inline styles)
   and on pages built on ds/rav.css. Links are placeholders (href="#") until hosting. */
.rav-foot {
  --f-blue: var(--blue-2, #39A8FF);
  --f-line: rgba(120, 180, 255, .14);
  --f-text: rgba(255, 255, 255, .74);
  --f-dim: rgba(255, 255, 255, .46);
  --f-pad: clamp(16px, 4vw, 64px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(56px, 7vw, 104px) 0 0;
  background:
    radial-gradient(60% 70% at 85% 0%, rgba(8, 119, 255, .10), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(57, 168, 255, .07), transparent 70%),
    linear-gradient(180deg, rgba(6, 19, 38, 0), #030C1C 40%);
  color: #fff;
  font-family: 'Manrope', 'Manrope Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  border-top: 1px solid var(--f-line);
}
/* The same blue glow along the top edge as the site's section seams. */
.rav-foot::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(900px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(57, 168, 255, .75), transparent);
}
.rav-foot a { color: inherit; text-decoration: none; }
.rav-foot em.ra { color: var(--f-blue); font-style: inherit; }
.rav-foot-in {
  position: relative;
  z-index: 1;
  max-width: var(--maxw, 1440px);
  margin: 0 auto;
  padding: 0 var(--f-pad);
}

/* ---- Top: brand + four link columns ---- */
.rav-foot-top {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3.4vw, 64px);
}
.rav-foot-logo { display: inline-flex; align-items: baseline; gap: 12px; }
.rav-foot-logo b {
  font-family: 'Montserrat', 'Montserrat Fallback', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 34px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.03em;
  line-height: 1;
}
.rav-foot-logo span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--f-dim);
}
.rav-foot-about {
  max-width: 320px;
  margin: 18px 0 26px;
  font-family: 'Fira Sans Condensed', 'Fira Sans Condensed Fallback', 'Manrope', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, .62);
}
.rav-foot-phone {
  display: inline-block;
  font-family: 'Montserrat', 'Montserrat Fallback', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
  transition: color .3s;
}
.rav-foot-phone:hover { color: var(--f-blue); }
.rav-foot-phone-note { display: block; margin-top: 6px; font-size: 12.5px; color: var(--f-dim); }

.rav-foot-col h2 {
  margin: 6px 0 16px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--f-blue);
}
.rav-foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rav-foot-col a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--f-text);
  transition: color .3s, transform .45s var(--ease, cubic-bezier(.16, 1, .3, 1));
}
/* A short blue dash slides in on hover. */
.rav-foot-col a::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--f-blue);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s, transform .45s var(--ease, cubic-bezier(.16, 1, .3, 1));
}
@media (hover: hover) {
  .rav-foot-col a:hover { color: #fff; transform: translateX(4px); }
  .rav-foot-col a:hover::before { opacity: 1; transform: none; }
}
.rav-foot a:focus-visible { outline: 2px solid var(--f-blue); outline-offset: 3px; border-radius: 6px; }

/* ---- Bottom line ---- */
.rav-foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(44px, 5vw, 72px);
  padding: 22px 0;
  border-top: 1px solid var(--f-line);
  font-size: 13px;
  color: var(--f-dim);
}
.rav-foot-bottom a { min-height: 32px; display: inline-flex; align-items: center; color: rgba(255, 255, 255, .64); transition: color .3s; }
.rav-foot-bottom a:hover { color: #fff; }

/* ---- Glass wordmark: whole letters, translucent body, bright rim ---- */
.rav-foot-mark {
  position: relative;
  z-index: 0;
  display: flex;
  justify-content: center;
  padding: clamp(18px, 3vw, 40px) var(--f-pad) clamp(30px, 4.5vw, 64px);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.rav-foot-word {
  position: relative;
  z-index: 1;
  display: flex;
  font-family: 'Montserrat', 'Montserrat Fallback', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: clamp(104px, 21vw, 340px);
  font-weight: 900;
  font-style: italic;
  line-height: .9;
  letter-spacing: -.04em;
  /* Rim from the SVG filter in the footer markup: traces only the outer edge of each glyph. */
  filter: url(#ravFootRim);
}
.rav-foot-word i {
  --sheen: rgba(255, 255, 255, .34);
  display: block;
  padding: 0 .05em;
  font-style: inherit;
  color: transparent;
  /* Layer 1: a light band that sweeps across; layer 2: the glass body, brighter at the top. */
  background:
    linear-gradient(105deg, transparent 42%, var(--sheen) 50%, transparent 58%) 160% 0 / 300% 100% no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .035) 70%, rgba(255, 255, 255, .06));
  -webkit-background-clip: text;
  background-clip: text;
}
.rav-foot-word i.a {
  --sheen: rgba(170, 220, 255, .55);
  background:
    linear-gradient(105deg, transparent 42%, var(--sheen) 50%, transparent 58%) 160% 0 / 300% 100% no-repeat,
    linear-gradient(180deg, rgba(57, 168, 255, .34), rgba(57, 168, 255, .08) 75%, rgba(57, 168, 255, .14));
  -webkit-background-clip: text;
  background-clip: text;
}
/* Soft pool of light under the letters. */
.rav-foot-mark::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(900px, 80%);
  height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 70%, rgba(8, 119, 255, .16), transparent 70%);
  filter: blur(10px);
}
/* Bubbles (injected by site-footer.js) drift up behind the glass. */
.rav-foot-bub {
  position: absolute;
  bottom: -20px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  border: 1px solid rgba(160, 215, 255, .35);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .45), rgba(57, 168, 255, .06) 55%, transparent 70%);
  opacity: 0;
}

/* ---- Motion: reveal on arrival, then a quiet idle loop ---- */
.rav-foot.is-anim::before { transform: translateX(-50%) scaleX(0); transition: transform 1.4s var(--ease, cubic-bezier(.16, 1, .3, 1)); }
.rav-foot.is-anim.is-in::before { transform: translateX(-50%) scaleX(1); }
.rav-foot.is-anim .rav-foot-brand,
.rav-foot.is-anim .rav-foot-col h2,
.rav-foot.is-anim .rav-foot-col li,
.rav-foot.is-anim .rav-foot-bottom {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform 1s var(--ease, cubic-bezier(.16, 1, .3, 1));
  transition-delay: calc(var(--d, 0) * 55ms + 120ms);
}
.rav-foot.is-anim.is-in .rav-foot-brand,
.rav-foot.is-anim.is-in .rav-foot-col h2,
.rav-foot.is-anim.is-in .rav-foot-col li,
.rav-foot.is-anim.is-in .rav-foot-bottom { opacity: 1; transform: none; }

.rav-foot.is-anim .rav-foot-word i {
  opacity: 0;
  transform: translateY(38%) scale(.94);
  filter: blur(14px);
  transition: opacity 1.1s ease, transform 1.5s var(--ease, cubic-bezier(.16, 1, .3, 1)), filter 1.2s ease;
  transition-delay: calc(var(--d, 0) * 140ms + 350ms);
}
.rav-foot.is-anim.is-in .rav-foot-word i { opacity: 1; transform: none; filter: blur(0); }
.rav-foot.is-in .rav-foot-word i { animation: ravFootSheen 7s ease-in-out infinite; animation-delay: calc(var(--d, 0) * .22s + 2s); }
.rav-foot.is-in .rav-foot-mark::before { animation: ravFootGlow 5s ease-in-out infinite; }
.rav-foot.is-in .rav-foot-bub { animation: ravFootBubble var(--t) linear infinite; animation-delay: var(--w); }

@keyframes ravFootSheen {
  0%, 62% { background-position: 160% 0, 0 0; }
  88%, 100% { background-position: -60% 0, 0 0; }
}
@keyframes ravFootGlow {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}
@keyframes ravFootBubble {
  0% { opacity: 0; transform: translate(0, 0); }
  12% { opacity: .9; }
  50% { transform: translate(var(--sw), calc(-.5 * var(--h))); }
  85% { opacity: .5; }
  100% { opacity: 0; transform: translate(0, calc(-1 * var(--h))); }
}

/* ---- Tablet ---- */
@media (max-width: 1100px) {
  .rav-foot-top { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 44px; }
  .rav-foot-brand {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px 40px;
  }
  .rav-foot-about { margin: 0; }
}
/* ---- Phone ---- */
@media (max-width: 760px) {
  .rav-foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
  .rav-foot-brand { display: block; }
  .rav-foot-about { margin: 14px 0 20px; font-size: 15px; }
  .rav-foot-col h2 { margin-bottom: 10px; }
  .rav-foot-col a { font-size: 14.5px; min-height: 40px; }
  .rav-foot-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }
}
/* Pages with a fixed background (program stories) keep the footer above it. */
.rav-foot { z-index: 1; }

/* ---- Full-screen slide pages: the footer continues the page after the last slide ----
   Hidden until the last slide; then the slide stage stops being fixed, the body scrolls,
   and the footer follows right below it (RAVTail in site-footer.js). */
.rav-foot-tail { display: none; }
html.rav-tail .rav-foot-tail { display: block; }
html.rav-tail body { overflow-y: auto; overscroll-behavior-y: none; }
html.rav-tail .app { position: relative; inset: auto; }
/* slide stages forbid panning (touch-action: pinch-zoom) — on the last slide the finger must scroll the page */
html.rav-tail .app, html.rav-tail .app * { touch-action: pan-y pinch-zoom; }
/* inner text boxes of the last slide must hand the swipe on to the page (no scroll trapping) */
html.rav-tail .app * { overscroll-behavior: auto; }
html.rav-tail .app [data-scroll] { overflow-y: visible; }

/* Under the floating bottom menu the footer runs to the screen edge instead of leaving a page-coloured strip. */
@media (max-width: 900px) {
  .rav-menu-page .rav-foot {
    margin-bottom: calc(-1 * var(--rav-menu-clearance, 0px));
    padding-bottom: var(--rav-menu-clearance, 0px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rav-foot *, .rav-foot *::before, .rav-foot::before { transition: none !important; animation: none !important; }
  .rav-foot-bub { display: none; }
}
