:root {
    --bg-deep: #050c12;
    --bg-surface: #0a151d;
    --bg-card: #0f2029;
    --bg-elevated: #16303a;
    --border: #1b3942;
    --border-glow: #44efb3;
    --text-primary: #edf8f7;
    --text-secondary: #9bb1b5;
    --text-dim: #789398;
    --accent: #44efb3;
    --accent-dim: #25c998;
    --accent-glow: rgba(68, 239, 179, 0.14);
    --accent-blue: #62a8ff;
    --accent-orange: #ff846b;
}

body {
    background:
        radial-gradient(circle at 82% 2%, rgba(21, 86, 93, 0.22), transparent 34rem),
        var(--bg-deep);
}

nav {
    background: rgba(5, 12, 18, 0.78);
    border-bottom-color: rgba(119, 184, 185, 0.16);
}

.nav-brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.nav-brand img,
.footer-brand img {
    display: block;
    flex: none;
    filter: drop-shadow(0 0 14px rgba(68, 239, 179, 0.16));
}

.brand-wordmark {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.045em;
}

.nav-brand .brand-wordmark,
.footer-brand .brand-wordmark {
    color: var(--text-primary);
}

.brand-wordmark strong {
    color: var(--accent);
    font-weight: 700;
}

.hero {
    isolation: isolate;
    min-height: min(1000px, 100svh);
    padding: 132px 0 70px;
    background:
        radial-gradient(circle at 73% 43%, rgba(68, 239, 179, 0.1), transparent 30rem),
        linear-gradient(112deg, rgba(5, 12, 18, 0.98) 0%, rgba(5, 12, 18, 0.88) 45%, rgba(7, 20, 27, 0.78) 100%);
}

