/* ============================================================
         1. TOKENS (shared, from the logo)
         ============================================================ */
            /* --------------------------------------------------------
         Local names mapped onto the shared design system in
         css/main.css. No colour, font or size is defined here —
         edit the --qw-* tokens in main.css to restyle the site.
         -------------------------------------------------------- */
      :root {
        --ease: var(--qw-ease-out);
        --navy: var(--qw-navy);
        --navy-2: var(--qw-navy-2);
        --navy-3: var(--qw-navy-3);
        --paper: var(--qw-paper);
        --paper-2: var(--qw-paper-2);
        --card: var(--qw-card);
        --ink: var(--qw-ink);
        --muted: var(--qw-muted);
        --muted-dark: var(--qw-muted-dark);
        --body: var(--qw-ink-70);
        --violet: var(--qw-violet);
        --indigo: var(--qw-indigo);
        --blue: var(--qw-blue);
        --sky: var(--qw-sky);
        --cyan: var(--qw-cyan);
        --mint: var(--qw-mint);
        --grad: var(--qw-grad);
        --line: var(--qw-line);
        --line-dark: var(--qw-line-dark);
        --shadow: var(--qw-shadow);
        --font-display: var(--qw-font-display);
        --font-ui: var(--qw-font-ui);
        --fs-hero: var(--qw-fs-hero);
        --fs-h2: var(--qw-fs-h2);
        --fs-h3: var(--qw-fs-h3);
        --fs-lead: var(--qw-fs-lead);
        --pad-section: var(--qw-pad-section);
        --container: var(--qw-container);
        --gutter: var(--qw-gutter);
        --ease-out: var(--qw-ease-out);
        --ease-inout: var(--qw-ease-io);
      }

      /* ============================================================
         2. RESET & BASE
         ============================================================ */
      *,
      *::before,
      *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
      }
      html {
        scroll-behavior: smooth;
        -webkit-text-size-adjust: 100%;
      }
      body {
        font-family: var(--font-ui);
        font-size: 1.0625rem;
        line-height: 1.6;
        color: var(--ink);
        background: var(--paper);
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
      }
      img,
      video,
      svg,
      canvas {
        display: block;
        max-width: 100%;
      }
      a {
        color: inherit;
        text-decoration: none;
      }
      :focus-visible {
        outline: 2px solid var(--blue);
        outline-offset: 3px;
        border-radius: 2px;
      }

      /* ============================================================
         3. TYPOGRAPHY
         ============================================================ */
      h1,
      h2,
      h3,
      h4,
      h5 {
        font-family: var(--font-display);
        font-weight: 600;
        line-height: 1.06;
        letter-spacing: -0.02em;
      }
      p {
        max-width: 64ch;
      }
      .grad-text {
        background: var(--grad);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
      }

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

      /* ============================================================
         6. MASTHEAD — parallax photo + particle field
         ============================================================ */
      .masthead {
        position: relative;
        min-height: 92vh;
        display: grid;
        place-content: center;
        text-align: center;
        color: var(--paper);
        background: var(--navy);
        overflow: hidden;
      }
      .masthead__bg {
        position: absolute;
        inset: -14% 0;
        z-index: 0;
        background: var(--navy);
        will-change: transform;
      }
      .masthead__blob {
        position: absolute;
        z-index: 0;
        border-radius: 50%;
        filter: blur(70px);
        opacity: 0.45;
      }
      .masthead__blob--1 {
        width: 40vw;
        height: 40vw;
        top: -12%;
        right: -6%;
        background: radial-gradient(
          circle,
          rgba(130, 62, 231, 0.6),
          transparent 65%
        );
        animation: drift1 18s var(--ease-inout) infinite alternate;
      }
      .masthead__blob--2 {
        width: 36vw;
        height: 36vw;
        bottom: -16%;
        left: -8%;
        background: radial-gradient(
          circle,
          rgba(63, 238, 215, 0.5),
          transparent 65%
        );
        animation: drift2 15s var(--ease-inout) infinite alternate;
      }
      @keyframes drift1 {
        to {
          transform: translate(-40px, 30px);
        }
      }
      @keyframes drift2 {
        to {
          transform: translate(40px, -30px);
        }
      }
      .masthead__scrim {
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(
          180deg,
          rgba(12, 23, 48, 0.72),
          rgba(12, 23, 48, 0.9)
        );
      }
      .masthead__canvas {
        position: absolute;
        inset: 0;
        z-index: 2;
      }
      .masthead__inner {
        position: relative;
        z-index: 3;
        padding: 9rem var(--gutter) 4rem;
        max-width: 900px;
        margin-inline: auto;
      }
      .masthead h1 {
        font-size: var(--fs-hero);
        margin-bottom: 1.2rem;
      }
      .masthead__sub {
        display: inline-block;
        position: relative;
        font-size: var(--fs-lead);
        color: var(--paper);
        font-weight: 500;
        padding-bottom: 0.9rem;
        margin-bottom: 1.6rem;
      }
      .masthead__sub::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        width: 64px;
        height: 3px;
        border-radius: 3px;
        background: var(--grad);
      }
      .masthead__inner p {
        margin: 0 auto;
        color: var(--muted-dark);
      }
      .masthead__scroll {
        position: absolute;
        left: 50%;
        bottom: 2rem;
        z-index: 3;
        transform: translateX(-50%);
        width: 1px;
        height: 46px;
        background: var(--grad);
        transform-origin: top;
        animation: pulse 2s var(--ease-inout) infinite;
      }
      @keyframes pulse {
        0%,
        100% {
          transform: translateX(-50%) scaleY(0.4);
          opacity: 0.4;
        }
        50% {
          transform: translateX(-50%) scaleY(1);
          opacity: 1;
        }
      }

      /* ============================================================
         7. SECTION SIDE-NAV — fixed dots that track the current
         service and jump to it (keeps orientation without tabs).
         ============================================================ */
      .svcnav {
        position: fixed;
        right: 1.6rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 80;
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
      }
      .svcnav__item {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        justify-content: flex-end;
      }
      .svcnav__lbl {
        font-size: 0.78rem;
        font-weight: 600;
        color: var(--muted);
        opacity: 0;
        transform: translateX(8px);
        transition:
          opacity 0.3s,
          transform 0.3s,
          color 0.3s;
        white-space: nowrap;
        background: rgba(238, 241, 246, 0.7);
        backdrop-filter: blur(6px);
        padding: 0.2rem 0.6rem;
        border-radius: 999px;
      }
      .svcnav__dot {
        width: 11px;
        height: 11px;
        border-radius: 50%;
        border: 1.5px solid var(--muted);
        transition: 0.35s var(--ease-out);
        flex: none;
      }
      .svcnav__item:hover .svcnav__lbl {
        opacity: 1;
        transform: none;
      }
      .svcnav__item.is-active .svcnav__dot {
        background: var(--grad);
        border-color: transparent;
        transform: scale(1.35);
        box-shadow: 0 0 0 4px rgba(66, 105, 253, 0.18);
      }
      .svcnav__item.is-active .svcnav__lbl {
        opacity: 1;
        transform: none;
        color: var(--ink);
      }

      /* ============================================================
         8. SERVICE SECTIONS
         ============================================================ */
      .services-wrap {
        position: relative;
        background: var(--paper);
      }
      .svc {
        position: relative;
        padding-block: var(--qw-pad-section);
        scroll-margin-top: 90px;
      }
      .svc__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: clamp(2rem, 5vw, 5rem);
        align-items: start;
      }

      /* framed photo with a curtain reveal + inner parallax */
      .svc__frame {
        position: relative;
        border-radius: 22px;
        overflow: hidden;
        box-shadow: var(--shadow);
        /* viewport-relative height (not aspect-ratio) so the sticky frame
           always fits above the fold instead of overflowing the viewport */
        height: clamp(380px, 78vh, 720px);
        clip-path: inset(0 0 100% 0);
        transition: clip-path 1s var(--ease-out);
        will-change: clip-path;
      }
      .svc__frame.is-in {
        clip-path: inset(0 0 0 0);
      }
      .svc__frame::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1.5px;
        background: var(--grad);
        -webkit-mask:
          linear-gradient(#000 0 0) content-box,
          linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
        opacity: 0.85;
        z-index: 2;
      }
      .svc__photo {
        position: absolute;
        inset: -10% 0;
        background-size: cover;
        background-position: center;
        will-change: transform;
        background-color: var(--navy-2);
      }
      .svc__media--sticky {
        position: sticky;
        top: 110px;
      }

      .svc__body h3 {
        font-size: var(--fs-h2);
        margin-bottom: 1.2rem;
      }
      .svc__body > p {
        color: var(--body);
        margin-bottom: 1rem;
      }
      .svc__sub {
        font-size: clamp(1.2rem, 2vw, 1.6rem);
        margin: clamp(1.8rem, 3.5vw, 2.6rem) 0 1.3rem;
      }

      /* feature cards (light) */
      .fcard {
        display: flex;
        gap: 1.1rem;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: clamp(1.4rem, 2.2vw, 1.9rem);
        box-shadow: var(--shadow);
        margin-bottom: 1rem;
        transition:
          transform 0.4s var(--ease-out),
          border-color 0.4s var(--ease-out);
      }
      .fcard:hover {
        transform: translateY(-4px);
        border-color: rgba(66, 105, 253, 0.4);
      }
      .fcard__check {
        flex: none;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: var(--grad);
        display: grid;
        place-content: center;
      }
      .fcard h3 {
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
      }
      .fcard p {
        color: var(--body);
        font-size: 0.96rem;
        max-width: none;
      }

      .svc__note {
        margin-top: 1.4rem;
        color: var(--body);
      }

      .svc__cta {
        margin-top: 1.8rem;
        align-self: flex-start;
        color: #fff;
      }

      .svc__cta .btn__dot {
        background: #fff;
      }

      /* callout with gradient border */
      .callout {
        position: relative;
        border-radius: 20px;
        padding: clamp(2rem, 4vw, 3rem);
        background: var(--card);
        box-shadow: var(--shadow);
        text-align: center;
        margin-top: clamp(2rem, 4vw, 3rem);
      }
      .callout::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1.5px;
        background: var(--grad);
        -webkit-mask:
          linear-gradient(#000 0 0) content-box,
          linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
        opacity: 0.7;
      }
      .callout h5 {
        font-size: clamp(1.3rem, 2.2vw, 1.7rem);
        margin-bottom: 1rem;
      }
      .callout p {
        color: var(--body);
        margin: 0 auto;
      }

      /* animated gradient divider between services */
      .divider {
        height: 2px;
        border: 0;
        background: var(--grad);
        background-size: 200% 100%;
        animation: slidegrad 6s linear infinite;
        opacity: 0.8;
      }
      @keyframes slidegrad {
        to {
          background-position: 200% 0;
        }
      }

      /* ---- editorial definition list (Risk) ---- */
      .deflist {
        margin-top: 0.4rem;
      }
      .deflist__row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.35rem;
        padding-block: 1.4rem;
        border-top: 1px solid var(--line);
      }
      .deflist__row:last-child {
        border-bottom: 1px solid var(--line);
      }
      .deflist__t {
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 1.05rem;
        display: flex;
        align-items: baseline;
        gap: 0.7rem;
      }
      .deflist__dot {
        flex: none;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--grad);
        transform: translateY(-2px);
      }
      .deflist__d {
        color: var(--body);
      }
      @media (min-width: 769px) {
        .deflist__row {
          grid-template-columns: 5fr 7fr;
          gap: 1.6rem;
        }
      }

      /* ---- editorial closing statement (gradient top rule, not a box) ---- */
      .statement {
        position: relative;
        margin-top: clamp(2rem, 4vw, 3rem);
        padding-top: clamp(1.4rem, 3vw, 2rem);
      }
      .statement::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 64px;
        height: 3px;
        border-radius: 3px;
        background: var(--grad);
      }
      .statement h5 {
        font-size: clamp(1.3rem, 2.2vw, 1.7rem);
        margin-bottom: 0.8rem;
      }
      .statement p {
        color: var(--body);
      }

      /* ---- editorial checklist (Crisis) ---- */
      .clist {
        list-style: none;
        margin-top: 0.4rem;
      }
      .clist li {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        padding: 1.3rem 0;
        border-top: 1px solid var(--line);
        color: var(--ink);
      }
      .clist li:last-child {
        border-bottom: 1px solid var(--line);
      }
      .clist li::before {
        content: "";
        flex: 0 0 20px;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background-image:
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E"),
          var(--grad);
        background-repeat: no-repeat, no-repeat;
        background-position: center, center;
        background-size: 12px 12px, cover;
      }

      /* ============================================================
         9. RESPONSIVE
         ============================================================ */
      @media (max-width: 992px) {
        .svcnav {
          display: none;
        }
        .svc__grid {
          grid-template-columns: 1fr;
        }
        .svc__media--sticky {
          position: static;
        }
        .svc__frame {
          height: auto;
          aspect-ratio: 4 / 3;
        }
      }

      /* ============================================================
         10. REDUCED MOTION
         ============================================================ */
      @media (prefers-reduced-motion: reduce) {
        html {
          scroll-behavior: auto;
        }
        *,
        *::before,
        *::after {
          animation-duration: 0.001ms !important;
          animation-iteration-count: 1 !important;
          transition-duration: 0.001ms !important;
        }
        [data-reveal] {
          opacity: 1 !important;
          transform: none !important;
        }
        .svc__frame {
          clip-path: none !important;
        }
      }
