/* ========================================================================== */
/* Model hero: binary catmaOS emblem + accelerated full-height rain           */
/* ========================================================================== */

/* The Model hero uses the code-built boat instead of the shared orbit/ship. */
.model-matrix-hero .dogma-left-scene { display: none !important; }

.dogma-wave-hero.model-matrix-hero .model-code-field { opacity: .42; }

.dogma-tidal-hero.model-matrix-hero .model-code-field, .model-matrix-hero .model-code-field {
    --model-field-x: 0px;
    --model-field-y: 0px;
    position: absolute;
    z-index: 3;
    inset: calc(var(--dogma-nav-clearance) + .1rem) max(calc(var(--dogma-hero-gutter) * .48), .75rem) calc(var(--dogma-hero-wave-height) - 2.25rem) auto;
    width: min(56vw, 58rem);
    min-width: 38rem;
    overflow: visible;
    background: transparent;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    transform: translate3d(var(--model-field-x), var(--model-field-y), 0);
    transition: transform .85s cubic-bezier(.2, .7, .2, 1);
    pointer-events: none;
    isolation: isolate;
}

.model-matrix-hero .model-code-field::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 12% 0 0 8%;
    border-radius: 50%;
    opacity: .55;
    background: transparent;
    filter: blur(18px);
}

.model-matrix-hero .model-code-field::after { content: none !important; }

.model-rain-layer {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000000 8%, #000000 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000000 8%, #000000 100%);
}

.model-rain-layer--far {
    opacity: .34;
    filter: blur(.35px);
    transform: scale(.94);
    transform-origin: 50% 40%;
}

.model-rain-layer--mid {
    z-index: 2;
    opacity: .64;
}

.model-rain-stream {
    position: absolute;
    top: -40%;
    left: var(--stream-left);
    display: flex;
    width: max-content;
    flex-direction: column;
    align-items: center;
    gap: clamp(.24rem, .55vh, .48rem);
    opacity: 0;
    color: #3E8EC8;
    will-change: transform, opacity;
    animation: model-depth-rain var(--stream-duration) linear var(--stream-delay) infinite;
}

.model-rain-layer--far .model-rain-stream {
    color: rgba(62, 140, 196, .72);
    font-size: .5rem;
}

.model-rain-layer--mid .model-rain-stream {
    color: rgba(27, 100, 152, .88);
    font-size: .63rem;
}

.model-rain-stream .model-rain-token {
    display: block;
    min-height: 1em;
    color: inherit;
    background: none;
    -webkit-text-fill-color: currentColor;
    font: 600 1em/1 "Fira Code", monospace;
    letter-spacing: .02em;
    white-space: nowrap;
    filter: none;
}

.model-rain-stream .model-rain-token.is-dim { opacity: .58; }

@keyframes model-depth-rain {
    0% {
        opacity: 0;
        transform: translate3d(0, -12%, 0);
    }
    9% { opacity: 1; }
    86% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate3d(var(--stream-drift), calc(100svh + 70%), 0);
    }
}

.model-code-boat {
    position: absolute;
    z-index: 4;
    right: 7%;
    bottom: 0;
    height: min(100%, 34rem);
    width: auto;
    aspect-ratio: 916 / 1078;
    opacity: .98;
    filter: drop-shadow(0 1rem 1.8rem rgba(16, 59, 90, .10));
}

.model-boat-token {
    position: absolute;
    top: var(--target-y);
    left: var(--target-x);
    display: block;
    width: 1ch;
    color: rgba(27, 101, 154, .98);
    opacity: 0;
    font: 700 clamp(.43rem, .58vw, .67rem)/1 "Fira Code", monospace;
    white-space: nowrap;
    text-align: center;
    text-shadow: 0 0 .28rem rgba(35, 129, 196, .18);
    transform: translate3d(var(--fall-x), var(--fall-y), 0) scale(.76);
    will-change: transform, opacity;
    animation: model-symbol-settle var(--settle-duration) cubic-bezier(.16, .72, .2, 1) var(--settle-delay) forwards;
}

.model-code-boat-outline {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.model-boat-outline-path {
    fill: none;
    stroke: rgba(28, 104, 159, .9);
    stroke-width: 3.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    opacity: 0;
    filter: drop-shadow(0 0 2px rgba(48, 147, 218, .28));
    animation: model-boat-outline-draw 1.2s cubic-bezier(.2, .7, .2, 1) var(--outline-delay) forwards;
}

@keyframes model-boat-outline-draw {
    0% { opacity: 0; stroke-dashoffset: 1; }
    12% { opacity: .9; }
    100% { opacity: .9; stroke-dashoffset: 0; }
}

.model-boat-token--depth-1 {
    color: rgba(30, 112, 171, .92);
    font-weight: 700;
    transform: translate3d(var(--fall-x), var(--fall-y), 0) scale(.72);
}

.model-boat-token--depth-2 { color: rgba(28, 106, 161, .96); }
.model-boat-token--depth-3 {
    color: rgba(24, 88, 134, 1);
}

@keyframes model-symbol-settle {
    0% {
        opacity: 0;
        transform: translate3d(var(--fall-x), var(--fall-y), 0) scale(.72);
    }
    12% { opacity: .18; }
    55% { opacity: .86; }
    82% {
        opacity: 1;
        transform: translate3d(0, -8px, 0) scale(1);
    }
    92% { transform: translate3d(0, 3px, 0) scale(1); }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}











@media (max-width: 1050px) {
    .dogma-tidal-hero.model-matrix-hero .model-code-field, .model-matrix-hero .model-code-field {
        right: .25rem;
        width: 55vw;
        min-width: 30rem;
    }
    .model-code-boat { right: 5%; }
}

@media (max-width: 760px) {
    .dogma-tidal-hero.model-matrix-hero .model-code-field, .model-matrix-hero .model-code-field {
        top: 30%;
        right: -11%;
        bottom: calc(var(--dogma-hero-wave-height) - .5rem);
        width: 74vw;
        min-width: 21rem;
        opacity: .5;
    }
    .model-code-boat { right: 1%; max-width: 82%; max-height: 100%; }
    .model-rain-layer--far { display: none; }
}

@media (max-width: 620px) {
    .dogma-wave-hero.model-matrix-hero .model-code-field {
        inset: 34% 8% calc(var(--dogma-hero-wave-height) - 1rem);
        width: auto;
        min-width: 0;
        opacity: .42;
    }
    .model-code-boat { right: 10%; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .model-code-field { transform: none !important; }
    .model-rain-stream {
        opacity: .22;
        transform: translateY(30%);
        animation: none !important;
    }
    .model-boat-token {
        opacity: 1;
        transform: none;
        animation: none !important;
    }
    .model-boat-outline-path {
        opacity: .82;
        stroke-dashoffset: 0;
        animation: none !important;
    }
}
