﻿:root {
  --bg: #243d69;
  --bg-soft: #243d69;
  --panel: rgba(36, 61, 105, 0.92);
  --panel-solid: #243d69;
  --ink: #ffffff;
  --muted: #f5f8fa;
  --soft: #e0e0e0;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.28);
  --accent: #008080;
  --navy: #243d69;
  --slate: #37474f;
  --wash: #f5f8fa;
  --shadow: 0 28px 90px rgba(55, 71, 79, 0.55);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --container: 1180px;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --hero-video-y: 0px;
  --hero-stars-y: 0px;
  --hero-copy-y: 0px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

.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: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  transform: translateY(-150%);
  border-radius: 999px;
  background: #ffffff;
  color: #243d69;
  padding: 0.75rem 1rem;
  font-weight: 900;
}

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

.cursor-halo {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 190;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(245, 248, 250, 0.82);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  box-shadow:
    0 0 16px rgba(0, 128, 128, 0.32),
    0 0 46px rgba(0, 128, 128, 0.24),
    inset 0 0 16px rgba(255, 255, 255, 0.12);
  transition: opacity 160ms ease, width 180ms ease, height 180ms ease, border-color 180ms ease;
  will-change: transform, opacity;
}

.cursor-halo::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  border: 1px solid rgba(0, 128, 128, 0.24);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), rgba(0, 128, 128, 0.07) 36%, transparent 66%);
}

.cursor-halo.is-visible {
  opacity: 1;
}

.cursor-halo.is-active {
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.95);
}

.water-ripple-canvas {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.9;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  padding: 1rem clamp(1rem, 3vw, 2rem) 0;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, var(--container));
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #243d69;
  padding: 0.72rem 0.82rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: max-content;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.brand img {
  width: 42px;
  height: auto;
}

.desktop-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2vw, 1.7rem);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 800;
}

.desktop-links a,
.footer-links a {
  transition: color 180ms ease, transform 180ms ease;
}

.desktop-links a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.nav-cta,
.primary-button,
.secondary-button,
.mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0.86rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 900;
  border: 1px solid transparent;
  box-shadow: 0 16px 42px rgba(55, 71, 79, 0.26);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.nav-cta,
.primary-button,
.secondary-button,
.mobile-cta,
.dark-outline {
  border-color: #f5f8fa;
  background: #f5f8fa;
  color: #243d69;
}

.nav-cta:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  border-color: #008080;
  background: #008080;
  color: #ffffff;
}

.mobile-cta:hover,
.dark-outline:hover {
  transform: translateY(-1px);
  border-color: #008080;
  background: #008080;
  color: #ffffff;
}

.mobile-menu-button,
.mobile-panel {
  display: none;
}

.hero-section {
  position: relative;
  min-height: 128svh;
  overflow: hidden;
  isolation: isolate;
  background: #243d69;
}

.hero-video,
.hero-shade,
.star-field {
  position: absolute;
  inset: 0;
}

.hero-video {
  z-index: -4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.76;
  filter: grayscale(1) brightness(0.9) contrast(1.34) saturate(0.8);
  mix-blend-mode: luminosity;
  transform: translate3d(0, var(--hero-video-y), 0) scale(1.07);
  transform-origin: center;
  will-change: transform;
  background: #243d69 url("/assets/fhlm-background-poster.jpg") center / cover no-repeat;
}

.hero-shade {
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(36, 61, 105, 0.98) 0%, rgba(36, 61, 105, 0.82) 42%, rgba(36, 61, 105, 0.24) 66%, rgba(36, 61, 105, 0.50) 100%),
    linear-gradient(180deg, rgba(36, 61, 105, 0.42) 0%, rgba(36, 61, 105, 0.10) 44%, rgba(36, 61, 105, 0.90) 100%);
}

