/* ==========================================================================
   Hero showcase: three scenes that rotate on the right side of the hero
   1. data security: classify data at rest, protect data in motion, govern AI
   2. live redaction of an AI prompt
   3. data sovereignty (Europe)
   ========================================================================== */

body.home .hero-visual {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
}

/* .hero-image is a flex container; the showcase must fill it rather than shrink to its content */
body.home .hero-showcase {
    width: 100%;
}

/* Images inside the showcase must not inherit the floating hero image style */
body.home .hero-visual .hero-showcase img {
    width: auto;
    max-width: none;
    filter: none;
    animation: none;
}

body.home .hero-visual::before {
    opacity: 0.5;
}

body.home .showcase-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}

body.home .showcase-scene {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.97);
    transition: opacity 0.7s ease, transform 0.7s var(--ease), visibility 0s linear 0.7s;
}

body.home .showcase-scene.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.7s ease 0.15s, transform 0.7s var(--ease) 0.15s, visibility 0s;
}

/* Scene tabs with a progress bar */
body.home .showcase-nav {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}

body.home .showcase-nav button {
    display: flex;
    /* progress line above the label keeps the lines aligned when a label wraps */
    flex-direction: column-reverse;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    flex: 1 1 0;
    padding: 0;
    border: 0;
    background: none;
    color: #8a8a93;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: color 0.25s ease;
}

body.home .showcase-nav button:hover,
body.home .showcase-nav button.is-active {
    color: #fff;
}

