/* ==========================================================================
   FinWisePoint — styles.css
   Phase 2.5: editorial Swiss redesign pass.
   Calm dark-navy field, large whitespace, strong type hierarchy, hairline
   dividers, flat editorial blocks (not cards), restrained single accent.
   No animations (Phase 3). Content stays fully visible.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Surface / navy field (deep, calm, near-flat) */
  --navy-900: #06101f;
  --navy-850: #081428;
  --navy-800: #0a1a31;
  --ink-bottom: #050c18;

  /* Text ramp */
  --text-strong: #f4f7fc;
  --text:        #cfd8e8;
  --text-muted:  #93a1ba;
  --text-faint:  #7d8ca8;

  /* Single locked accent — used sparingly (links, focus, tiny markers) */
  --accent:      #6f9bf2;
  --accent-soft: #9bb8f7;

  /* Lines (the primary structural language now) */
  --line:        rgba(160, 176, 204, 0.14);
  --line-strong: rgba(160, 176, 204, 0.26);
  --hairline:    rgba(160, 176, 204, 0.18);

  /* Minimal fills (used only on buttons/inputs) */
  --field-bg:    rgba(255, 255, 255, 0.014);

  /* One radius system — sharp Swiss (small only) */
  --r: 6px;
  --r-pill: 999px;

  /* Rhythm — large editorial whitespace */
  --container: 1500px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --section-y: clamp(6.5rem, 14vw, 13rem);

  /* Type */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

/* ==========================================================================
   LIGHT SECTIONS — white background + inverted (dark-on-light) palette.
   Re-maps the color tokens within scope so all child text/borders/accents
   flip automatically; only hardcoded glass card fills need an explicit reset.
   ========================================================================== */
.section-light {
  position: relative;
  z-index: 1;
  background: #ffffff;
  --text-strong: #0b1a30;
  --text:        #2b3a52;
  --text-muted:  #586882;
  --text-faint:  #7d8aa0;
  --accent:      #2f63d6;
  --accent-soft: #2f63d6;
  --line:        rgba(11, 26, 48, 0.12);
  --line-strong: rgba(11, 26, 48, 0.20);
  --hairline:    rgba(11, 26, 48, 0.12);
  color: var(--text);
}
/* Glass-on-dark cards → clean light cards with a tinted shadow */
.section-light .svc-card,
.section-light .svc-card.is-active {
  background: #ffffff;
  border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(11, 26, 48, 0.04), 0 10px 28px rgba(11, 26, 48, 0.06);
}
.section-light .svc-card.is-active { border-color: var(--accent); }
.section-light .news-link {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(11, 26, 48, 0.04), 0 8px 24px rgba(11, 26, 48, 0.05);
}
.section-light .news-link:hover {
  background: #f7faff;
  box-shadow: 0 2px 4px rgba(11, 26, 48, 0.06), 0 14px 34px rgba(11, 26, 48, 0.09);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; padding: 0; }

::selection { background: rgba(111, 155, 242, 0.22); color: var(--text-strong); }

:focus-visible {
  outline: 1.5px solid var(--accent-soft);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #04122e;
  padding: 0.6rem 1rem;
  border-radius: var(--r);
  font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main > section {
  position: relative;
  padding-block: var(--section-y);
  scroll-margin-top: 96px; /* clears the sticky header on anchor jumps */
}

/* Single precise hairline between sections (full container width) */
main > section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--hairline);
}

/* ==========================================================================
   UNIFIED BACKGROUND — quiet, near-flat, one field
   ========================================================================== */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(110% 70% at 50% -10%, #0c1c38 0%, transparent 55%),
    linear-gradient(180deg, var(--navy-850) 0%, var(--navy-900) 42%, var(--ink-bottom) 100%);
}

/* One barely-there top glow for depth (no multi-blob aurora) */
.bg-aurora {
  position: absolute;
  inset: 0;
  background: radial-gradient(46% 30% at 50% 0%, rgba(111, 155, 242, 0.08), transparent 70%);
}

/* Grid retired — kept transparent so HTML hooks stay valid */
.bg-grid { display: none; }

/* Trace of grain only, to prevent gradient banding */
.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   TYPOGRAPHY HELPERS
   ========================================================================== */
.eyebrow,
.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: var(--text-strong);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
}

/* Swiss section header: small label rail above a large light headline */
.section-head {
  max-width: 50rem;
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}
.section-head .section-title { margin-top: 0; }

.section-intro {
  margin-top: 1.6rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 46ch;
}

