/* Compass — NIS2 compliance presentation / pitch-deck stylesheet.
   A modern, deliberately *square* deck (no rounded or oval shapes): hairline
   grids, sharp corners, big type. Scoped entirely under `.deck` so it never
   touches the rest of the marketing site. Built to print cleanly to PDF —
   A4 landscape, one slide per page — see the @media print block at the foot. */

.deck {
    --line: rgba(255, 255, 255, .14);
    --line-strong: rgba(255, 255, 255, .30);
    --panel: #0a0f1d;
    --panel-2: #0d1526;
    /* Total slide count — kept in one place; the running number is generated by
       a CSS counter so adding/removing a slide never needs hand-renumbering. */
    --slides: "12";
    counter-reset: slide;
}

/* Drop the soft circular background glows on the deck — keep it square. The
   base radial gradient on .bg-aurora stays for a subtle wash. */
body:has(.deck) .bg-aurora .glow { display: none; }

/* ---------- floating actions (screen only) ---------- */
.deck-actions {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 60;
    display: flex;
    gap: .6rem;
}
.deck-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .72rem 1.1rem;
    border: 1px solid var(--glass-border);
    background: rgba(12, 17, 30, .9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--ink);
    font: inherit;
    font-weight: 500;
    border-radius: 0;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s;
}
.deck-btn:hover { border-color: var(--line-strong); transform: translateY(-2px); color: var(--ink); }
.deck-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 28px -12px rgba(0, 109, 204, .9);
}
.deck-btn-primary:hover { color: #fff; filter: brightness(1.06); }

/* ---------- slide shell ---------- */
.deck .slide {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(2.4rem, 6vw, 5rem) clamp(1.3rem, 7vw, 6.5rem) 5rem;
    border-top: 1px solid var(--line);
    counter-increment: slide;
}
.slide h2 { color: var(--ink); font-weight: 700; }
.deck .slide:first-of-type { border-top: 0; }
.slide-inner { width: 100%; }

/* eyebrow tag with a square leading rule */
.slide-tag {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary-2);
    font-weight: 600;
    margin-bottom: 1.4rem;
}
.slide-tag::before { content: ""; width: 26px; height: 2px; background: var(--primary-2); display: inline-block; }

.slide h2 {
    font-size: clamp(1.9rem, 4.6vw, 3.1rem);
    line-height: 1.06;
    letter-spacing: -.02em;
    max-width: 940px;
}
.slide h2 .accent { color: var(--primary-2); }
.slide .lead {
    color: var(--ink-muted);
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    max-width: 780px;
    margin-top: 1.1rem;
    line-height: 1.55;
}

/* running foot: brand left, slide number right */
.slide-foot {
    position: absolute;
    left: clamp(1.3rem, 7vw, 6.5rem);
    right: clamp(1.3rem, 7vw, 6.5rem);
    bottom: 1.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: .78rem;
    letter-spacing: .04em;
    color: var(--ink-faint);
    border-top: 1px solid var(--line);
    padding-top: .9rem;
}
.slide-brand { display: inline-flex; align-items: center; gap: .45rem; }
.slide-brand .sd-logo { height: 26px; width: auto; }
.slide-num { font-family: ui-monospace, "Cascadia Code", monospace; color: var(--ink-muted); }
.slide-num::before { content: counter(slide, decimal-leading-zero) " / " var(--slides); }

/* square icon tile (replaces the rounded .card-ico) */
.sq-ico {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 0;
    color: var(--ico, var(--primary));
    background: color-mix(in srgb, var(--ico, var(--primary)) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--ico, var(--primary)) 42%, transparent);
    font-size: 1.5rem;
}

/* square chip (replaces the pill-shaped .chip) */
.sq-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .34rem .62rem;
    border-radius: 0;
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning) 42%, transparent);
}

/* ---------- cover slide ---------- */
.slide-cover { justify-content: center; }
/* The official mark (tile + shield) as drawn; its own corners, so the glow is a
   drop-shadow that follows them rather than a square box-shadow. */
.cover-mark {
    display: block;
    width: 76px;
    height: 76px;
    filter: drop-shadow(0 14px 22px rgba(0, 109, 204, .55));
    margin-bottom: 1.6rem;
}
.cover-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .86rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--primary-2);
    font-weight: 600;
}
.cover-title {
    font-size: clamp(2.8rem, 9vw, 6rem);
    line-height: .98;
    letter-spacing: -.03em;
    margin: 1rem 0 1.1rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
}
.cover-sub {
    font-size: clamp(1.15rem, 2.6vw, 1.7rem);
    color: var(--ink);
    max-width: 820px;
    font-weight: 500;
    line-height: 1.3;
}
.cover-lead {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--ink-muted);
    max-width: 720px;
    margin-top: 1.1rem;
}
.cover-meta {
    margin-top: 2.4rem;
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
    color: var(--ink-faint);
    font-size: .9rem;
}
.cover-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.cover-meta i { color: var(--primary-2); }

