/* =========================================================================
   LAVACASCADE — css/sections/hero.css
   Home hero: copy on the left, an example server card (styled like the
   themed panel) on the right, with a slow molten glow behind it, all over
   blurred Minecraft footage (assets/video/, played by hero-video.js).
   ========================================================================= */

/* =========================================
   LAYOUT
   ========================================= */
.hero {
    position: relative;
    padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem);
    overflow: hidden;
}

/* =========================================
   BACKGROUND VIDEO (blur is baked into the file; the darkening, vignette
   and dot grid are layered on top here, so they're easy to tune)
   ========================================= */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--night-900);
    pointer-events: none;
}

.hero__bg .vbg__video {
    opacity: 0.9;
}

/* darkening for the text, vignette, and a fade into the page below */
.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(rgba(246, 242, 250, 0.07) 1px, transparent 1.4px) 0 0 / 5px 5px,
        linear-gradient(180deg, rgba(11, 7, 19, 0.45) 0%, rgba(11, 7, 19, 0) 25%, rgba(11, 7, 19, 0) 65%, var(--night-900) 100%),
        linear-gradient(90deg, rgba(11, 7, 19, 0.86) 0%, rgba(11, 7, 19, 0.8) 48%, rgba(11, 7, 19, 0.3) 66%, rgba(11, 7, 19, 0.12) 100%),
        radial-gradient(ellipse 85% 80% at 60% 45%, rgba(11, 7, 19, 0) 40%, rgba(11, 7, 19, 0.85) 100%);
}

/* small text sits on moving footage: one step lighter than usual */
.hero .eyebrow,
.hero__notes {
    color: var(--text-soft);
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    /* minmax(0, ...): the console's no-wrap lines must never widen a column */
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4.5rem);
}

/* =========================================
   COPY
   ========================================= */
.hero__title {
    margin-top: var(--space-4);
    font-size: var(--fs-display);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero .lead {
    margin-top: var(--space-5);
}

.hero__actions {
    margin-top: var(--space-6);
}

.hero__notes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin-top: var(--space-5);
    padding: 0;
    font-size: var(--fs-sm);
    list-style: none;
}

.hero__notes li {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.hero__notes .icon {
    width: 16px;
    height: 16px;
    color: var(--lava-400);
}

/* =========================================
   VISUAL: glow + tilted frame behind the card
   ========================================= */
.hero__visual {
    position: relative;
}

.hero__visual::before {
    content: "";
    position: absolute;
    inset: 8% -6% -6% 8%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(199, 71, 12, 0.35), transparent);
    filter: blur(30px);
}

/* thin double outline, slightly rotated: the brand's tilted frame */
.hero__visual::after {
    content: "";
    position: absolute;
    inset: -14px;
    z-index: -1;
    border: 1px solid var(--line);
    border-radius: 20px;
    outline: 1px solid rgba(255, 133, 64, 0.12);
    outline-offset: 6px;
    transform: rotate(-2.2deg);
}

/* =========================================
   MASCOT (replaces the server card; the glow above stays behind it)
   ========================================= */
.hero__mascot::after {
    display: none;   /* no tilted frame around the knight */
}

.mascot-wrap {
    position: relative;
    max-width: 586px;
    margin-inline: auto;
}

.mascot {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
}

/* Contact shadow on an imaginary ground under the log, so it doesn't float.
   Follows the log's bottom edge, which runs at 9 degrees in the render
   (from 71% down on the left to 95% on the right). Re-check these numbers
   if the camera changes in a new render. */
.mascot-shadow {
    position: absolute;
    z-index: 0;
    left: -6%;
    top: 77%;
    width: 112%;
    height: 17%;
    background:
        radial-gradient(closest-side, rgba(5, 3, 10, 0.85), rgba(5, 3, 10, 0.55) 50%, transparent),
        radial-gradient(closest-side, rgba(5, 3, 10, 0.6), transparent) 50% 50% / 85% 55% no-repeat;
    filter: blur(6px);
    transform: rotate(9deg);
    pointer-events: none;
}

/* =========================================
   SERVER CARD (no longer on the home page; kept for reuse)
   ========================================= */
.server-card {
    padding: var(--space-5);
    background: var(--night-800);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
}

.server-card__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.server-card__name {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 600;
    color: var(--text-strong);
}

/* a little lava block standing in for the server icon */
.server-card__block {
    width: 22px;
    height: 22px;
    background: var(--grad-molten);
    border-radius: 5px;
    box-shadow: 0 0 18px rgba(255, 133, 64, 0.45);
}

.server-card__addr {
    margin-top: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.server-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.server-card__stats div {
    padding: var(--space-3);
    background: var(--night-700);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.server-card__stats span {
    display: block;
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.server-card__stats b {
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.server-card__stats .is-ok {
    color: var(--ok);
}

/* RAM: blocks, like the configurator */
.server-card__ram {
    margin-top: var(--space-5);
}

.server-card__ram-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.ram-meter {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.ram-meter i {
    height: 14px;
    background: var(--night-600);
    border-radius: 3px;
}

.ram-meter .is-on   { background: var(--grad-molten); }
.ram-meter .is-half { background: linear-gradient(90deg, var(--lava-400) 0 20%, var(--night-600) 20%); }

/* =========================================
   CONSOLE (lines added by js/components/hero-console.js)
   ========================================= */
.server-card__console,
.panel-mock__console {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.75;
    color: var(--text-soft);
    background: var(--night-950);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.server-card__console {
    height: 118px;
    margin-top: var(--space-5);
    padding: var(--space-3) var(--space-4);
    overflow: hidden;
}

.server-card__console p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: console-line 0.4s var(--ease);
}

@keyframes console-line {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

.c-time   { color: var(--text-faint); }
.c-prompt { color: var(--ember-400); }
.c-ok     { color: var(--ok); }
.c-warn   { color: var(--warn); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 960px) {
    .hero__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    /* stacked layout: text runs full width, so darken evenly */
    .hero__bg::after {
        background:
            radial-gradient(rgba(246, 242, 250, 0.07) 1px, transparent 1.4px) 0 0 / 5px 5px,
            linear-gradient(180deg, rgba(11, 7, 19, 0.84) 0%, rgba(11, 7, 19, 0.84) 52%, rgba(11, 7, 19, 0.35) 70%, var(--night-900) 100%),
            radial-gradient(ellipse 90% 70% at 50% 35%, rgba(11, 7, 19, 0) 30%, rgba(11, 7, 19, 0.85) 100%);
    }

    .hero__visual {
        max-width: 520px;
    }
}

@media (max-width: 520px) {
    .hero__visual::after { display: none; }
    .server-card { padding: var(--space-4); }
    .server-card__stats b { font-size: 0.95rem; }
}