/* ==========================================================================
   BUTTONS — understated, restrained, no glow
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.94rem;
  letter-spacing: 0;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.18s var(--ease),
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn-primary {
  background: var(--text-strong);
  color: #0a1626;
}
.btn-primary:hover { background: #ffffff; }

.btn-ghost {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--text-muted); }

.btn:active { transform: scale(0.97); }
.btn-block { width: 100%; }

/* ==========================================================================
   HEADER — thin, quiet, single line
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  height: 84px;
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  /* NOTE: backdrop-filter is deliberately NOT transitioned — animating the blur
     radius for 0.3s on every scroll-toggle was the single most expensive GPU
     spike. The frost now snaps in (imperceptible) instead of easing. */
  transition:
    height 0.3s var(--ease),
    background-color 0.3s var(--ease),
    border-color 0.3s var(--ease);
  /* NOTE: intentionally NO transform here — the nav dropdown panels are
     position:fixed descendants of this header, and a transform would make the
     header their containing block (breaking their viewport positioning). */
}
/* Transparent only at the very top; solid corporate-navy once scrolling */
.site-header.scrolled {
  height: 62px;
  background: rgba(6, 16, 31, 0.86);
  border-bottom-color: var(--line);
  /* blur reduced 16px -> 12px: visually near-identical, much cheaper to repaint
     across a full-width header whose pixel count grows with the viewport */
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.header-inner .wordmark { justify-self: start; }
.header-inner .header-cta { justify-self: end; }

/* Wordmark — split logo: graphic mark (always) + writing (slides into the
   mark and fades on scroll, slides back out on scroll up). Two real SVGs that
   overlap into the full logo. Mark never moves or resizes. */
.wordmark {
  position: relative;
  display: inline-block;
  line-height: 0;
  font-family: var(--font-display);
  /* SVG viewBox was widened leftward (48→24) to un-clip the mark's left
     rounded corner. That adds 24 viewBox units of width on the left, so without
     compensation the whole lockup would drift right by 24 * (338/375) ≈ 21.6px.
     Pull it back the same amount so the dot/writing stay put and only the
     revealed corner extends into the existing left gutter. */
  margin-left: -21.6px;
}
.wordmark-mark,
.wordmark-text {
  height: 338px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1); /* render white */
}
.wordmark-mark {
  position: relative;
  z-index: 2;
}
.wordmark-text {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}
/* Scrolled: the writing retracts into the mark and disappears */
.site-header.scrolled .wordmark-text {
  transform: translateX(-32%);
  opacity: 0;
}
.wordmark-mark {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}
.wordmark-text {
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  color: var(--text-strong);
}

.site-nav {
  display: flex;
  gap: 2.6rem;
  justify-self: center;
}
.site-nav a {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-strong); /* white */
  transition: color 0.2s var(--ease);
}
.site-nav a:hover { color: var(--accent-soft); } /* color shift on hover */
.site-nav a[aria-current="page"] { color: var(--accent-soft); } /* current standalone page */

.header-cta {
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
}

/* ==========================================================================
   HERO — calm, large, light-weight editorial headline
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

/* Background video layer (behind the hero text, above the unified field) */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Scrim: darkened toward bottom-left so the headline stays readable */
.hero-media-scrim {
  position: absolute;
  inset: 0;
  background:
    /* top bar: ~30% darker behind the header, fading smoothly into the video */
    linear-gradient(180deg, rgba(6, 16, 31, 0.32) 0%, rgba(6, 16, 31, 0.26) 9%, rgba(6, 16, 31, 0) 20%),
    linear-gradient(180deg, rgba(6, 16, 31, 0.12) 0%, rgba(6, 16, 31, 0.04) 32%, rgba(6, 16, 31, 0.9) 100%),
    linear-gradient(90deg, rgba(6, 16, 31, 0.68) 0%, rgba(6, 16, 31, 0.1) 58%, transparent 100%);
}

/* Full container so the text's left edge aligns with the header logo,
   not a narrow centered box. Children keep their own max-widths. */
.hero-inner { position: relative; z-index: 1; max-width: none; }
.hero .eyebrow { display: block; margin-bottom: 1.3rem; font-size: 0.68rem; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  max-width: 18ch;
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: clamp(0.98rem, 1.1vw, 1.05rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   POSITIONING — large light statement, generous space
   ========================================================================== */
/* Tight, symmetric gap above and below this section */
.positioning {
  padding-top: clamp(0.95rem, 2.1vw, 1.95rem);
  padding-bottom: clamp(0.95rem, 2.1vw, 1.95rem);
}

/* Two-column: overlapping animations on the left, text on the right */
.positioning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.positioning-media {
  position: relative;
  min-height: clamp(560px, 58vw, 760px);
}
.lottie { position: absolute; }
/* purple (income) behind, upper-left; orange (savings) in front, lower-right */
.lottie-a {
  width: 112%;
  top: 10%;
  left: -20%;
  transform: rotate(-7deg);
  z-index: 1;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.45));
}
.lottie-b {
  width: 112%;
  left: 8%;
  bottom: 8%;
  transform: rotate(8deg);
  z-index: 2;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.5));
}
.positioning-inner {
  max-width: 38rem;
  /* shift right into the open margin; never past the viewport edge */
  transform: translateX(clamp(0px, calc((100vw - 1500px) / 2 - 24px), 20%));
}
.positioning .section-label { display: block; margin-bottom: 1.7rem; }

.positioning-lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  line-height: 1.32;
  letter-spacing: -0.018em;
  color: var(--text-strong);
}
.positioning-body {
  margin-top: 1.9rem;
  font-size: 1.08rem;
  line-height: 1.68;
  color: var(--text-muted);
  max-width: 56ch;
}

/* Word-by-word reveal on the lead (Emil: motivated entrance, draws the eye
   through the statement). Hidden under js until processed; no flash. */
