/* ==========================================================================
   EVENLIO EVENT MODE — discovery entry CTA.
   Loaded only by event_mode/_entry.blade.php on ordinary EVENLIO pages.
   Deliberately standalone: the heavy event-mode.css must never be pulled onto
   a normal event page (spec §60 — assets follow the surface that needs them).
   ========================================================================== */

.em-entry {
    --em-e-bg: #0d0d0e;
    --em-e-bg-2: #16151a;
    --em-e-ink: #f6f4f3;
    --em-e-variant: #a9a4a2;
    --em-e-red: #e10100;
    --em-e-line: rgba(225, 1, 0, .34);
    position: relative;
    display: block;
    isolation: isolate;
    overflow: hidden;
    margin-block: 1.25rem;
    padding: 1.5rem 1.6rem;
    border-radius: 1.25rem;
    background: linear-gradient(155deg, var(--em-e-bg-2) 0%, var(--em-e-bg) 62%, #0a0a0b 100%);
    color: var(--em-e-ink);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), box-shadow .5s cubic-bezier(.16, 1, .3, 1), border-color .4s ease;
}

/* Deep red bloom behind the type — atmosphere, not decoration. */
.em-entry::before {
    content: "";
    position: absolute;
    inset-inline-start: -22%;
    inset-block-start: -70%;
    width: 68%;
    height: 240%;
    background: radial-gradient(closest-side, rgba(225, 1, 0, .3), transparent 72%);
    filter: blur(34px);
    z-index: -1;
    opacity: .75;
    transition: opacity .6s ease;
}

/* Slow horizontal sweep reads as "live signal travelling the edge". */
.em-entry::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--em-e-red), transparent);
    opacity: .5;
    animation: emEntrySweep 5.5s linear infinite;
}

@keyframes emEntrySweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.em-entry:hover,
.em-entry:focus-visible {
    transform: translateY(-3px);
    border-color: var(--em-e-line);
    box-shadow: 0 26px 60px -20px rgba(0, 0, 0, .95), 0 0 34px -12px rgba(225, 1, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .07);
    color: var(--em-e-ink);
    text-decoration: none;
}

.em-entry:hover::before { opacity: 1; }

.em-entry:focus-visible {
    outline: 2px solid var(--em-e-red);
    outline-offset: 3px;
}

.em-entry__eyebrow {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--em-e-variant);
}

.em-entry__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--em-e-red);
    box-shadow: 0 0 0 0 rgba(225, 1, 0, .55);
    animation: emEntryPulse 2.2s ease-out infinite;
    flex: none;
}

.em-entry__dot--idle {
    background: var(--em-e-variant);
    animation: none;
    box-shadow: none;
}

@keyframes emEntryPulse {
    0% { box-shadow: 0 0 0 0 rgba(225, 1, 0, .5); }
    70% { box-shadow: 0 0 0 9px rgba(225, 1, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(225, 1, 0, 0); }
}

.em-entry__title {
    display: block;
    margin: .6rem 0 0;
    font-size: 1.3rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.015em;
    text-transform: uppercase;
    color: var(--em-e-ink);
}

.em-entry__sub {
    margin: .45rem 0 0;
    font-size: .8rem;
    line-height: 1.5;
    color: var(--em-e-variant);
}

.em-entry__go {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-top: 1.15rem;
    padding-top: .95rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--em-e-ink);
}

.em-entry__arrow {
    margin-inline-start: auto;
    display: inline-flex;
    width: 1.9rem;
    height: 1.9rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(225, 1, 0, .16);
    border: 1px solid var(--em-e-line);
    color: #ff5449;
    transition: transform .45s cubic-bezier(.16, 1, .3, 1), background .3s ease;
}

.em-entry__arrow svg { width: 15px; height: 15px; }

/* Directional glyph must flip for RTL, mirroring navigation as required. */
[dir="rtl"] .em-entry__arrow svg { transform: scaleX(-1); }

.em-entry:hover .em-entry__arrow {
    transform: scale(1.08);
    background: rgba(225, 1, 0, .3);
}

[dir="rtl"] .em-entry:hover .em-entry__arrow { transform: scaleX(-1) scale(1.08); }

/* Compact variant for grids and dashboards. A row of flex items squeezed the
   eyebrow to one letter per line inside a 19rem track; a stacked card cannot. */
.em-entry--inline {
    padding: 1.05rem 1.15rem;
    margin-block: 0;
}

.em-entry--inline .em-entry__title {
    margin-top: .5rem;
    font-size: 1.02rem;
}

.em-entry--inline .em-entry__sub { display: none; }

.em-entry--inline .em-entry__go {
    margin-top: .85rem;
    padding-top: .7rem;
}

