/* ==========================================================
   DigiPathform - Main stylesheet
   Palette: #123B62 blue, #0B9B91 teal, #F4F7FA, #FFFFFF,
            #172B3A text, #687887 secondary, #E3EAF0 borders
   ========================================================== */

:root {
    --blue: #123B62;
    --blue-deep: #0E2F4F;
    --teal: #0B9B91;
    --teal-soft: #E6F5F4;
    --bg: #F4F7FA;
    --white: #FFFFFF;
    --text: #172B3A;
    --text-2: #687887;
    --border: #E3EAF0;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(18, 59, 98, .06), 0 6px 18px rgba(18, 59, 98, .05);
    --container: 1200px;
    --narrow: 820px;
    --header-h: 72px;

    --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
    border-radius: 4px;
}
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .6em; color: var(--blue); letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; color: var(--text); }
ul, ol { padding: 0; margin: 0; }
.skip-link {
    position: absolute; left: -9999px; top: 8px; z-index: 999;
    background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.narrow { max-width: var(--narrow); }
.center { text-align: center; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.alt { background: var(--bg); }

.eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 14px;
}
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--text-2); max-width: 62ch; }
.accent { color: var(--teal); }
.note { color: var(--text-2); font-size: .95rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font); font-weight: 700; font-size: .95rem;
    padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
    cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
    text-align: center; line-height: 1.2;
}
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #098A81; color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { background: var(--teal-soft); color: var(--blue); }

.link { font-weight: 700; color: var(--teal); }
.link:hover { color: var(--blue); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 20px; flex-wrap: nowrap; }
.site-header { overflow: visible; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--blue); }
.brand:hover { color: var(--blue); }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-text { font-size: 1.2rem; font-weight: 500; letter-spacing: -.01em; color: var(--blue); }
.brand-text strong { font-weight: 800; }

.site-header .container { width: min(1360px, calc(100% - 40px)); }
.primary-nav { flex: 1; min-width: 0; display: flex; justify-content: center; }
.primary-nav ul { display: flex; gap: 2px; list-style: none; align-items: center; }
.primary-nav a {
    display: block; padding: 8px 10px; border-radius: 8px;
    font-size: .92rem; font-weight: 600; color: var(--text);
    white-space: nowrap; line-height: 1.2;
}
.primary-nav a:hover { color: var(--blue); background: var(--bg); }
.primary-nav a.is-active { color: var(--teal); }
.btn-nav-mobile { display: none; }
.btn-nav-cta { padding: 10px 18px; font-size: .9rem; white-space: nowrap; flex-shrink: 0; }

.nav-toggle {
    display: none; background: none; border: 0; width: 44px; height: 44px;
    cursor: pointer; padding: 10px; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--blue); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 112px);
    background:
        radial-gradient(900px 480px at 85% -10%, rgba(11, 155, 145, .10), transparent 60%),
        linear-gradient(180deg, #F7FAFC 0%, #FFFFFF 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: .45em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.ecosystem-svg { width: 100%; height: auto; }
.ecosystem-svg .flow { animation: dash 14s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -200; } }

/* ---------- Flagship ---------- */
.flagship { background: var(--blue); color: #fff; }
.flagship h2, .flagship h3 { color: #fff; }
.flagship p { color: #C9D8E6; }
.flagship .eyebrow { color: #5FD7CD; }
.flagship .section-head p { color: #C9D8E6; }
.flagship-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; margin-top: 56px; }
.capability-list { list-style: none; display: grid; gap: 22px; }
.capability-list li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.capability-list p { margin: 0; font-size: .97rem; }
.cap-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
    display: grid; place-items: center;
}
.cap-icon svg { width: 24px; height: 24px; fill: none; stroke: #5FD7CD; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dashboard {
    margin: 0; background: #F4F7FA; border-radius: 18px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25); color: var(--text);
}
.dash-bar {
    display: flex; align-items: center; gap: 6px; padding: 12px 16px;
    background: #fff; border-bottom: 1px solid var(--border);
}
.dash-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.dash-bar small { margin-left: auto; font-size: .72rem; color: var(--text-2); }
.dash-body { padding: 20px; display: grid; gap: 16px; }
.dash-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.score-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.score-card p { font-size: .78rem; color: var(--text-2); margin: 0 0 4px; font-weight: 600; }
.score-card strong { font-size: 1.9rem; color: var(--blue); }
.score-card strong small { font-size: .9rem; color: var(--text-2); font-weight: 600; }
.bar { height: 6px; background: var(--border); border-radius: 6px; margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 6px; }
.bar.teal i { background: var(--teal); }
.dash-chart, .dash-lists > div, .dash-summary {
    background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px;
}
.dash-label { font-size: .78rem; font-weight: 700; color: var(--text-2); margin: 0 0 10px; letter-spacing: .02em; }
.chart-rows { display: grid; gap: 10px; }
.chart-rows div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; font-size: .82rem; }
.chart-rows i { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--teal)); }
.dash-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-lists ul { list-style: none; font-size: .85rem; display: grid; gap: 6px; }
.dash-lists li::before { content: "•"; color: var(--teal); margin-right: 6px; }
.dash-summary { font-size: .88rem; margin: 0; color: var(--text); }
.dash-summary strong { color: var(--blue); }