html.js .positioning-lead { opacity: 0; }
html.js .positioning-lead.lead-ready { opacity: 1; }
.positioning-lead .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  transition:
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.positioning-lead.is-in .word { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { /* disabled: site ignores reduced-motion (always animate) */
  html.js .positioning-lead { opacity: 1; }
  .positioning-lead .word { opacity: 1; transform: none; }
}

/* ==========================================================================
   SERVICES CAROUSEL — sleek infinite track, click to expand in place
   ========================================================================== */
.services-head {
  max-width: 52rem;
  margin-bottom: clamp(2.75rem, 6vw, 4.5rem);
}
.services-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.07;
  letter-spacing: -0.032em;
  color: var(--text-strong);
  max-width: 16ch;
}
.services-intro {
  margin-top: 1.5rem;
  font-size: 1.06rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 44ch;
}

.svc-carousel { position: relative; }

.svc-viewport {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  padding-block: 0.5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.svc-viewport::-webkit-scrollbar { display: none; }
.svc-viewport.dragging { cursor: grabbing; }
.svc-viewport.dragging .svc-card { pointer-events: none; }

.svc-track {
  display: flex;
  gap: clamp(0.9rem, 1.6vw, 1.35rem);
  width: max-content;
  padding-inline: var(--gutter);
}

.svc-card {
  flex: 0 0 auto;
  width: clamp(284px, 80vw, 360px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 2vw, 2.1rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition:
    width 0.55s var(--ease),
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    transform 0.3s var(--ease);
}
.svc-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.svc-card:focus-visible { border-color: var(--accent-soft); outline: none; }

.svc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.svc-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.svc-expand { position: relative; width: 22px; height: 22px; flex: none; }
.svc-expand::before,
.svc-expand::after {
  content: "";
  position: absolute;
  background: var(--text-faint);
  transition: transform 0.4s var(--ease), background 0.3s var(--ease);
}
.svc-expand::before { left: 0; top: 50%; width: 100%; height: 1.5px; transform: translateY(-50%); }
.svc-expand::after { top: 0; left: 50%; width: 1.5px; height: 100%; transform: translateX(-50%); }

.svc-main { margin-top: 1.4rem; }
.svc-cat {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.85rem;
}
.svc-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.12rem, 1.5vw, 1.28rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--text-strong);
}
.svc-desc {
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.svc-detail[hidden] { display: none; }
.svc-card.is-active {
  border-color: var(--accent-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.svc-detail {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transition:
    grid-template-rows 0.5s var(--ease),
    opacity 0.4s var(--ease),
    margin-top 0.5s var(--ease);
}
.svc-detail > * { overflow: hidden; min-height: 0; }
.svc-detail p {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* Service detail pop-up: centered, smoothly scales open, rounded */
.svc-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.svc-modal[hidden] { display: none; }
.svc-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 18, 0.6);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.svc-modal-card {
  position: relative;
  width: min(92vw, 540px);
  padding: clamp(2rem, 3.2vw, 3rem);
  padding-right: clamp(3rem, 4vw, 3.6rem);
  background: linear-gradient(180deg, #0e1c36, #0a1326);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: 0 40px 100px -36px rgba(0, 0, 0, 0.75);
  transform: scale(0.9) translateY(14px);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.32, 1),
    opacity 0.32s ease;
  transform-origin: center;
}
.svc-modal.is-open .svc-modal-scrim { opacity: 1; }
.svc-modal.is-open .svc-modal-card { transform: scale(1) translateY(0); opacity: 1; }

.svc-modal-cat {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.svc-modal-title {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: -0.018em;
  line-height: 1.16;
  color: var(--text-strong);
}
.svc-modal-text {
  margin-top: 1.1rem;
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.72;
}
.svc-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.8rem;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-strong);
  background: rgba(111, 155, 242, 0.12);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.15s var(--ease);
}
.svc-modal-link:hover {
  background: rgba(111, 155, 242, 0.2);
  border-color: var(--accent-soft);
}
.svc-modal-link:active { transform: scale(0.97); }
.svc-modal-link-arrow {
  font-size: 1rem;
  transition: transform 0.2s var(--ease);
}
.svc-modal-link:hover .svc-modal-link-arrow { transform: translateX(4px); }
.svc-modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.svc-modal-close:hover { color: var(--text-strong); border-color: var(--text-muted); background: rgba(255, 255, 255, 0.03); }

.svc-controls {
  display: flex;
  gap: 0.75rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.svc-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}
.svc-btn:hover { border-color: var(--text-muted); color: var(--text-strong); background: rgba(255, 255, 255, 0.02); }
.svc-btn:active { transform: scale(0.95); }

/* ==========================================================================
   COMMITMENTS — numbered practice list, large editorial rows + motion
   ========================================================================== */
.commitments .section-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.commit-list {
  list-style: none;
  margin: clamp(2.2rem, 4vw, 3.25rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.commit-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1.15fr) minmax(0, 0.85fr) 2.2rem;
  grid-template-areas: "num title desc arrow";
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.7rem, 2.8vw, 2.6rem) clamp(0.6rem, 1.5vw, 1.4rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background-color 0.35s var(--ease);
}
/* whole row links to the dedicated Approach page (stretched, transparent) */
.commit-link { position: absolute; inset: 0; z-index: 1; }
.commit-num {
  grid-area: num;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease);
}
.commit-title {
  grid-area: title;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.7vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--text-strong);
  transition: transform 0.4s var(--ease), color 0.3s var(--ease);
}
.commit-desc {
  grid-area: desc;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.56;
  max-width: 44ch;
}
.commit-arrow {
  grid-area: arrow;
  justify-self: end;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-faint);
  transition: transform 0.4s var(--ease), color 0.3s var(--ease);
}
/* hover — row tint, title + arrow glide, accent shift (transform/opacity/color only) */
.commit-row:hover {
  background: rgba(11, 26, 48, 0.025);
}
.commit-row:hover .commit-title {
  transform: translateX(12px);
}
.commit-row:hover .commit-arrow {
  transform: translateX(8px);
  color: var(--accent);
}
.commit-row:hover .commit-num {
  color: var(--accent);
}
@media (max-width: 760px) {
  .commit-row {
    grid-template-columns: 2.2rem 1fr 1.4rem;
    grid-template-areas:
      "num title arrow"
      "num desc  arrow";
    align-items: start;
    row-gap: 0.65rem;
    column-gap: 1rem;
  }
  .commit-arrow { align-self: center; }
  .commit-row:hover .commit-title { transform: translateX(6px); }
}