/* ---------- hairline grids (square cells separated by 1px rules) ---------- */
.hgrid {
    display: grid;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: 2.2rem;
}
.hgrid-2 { grid-template-columns: repeat(2, 1fr); }
.hgrid-3 { grid-template-columns: repeat(3, 1fr); }
.hgrid-4 { grid-template-columns: repeat(4, 1fr); }
.cell {
    background: var(--panel);
    padding: 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

/* numbered point (problem / journey) */
.cell .cell-n {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-2);
    line-height: 1;
}
.cell h3 { font-size: 1.12rem; line-height: 1.25; }
.cell p { color: var(--ink-muted); font-size: .94rem; margin: 0; line-height: 1.5; }
.cell .big { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1; color: var(--ink); letter-spacing: -.02em; }
.cell .big small { font-size: .9rem; font-weight: 600; color: var(--ink-muted); letter-spacing: .02em; }

/* ---------- capability grid (the nine features) ---------- */
.cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: 2rem;
}
.cap {
    background: var(--panel);
    padding: 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.cap-head { display: flex; align-items: center; gap: .75rem; }
.cap .sq-ico { width: 42px; height: 42px; font-size: 1.2rem; }
.cap-kind { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--primary-2); font-weight: 700; }
.cap h3 { font-size: 1.06rem; margin: 0; }
.cap p {
    color: var(--ink-muted);
    font-size: .85rem;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- plain-language intro (what NIS2 is) ---------- */
.deck-prose { max-width: 880px; }
.deck-prose p { color: var(--ink-muted); font-size: clamp(1rem, 1.9vw, 1.18rem); line-height: 1.6; margin: 1rem 0 0; }
.deck-prose p strong { color: var(--ink); }
.deck-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .9rem 1.8rem;
    max-width: 960px;
}
.deck-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--ink-muted); font-size: 1rem; line-height: 1.45; }
.deck-list li i { color: var(--primary-2); font-size: 1.15rem; flex: 0 0 auto; margin-top: .1rem; }
.deck-list li b { color: var(--ink); font-weight: 600; }

/* ---------- capability deep-dive (what it does + obligation met) ---------- */
.dive-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: 1.9rem;
}
.dive-item {
    background: var(--panel);
    padding: 1.3rem 1.6rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.2rem;
    align-items: start;
}
.dive-item .sq-ico { width: 48px; height: 48px; font-size: 1.35rem; }
.dive-kind { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--primary-2); font-weight: 700; }
.dive-item h3 { font-size: 1.18rem; margin: .12rem 0 .4rem; }
.dive-item p { color: var(--ink-muted); font-size: .94rem; margin: 0; line-height: 1.5; }
.dive-nis2 { margin-top: .6rem; display: flex; gap: .6rem; align-items: baseline; font-size: .9rem; color: var(--ink); }
.dive-nis2 b { color: var(--success); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; font-size: .68rem; flex: 0 0 auto; padding-top: .12rem; }
.dive-nis2 span { color: var(--ink-muted); }

/* ---------- obligation → capability map ---------- */
.map2 { border: 1px solid var(--line); margin-top: 2rem; }
.map2-row {
    display: grid;
    grid-template-columns: minmax(190px, 320px) 1fr;
    border-top: 1px solid var(--line);
}
.map2-row:first-child { border-top: 0; }
.map2-row dt {
    padding: .95rem 1.3rem;
    color: var(--ink);
    font-weight: 500;
    font-size: .96rem;
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, .025);
    display: flex;
    align-items: center;
}
.map2-row dd { padding: .95rem 1.3rem; margin: 0; color: var(--ink-muted); font-size: .94rem; display: flex; align-items: center; }
.map2-row dd b { color: var(--primary-2); font-weight: 600; }

/* ---------- pillars (our answer) ---------- */
.pillar .sq-ico { margin-bottom: .4rem; }
.pillar h3 { font-size: 1.22rem; }

