/* ==========================================================================
   Base: design tokens, reset, typography, buttons, shared utilities
   Brand values come from the original site's Elementor global kit.
   ========================================================================== */

:root {
  /* Brand palette (original site) */
  --primary: #263173;
  --navy-950: #0e1b45;
  --navy-900: #141d4f; /* heading colour */
  --navy-800: #192254; /* header bar */
  --navy-700: #222c66;
  --gold: #f2c230;
  --text: #3a3a3a;
  --bg: #f2f2f2;
  --bg-soft: #f4f4f4;
  --white: #ffffff;

  /* Derived */
  --text-muted: #565a6a;
  --line: rgba(38, 49, 115, 0.14);
  --gold-soft: rgba(242, 194, 48, 0.16);
  --danger: #b3261e;

  /* Type */
  --font-head: "Lato", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-body: "Karla", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  /* Shape + depth */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 12px rgba(20, 29, 79, 0.08);
  --shadow-md: 0 18px 44px -16px rgba(20, 29, 79, 0.35);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.1rem, 4vw, 2rem);
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Slide-in animations and decorative frames may extend past the edge.
     "clip" (unlike "hidden") keeps position: sticky working. */
  overflow-x: hidden; /* fallback for browsers without "clip" */
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* <picture> only swaps the image source (e.g. a cropped photo on phones); the <img> lays out as before */
picture {
  display: contents;
}

img {
  height: auto;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--primary);
  text-decoration-color: rgba(38, 49, 115, 0.35);
  text-underline-offset: 3px;
  transition: color 0.25s var(--ease), text-decoration-color 0.25s var(--ease);
}

a:hover {
  color: var(--navy-900);
  text-decoration-color: var(--gold);
}

/* Keyboard focus ring. Navy on light surfaces (3px, ~16:1 against white);
   gold only where the surface behind it is dark. No border-radius override, so
   round and pill-shaped controls keep their shape while focused. */
:focus-visible {
  outline: 3px solid var(--navy-900);
  outline-offset: 3px;
}

.site-header :focus-visible,
.site-footer :focus-visible,
.on-dark :focus-visible,
.process :focus-visible {
  outline-color: var(--gold);
}

/* The floating button can sit over light or dark content: navy gap + gold ring. */
.to-top:focus-visible {
  outline-color: var(--gold);
  box-shadow: 0 0 0 3px var(--navy-900), var(--shadow-md);
}

/* ----- Headings ---------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  color: var(--navy-900);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 1.1rem + 4.6vw, 4.3rem);
  line-height: 1.06;
}

h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.5vw, 3.1rem);
}

h3 {
  font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.35rem);
}

h4 {
  font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem);
  line-height: 1.25;
}

h6 {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

/* Sub-heading size for h3 elements used as card / block titles */
.t-h4 {
  font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem);
  line-height: 1.25;
}

.on-dark,
.on-dark h1,
.on-dark h2,
.on-dark h3,
.on-dark h4 {
  color: var(--white);
}

/* ----- Layout helpers ---------------------------------------------------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.section--white {
  background: var(--white);
}

.section--tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.1rem;
  background: var(--gold);
  color: var(--navy-900);
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transform: translateY(-120%);
  transition: transform 0.25s var(--ease);
}

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

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ----- Eyebrow label ----------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1rem;
  color: var(--primary);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2.4rem;
  height: 2px;
  background: var(--gold);
}

.on-dark .eyebrow {
  color: var(--gold);
}

/* ----- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.05rem 1.6rem;
  border: 2px solid var(--gold);
  border-radius: 5px;
  background: var(--gold);
  color: var(--navy-900);
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
    transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.btn .icon {
  transition: transform 0.3s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background: var(--navy-900);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(20, 29, 79, 0.55);
}

.btn:hover .icon {
  transform: translateX(4px);
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy-900);
}

/* ----- Scroll reveal (progressive enhancement; needs the .js class) ------ */

.js [data-reveal] {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.9s var(--ease), translate 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}

.js [data-reveal="left"] {
  translate: -34px 0;
}

.js [data-reveal="right"] {
  translate: 34px 0;
}

.js [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

/* No sideways offsets on small screens: avoids any horizontal overflow. */
@media (max-width: 900px) {
  .js [data-reveal="left"],
  .js [data-reveal="right"] {
    translate: 0 28px;
  }

  .js [data-reveal="left"].is-visible,
  .js [data-reveal="right"].is-visible {
    translate: 0 0;
  }
}

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

  .js [data-reveal] {
    opacity: 1;
    translate: none;
    transition: none;
  }

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