/* ==========================================================================
   PROCESS — numbered editorial columns, hairline-topped
   ========================================================================== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.step {
  position: relative;
  border-top: 1px solid var(--line-strong);
  transition: border-top-color 0.35s var(--ease);
}
/* the whole step IS the link to its dedicated Process page */
.step-link {
  display: block;
  padding-top: 1.6rem;
  color: inherit;
  text-decoration: none;
}
.step-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), color 0.3s var(--ease);
}
.step-more i { font-style: normal; transition: transform 0.4s var(--ease); }
.step:hover { border-top-color: var(--accent); }
.step:hover .step-title { color: var(--accent); }
.step:hover .step-more { opacity: 1; transform: translateY(0); color: var(--accent); }
.step:hover .step-more i { transform: translateX(5px); }
.step-title { transition: color 0.3s var(--ease); }
@media (max-width: 760px) { .step-more { opacity: 1; transform: none; } }
.step-num {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.step-title {
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.step-desc {
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.62;
}

/* ==========================================================================
   FOUNDER — large light statement, left-aligned editorial
   ========================================================================== */
/* Split layout: editorial statement on the left, animation on the right */
.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: center;
}
.founder-inner { max-width: 42rem; }
.founder-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.founder-lottie {
  position: relative;
  width: 100%;
  max-width: 704px; /* +10% */
  aspect-ratio: 600 / 532;
  /* nudge right; translateZ(0) isolates this forever-looping SVG to its own
     compositor layer so its repaints don't dirty the rest of the page */
  transform: translateX(10%) translateZ(0);
  will-change: transform;
}
/* soft light lift on white — baked into a STATIC pseudo-element instead of a CSS
   filter, so the shadow is NOT re-rasterized on every animation frame (the
   drop-shadow version was the worst large-screen jank source) */
.founder-lottie::after {
  content: "";
  position: absolute;
  inset: 6% 4%;
  z-index: -1;
  border-radius: 22px;
  box-shadow: 0 20px 44px rgba(11, 26, 48, 0.14);
}
.founder-lottie svg { display: block; position: relative; }
@media (max-width: 860px) {
  .founder-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .founder-inner { max-width: 56rem; }
  .founder-media { order: -1; }
  .founder-lottie { max-width: 420px; margin-inline: auto; transform: none; }
}
.founder .section-label { display: block; margin-bottom: 2.4rem; }
.founder-statement {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  line-height: 1.36;
  letter-spacing: -0.022em;
  color: var(--text-strong);
}
.founder-note {
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 56ch;
}
.founder-more { margin-top: 2.2rem; }
.founder-more span { display: inline-block; transition: transform 0.2s var(--ease); }
.founder-more:hover span { transform: translateX(4px); }

/* ==========================================================================
   CONTACT — editorial split, underlined inputs (no boxed form card)
   ========================================================================== */
/* Tighter section: less empty space above and below the form */
.contact {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 3.25rem);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 8vw, 7rem);
  align-items: start;
}
.contact-intro { max-width: 34rem; }
.contact-intro .section-intro { max-width: 42ch; }

.contact-meta {
  margin-top: 3rem;
  display: grid;
  gap: 1.4rem;
}
.contact-meta li {
  display: grid;
  gap: 0.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.contact-meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.contact-meta a:hover { color: var(--accent-soft); }

.contact-social { display: flex; gap: 0.6rem; margin-top: 2.4rem; }
.contact-social a,
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.18s var(--ease);
}
.contact-social a:hover,
.footer-social a:hover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}
.contact-social img,
.footer-social img { opacity: 0.7; transition: opacity 0.2s var(--ease); }
.contact-social a:hover img,
.footer-social a:hover img { opacity: 1; }

.contact-form { display: block; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.4rem;
}