.hero::before {
    z-index: -2;
    background-image:
        linear-gradient(rgba(74, 143, 148, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 143, 148, 0.12) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.42;
    mask-image: radial-gradient(ellipse 82% 76% at 64% 42%, #000 24%, transparent 77%);
}

.hero::after {
    z-index: -1;
    width: 64vw;
    height: 64vw;
    top: 5%;
    right: -24%;
    background: radial-gradient(circle, rgba(255, 132, 107, 0.08), rgba(68, 239, 179, 0.04) 28%, transparent 68%);
    filter: blur(30px);
}

.hero .container {
    width: 100%;
    max-width: 1420px;
    padding-inline: clamp(24px, 4vw, 64px);
}

.hero-grid {
    position: relative;
    display: block;
    min-height: 730px;
}

.hero-content {
    position: relative;
    z-index: 5;
    width: min(690px, 54%);
    padding-top: 42px;
}

.hero-copy-lower {
    position: relative;
    z-index: 5;
    width: min(610px, 48%);
    margin-top: 26px;
}

.hero-tag {
    color: #8fffd8;
    background: rgba(68, 239, 179, 0.07);
    border-color: rgba(68, 239, 179, 0.3);
    padding: 8px 14px;
    margin-bottom: 26px;
    box-shadow: inset 0 0 20px rgba(68, 239, 179, 0.03);
}

.hero h1 {
    max-width: 780px;
    margin-bottom: 26px;
    font-size: clamp(3.2rem, 5.25vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.hero h1 .highlight {
    background: linear-gradient(105deg, #44efb3 0%, #b8ffe7 46%, #62a8ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: 0 0 42px rgba(68, 239, 179, 0.1);
}

.hero-desc {
    max-width: 620px;
    margin-bottom: 34px;
    color: #a8bec1;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-actions {
    align-items: center;
}

.hero .btn-primary,
.hero .btn-outline {
    min-height: 54px;
    border-radius: 999px;
    padding-inline: 26px;
}

.hero .btn-primary {
    background: linear-gradient(120deg, #66f7c4, #37dca6);
    box-shadow: 0 12px 42px rgba(68, 239, 179, 0.17);
}

.hero .btn-outline {
    border-color: rgba(170, 215, 215, 0.25);
    background: rgba(10, 24, 31, 0.42);
    backdrop-filter: blur(14px);
}

.hero .btn-primary:focus-visible,
.hero .btn-outline:focus-visible,
.hero-sequence-control:focus-visible {
    outline: 3px solid #edf8f7;
    outline-offset: 4px;
}

.stats-bar {
    width: min(100%, 620px);
    gap: 0;
    margin-top: 42px;
    padding: 18px 8px;
    border: 1px solid rgba(142, 204, 204, 0.15);
    border-radius: 18px;
    background: rgba(8, 21, 28, 0.48);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(16px);
}

.stat-item {
    flex: 1;
    padding: 0 16px;
}

.stat-item + .stat-item {
    border-left: 1px solid rgba(142, 204, 204, 0.14);
}

.stat-number {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.hero-sequence {
    --hero-parallax-x: 0px;
    --hero-parallax-y: 0px;
    position: absolute;
    z-index: 2;
    inset: -36px -8vw -28px 24%;
    width: auto;
    aspect-ratio: auto;
    transform: translate3d(var(--hero-parallax-x), var(--hero-parallax-y), 0);
    transition: transform 180ms ease-out;
}

.hero-sequence::before {
    content: "";
    position: absolute;
    inset: 5% 0 0 14%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(68, 239, 179, 0.21), rgba(39, 106, 116, 0.09) 44%, transparent 72%);
    filter: blur(34px);
}

.hero-frame-shell {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.22) 12%, #000 34%, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.22) 12%, #000 34%, #000 88%, transparent 100%);
}

.hero-frame-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(5, 12, 18, 0.92), rgba(5, 12, 18, 0.18) 32%, transparent 57%),
        linear-gradient(180deg, rgba(5, 12, 18, 0.18), transparent 25%, rgba(5, 12, 18, 0.48));
}

.hero-frame {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 63% center;
    filter: saturate(1.07) contrast(1.04);
    user-select: none;
    -webkit-user-drag: none;
}

.hero-sequence[data-state="loading"] .hero-frame {
    opacity: 0.78;
}

.hero-sequence-topline {
    position: absolute;
    z-index: 3;
    top: 12%;
    left: 43%;
    right: 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.hero-sequence-kicker,
.hero-sequence-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 7px 11px;
    border: 1px solid rgba(153, 220, 215, 0.17);
    border-radius: 999px;
    color: #b9cdcf;
    background: rgba(5, 13, 19, 0.58);
    backdrop-filter: blur(14px);
    font: 500 0.66rem/1 var(--font-mono);
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hero-sequence-kicker::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    content: "";
}

.hero-capabilities {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 8%;
    display: grid;
    gap: 8px;
    transform: translateY(-50%);
    pointer-events: none;
}

.hero-capability {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 154px;
    padding: 10px 12px;
    border: 1px solid rgba(150, 213, 211, 0.15);
    border-radius: 12px;
    color: #c2d8d8;
    background: rgba(4, 13, 18, 0.56);
    backdrop-filter: blur(14px);
    font: 500 0.64rem/1 var(--font-mono);
    letter-spacing: 0.08em;
}

.hero-capability span:last-child {
    color: var(--accent);
}

.hero-signal-feed {
    position: absolute;
    z-index: 3;
    left: 39%;
    right: 10%;
    bottom: 9%;
    min-height: 52px;
    padding: 12px 48px 12px 14px;
    overflow: hidden;
    border: 0;
    border-top: 1px solid rgba(138, 206, 203, 0.22);
    border-radius: 0;
    color: #b6c9cb;
    background: linear-gradient(90deg, rgba(4, 13, 18, 0.64), transparent);
    backdrop-filter: blur(8px);
    font: 400 0.68rem/1.7 var(--font-mono);
    pointer-events: none;
}

.hero-signal-feed .terminal-line {
    opacity: 1;
    animation: hero-feed-in 420ms both;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes hero-feed-in {
    from { opacity: 0; transform: translateY(8px); }
}

.hero-sequence-control {
    position: absolute;
    z-index: 4;
    right: 8%;
    bottom: 3%;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(150, 213, 211, 0.2);
    border-radius: 50%;
    color: #d9eeec;
    background: rgba(5, 14, 19, 0.8);
    cursor: pointer;
}

.hero-sequence-control::before {
    content: "Ⅱ";
    font: 700 0.65rem/1 var(--font-mono);
}

.hero-sequence-control[aria-pressed="true"]::before {
    content: "▶";
    transform: translateX(1px);
}

.hero-terminal-source[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .hero h1 {
        font-size: clamp(3rem, 5vw, 4.7rem);
    }

    .hero-sequence {
        inset-inline: 20% -15vw;
    }
}

@media (max-width: 968px) {
    .hero {
        min-height: auto;
        padding: 120px 0 74px;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        min-height: 0;
        gap: 54px;
    }

    .hero-content {
        order: 1;
        width: 100%;
        max-width: 760px;
        padding: 0;
    }

    .hero-copy-lower {
        order: 3;
        width: 100%;
        max-width: 680px;
        margin-top: 0;
    }

    .hero h1 {
        font-size: clamp(3.5rem, 9.6vw, 6rem);
    }

    .hero-sequence {
        position: relative;
        order: 2;
        inset: auto;
        width: calc(100% + 96px);
        max-width: none;
        margin: -38px -48px -52px;
        aspect-ratio: 16 / 10;
    }

    .hero-frame-shell {
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 82%, transparent 100%);
        mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 82%, transparent 100%);
    }

    .hero-sequence-topline {
        top: 15%;
        left: 10%;
        right: 10%;
    }

    .hero-signal-feed {
        left: 12%;
        right: 12%;
        bottom: 10%;
    }

    .hero-sequence-control {
        right: 11%;
        bottom: 4%;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 104px 0 52px;
    }

    .hero .container {
        padding-inline: 18px;
    }

    .hero h1 {
        font-size: clamp(2.7rem, 13vw, 4.2rem);
        letter-spacing: -0.06em;
    }

    .hero-desc {
        line-height: 1.6;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero .btn-primary,
    .hero .btn-outline {
        justify-content: center;
        width: 100%;
    }

    .stats-bar {
        width: 100%;
        padding: 15px 2px;
    }

    .stat-item {
        padding-inline: 8px;
    }

    .stat-label {
        display: block;
        font-size: 0.59rem;
        line-height: 1.35;
    }

    .hero-grid {
        gap: 34px;
    }

    .hero-sequence {
        width: calc(100% + 36px);
        margin: -28px -18px -42px;
        aspect-ratio: 1 / 1;
    }

    .hero-frame {
        object-position: 65% center;
    }

    .hero-sequence-topline {
        top: 12%;
        left: 7%;
        right: 7%;
    }

    .hero-sequence-location {
        display: none;
    }

    .hero-capabilities {
        top: auto;
        right: 6%;
        bottom: 22%;
        transform: none;
    }

    .hero-capability {
        min-width: 136px;
        padding: 8px 10px;
        font-size: 0.58rem;
    }

    .hero-signal-feed {
        left: 7%;
        right: 7%;
        bottom: 9%;
        min-height: 58px;
        padding: 11px 44px 11px 12px;
        font-size: 0.6rem;
    }

    .hero-sequence-control {
        right: 7%;
        bottom: 2%;
    }
}

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

    .hero-sequence,
    .hero-signal-feed .terminal-line,
    .hero-tag .pulse-dot {
        animation: none !important;
        transition: none !important;
    }

    .hero-sequence-control {
        display: none;
    }
}

/* Secondary headings power on as their section enters the viewport. */
.section-title {
    position: relative;
    display: inline-block;
    color: var(--text-secondary);
    background: linear-gradient(104deg, #edf8f7 8%, #8fffd8 48%, #62a8ff 92%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: grayscale(1) brightness(0.4);
    opacity: 0.52;
    text-shadow: 0 0 0 rgba(68, 239, 179, 0);
    transition: filter 1.05s cubic-bezier(.22, 1, .36, 1), opacity .75s ease, text-shadow 1.1s ease;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #44efb3 18%, #62a8ff 82%, transparent);
    box-shadow: 0 0 16px rgba(68, 239, 179, 0.65);
    opacity: 0;
}

.section-title.is-powered {
    filter: grayscale(0) brightness(1);
    opacity: 1;
    text-shadow: 0 0 34px rgba(68, 239, 179, 0.16);
    animation: section-title-power-on .92s steps(1, end) both;
}

.section-title.is-powered::after {
    right: 0;
    opacity: 0.82;
    transition: right 1s .18s cubic-bezier(.22, 1, .36, 1), opacity .4s .18s ease;
}

@keyframes section-title-power-on {
    0% { filter: grayscale(1) brightness(.4); opacity: .52; }
    28% { filter: grayscale(.7) brightness(.84); opacity: .86; }
    34% { filter: grayscale(1) brightness(.52); opacity: .62; }
    48% { filter: grayscale(.25) brightness(1.08); opacity: 1; }
    55% { filter: grayscale(.65) brightness(.72); opacity: .8; }
    72%, 100% { filter: grayscale(0) brightness(1); opacity: 1; }
}

/* Client marks float on a shared signal field; there are no white logo cards. */
#clients {
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 58%, rgba(28, 102, 100, 0.16), transparent 58%);
}

.client-logo-wrapper {
    position: relative;
    isolation: isolate;
    width: min(230px, 42vw);
    height: 112px;
    padding: 16px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.client-logo-wrapper::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 13% 2%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(158, 228, 209, 0.19), rgba(68, 239, 179, 0.05) 52%, transparent 73%);
    filter: blur(12px);
    opacity: 0.46;
    transition: opacity .35s ease, transform .35s ease;
}

