/* ==========================================================================
   Base
   ========================================================================== */

:root {
    --color-navy: #0b1a33;
    --color-navy-light: #13264a;
    --color-blue: #1a66e0;
    --color-blue-hover: #1557c2;
    --color-blue-light: #5b9bff;
    --color-white: #ffffff;
    --color-text-muted: #b6c2d6;
    --color-border-dark: rgba(255, 255, 255, 0.14);
    --color-blue-tint: #e8f0fd;
    --color-surface: #f4f6fa;
    --color-border: #e3e8f0;
    --color-text: #5b6880;
    --color-error: #c62828;
    --color-success: #1e7d4f;

    --font-base: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

    --container-width: 1200px;
    --gutter: 16px;
    --header-height: 72px;
    --radius: 8px;
    --transition: 0.2s ease;
}

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

body {
    margin: 0;
    font-family: var(--font-base);
    color: var(--color-navy);
    background: var(--color-white);
}

body.nav-open {
    overflow: hidden;
}

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

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-navy);
    border-bottom: 1px solid var(--color-border-dark);
}

.nav-bar {
    max-width: var(--container-width);
    height: var(--header-height);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-white);
}

.logo img {
    width: 36px;
    height: 36px;
}

.organization p {
    margin: 0;
    line-height: 1;
}

.organization-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.organization-name span {
    color: var(--color-blue-light);
}