/* Multi-step form */
.form-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.form-bar {
  height: 1px;
  flex: 1;
  background: var(--line-strong);
  transition: background-color 0.3s var(--ease);
}
.form-bar.is-on { background: var(--accent-soft); }
.form-step-count {
  margin-left: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.form-step { display: none; }
.form-step.is-active {
  display: grid;
  gap: 1.1rem;
  animation: stepIn 0.35s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.form-step-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.form-nav {
  display: flex;
  align-items: center;
  margin-top: 0.8rem;
}
.form-back { margin-right: auto; }
.form-next,
.form-back {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  transition: gap 0.2s var(--ease), color 0.2s var(--ease);
}
.form-next:hover { gap: 0.85rem; color: var(--text-strong); }
.form-back { color: var(--text-muted); }
.form-back:hover { gap: 0.85rem; color: var(--text-strong); }
.form-step .form-note { margin-top: 1rem; }
.field-opt { color: var(--text-faint); font-weight: 400; }
.field { display: grid; gap: 0.55rem; }
.field label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--text-strong);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.55rem 0;
  width: 100%;
  transition: border-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 3.5rem; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
/* Service-interest chips */
.svc-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.svc-pick legend {
  padding: 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.chip:hover span { border-color: var(--text-muted); color: var(--text); }
.chip input:checked + span {
  border-color: var(--accent-soft);
  color: var(--text-strong);
  background: rgba(111, 155, 242, 0.12);
}
.chip input:focus-visible + span { outline: 1.5px solid var(--accent-soft); outline-offset: 2px; }

.contact-form .btn { margin-top: 0.3rem; justify-self: start; padding-inline: 2.4rem; }
.form-note {
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ==========================================================================
   SCROLL-TO-TOP — floating pill, fades in once the page is scrolled
   ========================================================================== */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-strong);
  background: rgba(8, 20, 40, 0.78);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease),
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover {
  color: var(--accent-soft);
  border-color: var(--accent-soft);
  background: rgba(8, 20, 40, 0.92);
}
.to-top:active { transform: scale(0.96); }
.to-top-arrow {
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.2s var(--ease);
}
.to-top:hover .to-top-arrow { transform: translateY(-2px); }
@media (max-width: 540px) {
  .to-top-label { display: none; } /* compact to a round arrow on small screens */
  .to-top { padding: 0.6rem; }
}

/* ==========================================================================
   NEWS / INSIGHTS — editorial feed of short notes
   ========================================================================== */
.news {
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}
.news-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.news-head .section-title { margin-top: 0; }
.news-all {
  flex: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}
.news-all:hover { color: var(--accent-soft); }
.news-all span { transition: transform 0.2s var(--ease); display: inline-block; }
.news-all:hover span { transform: translateX(3px); }

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}
.news-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.75rem 1.6rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 26, 49, 0.4);
  color: inherit;
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    background-color 0.3s var(--ease);
}
.news-link:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: rgba(10, 26, 49, 0.7);
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.news-cat {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.news-date {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-left: auto;
}
.news-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--text-strong);
  margin: 0 0 0.7rem;
}
.news-excerpt {
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.62;
  margin: 0 0 1.5rem;
}
.news-more {
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--accent);
}
.news-more span { transition: transform 0.2s var(--ease); display: inline-block; }
.news-link:hover .news-more span { transform: translateX(4px); }

@media (max-width: 900px) {
  .news-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FOOTER — 3-column block (brand · hours · contact/social) + legal strip
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.25rem, 4vw, 3.25rem) clamp(1.1rem, 2vw, 1.6rem);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

/* Part 1: brand + identity */
.footer-brand .footer-wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.footer-tagline {
  margin-top: 1.2rem;
  color: var(--text-muted);
  max-width: 36ch;
  font-size: 0.98rem;
  line-height: 1.62;
}
.footer-status {
  margin-top: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.footer-status strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 0.3rem;
}
.footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 155, 242, 0.18);
}

/* Parts 2 & 2b: labelled detail columns */
.footer-col { display: grid; gap: 0.45rem; align-content: start; }
.footer-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 1.8rem;
}
.footer-label:first-child { margin-top: 0; }
.footer-col p { color: var(--text); font-size: 0.98rem; line-height: 1.5; }
.footer-col a { color: var(--text); transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--accent-soft); }
.footer-links { display: flex; flex-direction: column; gap: 0.45rem; }

