/* The Vault Media Co. · V7 cinematic footer (1 Dec 2026). Replaces the V6 wax-seal footer on the landing page.
   The supplied footage (/media/vault-footer/) is the whole scene; nothing in it is redrawn. This file lays the
   V6 footer content over it, styles the power button, and sets the phone composition. footer.js drives the video,
   the canvas overlay (scanline, star glints) and the travelling light. Tokens come from landing.css. */

.cf {
  position: relative; z-index: 2; isolation: isolate; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 600px;
  background: var(--black); color: var(--white);
  --cf-ease: cubic-bezier(.25, 1, .5, 1);
  --cf-wipe: cubic-bezier(.65, 0, .35, 1);
}

/* ---------- The scene ---------- */
.cf-video { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; background: #3a69b2; pointer-events: none; }
.cf-sky { display: none; }
/* soft dark top so the page above runs into the sky and the columns stay readable; a lighter one over the grass
   for the legal line */
.cf-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, var(--black) 0%, rgba(8,8,8,.74) 11%, rgba(8,8,8,.42) 26%, rgba(8,8,8,.12) 40%, rgba(8,8,8,0) 50%),
    linear-gradient(0deg, rgba(8,8,8,.62) 0%, rgba(8,8,8,.2) 10%, rgba(8,8,8,0) 20%); }
.cf-fx { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Content: an editorial grid across the upper sky ---------- */
.cf-grid {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, .95fr) minmax(0, 1.05fr) minmax(0, .8fr);
  gap: 28px clamp(24px, 3.2vw, 60px); align-items: start;
  padding: clamp(84px, 11svh, 128px) calc(var(--inset) + 18px) 0;
  text-shadow: 0 1px 14px rgba(0,0,0,.38);
}
.cf-name { margin: 0; font: 800 clamp(38px, 4.3vw, 74px)/.86 var(--display); font-stretch: 100%; letter-spacing: .004em; text-transform: uppercase; }
.cf-lead { margin: 14px 0 0; max-width: 34ch; font-size: 13px; line-height: 1.5; color: rgba(246,246,246,.86); }
.cf-book { margin: 20px 0 0; }
.cf-cta { display: inline-block; padding: 12px 20px 13px; border-radius: 999px; background: var(--white); color: var(--black); font-size: 13px; font-weight: 500; text-shadow: none; transition: background .3s; }
.cf-cta:hover { background: var(--blush); }
.cf-h { margin: 6px 0 14px; font: 400 11px/1.3 var(--mono); letter-spacing: .02em; color: rgba(246,246,246,.66); }
.cf-links { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 13px; line-height: 1.3; }

/* ---------- Link hover: a 1.6 px underline wipes in from the left and out to the right ---------- */
.cf-links a, .cf-legal a {
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1.6px;
  transition: background-size .32s var(--cf-wipe);
}
.cf-links a:hover, .cf-links a:focus-visible, .cf-legal a:hover, .cf-legal a:focus-visible { background-position: 0 100%; background-size: 100% 1.6px; }
.cf a:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

/* ---------- Base row: legal line left, power button right ---------- */
.cf-base { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 calc(var(--inset) + 18px) clamp(18px, 3.2svh, 34px); }
.cf-legal { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 4px; font-size: 11px; color: rgba(246,246,246,.78); text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.cf-legal a { color: inherit; }
.cf-power-wrap { display: flex; align-items: center; gap: 12px; flex: none; }
.cf-power-state { font: 400 11px/1 var(--mono); letter-spacing: .02em; color: rgba(246,246,246,.78); text-shadow: 0 1px 10px rgba(0,0,0,.5); min-width: 3ch; text-align: right; }

/* The power control: separate from the logo, a plain circular button */
.cf-power {
  position: relative; display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55); background: rgba(12,12,16,.32); color: var(--white); cursor: pointer;
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, box-shadow .35s ease, border-color .35s ease, background .35s ease;
}
.cf-power svg { position: relative; z-index: 1; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; opacity: .72; transition: opacity .35s ease, filter .35s ease; }
.cf-power[aria-pressed="true"] svg { opacity: 1; }
.cf-power:hover { border-color: rgba(255,255,255,.9); box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 24px rgba(255,255,255,.28); }
.cf-power:hover svg { opacity: 1; }
.cf-power:active { transform: scale(.94); }
.cf-power:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; }
.cf-power[aria-disabled="true"] { cursor: progress; }
/* after the light has gone in: the button holds a soft white glow while the scene is off */
.cf-power.is-standby { border-color: rgba(255,255,255,.85); box-shadow: 0 0 18px rgba(255,255,255,.32), inset 0 0 12px rgba(255,255,255,.16); }
.cf-power.is-standby svg { opacity: 1; filter: drop-shadow(0 0 4px rgba(255,255,255,.85)); }
.cf-halo { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0 22%, rgba(255,255,255,.5) 38%, rgba(255,255,255,0) 70%);
  box-shadow: 0 0 34px 10px rgba(255,255,255,.55); }