/* ---------- outcomes ---------- */
.outcome { flex-direction: row; align-items: flex-start; gap: .9rem; }
.outcome i { color: var(--success); font-size: 1.4rem; line-height: 1.3; flex: 0 0 auto; }
.outcome div { display: flex; flex-direction: column; gap: .25rem; }
.outcome h3 { font-size: 1.05rem; }
.outcome p { font-size: .9rem; }

/* ---------- plans / engagement tiers ---------- */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: 2rem;
}
.plan {
    background: var(--panel);
    padding: 1.5rem 1.55rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    position: relative;
}
/* the recommended middle tier reads a touch brighter, with a corner flag */
.plan.is-featured { background: var(--panel-2); }
.plan-flag {
    position: absolute;
    top: 0;
    right: 0;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--primary);
    padding: .3rem .55rem;
}
.plan-kind { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--primary-2); font-weight: 700; }
.plan-name { font-size: 1.32rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.plan-for { color: var(--ink-muted); font-size: .88rem; line-height: 1.4; }
.plan-who {
    color: var(--ink);
    font-weight: 500;
    font-size: .92rem;
    border-top: 1px solid var(--line);
    padding-top: .75rem;
    margin-top: .25rem;
}
.plan-list { list-style: none; padding: 0; margin: .35rem 0 0; display: flex; flex-direction: column; gap: .45rem; }
.plan-list li { display: flex; gap: .55rem; align-items: flex-start; color: var(--ink-muted); font-size: .87rem; line-height: 1.4; }
.plan-list li i { color: var(--primary-2); font-size: 1rem; flex: 0 0 auto; margin-top: .08rem; }
.plan-effort {
    margin-top: auto;
    padding-top: 1rem;
    font-size: .72rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* ---------- responsive (screen) ---------- */
@media (max-width: 900px) {
    .cap-grid { grid-template-columns: repeat(2, 1fr); }
    .hgrid-3, .hgrid-4, .plan-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .cap-grid, .hgrid-2, .hgrid-3, .hgrid-4, .plan-grid { grid-template-columns: 1fr; }
    .map2-row { grid-template-columns: 1fr; }
    .map2-row dt { border-right: 0; border-bottom: 1px solid var(--line); }
    .deck .slide { padding-bottom: 4rem; }
}

/* ---------- print → PDF (A4 landscape, one slide per page) ---------- */
@media print {
    @page { size: A4 landscape; margin: 0; }

    /* hide all site + deck chrome that isn't part of a slide */
    .site-header,
    .site-footer,
    .bg-aurora,
    .deck-actions,
    .print-masthead,
    .nav-burger { display: none !important; }

    /* Force the dark theme to render in the PDF so contrast matches the website.
       html/body sit OUTSIDE `.deck`, so without them here the page prints white
       and the light text vanishes — cover them too. */
    html, body.landing-theme, .deck, .deck * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    html, body.landing-theme { background: #05070f !important; }

    .deck .slide {
        max-width: none;
        margin: 0;
        min-height: 210mm;          /* fill the full landscape A4 page (margin:0) so short slides reach the bottom */
        padding: 13mm 17mm 17mm;
        border-top: 0;
        /* Same dark backdrop as the website (subtle top glow + vertical fade),
           painted on every page so each slide reads like the live site. */
        background:
            radial-gradient(1100px 520px at 50% -180px, rgba(0, 109, 204, .16), transparent 60%),
            linear-gradient(180deg, #0a0f1d, #05070f 62%) !important;
        break-after: page;
        page-break-after: always;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .deck .slide:last-of-type { break-after: auto; page-break-after: avoid; }

    .slide-foot { bottom: 9mm; left: 17mm; right: 17mm; }

    /* The nine-capability grid MUST stay 3×3 so it fits one page in either
       orientation — never let the narrow-screen 2-column rule win in print. */
    .cap-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .cap { padding: 1rem 1.1rem; }
    .cap p { -webkit-line-clamp: 3; font-size: .8rem; }
    .cap .sq-ico { width: 38px; height: 38px; font-size: 1.05rem; }

    /* the three engagement tiers MUST stay 3-up so they fit one page */
    .plan-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .plan { padding: 1.15rem 1.2rem; }
    .plan-list li { font-size: .8rem; }

    /* keep the two-column intro / outcome grids intact when printing */
    .deck-list { grid-template-columns: repeat(2, 1fr) !important; }
    .hgrid-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .hgrid-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .hgrid-4 { grid-template-columns: repeat(4, 1fr) !important; }
    .map2-row { grid-template-columns: minmax(190px, 320px) 1fr !important; }
}