.client-logo-wrapper:hover {
    box-shadow: none;
}

.client-logo-wrapper:hover::before {
    opacity: 0.92;
    transform: scale(1.08);
}

.client-logo {
    position: relative;
    max-height: 72px;
    filter: grayscale(.15) saturate(.88) brightness(.9);
    opacity: .78;
}

.client-logo-wrapper:hover .client-logo {
    filter: grayscale(0) saturate(1.05) brightness(1.05);
    opacity: 1;
}

.client-logo-wrapper[data-logo="paantec"] .client-logo {
    filter: saturate(.85) brightness(1.7);
    opacity: .94;
}

.client-logo-wrapper[data-logo="paantec"]:hover .client-logo {
    filter: saturate(.95) brightness(1.9);
}

.client-logo-wrapper[data-logo="casona"] .client-logo {
    clip-path: inset(15% 1% 15% 1% round 45%);
}

.footer-brand {
    margin-bottom: 14px;
}

@media (max-width: 640px) {
    .nav-brand img {
        width: 36px;
        height: 36px;
    }

    .brand-wordmark {
        font-size: .92rem;
    }

    .client-logo-wrapper {
        width: min(170px, 42vw);
        height: 96px;
        padding-inline: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .section-title,
    .section-title::after,
    .client-logo-wrapper,
    .client-logo-wrapper::before,
    .client-logo {
        transition: none !important;
    }

    .section-title,
    .section-title.is-powered {
        filter: none;
        opacity: 1;
        animation: none;
    }
}