/* Part 3: legal strip */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
}
.footer-legal-nav { display: flex; gap: 2rem; }
.footer-legal-nav a,
.footer-copy {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.footer-legal-nav a { transition: color 0.2s var(--ease); }
.footer-legal-nav a:hover { color: var(--text-muted); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .positioning-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  /* single-column: the decorative lotties (112% wide, rotated) would bleed past
     the viewport, so clip them to the now-full-width media box. Desktop keeps its
     intentional gutter bleed (this only applies once the columns stack). */
  .positioning-media { min-height: clamp(260px, 60vw, 360px); overflow: hidden; }
  .positioning-inner { max-width: none; }
  .contact-inner { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .footer-brand { grid-column: 1 / -1; }
  .process-steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.6rem; }
}

@media (max-width: 760px) {
  .site-nav { display: none; }
  .header-cta { margin-left: auto; }
  .header-inner { gap: 1rem; }

  .hero { min-height: 80vh; padding-top: 3.5rem; }
  .hero-title { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .hero-actions .btn { flex: 1 1 auto; }

  .svc-card { min-height: 340px; }

  .commit-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }

  .field-row { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
}

/* ==========================================================================
   PHASE 3 — Scroll reveals + micro-interactions (Emil Kowalski)
   Entering elements: strong ease-out, blur-masked, staggered, once only.
   Only opacity / transform / filter animate (GPU friendly).
   ========================================================================== */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(6px);
  transition:
    opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    filter 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Touch devices: drop transform-based hovers (avoid sticky tap states) */
@media (hover: none) {
  .svc-card:hover,
  .btn:hover,
  .footer-social a:hover,
  .contact-social a:hover { transform: none; }
}

/* ==========================================================================
   INTRO PRELOADER — mirrors the reference reveal. The motto builds word by word
   (Your / numbers, / in / order.) over a small brand caption, then a gap opens
   at the dead centre with the FinWise mark in it, and two navy panels retract
   so the hero is revealed by a rectangle growing outward from the centre.
   Driven by class changes from script.js: .is-typing -> .is-split -> .is-done.
   JS-gated: no .js class (script blocked) -> it never shows.
   ========================================================================== */
html:not(.js) .preloader { display: none; }
body.pl-lock { overflow: hidden; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
}
/* Already entered this session: never show the intro again (set in <head>). */
html.intro-done .preloader { display: none; }
.preloader.is-done { pointer-events: none; }

/* two solid navy panels meeting at the vertical centre. They cover the hero
   while the intro plays; on reveal they retract up/down, so the visible hero is
   a horizontal band that grows from the centre line out to full screen. Flat
   colour + slight overlap keeps the seam invisible. */
.pl-panel {
  position: absolute;
  left: 0;
  right: 0;
  height: 50.5%;
  background: var(--navy-900);
  z-index: 1;
  transition: transform 0.95s var(--ease);
  will-change: transform;
}
.pl-panel-top { top: 0; }
.pl-panel-bot { bottom: 0; }
.preloader.is-done .pl-panel-top { transform: translateY(-100%); }
.preloader.is-done .pl-panel-bot { transform: translateY(100%); }

/* a soft accent glow centred on the seam for depth */
.preloader::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(120vw, 1100px);
  height: min(120vw, 1100px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(111, 155, 242, 0.16), rgba(111, 155, 242, 0) 60%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  pointer-events: none;
}
.preloader.is-split::after { opacity: 1; }
.preloader.is-done::after { opacity: 0; }

/* centre content layer: the stacked motto + the mark, above the panels */
.pl-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--gutter);
}

/* each half of the motto (two words) is a centred column that moves as a block */
.pl-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.9s var(--ease);
  will-change: transform;
}
.pl-word {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.55s var(--ease), transform 0.7s var(--ease);
  will-change: transform, opacity;
}
/* word-by-word build, top to bottom */
.preloader.is-typing .pl-group-top .pl-word:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.10s; }
.preloader.is-typing .pl-group-top .pl-word:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.26s; }
.preloader.is-typing .pl-group-bot .pl-word:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.42s; }
.preloader.is-typing .pl-group-bot .pl-word:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.58s; }

