/* Frontier Performance – shared across every public page.
 *
 * Carries the things that were previously duplicated or missing per page:
 * accessibility primitives, the reveal contract, focus styling, reduced-motion
 * handling and the shared footer. Page-specific styling stays in each page.
 */

/* ---------------------------------------------------------------- a11y ---- */

/* Visible only to screen readers, until focused. */
.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;
}

.skip-link {
  position: absolute;
  left: 0; top: 0;
  z-index: 999;
  transform: translateY(-120%);
  padding: 0.75rem 1.25rem;
  background: #06b6d4;
  color: #04222a;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 0;
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

/* One visible focus treatment everywhere. Pages remove default outlines on
   inputs for design reasons, which previously left keyboard users with only a
   one-pixel border change. */
:focus-visible {
  outline: 3px solid #06b6d4;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Fixed navigation would otherwise cover the top of any in-page anchor target. */
html { scroll-padding-top: 6rem; }

/* ------------------------------------------------------------- reveal ---- */

/* Content is visible by default. The animation is opt-in and is only switched
   on by fp.js once IntersectionObserver is confirmed present, so no-JS, blocked-JS
   or reduced-motion visitors always see the full page. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------------------- reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .telemetry-inner { animation: none !important; transform: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------- form status --- */

.form-status { display: none; margin-top: 0.75rem; font-size: 0.85rem; line-height: 1.6; }
.form-status.is-error { color: #ff8080; }

[aria-invalid="true"] { border-color: #ff8080 !important; box-shadow: 0 0 0 3px rgba(255, 128, 128, 0.25) !important; }

/* ------------------------------------------------------- shared footer --- */

.fp-legal {
  font-size: 0.72rem;
  line-height: 1.65;
  max-width: 62ch;
}

.fp-legal a { text-decoration: underline; }

/* Companies Act 2006 s.82 trading disclosure plus the product boundary the
   claims control requires on every public surface. */
.fp-boundary {
  font-size: 0.72rem;
  line-height: 1.65;
  max-width: 62ch;
}