.organization .organization-tagline {
    margin-top: 4px;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Mobile toggle */

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.menu-toggle:focus-visible,
.nav-items a:focus-visible,
.nav-cta:focus-visible,
.brand:focus-visible {
    outline: 2px solid var(--color-blue-light);
    outline-offset: 2px;
}

/* Mobile menu panel */

.nav-items-section {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px var(--gutter);
    background: var(--color-navy);
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.nav-items-section.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.nav-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-items li + li {
    border-top: 1px solid var(--color-border-dark);
}

.nav-items a {
    display: block;
    padding: 16px 0;
    font-size: 1.0625rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.nav-items a:hover,
.nav-items a[aria-current="page"] {
    color: var(--color-white);
}

.nav-cta {
    display: block;
    padding: 14px 20px;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-white);
    background: var(--color-blue);
    border-radius: var(--radius);
    transition: background var(--transition);
}

.nav-cta:hover {
    background: var(--color-blue-hover);
}

/* Desktop */

@media (min-width: 900px) {
    .menu-toggle {
        display: none;
    }

    .nav-items-section {
        position: static;
        padding: 0;
        background: none;
        flex-direction: row;
        align-items: center;
        gap: 28px;
        overflow: visible;
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .nav-items {
        display: flex;
        align-items: center;
        gap: 28px;
    }

    .nav-items li + li {
        border-top: none;
    }

    .nav-items a {
        padding: 8px 0;
        font-size: 0.875rem;
    }

    .nav-cta {
        padding: 10px 18px;
        font-size: 0.875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .menu-toggle span,
    .nav-items-section {
        transition: none;
    }
}

/* ==========================================================================
   Layout
   ========================================================================== */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
}

/* Wider side gutter on desktop (header, footer and .container share it) */
@media (min-width: 900px) {
    :root {
        --gutter: 32px;
    }
}

/* Anchor links (e.g. /services/#forex) land below the sticky header */
html {
    scroll-padding-top: calc(var(--header-height) + 16px);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Small uppercase label with a leading dash */
.eyebrow {
    margin: 0 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-blue);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: currentColor;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition), background-color var(--transition), border-color var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:focus-visible {
    outline: 2px solid var(--color-blue-light);
    outline-offset: 3px;
}

.btn-primary {
    background: var(--color-blue);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-blue-hover);
}

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

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

/* Outline button for light backgrounds */
.btn-outline {
    border-color: var(--color-border);
    background: var(--color-white);
    color: var(--color-navy);
}

.btn-outline:hover {
    border-color: var(--color-navy);
}

.btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* Hidden visually, still read by screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Page hero: solid navy band at the top of inner pages.
   Content below can overlap its bottom edge with a negative margin. */

.page-hero {
    padding: 64px 0 120px;
    background: var(--color-navy);
    color: var(--color-white);
}

.page-hero-inner > * {
    max-width: 640px;
}

.page-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(2rem, 6vw, 3.1rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.page-hero p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1.0625rem;
    line-height: 1.7;
}

/* Call-to-action band: solid navy, rounded, closes a page */

.cta-band {
    position: relative;
    margin-top: 72px;
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--color-navy);
    border-radius: 20px;
    color: var(--color-white);
    overflow: hidden;
}

/* Large faint "N" echoing the logo mark */
.cta-band::before {
    content: "N";
    position: absolute;
    right: -10px;
    bottom: -60px;
    color: rgba(91, 155, 255, 0.07);
    font-size: 16rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.cta-band > * {
    position: relative;
}

.cta-band h2 {
    margin: 0 0 8px;
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cta-band p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.cta-band-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cta-band-actions .btn {
    flex: 1 1 100%;
}

@media (min-width: 640px) {
    .cta-band-actions .btn {
        flex: 0 0 auto;
    }
}

@media (min-width: 900px) {
    .page-hero {
        padding: 96px 0 160px;
    }

    .cta-band {
        margin-top: 96px;
        padding: 48px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Section heading: optional eyebrow + large title */

.section-head {
    max-width: 560px;
    margin-bottom: 36px;
}

.section-head h2 {
    margin: 0;
    color: var(--color-navy);
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Numbered process steps (partials/process.html) */

.process-steps {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    list-style: none;
    counter-reset: step;
}

.process-steps li {
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 2px solid var(--color-navy);
    counter-increment: step;
}

/* The final step marks go-live */
.process-steps li:last-child {
    border-top-color: var(--color-blue);
}

.process-steps li::before {
    content: counter(step, decimal-leading-zero);
    margin-bottom: 4px;
    color: var(--color-blue);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 0.8rem;
}

.process-steps strong {
    color: var(--color-navy);
    font-size: 1.05rem;
    font-weight: 600;
}

.process-steps span {
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (min-width: 640px) {
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .process-steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Scroll reveal
   Uses `translate` (not `transform`) via an animation,
   so it never clashes with hover transforms. */

.js .reveal {
    opacity: 0;
}

.js .reveal.is-visible {
    animation: reveal-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0s) both;
}

@keyframes reveal-up {
    from {
        opacity: 0;
        translate: 0 28px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal,
    .js .reveal.is-visible {
        opacity: 1;
        animation: none;
    }

    .btn {
        transition: none;
    }
}

/* ==========================================================================
   Home Page
   ========================================================================== */

.home-page {
    padding-bottom: 64px;
    background: var(--color-surface);
}

/* Hero */

.home-hero {
    position: relative;
    padding: 56px 0 64px;
    background: var(--color-navy);
    color: var(--color-white);
    overflow: hidden;
}

/* Background pattern: a faint dot grid, with roads and junctions over it */
.home-hero::before,
.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-hero::before {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1.5px);
    background-size: 28px 28px;
}

.home-hero::after {
    background: url("/images/patterns/hero-roads.svg") center / cover no-repeat;
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.home-hero .eyebrow {
    color: var(--color-blue-light);
}

.home-hero h1 {
    margin: 0 0 20px;
    font-size: clamp(2.1rem, 7vw, 3.4rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.home-lead {
    max-width: 520px;
    margin: 0 0 32px;
    color: var(--color-text-muted);
    font-size: 1.0625rem;
    line-height: 1.7;
}

.home-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Dashboard card (illustration with sample data) */

.home-dashboard {
    display: none;
    padding: 20px;
    background: var(--color-white);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    color: var(--color-navy);
}

.dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dash-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.dash-badge {
    padding: 3px 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dash-stats {
    margin: 0 0 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.dash-stats div {
    padding: 12px 12px 14px;
}

.dash-stats div + div {
    border-left: 1px solid var(--color-border);
}

.dash-stats dt {
    color: var(--color-text);
    font-size: 0.7rem;
}

.dash-stats dd {
    margin: 4px 0 0;
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 1.15rem;
    font-weight: 600;
}

.dash-chart-title {
    margin: 0 0 10px;
    color: var(--color-text);
    font-size: 0.7rem;
}

/* Single series: one hue, rounded tops on a shared baseline, 2px gaps */
.dash-bars {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    border-bottom: 1px solid var(--color-border);
}

.dash-bar {
    position: relative;
    flex: 1;
    background: #cfdffa;
    border-radius: 4px 4px 0 0;
    transition: background-color var(--transition);
}

.dash-bar.is-current {
    background: var(--color-blue);
}

.dash-bar:hover {
    background: var(--color-blue-hover);
}

/* Hover tooltip with the month and value */
.dash-bar::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    padding: 4px 8px;
    background: var(--color-navy);
    border-radius: 4px;
    color: var(--color-white);
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity var(--transition);
}

.dash-bar:hover::after {
    opacity: 1;
}

.dash-rows {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.dash-rows li {
    padding: 9px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.75rem;
}

.dash-rows li + li {
    border-top: 1px solid var(--color-border);
}

.dash-status {
    color: var(--color-text);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.dash-status.is-good {
    color: var(--color-success);
}

/* Who we build for */

.home-audience {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}

.home-audience-inner {
    padding-top: 20px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-audience-label {
    margin: 0;
    color: var(--color-text);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.home-audience ul {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
    list-style: none;
}

.home-audience li {
    color: var(--color-navy);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Intro + solutions */

.home-solutions {
    padding: 56px 0;
}

.home-intro {
    margin-bottom: 40px;
    display: grid;
    gap: 16px;
}

.home-intro h2,
.home-why-intro h2 {
    margin: 0;
    color: var(--color-navy);
    font-size: clamp(1.6rem, 4.5vw, 2.3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.home-intro p,
.home-why-intro p {
    margin: 0;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.75;
}

.home-solution-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

/* Mobile: icon beside the text. Wider screens: icon on top. */
.home-solution {
    position: relative;
    padding: 22px 20px;
    display: flex;
    gap: 16px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.home-solution::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--color-blue);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
}

.home-solution:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: 0 18px 40px rgba(11, 26, 51, 0.1);
}

.home-solution:hover::after {
    transform: scaleX(1);
}

.home-solution:hover .service-icon {
    background: var(--color-blue);
    color: var(--color-white);
}

.home-solution:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 3px;
}

.home-solution .service-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    margin: 0;
}

.home-solution .service-icon svg {
    width: 20px;
    height: 20px;
}

.home-solution-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-solution-title {
    color: var(--color-navy);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.3;
}

.home-solution-text {
    color: var(--color-text);
    font-size: 0.875rem;
    line-height: 1.6;
}

.home-solution-link {
    margin-top: auto;
    padding-top: 10px;
    color: var(--color-blue);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Why NextRoad */

.home-why {
    padding: 56px 0;
    background: var(--color-white);
}

.home-why-inner {
    display: grid;
    gap: 40px;
}

.home-why-intro h2 {
    margin-bottom: 16px;
}

.home-why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

.home-why-item {
    padding-top: 16px;
    border-top: 2px solid var(--color-navy);
}

.home-why-item h3 {
    margin: 0 0 6px;
    color: var(--color-navy);
    font-size: 1rem;
    font-weight: 600;
}

.home-why-item p {
    margin: 0;
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* How we work */

.home-process {
    padding-top: 56px;
}

@media (min-width: 640px) {
    .home-hero-actions {
        flex-direction: row;
    }

    .home-audience ul {
        grid-template-columns: repeat(4, auto);
        justify-content: space-between;
    }

    .home-solution-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-solution {
        flex-direction: column;
        padding: 26px 24px;
    }

    .home-solution-body {
        flex: 1;
    }

    .home-why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .home-page {
        padding-bottom: 96px;
    }

    .home-hero {
        padding: 88px 0 96px;
    }

    .home-hero-inner {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: 56px;
    }

    .home-dashboard {
        display: block;
    }

    .home-audience-inner {
        flex-direction: row;
        align-items: center;
        gap: 48px;
    }

    .home-audience ul {
        flex: 1;
    }

    .home-solutions,
    .home-why {
        padding: 96px 0;
    }

    .home-intro {
        margin-bottom: 56px;
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }

    .home-why-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
        gap: 64px;
    }

    .home-process {
        padding-top: 96px;
    }
}

@media (min-width: 1100px) {
    .home-solution-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-solution,
    .home-solution::after,
    .dash-bar,
    .dash-bar::after {
        transition: none;
    }
}

/* ==========================================================================
   Services Page
   ========================================================================== */

/* Extend the surface background down to the footer on tall screens */
.content:has(.services-page) {
    background: var(--color-surface);
}

.services-page {
    padding-bottom: 64px;
}

/* Cards: overlap the bottom of the hero */

.services-grid {
    position: relative;
    z-index: 1;
    margin-top: -72px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.service-card {
    position: relative;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(11, 26, 51, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Blue bar that grows along the bottom on hover */
.service-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--color-blue);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 22px 48px rgba(11, 26, 51, 0.12);
}

.service-card:hover::after,
.service-card:target::after {
    transform: scaleX(1);
}

/* Highlight the card a footer or nav link jumped to */
.service-card:target {
    border-color: var(--color-blue);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
    background: var(--color-blue-tint);
    border-radius: 12px;
    color: var(--color-blue);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--color-blue);
    color: var(--color-white);
}

.service-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-title {
    margin: 0 0 10px;
    color: var(--color-navy);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.service-description {
    margin: 0;
    color: var(--color-text);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.service-features {
    margin: 20px 0 0;
    padding: 20px 0 0;
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--color-border);
    list-style: none;
}

.service-features li {
    position: relative;
    padding-left: 28px;
    color: var(--color-navy);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Check mark in a tinted circle */
.service-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 18px;
    height: 18px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a66e0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat,
        var(--color-blue-tint);
    border-radius: 50%;
}

/* Pinned to the bottom so links line up across a row */
.service-link {
    margin-top: auto;
    padding-top: 24px;
    align-self: flex-start;
    color: var(--color-blue);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.service-link span {
    display: inline-block;
    transition: transform var(--transition);
}

.service-link:hover span {
    transform: translateX(4px);
}

.service-link:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 3px;
    border-radius: 2px;
}

/* How we work */

.services-process {
    padding-top: 72px;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .services-page {
        padding-bottom: 96px;
    }

    .services-grid {
        margin-top: -96px;
        gap: 28px;
    }

    .service-card {
        padding: 36px 32px;
    }

    .services-process {
        padding-top: 96px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-card,
    .service-card::after,
    .service-icon {
        transition: none;
    }
}

/* ==========================================================================
   Team Page
   ========================================================================== */

.content:has(.team-page) {
    background: var(--color-surface);
}

.team-page {
    padding-bottom: 64px;
}

/* Grid: flex so an incomplete last row sits centred */

.team-grid {
    position: relative;
    z-index: 1;
    margin-top: -72px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    --team-gap: 20px;
    gap: var(--team-gap);
}

.team-card {
    position: relative;
    flex: 0 1 100%;
    min-width: 0; /* let the card shrink below the photo's natural width */
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(11, 26, 51, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Blue bar that grows along the bottom on hover */
.team-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--color-blue);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
}

.team-card:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 22px 48px rgba(11, 26, 51, 0.12);
}

.team-card:hover::after {
    transform: scaleX(1);
}

/* Portrait crop; tinted backdrop shows behind cut-out photos */
.team-photo {
    aspect-ratio: 4 / 5;
    background: var(--color-blue-tint);
    overflow: hidden;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease;
}

.team-card:hover .team-photo img {
    transform: scale(1.04);
}

.team-body {
    padding: 22px 24px 28px;
}

.team-name {
    margin: 0 0 4px;
    color: var(--color-navy);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.team-role {
    margin: 0 0 14px;
    color: var(--color-blue);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.team-bio {
    margin: 0;
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.65;
}

@media (min-width: 560px) {
    .team-card {
        flex-basis: calc((100% - var(--team-gap)) / 2);
    }
}

@media (min-width: 900px) {
    .team-page {
        padding-bottom: 96px;
    }

    .team-grid {
        margin-top: -96px;
        --team-gap: 24px;
    }
}

@media (min-width: 1100px) {
    .team-card {
        flex-basis: calc((100% - 3 * var(--team-gap)) / 4);
    }
}

@media (prefers-reduced-motion: reduce) {
    .team-card,
    .team-card::after,
    .team-photo img {
        transition: none;
    }
}

/* ==========================================================================
   Contact Page
   ========================================================================== */

.content:has(.contact-page) {
    background: var(--color-surface);
}

.contact-page {
    padding-bottom: 64px;
}

/* Contact cards overlap the bottom of the hero */

.contact-layout {
    position: relative;
    z-index: 1;
    margin-top: -72px;
    display: grid;
    gap: 20px;
}

.contact-cards {
    display: grid;
    gap: 12px;
}

.contact-card {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    color: var(--color-navy);
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

a.contact-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-blue);
    box-shadow: 0 14px 30px rgba(11, 26, 51, 0.08);
}

a.contact-card:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 3px;
}

.contact-card-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--color-blue-tint);
    border-radius: 12px;
}

.contact-card-icon img {
    width: 22px;
    height: 22px;
}

.contact-card-label {
    display: block;
    color: var(--color-text);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-card-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* What happens next (solid navy, like the footer) */

.contact-next {
    padding: 28px 24px;
    background: var(--color-navy);
    border-radius: 16px;
    color: var(--color-white);
}

.contact-next h2 {
    margin: 0 0 18px;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-next ol {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
    list-style: none;
    counter-reset: next;
}

.contact-next ol li {
    position: relative;
    padding-left: 40px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    counter-increment: next;
}

.contact-next ol li::before {
    content: counter(next);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    background: var(--color-blue);
    border-radius: 50%;
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 600;
}

.contact-socials {
    margin: 24px 0 0;
    padding: 20px 0 0;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--color-border-dark);
    list-style: none;
}

.contact-socials a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius);
    transition: border-color var(--transition), transform var(--transition);
}

.contact-socials a:hover {
    border-color: var(--color-blue-light);
    transform: translateY(-3px);
}

.contact-socials a:focus-visible {
    outline: 2px solid var(--color-blue-light);
    outline-offset: 2px;
}

.contact-socials img {
    width: 24px;
    height: 24px;
    padding: 2px;
    background: var(--color-white);
    border-radius: 6px;
}

@media (min-width: 900px) {
    .contact-page {
        padding-bottom: 96px;
    }

    .contact-layout {
        margin-top: -96px;
        gap: 28px;
    }

    .contact-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .contact-next {
        padding: 36px 40px;
    }

    .contact-next ol {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-card,
    .contact-socials a {
        transition: none;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

.footer {
    position: relative;
    background: var(--color-navy);
    color: var(--color-text-muted);
}

/* Thin brand stripe across the top edge */
.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-blue) 0%, var(--color-blue-light) 50%, var(--color-blue) 100%);
}

.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.footer-top {
    padding: 56px 0 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
}

/* Brand column */

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--color-white);
    text-decoration: none;
}

.footer-logo-badge {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: var(--color-white);
    border-radius: 12px;
}

.footer-logo-badge img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.footer-logo-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-logo-name .accent {
    color: var(--color-blue-light);
}

.footer-tagline {
    margin: 20px 0 10px;
    color: var(--color-blue-light);
    font-size: 1rem;
    font-weight: 500;
}

.footer-about {
    max-width: 360px;
    margin: 0 0 24px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-socials {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius);
    transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}

.footer-socials a:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--color-blue-light);
    transform: translateY(-3px);
}

/* White tile so dark brand marks (e.g. X) stay visible on navy */
.footer-socials img {
    width: 24px;
    height: 24px;
    padding: 2px;
    background: var(--color-white);
    border-radius: 6px;
    object-fit: contain;
}

/* Link + contact columns */

.footer-heading {
    margin: 4px 0 16px;
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.footer-links,
.footer-contact {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
}

.footer-links a,
.footer-contact a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition);
}

/* Small blue dash that slides in on hover */
.footer-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    transition: color var(--transition), padding-left var(--transition);
}

.footer-links a::before {
    content: "";
    position: absolute;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-blue-light);
    transition: width var(--transition);
}

.footer-links a:hover,
.footer-links a[aria-current="page"],
.footer-contact a:hover {
    color: var(--color-white);
}

.footer-links a:hover {
    padding-left: 18px;
}

.footer-links a:hover::before {
    width: 10px;
}

.footer-logo:focus-visible,
.footer-socials a:focus-visible,
.footer-links a:focus-visible,
.footer-contact a:focus-visible,
.footer-top-link:focus-visible {
    outline: 2px solid var(--color-blue-light);
    outline-offset: 3px;
    border-radius: 2px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
}

/* Icons are black outlines; invert them to white for the navy footer */
.footer-contact img {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
    filter: invert(1);
    opacity: 0.85;
}

.footer-contact a {
    overflow-wrap: anywhere;
}

/* Bottom bar */

.footer-bottom {
    padding: 22px 0 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid var(--color-border-dark);
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
}

.footer-top-link {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-top-link:hover {
    color: var(--color-blue-light);
}

@media (min-width: 560px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (min-width: 900px) {
    .footer-top {
        padding: 72px 0 56px;
        grid-template-columns: 1.6fr 1fr 1.2fr;
        gap: 48px;
    }

    .footer-brand {
        grid-column: auto;
    }
}

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

    .footer-socials a,
    .footer-links a,
    .footer-links a::before {
        transition: none;
    }
}