/* A lone door on the home band stretches into the cinematic wide card: text on
   one side, the way in on the other. Grid areas keep the flat markup (four
   siblings, no wrapper) and flip with direction for RTL. */
.em-band__list > .em-entry:only-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "eyebrow go"
        "title   go"
        "sub     go";
    align-items: center;
    column-gap: 2.5rem;
    padding: 2.4rem 2.6rem;
    min-height: 11.5rem;
}

.em-band__list > .em-entry:only-child .em-entry__eyebrow { grid-area: eyebrow; }

.em-band__list > .em-entry:only-child .em-entry__title {
    grid-area: title;
    margin-top: .75rem;
    font-size: clamp(1.5rem, 2.6vw, 2.15rem);
    letter-spacing: -.02em;
}

.em-band__list > .em-entry:only-child .em-entry__sub {
    grid-area: sub;
    margin-top: .7rem;
    max-width: 36rem;
    font-size: .88rem;
}

.em-band__list > .em-entry:only-child .em-entry__go {
    grid-area: go;
    align-self: center;
    margin: 0;
    padding: 0;
    border-top: 0;
    flex-direction: column;
    gap: .8rem;
    font-size: .72rem;
    writing-mode: horizontal-tb;
}

.em-band__list > .em-entry:only-child .em-entry__arrow {
    margin-inline-start: 0;
    width: 3rem;
    height: 3rem;
}

.em-band__list > .em-entry:only-child .em-entry__arrow svg { width: 20px; height: 20px; }

@media (max-width: 720px) {
    .em-band__list > .em-entry:only-child {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "eyebrow"
            "title"
            "sub"
            "go";
        padding: 1.6rem 1.5rem;
        min-height: 0;
        row-gap: 0;
    }

    .em-band__list > .em-entry:only-child .em-entry__go {
        flex-direction: row;
        margin-top: 1.1rem;
        padding-top: .9rem;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }

    .em-band__list > .em-entry:only-child .em-entry__arrow {
        margin-inline-start: auto;
        width: 2.2rem;
        height: 2.2rem;
    }
}

@media (max-width: 640px) {
    .em-entry__title { font-size: 1.12rem; }
    .em-entry { padding: 1.25rem 1.3rem; }
}

/* Listing wrapper — dashboards and grids hold several doors. */
.em-doors {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-block: 1.25rem;
}

/* Inside the user panel the door takes that surface's geometry — corner radius
   and vertical rhythm — so it reads as a resident of the panel, not a visitor
   dropped on top of it. The obsidian face stays: it is the brand moment. */
.user-dashboard .em-entry { border-radius: var(--user-radius, 1.25rem); }

.user-dashboard .em-doors { margin-block: 0 var(--user-gutter, 1.25rem); }

.em-doors__head {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.em-doors__label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--em-e-variant);
}

.em-doors__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding-inline: .4rem;
    border-radius: 999px;
    background: rgba(225, 1, 0, .12);
    border: 1px solid rgba(225, 1, 0, .3);
    color: #c40100;
    font-size: .68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.em-doors__list {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.em-doors .em-entry { margin-block: 0; }

/* Home band — the subsystem's front door on the marketing site. */
.em-band {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: 3.25rem;
    background: #0b0b0c;
    color: var(--em-e-ink);
}

.em-band::before {
    content: "";
    position: absolute;
    inset-inline-start: 8%;
    inset-block-start: -55%;
    width: 44rem;
    height: 44rem;
    background: radial-gradient(closest-side, rgba(225, 1, 0, .22), transparent 70%);
    filter: blur(70px);
    z-index: -1;
}

/* Faint grid gives the band depth without reading as a dashboard. */
.em-band::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .16;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 25%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 25%, transparent 75%);
}

.em-band__inner {
    max-width: 78rem;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.em-band__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #ff5449;
}

.em-band__title {
    margin: .85rem 0 0;
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.02em;
    text-transform: uppercase;
    color: var(--em-e-ink);
}

.em-band__sub {
    margin: .7rem 0 0;
    max-width: 42rem;
    font-size: .9rem;
    line-height: 1.6;
    color: var(--em-e-variant);
}

.em-band__list {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    margin-top: 2rem;
}

/* The band's own doors must not carry the light-page tint. */
.em-band .em-entry {
    background: linear-gradient(155deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
    border-color: rgba(255, 255, 255, .1);
}

/* The moving edge and the breathing dot are motion, not information. */
@media (prefers-reduced-motion: reduce) {
    .em-entry::after { animation: none; opacity: .35; }
    .em-entry__dot { animation: none; }
    .em-entry,
    .em-entry__arrow { transition: none; }
    .em-entry:hover { transform: none; }
}