/* small brand caption under the motto, like the reference's acme® */
.pl-caption {
  margin-top: clamp(0.9rem, 2vw, 1.5rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.pl-caption sup { font-size: 0.62em; top: -0.5em; }
.preloader.is-typing .pl-caption { opacity: 1; transition-delay: 0.80s; }
.preloader.is-split .pl-caption { opacity: 0; transition-delay: 0s; }

/* the FinWise mark fills the gap that opens at the dead centre on the split */
.pl-mark {
  display: flex;
  justify-content: center;
  max-height: 0;
  margin: 0;
  opacity: 0;
  transform: scale(0.6);
  transition: max-height 0.7s var(--ease), margin 0.7s var(--ease),
              opacity 0.45s var(--ease), transform 0.7s var(--ease);
  will-change: transform, opacity;
}
/* The mark is drawn with a CSS MASK filled solid white — this stamps the SVG's
   shape in white regardless of the file's internal gradients/filters, so it can
   never render blank (unlike chaining a CSS filter over the SVG's own filter). */
.pl-mark-glyph {
  display: block;
  width: clamp(225px, 42vw, 495px);   /* the full NewLogoVol2 lockup, dead centre */
  aspect-ratio: 358.5 / 100;          /* matches the cropped intro SVG's frame */
  background-color: #ffffff;
  -webkit-mask: url(images/logo-mark-intro.svg) no-repeat center / contain;
          mask: url(images/logo-mark-intro.svg) no-repeat center / contain;
  will-change: transform;
}
/* when the motto splits, the halves push well apart and the white mark fills
   the centre — a wide gap, per the reference */
.preloader.is-split .pl-mark {
  max-height: 22rem;
  margin: clamp(2rem, 5vw, 3.6rem) 0;
  opacity: 1;
  transform: scale(1);
}
.preloader.is-split .pl-group-top { transform: translateY(-0.9em); }
.preloader.is-split .pl-group-bot { transform: translateY(0.9em); }

/* reveal: the motto halves ride to the edges and off as the hero opens from the
   centre — synced with the panels retracting. The mark does NOT fade here; JS
   flies it to the header logo position (FLIP) via an inline transform. */
.preloader.is-done .pl-group-top { transform: translateY(-65vh); }
.preloader.is-done .pl-group-bot { transform: translateY(65vh); }
.preloader.is-done .pl-caption { opacity: 0; }

/* header logo is hidden while the intro plays, then revealed exactly when the
   flown mark lands on it, for a seamless hand-off */
html.pl-await-logo .wordmark { opacity: 0; }

/* loading line (full-width along the very bottom) + percentage (bottom-right) */
.pl-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  transition: opacity 0.45s var(--ease);
}
.pl-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.pl-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.pl-progress-pct {
  position: absolute;
  right: clamp(1.3rem, 4vw, 3rem);
  bottom: clamp(1.1rem, 3vw, 2rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.95rem, 2.2vw, 1.3rem);
  letter-spacing: 0.02em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.preloader.is-done .pl-progress { opacity: 0; }

/* ==========================================================================
   REDUCED MOTION — keep content, remove movement
   ========================================================================== */
@media (prefers-reduced-motion: reduce) and (min-width: 100000px) { /* disabled: site ignores reduced-motion (always animate) */
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero-video { display: none; } /* no autoplaying motion under reduced-motion */

  /* preloader: show the motto + mark statically, no build/split/curtain motion */
  .pl-word { opacity: 1; transform: none; }
  .pl-caption { opacity: 1; }
  .pl-mark { max-height: 22rem; margin: clamp(2rem, 5vw, 3.6rem) 0; opacity: 1; transform: none; }
  .preloader.is-split .pl-group-top,
  .preloader.is-split .pl-group-bot { transform: none; }
  .preloader.is-done .pl-group-top,
  .preloader.is-done .pl-group-bot { transform: none; }
  .preloader.is-done { opacity: 0; }
}

/* ==========================================================================
   MOBILE NAV — hamburger + slide-in accordion drawer (markup built by script.js)
   Desktop is untouched: the burger and drawer only appear at <=760px.
   ========================================================================== */
.nav-burger { display: none; }

@media (max-width: 760px) {
  /* phone header bar: CENTERED stacked logo, burger floated right; the desktop
     nav and inline CTA move into the drawer. Header height is held constant (no
     scroll-shrink) so the taller stacked logo never clips. */
  .site-header, .site-header.scrolled { height: 80px; }
  .header-inner { display: flex; align-items: center; justify-content: center; gap: 1rem; position: relative; }
  .site-nav { display: none; }
  .header-cta { display: none; }
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; padding: 0; margin: 0;       /* >=44px tap target */
    background: none; border: 0; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
}

.nav-burger-box { position: relative; display: block; width: 24px; height: 16px; }
.nav-burger-box span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: var(--text-strong);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease), top 0.3s var(--ease);
}
.nav-burger-box span:nth-child(1) { top: 0; }
.nav-burger-box span:nth-child(2) { top: 7px; }
.nav-burger-box span:nth-child(3) { top: 14px; }
.nav-burger.is-active .nav-burger-box span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.nav-burger.is-active .nav-burger-box span:nth-child(2) { opacity: 0; }
.nav-burger.is-active .nav-burger-box span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

html.drawer-open { overflow: hidden; }

.mobile-drawer {
  position: fixed; inset: 0; z-index: 90;             /* above header (50) + to-top (60) */
  background: rgba(4, 10, 22, 0.55);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}
.mobile-drawer.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease); }

.mdr-panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(86vw, 360px);
  display: flex; flex-direction: column;
  padding: 1.1rem 1.4rem 1.6rem;
  background: var(--navy-850, #081428);
  border-left: 1px solid var(--line-strong);
  box-shadow: -30px 0 80px -40px rgba(0, 0, 0, 0.9);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.34s var(--ease);
}
.mobile-drawer.is-open .mdr-panel { transform: translateX(0); }

.mdr-close {
  align-self: flex-end;
  width: 44px; height: 44px; margin: -0.2rem -0.5rem 0.4rem 0;
  font-size: 1.9rem; line-height: 1; color: var(--text-muted);
  background: none; border: 0; cursor: pointer;
}
.mdr-close:hover { color: var(--text-strong); }

.mdr-link, .mdr-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  width: 100%; min-height: 48px; padding: 0.5rem 0;
  font-family: var(--font-display); font-size: 1.12rem; font-weight: 500;
  color: var(--text-strong); text-decoration: none; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.mdr-link[aria-current] { color: var(--accent-soft); }
.mdr-chev { font-size: 0.7rem; color: var(--text-muted); transition: transform 0.3s var(--ease); }
.mdr-group.is-open .mdr-group-head .mdr-chev { transform: rotate(180deg); }

.mdr-sub { max-height: 0; overflow: hidden; transition: max-height 0.34s var(--ease); }
.mdr-group.is-open .mdr-sub { max-height: 820px; }   /* fits the 15-item Services group */
.mdr-sublink {
  min-height: 44px; padding: 0.45rem 0 0.45rem 0.95rem;
  font-size: 1rem; font-weight: 400; color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}