.star-field {
  z-index: -2;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1px),
    radial-gradient(circle at 62% 20%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px),
    radial-gradient(circle at 83% 62%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 36% 76%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px);
  background-size: 210px 210px, 320px 320px, 250px 250px, 380px 380px;
  transform: translate3d(0, var(--hero-stars-y), 0);
  will-change: transform;
}

.hero-inner {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 100svh;
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: clamp(7.5rem, 14vh, 10rem) clamp(1rem, 3vw, 2rem) clamp(3rem, 8vh, 5rem);
}

.hero-card {
  max-width: 840px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: translate3d(0, var(--hero-copy-y), 0);
  will-change: transform;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h1 {
  max-width: 12ch;
  margin-bottom: 0;
  font-size: clamp(4rem, 7vw, 7.2rem);
  line-height: 0.92;
  text-shadow: 0 20px 80px rgba(55, 71, 79, 0.62), 0 2px 16px rgba(55, 71, 79, 0.52);
}

.hero-copy {
  max-width: 680px;
  margin: clamp(1.2rem, 3vw, 1.9rem) 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  font-weight: 720;
  line-height: 1.72;
  text-shadow: 0 10px 38px rgba(55, 71, 79, 0.62);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: clamp(1.7rem, 4vw, 2.6rem);
}

.section {
  position: relative;
  padding: clamp(4.8rem, 8vw, 7rem) clamp(1rem, 3vw, 2rem);
}

@supports (content-visibility: auto) {
  .section:not(:first-of-type) {
    content-visibility: auto;
    contain-intrinsic-size: 720px;
  }
}

.section-dark {
  background: #243d69;
}

.section-dark[aria-labelledby="focus-title"] {
  background: #243d69;
}

.section-dark[aria-labelledby="focus-title"] .bento-card {
  border-color: rgba(224, 224, 224, 0.34);
  background: #37474f;
}

.section-panel {
  background:
    linear-gradient(180deg, #243d69 0%, #243d69 100%);
}

.section-compact {
  padding-top: clamp(3.5rem, 6vw, 5rem);
  padding-bottom: clamp(3.5rem, 6vw, 5rem);
}

.section-inner {
  width: min(100%, var(--container));
  margin: 0 auto;
}

.section-heading {
  max-width: 760px;
}

.section-heading.centred {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.section h2 {
  margin-bottom: 0;
  font-size: clamp(3rem, 5.6vw, 5.8rem);
  line-height: 0.96;
}

.section-heading p,
.closing-panel p {
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  font-weight: 700;
  line-height: 1.72;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(210px, auto);
  gap: 1rem;
  margin-top: 3rem;
}

.bento-card,
.download-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-solid);
  padding: clamp(1.25rem, 2.2vw, 1.65rem);
  box-shadow: 0 20px 70px rgba(55, 71, 79, 0.36);
}

.bento-card::before,
.download-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: none;
}

.bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-tall {
  grid-row: span 2;
}

.bento-card h3,
.download-card h3,
.process-list h3 {
  position: relative;
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.12;
}

.bento-large h3 {
  max-width: 11ch;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.6vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.bento-card p,
.download-card p,
.process-list p {
  position: relative;
  margin: 0.95rem 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.7;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense;
  align-items: stretch;
  gap: 1rem;
  margin-top: 3rem;
}

.download-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.download-feature {
  grid-column: span 3;
  grid-row: span 2;
  min-height: 520px;
}

.download-wide {
  grid-column: span 3;
  min-height: 250px;
}

.download-compact {
  grid-column: span 3;
}

.download-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: auto;
  min-height: 46px;
  border: 1px solid #f5f8fa;
  border-radius: 999px;
  background: #f5f8fa;
  color: #243d69;
  padding: 0.8rem 1.15rem;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.download-card a:hover {
  transform: translateY(-1px);
  border-color: #008080;
  background: #008080;
  color: #ffffff;
}

.download-feature h3 {
  max-width: 10ch;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 5.3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.download-feature p {
  max-width: 36rem;
  font-size: 1.06rem;
}

.process-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
}

.process-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #243d69;
  padding: 1.2rem;
}