/* ---------- Journey ---------- */
.section-head { max-width: 760px; margin: 0 0 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-2); }
.stages {
    list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
    position: relative;
}
.stages::before {
    content: ""; position: absolute; top: 34px; left: 12%; right: 12%; height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    opacity: .35; z-index: 0;
}
.stage {
    position: relative; z-index: 1; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.stage:hover { transform: translateY(-4px); border-color: #BFE3E0; }
.stage-num {
    display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
    background: var(--blue); color: #fff; font-weight: 800; margin-bottom: 18px; font-size: .95rem;
}
.stage:nth-child(even) .stage-num { background: var(--teal); }
.stage p { color: var(--text-2); font-size: .95rem; margin: 0; }
.journey .center-cta { margin-top: 48px; }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.check-list { list-style: none; display: grid; gap: 12px; margin: 24px 0 32px; }
.check-list li { position: relative; padding-left: 32px; color: var(--text); }
.check-list li::before {
    content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B9B91' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat;
}

.network-visual { background: var(--bg); border-radius: 24px; padding: 32px; border: 1px solid var(--border); }
.network-visual svg { width: 100%; height: auto; }
.network-visual .caption { text-align: center; font-size: .92rem; color: var(--text-2); margin: 12px 0 0; }

.software-visual {
    background: linear-gradient(160deg, #EEF4FA, #E6F5F4); border-radius: 24px; padding: 40px;
    border: 1px solid var(--border); display: grid; gap: 22px;
}
.presentation {
    background: #fff; border-radius: 16px; padding: 26px; box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.slide-top { margin-bottom: 18px; }
.pill {
    display: inline-block; font-size: .72rem; font-weight: 700; color: var(--teal);
    background: var(--teal-soft); padding: 5px 12px; border-radius: 999px;
}
.slide-lines i { display: block; height: 10px; border-radius: 6px; background: var(--border); margin-bottom: 10px; }
.slide-lines i.short { width: 60%; }
.slide-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.slide-cards span { height: 64px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
.audience-dots { display: flex; justify-content: center; gap: 12px; }
.audience-dots span { width: 14px; height: 14px; border-radius: 50%; background: var(--teal); opacity: .8; }
.audience-dots span:nth-child(odd) { background: var(--blue); }

/* ---------- Ecosystem ---------- */
.ecosystem { background: var(--bg); }
.eco-diagram { max-width: 960px; margin: 0 auto; }
.eco-diagram svg { width: 100%; height: auto; }
.eco-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.eco-legend h3 { font-size: 1rem; }
.eco-legend p { color: var(--text-2); font-size: .93rem; margin: 0; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    padding: 0 0 26px; box-shadow: var(--shadow); display: flex; flex-direction: column;
    transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(18, 59, 98, .10); }
.card > *:not(.thumb) { padding-inline: 26px; }
.card .cat { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-top: 22px; margin-bottom: 8px; }
.card h3 { margin-bottom: 8px; }
.card p:not(.cat) { color: var(--text-2); font-size: .95rem; }
.card .link { margin-top: auto; padding-top: 10px; display: inline-block; }
.thumb { height: 150px; display: grid; place-items: center; position: relative; }
.thumb span { color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: .04em; }
.thumb-a { background: linear-gradient(135deg, var(--blue), #1D5C8E); }
.thumb-b { background: linear-gradient(135deg, var(--teal), #3CC2B8); }
.thumb-c { background: linear-gradient(135deg, #1D5C8E, var(--teal)); }
.center-cta { text-align: center; margin-top: 48px; }

/* ---------- Final CTA ---------- */
.final-cta {
    background: var(--blue-deep); padding: clamp(72px, 9vw, 112px) 0; position: relative; overflow: hidden;
}
.final-cta::before {
    content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
    border-radius: 50%; background: radial-gradient(circle, rgba(11, 155, 145, .35), transparent 70%);
}
.final-cta h2 { color: #fff; }
.final-cta p { color: #C9D8E6; }
.final-cta .section-head p { color: #C9D8E6; }
.audience-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; position: relative; }
.aud-card {
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 14px;
}
.aud-card h3 { color: #fff; margin: 0; }
.aud-card p { color: #C9D8E6; margin: 0; font-size: .97rem; flex: 1; }
.aud-card .btn { align-self: flex-start; }
.final-cta .section-head { margin-bottom: 48px; }

/* ---------- Page heroes & legal ---------- */
.page-hero {
    padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px);
    background: linear-gradient(180deg, #F7FAFC, #fff);
    border-bottom: 1px solid var(--border);
}
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { margin-bottom: 26px; }
.page-hero.center .container { text-align: center; }
.page-hero.center .lead { margin-inline: auto; }
.steps-simple { list-style: none; counter-reset: s; display: grid; gap: 14px; margin: 24px 0; }
.steps-simple li { counter-increment: s; padding-left: 52px; position: relative; }
.steps-simple li::before {
    content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
    background: var(--teal-soft); color: var(--teal); font-weight: 800; display: grid; place-items: center;
}
.legal p { color: var(--text); }

/* ---------- Contact ---------- */
.contact-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); margin-top: 24px; display: grid; gap: 16px; justify-items: start; }
.contact-line { margin: 0; font-size: 1.05rem; }
.contact-card .note { margin: 0; }
.contact-list { list-style: none; display: grid; gap: 28px; }
.contact-list h2 { font-size: 1.15rem; margin-bottom: 6px; }
.contact-list p { margin: 0; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0B2540; color: #B9C9D9; padding: 72px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand .brand-text { color: #fff; }
.footer-brand p { color: #9FB3C8; font-size: .93rem; max-width: 34ch; }
.footer-col h3 { color: #fff; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a { color: #B9C9D9; font-size: .93rem; }
.footer-col a:hover { color: #5FD7CD; }
.footer-bottom {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem;
}
.footer-bottom p { margin: 0; color: #9FB3C8; }
.footer-legal a { color: #B9C9D9; }
.footer-legal a:hover { color: #5FD7CD; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */


/* Mobile menu applies below 1280px so the desktop nav never overlaps the logo or CTA */
@media (max-width: 1280px) {
    .nav-toggle { display: inline-flex; }
    .btn-nav-cta { display: none; }
    .primary-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; background: #fff;
        border-bottom: 1px solid var(--border); box-shadow: 0 16px 30px rgba(18, 59, 98, .10);
        padding: 12px 20px 24px; transform: translateY(-120%); opacity: 0; pointer-events: none;
        transition: transform .3s ease, opacity .3s ease; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    }
    .primary-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
    .primary-nav ul { flex-direction: column; gap: 0; }
    .primary-nav a { padding: 14px 6px; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 1rem; }
    .btn-nav-mobile { display: inline-flex; margin-top: 18px; width: 100%; }
    .primary-nav a { white-space: normal; }
    .btn-nav-cta { display: none; }
}

@media (max-width: 960px) {
    .hero-grid, .flagship-grid, .split { grid-template-columns: 1fr; gap: 40px; }
    .split.reverse > :first-child { order: 0; }
    .stages { grid-template-columns: 1fr 1fr; }
    .stages::before { display: none; }
    .card-grid, .audience-cards { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .eco-legend { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    :root { --header-h: 64px; }
    .container { width: calc(100% - 32px); }
    .brand-text { font-size: 1.05rem; }
    .brand-mark { width: 28px; height: 28px; }
    .stages, .card-grid, .audience-cards, .footer-grid, .field-row, .dash-scores, .dash-lists, .slide-cards { grid-template-columns: 1fr; }
    .enquiry { padding: 24px; }
    .hero-actions .btn { width: 100%; }
    .flagship-grid { margin-top: 36px; }
    .software-visual, .network-visual { padding: 22px; }
    .eco-diagram svg { min-width: 560px; }
    .eco-diagram { overflow-x: auto; }
    .footer-bottom { flex-direction: column; }
    .dash-body { padding: 14px; }
    .chart-rows div { grid-template-columns: 90px 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}