/* The travelling light: a white core in a radial glow, moved by footer.js along a quadratic curve */
.cf-light { position: absolute; left: 0; top: 0; z-index: 6; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; pointer-events: none; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(circle, #fff 0 4.5%, rgba(255,255,255,.92) 7%, rgba(232,240,255,.5) 15%, rgba(214,226,255,.18) 30%, rgba(214,226,255,0) 58%); }

/* ---------- Entrance: text rises 10 px over 0.9 s, 60 ms apart (footer.js sets --i and the classes) ---------- */
.cf.is-armed .cf-rise { opacity: 0; transform: translate3d(0, 10px, 0); }
.cf.is-armed.is-in .cf-rise { opacity: 1; transform: none; transition: opacity .9s var(--cf-ease), transform .9s var(--cf-ease); transition-delay: calc(var(--i, 0) * 60ms); }

/* ---------- Laptops and tablets: brand across the top, three link columns under it ---------- */
@media (max-width: 1180px) and (min-width: 761px) {
  .cf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px clamp(20px, 3vw, 40px); }
  .cf-brand { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 32px; }
  .cf-brand .cf-name { grid-column: 1 / -1; }
  .cf-lead { margin-top: 12px; }
  .cf-book { margin: 0; }
  .cf-name { font-size: clamp(38px, 5.4vw, 60px); }
}
@media (max-height: 820px) and (min-width: 1181px) {
  .cf-grid { padding-top: clamp(76px, 10svh, 100px); }
  .cf-name { font-size: clamp(36px, 3.7vw, 60px); }
  .cf-lead { margin-top: 10px; }
  .cf-book { margin-top: 14px; }
  .cf-links { gap: 7px; }
}

/* ---------- Phones: own composition ---------- */
/* Text first on a sky sampled live from the top rows of the video (blurred and stretched), then the scene at the
   bottom, 170% wide so the computer stays large, its top edge faded into that sky. */
@media (max-width: 760px) {
  .cf { height: auto; min-height: 0; display: flex; flex-direction: column; background: #3a69b2; }
  .cf-sky { display: block; position: absolute; left: -40px; top: -40px; z-index: 0; width: calc(100% + 80px); height: calc(100% + 80px); filter: blur(18px); transform: translateZ(0); }
  .cf.sky-off .cf-sky { display: none; }
  .cf.sky-off { background: linear-gradient(180deg, #3a69b2 0%, #4778bb 45%, #5f85af 100%); } /* fallback: the poster's own sky */
  .cf-video { position: relative; order: 2; inset: auto; z-index: 1; flex: none; width: 170vw; max-width: none; height: auto; aspect-ratio: 16 / 9; margin: 2vw 0 0 -35vw; background: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 12%, #000 26%); mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 12%, #000 26%); }
  .cf-shade { z-index: 1; background:
    linear-gradient(180deg, var(--black) 0, rgba(8,8,8,.62) 70px, rgba(8,8,8,.3) 200px, rgba(8,8,8,.16) 45%, rgba(8,8,8,0) 62%),
    linear-gradient(0deg, rgba(8,8,8,.55) 0, rgba(8,8,8,0) 110px); }
  .cf-fx { z-index: 2; }
  .cf-grid { order: 1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px 18px; padding: 84px var(--pad) 0; }
  .cf-brand { grid-column: 1 / -1; }
  /* two columns: Contact beside Explore, then Services across both, its list in two columns */
  .cf-contact { order: 1; }
  .cf-explore { order: 2; }
  .cf-services { order: 3; grid-column: 1 / -1; }
  .cf-services .cf-links { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 18px; }
  .cf-name { font-size: clamp(36px, 11vw, 48px); }
  .cf-lead { font-size: 13px; }
  .cf-links { gap: 10px; font-size: 13px; }
  .cf-links a, .cf-legal a { display: inline-block; padding: 4px 0 5px; margin: -4px 0 -5px; } /* taller touch areas, same rhythm */
  /* the legal line and the button sit under the scene, the grass running into black above them */
  .cf-base { position: relative; order: 3; z-index: 3; margin-top: -44px; padding: 34px var(--pad) 20px; align-items: center; background: linear-gradient(180deg, rgba(8,8,8,0) 0, rgba(8,8,8,.86) 34px, var(--black) 56px); }
  .cf-legal { flex-direction: column; gap: 3px; font-size: 12px; }
  .cf-power { width: 52px; height: 52px; }
}

/* ---------- Reduced motion: the poster and the text, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .cf.is-armed .cf-rise { opacity: 1; transform: none; transition: none; }
  .cf-power, .cf-power svg, .cf-links a, .cf-legal a { transition: none; }
  .cf-light, .cf-halo { display: none; }
}