.process-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: #ffffff;
  color: #243d69;
  font-weight: 950;
}

.process-list h3 {
  margin-top: 0;
}

.closing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: #243d69;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow);
}

.closing-panel h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4.4vw, 4.6rem);
  line-height: 0.98;
}

.closing-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 220px;
}

.footer {
  background: #243d69;
  border-top: 1px solid var(--line);
  padding: 3rem clamp(1rem, 3vw, 2rem);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(100%, var(--container));
  margin: 0 auto;
}

.footer-title {
  margin: 0;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-inner p:not(.footer-title) {
  max-width: 590px;
  margin: 0.8rem 0 0;
  color: var(--soft);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.65;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem 1.2rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 850;
}

.copyright {
  width: min(100%, var(--container));
  margin: 1.8rem auto 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 1040px) {
  .desktop-links,
  .nav-cta {
    display: none;
  }

  .mobile-menu-button {
    position: relative;
    z-index: 84;
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #243d69;
    color: #ffffff;
    cursor: pointer;
  }

  .mobile-menu-button span:not(.sr-only) {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .site-nav.is-open .mobile-menu-button span:nth-child(2) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-nav.is-open .mobile-menu-button span:nth-child(3) {
    opacity: 0;
  }

  .site-nav.is-open .mobile-menu-button span:nth-child(4) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-panel {
    position: absolute;
    left: 0.55rem;
    right: 0.55rem;
    top: calc(100% + 0.7rem);
    z-index: 82;
    display: grid;
    gap: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #243d69;
    padding: 0.75rem;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.is-open .mobile-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .mobile-panel a {
    display: flex;
    min-height: 46px;
    align-items: center;
    border-radius: 14px;
    padding: 0.72rem 0.85rem;
    color: #ffffff;
    font-weight: 900;
  }

  .mobile-panel a:hover {
    background: #008080;
    color: #ffffff;
  }

  .mobile-panel .mobile-cta {
    justify-content: center;
    color: #243d69;
    margin-top: 0.35rem;
  }

  .hero-inner,
  .process-layout,
  .closing-panel {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    align-items: end;
  }

  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bento-large,
  .bento-tall,
  .download-feature,
  .download-wide,
  .download-compact {
    grid-column: span 1;
    grid-row: span 1;
  }

  .download-feature,
  .download-card {
    min-height: 320px;
  }

  .closing-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 0.75rem 0.75rem 0;
  }

  .site-nav {
    border-radius: 22px;
  }

  .brand span {
    display: none;
  }

  .hero-video {
    object-position: 58% center;
    opacity: 0.78;
    filter: grayscale(1) brightness(0.84) contrast(1.32) saturate(0.8);
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(36, 61, 105, 0.90) 0%, rgba(36, 61, 105, 0.34) 44%, rgba(36, 61, 105, 1) 100%),
      linear-gradient(90deg, rgba(36, 61, 105, 0.92), rgba(36, 61, 105, 0.34));
  }

  .hero-inner {
    padding: 6.6rem 1rem 2.6rem;
  }

  .hero-card,
  .closing-panel {
    border-radius: 24px;
  }

  h1 {
    max-width: 11.5ch;
    font-size: clamp(3.1rem, 15vw, 5rem);
  }

  .section h2,
  .closing-panel h2 {
    font-size: clamp(2.55rem, 12vw, 3.7rem);
  }

  .hero-actions,
  .closing-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .bento-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-feature h3 {
    max-width: none;
    font-size: clamp(2.4rem, 11vw, 3.6rem);
  }

  .bento-card,
  .download-card {
    min-height: auto;
    border-radius: 20px;
  }

  .process-list li {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-halo,
  .ripple-layer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .hero-video {
    display: none;
  }

  .hero-section {
    background: #243d69 url("/assets/fhlm-background-poster.jpg") center / cover no-repeat;
  }
}