.mdr-sub .mdr-sublink:last-child { border-bottom: 0; }

.mdr-cta { margin-top: 1.2rem; width: 100%; justify-content: center; min-height: 48px; }

/* ==========================================================================
   PHONE TUNING (≤760 shared, ≤480 phone-specific). Mobile-only — desktop
   rules above are untouched. Pairs with the mobile-nav block.
   ========================================================================== */
@media (max-width: 760px) {
  /* Stacked, centered mobile logo. The desktop lockup is a WIDE horizontal
     mark+text that can't enlarge on a narrow phone, so on mobile we hide the two
     overlapping <img> layers and rebuild the lockup VERTICALLY from the same two
     SVGs as cropped backgrounds: the drawing (pill+dot) on top, "FinWisePoint"
     beneath — bigger and centred. url() is relative to styles.css (site root),
     so the paths resolve on every page. */
  .wordmark { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-left: 0; }
  .wordmark-mark, .wordmark-text { display: none; }
  .wordmark::before, .wordmark::after {
    content: ""; display: block; background-repeat: no-repeat;
    filter: brightness(0) invert(1);   /* render white on the navy bar */
  }
  .wordmark::before {                  /* drawing (pill + dot), cropped & centred */
    width: 90px; height: 34px;
    background-image: url(images/logo-mark.svg);
    background-size: 178px 190px; background-position: 9px -76px;
  }
  .wordmark::after {                   /* writing ("FinWisePoint"), cropped & centred */
    width: 210px; height: 30px;
    background-image: url(images/logo-text.svg);
    background-size: 300px 320px; background-position: -58px -132px;
  }

  /* Inputs at exactly 16px so iOS Safari never auto-zooms on focus; taller hit area. */
  .field input, .field textarea { font-size: 16px; padding: 0.7rem 0; }

  /* ≥44px tap targets for the chip pickers and the multi-step form buttons. */
  .chip span { padding: 0.7rem 1.05rem; min-height: 44px; display: inline-flex; align-items: center; }
  .chip-row { gap: 0.6rem; }
  .form-nav { gap: 1rem; }
  .form-next, .form-back { min-height: 44px; padding: 0.7rem 0.2rem; }

  /* Use dvh so the iOS toolbar can't clip the hero's bottom-aligned CTAs. */
  .hero { min-height: 88vh; min-height: 88dvh; }
  .hero-actions { width: 100%; }
}

@media (max-width: 480px) {
  /* Tighten the long phone scroll — desktop section padding is huge. */
  :root { --section-y: clamp(3.5rem, 11vw, 5rem); }
  main > section { scroll-margin-top: 72px; }

  /* Commitments: stack to a single readable column; the row is one big link so
     the decorative hover arrow isn't needed on touch. */
  .commit-row { grid-template-columns: 1fr; grid-template-areas: "num" "title" "desc"; row-gap: 0.45rem; padding: 1.4rem 0.2rem; }
  .commit-arrow { display: none; }
  .commit-title { font-size: 1.3rem; }

  /* Service cards: drop the tall desktop min-height so they hug their content. */
  .svc-card { min-height: 0; }

  /* Intro preloader: keep the centred motto+mark within a short phone viewport. */
  .preloader.is-split .pl-mark { max-height: 9rem; margin: 1.2rem 0; }
  .pl-mark-glyph { width: min(74vw, 300px); }
}

@media (max-width: 760px) {
  .svc-modal-close { width: 44px; height: 44px; }   /* comfortable touch close */
}

@media (max-width: 760px) {
  /* Homepage positioning charts: the desktop look overlaps two ROTATED lotties
     (width:112%, rotate ±7-8°, offset left), which on a phone crop and cram into
     each other ("income" showed as "...come"). On phones, lay them out FLAT and
     stacked, full-width, no rotation — two clean charts instead of a clipped pile. */
  .positioning-media { min-height: 0; overflow: visible; display: flex; flex-direction: column; gap: 1.1rem; }
  .lottie-a, .lottie-b {
    position: relative;            /* in-flow (keeps the ::after shadow contained) */
    width: 100%; left: auto; right: auto; top: auto; bottom: auto;
    transform: none;               /* un-rotate */
  }
}

/* ---- Contact form: submitted / error states (Netlify Forms AJAX) ---- */
.form-done { text-align: center; padding: clamp(2rem, 6vw, 3.5rem) 0; }
.form-done h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 1.7rem); letter-spacing: -0.01em;
  color: var(--text-strong); margin: 0 0 0.6rem;
}
.form-done p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }
.form-error { margin-top: 1rem; color: #ff9b9b; font-size: 0.95rem; }

/* ---- Footer social icons (LinkedIn / X brand marks) ---- */
.footer-social { flex-direction: row; gap: 0.6rem; align-items: center; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.footer-social a:hover { color: var(--text-strong); border-color: var(--line-strong); background-color: rgba(255, 255, 255, 0.04); }
.footer-social svg { display: block; }
@media (max-width: 760px) { .footer-social a { width: 44px; height: 44px; } }