body.home .showcase-nav-bar {
    position: relative;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

body.home .showcase-nav-bar i {
    position: absolute;
    inset: 0;
    transform-origin: left center;
    transform: scaleX(0);
    background: var(--brand);
}

body.home .showcase-nav button.is-done .showcase-nav-bar i {
    transform: scaleX(1);
    opacity: 0.35;
}

body.home .showcase-nav button.is-active .showcase-nav-bar i {
    opacity: 1;
    animation: showcase-progress var(--scene-duration, 9s) linear forwards;
}

body.home .hero-showcase.is-paused .showcase-nav button.is-active .showcase-nav-bar i {
    animation-play-state: paused;
}

@keyframes showcase-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* --------------------------------------------------------------------------
   Scene 1: data at rest is classified (DSPM), data in motion is protected
   at the organisation's edge (DLP) and AI use is governed
   -------------------------------------------------------------------------- */

body.home .flow-org {
    position: absolute;
    left: 0;
    top: 4%;
    width: 67%;
    height: 82%;
    border-radius: 24px;
    background:
        radial-gradient(ellipse 70% 60% at 50% 52%, rgba(242, 144, 97, 0.08) 0%, transparent 70%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.home .flow-heading {
    position: absolute;
    top: 16px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d4d4d8;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

body.home .flow-heading i {
    color: var(--brand);
    font-size: 0.75rem;
}

body.home .flow-heading-outside {
    top: calc(4% + 16px);
    left: auto;
    right: 0;
    width: 30%;
    justify-content: center;
    color: #8a8a93;
}

body.home .flow-heading-outside i {
    color: #8a8a93;
}

body.home .flow-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

body.home .flow-nodes {
    position: absolute;
    inset: 0;
}

body.home .flow-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transform: translate(-50%, -23px);
}

body.home .flow-node-icon {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e4e4e7;
    font-size: 1rem;
    box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.8);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
}

body.home .flow-node-outside .flow-node-icon {
    background: rgba(255, 255, 255, 0.03);
    border-style: dashed;
    color: #a1a1aa;
}

body.home .flow-node.is-scanned .flow-node-icon {
    border-color: rgba(242, 144, 97, 0.55);
    box-shadow: 0 0 0 4px rgba(242, 144, 97, 0.08), 0 12px 24px -14px rgba(0, 0, 0, 0.8);
}

body.home .flow-node.is-lit .flow-node-icon {
    border-color: rgba(242, 144, 97, 0.85);
    border-style: solid;
    color: var(--brand);
    box-shadow: 0 0 0 5px rgba(242, 144, 97, 0.14), 0 12px 24px -14px rgba(0, 0, 0, 0.8);
}

body.home .flow-node-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #8a8a93;
    white-space: nowrap;
}

/* classification tag pinned to the corner of a data store */
body.home .flow-node-tag {
    position: absolute;
    left: 50%;
    top: -11px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #3a3b45;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #d4d4d8;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 4px) scale(0.9);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

body.home .flow-node-tag.is-sensitive {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

body.home .flow-node.has-tag .flow-node-tag {
    opacity: 1;
    transform: translate(-50%, 0);
}

body.home .flow-core {
    position: absolute;
    left: 33.5%;
    top: 47%;
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 25%, #3a3b45 0%, #23242b 75%);
    box-shadow: 0 0 0 1px rgba(242, 144, 97, 0.45), 0 0 56px -8px rgba(242, 144, 97, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.home .hero-visual .flow-core img {
    width: 42px;
    height: 42px;
}

body.home .flow-toast {
    position: absolute;
    left: 50%;
    bottom: 1%;
    transform: translate(-50%, 8px);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 7px 14px 7px 7px;
    border-radius: 999px;
    background: rgba(35, 36, 43, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f4f4f5;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

body.home .flow-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

body.home .flow-toast-tag {
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(242, 144, 97, 0.16);
    color: var(--brand);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Scene 2: live redaction
   -------------------------------------------------------------------------- */

body.home .redact-window {
    position: relative;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    overflow: hidden;
    text-align: left;
}

body.home .redact-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8125rem;
    color: #a1a1aa;
}

body.home .redact-dots {
    display: inline-flex;
    gap: 6px;
}

body.home .redact-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

body.home .redact-title {
    font-weight: 600;
    color: #e4e4e7;
}

body.home .redact-status {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(242, 144, 97, 0.14);
    color: var(--brand);
    font-weight: 600;
    font-size: 0.75rem;
}

body.home .hero-visual .redact-status img {
    width: 14px;
    height: 14px;
}

body.home .redact-body {
    position: relative;
    padding: 22px 22px 26px;
    min-height: 196px;
}

body.home .redact-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #71717a;
}

body.home .redact-prompt {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #f4f4f5;
    min-height: 3.5em;
}

body.home .redact-prompt::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 2px;
    vertical-align: -0.15em;
    background: var(--brand);
    animation: redact-caret 1s steps(1) infinite;
}

body.home .hero-redact.is-scanned .redact-prompt::after {
    display: none;
}

@keyframes redact-caret {
    50% { opacity: 0; }
}

body.home .redact-token {
    border-radius: 6px;
    transition: background 0.3s ease, color 0.3s ease;
}

body.home .redact-token.is-flagged {
    background: rgba(242, 144, 97, 0.18);
    box-shadow: 0 0 0 1px rgba(242, 144, 97, 0.5);
}

body.home .redact-token .t-mask {
    display: none;
}

body.home .redact-token.is-masked {
    padding: 2px 8px;
    background: var(--brand);
    color: #fff;
    box-shadow: none;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

body.home .redact-token.is-masked .t-raw {
    display: none;
}

body.home .redact-token.is-masked .t-mask {
    display: inline;
}

body.home .redact-token .t-mask::before {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7em;
    margin-right: 6px;
}

body.home .redact-scan {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 64px;
    background: linear-gradient(180deg, transparent 0%, rgba(242, 144, 97, 0.16) 70%, rgba(242, 144, 97, 0.7) 100%);
    border-bottom: 1px solid var(--brand);
    opacity: 0;
    pointer-events: none;
}

body.home .hero-redact.is-scanning .redact-scan {
    animation: redact-sweep 1.1s ease-in-out forwards;
}

@keyframes redact-sweep {
    0% { transform: translateY(-64px); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateY(196px); opacity: 0; }
}

body.home .redact-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(242, 144, 97, 0.08);
    color: #e4e4e7;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

body.home .hero-redact.is-done .redact-footer {
    opacity: 1;
    transform: none;
}

body.home .redact-footer i {
    color: var(--brand);
}

body.home .redact-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(43, 44, 51, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e4e4e7;
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.7);
    animation: hero-node-bob 7s ease-in-out infinite;
}

body.home .redact-chip i {
    color: var(--brand);
    font-size: 0.75rem;
}

body.home .redact-chip-1 { top: 8px; right: 12%; }
body.home .redact-chip-2 { bottom: 12px; left: 6%; animation-delay: -2s; }
body.home .redact-chip-3 { bottom: 4px; right: 4%; animation-delay: -4s; }

/* --------------------------------------------------------------------------
   Scene 3: Europe data sovereignty map
   -------------------------------------------------------------------------- */

body.home .hero-eu-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 600 / 615;
    -webkit-mask-image: radial-gradient(ellipse 100% 92% at 50% 50%, #000 70%, transparent 100%);
            mask-image: radial-gradient(ellipse 100% 92% at 50% 50%, #000 70%, transparent 100%);
}

body.home .hero-visual .hero-eu-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.42;
}

body.home .hero-eu-routes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

body.home .hero-eu-routes .eu-arc {
    fill: none;
    stroke: rgba(242, 144, 97, 0.22);
    stroke-width: 1.2;
}

body.home .hero-eu-routes .eu-comet {
    fill: none;
    stroke: var(--brand);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 26 var(--len);
    stroke-dashoffset: calc(var(--len) + 26);
    animation: eu-comet var(--dur, 3.2s) linear infinite;
    animation-delay: var(--delay, 0s);
    filter: drop-shadow(0 0 4px rgba(242, 144, 97, 0.9));
}

@keyframes eu-comet {
    to { stroke-dashoffset: 0; }
}

body.home .hero-eu-routes .eu-city {
    fill: #fff;
}

body.home .hero-eu-routes .eu-city-hub {
    fill: var(--brand);
}

body.home .hero-eu-routes .eu-ring {
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.5;
    transform-box: fill-box;
    transform-origin: center;
    animation: eu-ring 2.8s ease-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes eu-ring {
    0% { transform: scale(0.4); opacity: 0.9; }
    100% { transform: scale(2.6); opacity: 0; }
}

body.home .hero-eu-card {
    position: absolute;
    right: 0;
    bottom: 6%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 12px 12px;
    border-radius: 16px;
    background: rgba(35, 36, 43, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    text-align: left;
    animation: hero-node-bob 7s ease-in-out infinite;
}

body.home .hero-eu-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(242, 144, 97, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.home .hero-visual .hero-eu-card-icon img {
    width: 24px;
    height: 24px;
}

body.home .hero-eu-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.home .hero-eu-card-text strong {
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
}

body.home .hero-eu-card-text small {
    color: #a1a1aa;
    font-size: 0.8125rem;
}


@keyframes hero-node-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Scenes 2 and 3 are centred inside the square stage */
body.home .scene-redact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 6px;
}

body.home .scene-eu {
    display: flex;
    align-items: center;
}

body.home .scene-eu .hero-eu-stage {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Responsive + motion
   -------------------------------------------------------------------------- */

@media (max-width: 992px) {
    body.home .hero-visual {
        max-width: 460px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    body.home .hero-visual {
        max-width: 360px;
    }

    /* a little taller so the four channel rows have room for their labels */
    body.home .showcase-stage {
        aspect-ratio: 1 / 1.12;
    }

    body.home .flow-node-icon {
        width: 36px;
        height: 36px;
        border-radius: 11px;
        font-size: 0.8125rem;
    }

    body.home .flow-node {
        transform: translate(-50%, -18px);
        gap: 4px;
    }

    body.home .flow-node-label {
        font-size: 0.5625rem;
    }

    body.home .flow-node-tag {
        font-size: 0.5rem;
        padding: 1px 5px;
        top: -9px;
    }

    body.home .flow-heading {
        top: 12px;
        left: 12px;
        font-size: 0.5625rem;
        letter-spacing: 0.08em;
    }

    body.home .flow-heading-outside {
        top: calc(4% + 12px);
        left: auto;
    }

    body.home .flow-core {
        width: 60px;
        height: 60px;
        margin: -30px 0 0 -30px;
        border-radius: 18px;
    }

    body.home .hero-visual .flow-core img {
        width: 30px;
        height: 30px;
    }

    body.home .flow-toast {
        font-size: 0.6875rem;
        padding: 5px 10px 5px 5px;
        gap: 7px;
        white-space: normal;
        width: max-content;
        max-width: 100%;
        border-radius: 14px;
        text-align: left;
    }

    body.home .flow-toast-tag {
        font-size: 0.5625rem;
    }

    body.home .scene-redact {
        padding: 36px 0;
    }

    body.home .redact-prompt {
        font-size: 0.9375rem;
    }

    body.home .redact-body {
        min-height: 168px;
        padding: 18px;
    }

    body.home .redact-chip {
        font-size: 0.75rem;
        padding: 6px 11px;
    }

    body.home .hero-eu-card {
        right: 0;
        bottom: 2%;
    }

    body.home .showcase-nav button {
        font-size: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.home .redact-chip,
    body.home .hero-eu-card,
    body.home .hero-eu-routes .eu-comet,
    body.home .hero-eu-routes .eu-ring {
        animation: none;
    }
}
