/* Events page design layer — /events (and /resources/events, which redirects here).
 *
 * The presentation layer for the `webpages` row whose slug is 'events'. That row
 * holds every word on the page; Components/Pages/EventsIndex.razor renders it and
 * splices the published events in at a placeholder comment pair, or leaves the
 * stored empty state in place when there are none. Nothing in here is content —
 * no text, no links, no image URLs. See docs/events-redesign.sql.
 *
 * Global CSS, linked from App.razor, so the two rules every sibling page sheet
 * calls out apply here too:
 *
 * 1. Nothing confines these rules to this page, so every selector is qe-
 *    prefixed or a descendant of one. No bare element selectors.
 * 2. @keyframes names are global as well, hence the prefix on those — they must
 *    not collide with the compiled Tailwind bundle or with the qh-, qp-, qw-,
 *    qct-, qb-, qc-, ql- and qv- animations the other page sheets declare.
 *
 * These rules are unlayered and Tailwind v4's utilities live inside @layer, so
 * they win regardless of specificity. That is why this page can be styled
 * entirely from here rather than from utility classes in the CMS textarea: the
 * bundle the site serves is a prebuilt Next.js artefact, so it contains only the
 * utilities that build emitted, and a class invented in the textarea would not
 * exist at runtime.
 *
 * `boxed-container` IS from the bundle and is used deliberately: it is the site's
 * own container (max-width and gutters stepping 1200 → 1400 → 1600px), so this
 * page's content column lines up with the header, the footer and every other
 * page. Do not replace it with a max-width of this sheet's own.
 *
 * PALETTE. The logo ramp the pricing, blog, help-centre, webinars, contact and
 * careers sheets already share — #4f46e5 (indigo, primary) → #7c3aed (violet) →
 * #a22dea (magenta-violet). No hue from outside that ramp appears here. Exactly
 * one surface is dark, the closing "Want to Host an Event?" band; the hero is a
 * pale violet wash and everything between is white on a very light tint.
 *
 * LAYOUT. hero → the events slot → closing band. The slot is one grid of cards
 * per event type, each under its own heading, or a single centred panel when
 * nothing is published. The empty panel is the branch that ships today, so it is
 * treated as a first-class surface rather than as loose copy.
 */

/* ── page shell ─────────────────────────────────────────────────────────
 *
 * EventsIndex reproduces ContentPage's wrapper so an edit in the Page HTML
 * textarea behaves here exactly as it does on every other CMS page. That wrapper
 * carries `style="color:#1a1a1a;line-height:1.8"` inline, which every stored
 * page depends on and which would otherwise cascade into every heading, card and
 * button on this one. Both are re-declared here so this page's type inherits
 * from .qe-page down rather than from the wrapper. Do not remove them. */
.qe-page {
    color: #14103a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.qe-page a { text-decoration: none; }

/* ── hero ───────────────────────────────────────────────────────────── */
.qe-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, #fbfaff 44%, #f3f1fe 100%);
    padding: 76px 0 62px;
}

.qe-hero__aurora,
.qe-hero__grid {
    position: absolute;
    inset: 0;
    display: block;
    pointer-events: none;
}

.qe-hero__aurora i {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .72;
    animation: qe-drift 26s ease-in-out infinite;
}

.qe-hero__aurora i:nth-child(1) {
    width: 720px;
    height: 720px;
    top: -400px;
    right: -200px;
    background: radial-gradient(circle, rgba(129, 140, 248, .28), transparent 62%);
}

.qe-hero__aurora i:nth-child(2) {
    width: 560px;
    height: 560px;
    bottom: -300px;
    left: -200px;
    animation-delay: -9s;
    background: radial-gradient(circle, rgba(167, 139, 250, .26), transparent 62%);
}

.qe-hero__aurora i:nth-child(3) {
    width: 440px;
    height: 440px;
    top: 24%;
    left: 44%;
    animation-delay: -16s;
    background: radial-gradient(circle, rgba(162, 45, 234, .16), transparent 62%);
}

@keyframes qe-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-46px, 38px) scale(1.08); }
    66%      { transform: translate(38px, -28px) scale(.94); }
}

.qe-hero__grid {
    opacity: .5;
    background-image: radial-gradient(circle at 1px 1px, rgba(79, 70, 229, .24) 1.1px, transparent 0);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 58% 46% at 50% 8%, #000, transparent 72%);
    mask-image: radial-gradient(ellipse 58% 46% at 50% 8%, #000, transparent 72%);
}

.qe-hero__inner {
    position: relative;
    z-index: 5;
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

/* ── breadcrumb ─────────────────────────────────────────────────────── */
.qe-crumbs {
    margin-bottom: 22px;
}

.qe-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 1.4;
    color: #94a3b8;
}

.qe-crumbs a {
    color: #64748b;
    transition: color .2s;
}

.qe-crumbs a:hover { color: #4f46e5; }

.qe-crumbs li[aria-current="page"] {
    font-weight: 650;
    color: #4f46e5;
}

/* ── eyebrow ────────────────────────────────────────────────────────── */
.qe-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 17px 8px 9px;
    margin-bottom: 26px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-align: left;
    color: #fff;
    background: linear-gradient(100deg, #4f46e5, #7c3aed 55%, #a855f7);
    box-shadow: 0 12px 30px -12px rgba(99, 102, 241, .85);
}

.qe-eyebrow__pip {
    width: 22px;
    height: 22px;
    border-radius: 99px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .22);
    animation: qe-pulse 2.8s ease-in-out infinite;
}

.qe-eyebrow__pip svg { width: 12px; height: 12px; }

@keyframes qe-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .38); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
}

.qe-hero__title {
    font-size: clamp(32px, 4.2vw, 54px);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 800;
    color: #0b1020;
    margin: 0 0 20px;
}

.qe-accent {
    background: linear-gradient(96deg, #4f46e5 0%, #7c3aed 46%, #a22dea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.qe-hero__lede {
    font-size: clamp(15.5px, 1.2vw, 17.5px);
    line-height: 1.65;
    color: #64748b;
    max-width: 660px;
    margin: 0 auto;
}

/* ── events slot ────────────────────────────────────────────────────── */
.qe-list {
    position: relative;
    padding: 62px 0 92px;
    background: linear-gradient(180deg, #fff 0%, #fbfaff 100%);
}

/* One block per event type. The heading is the type's label, so it only ever
   renders when that type has at least one published event. */
.qe-group + .qe-group { margin-top: 52px; }

.qe-group__title {
    position: relative;
    margin: 0 0 24px;
    padding-left: 15px;
    font-size: clamp(19px, 1.6vw, 24px);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0b1020;
}

/* The ramp as a short upright rule rather than a full underline — the groups
   are peers, so the marker sizes with the heading and does not span the row. */
.qe-group__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .18em;
    width: 4px;
    border-radius: 99px;
    background: linear-gradient(180deg, #4f46e5, #7c3aed 55%, #a22dea);
}

.qe-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* ── event card ─────────────────────────────────────────────────────── */
.qe-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #eae9f6;
    box-shadow: 0 20px 44px -32px rgba(15, 23, 42, .4);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s;
}

.qe-card:hover {
    transform: translateY(-6px);
    border-color: #d8d5f6;
    box-shadow: 0 36px 72px -34px rgba(79, 70, 229, .45);
}

/* Keyboard users get the same affordance the pointer does — the card is the
   link, so the focus ring belongs on the card and not on an inner element. */
.qe-card:focus-visible {
    outline: 3px solid #7c3aed;
    outline-offset: 3px;
}

.qe-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    /* Shows through while the banner loads, and stands in for it entirely on a
       row that has no banner stored. */
    background: linear-gradient(135deg, #7b5ee5, #a22dea 52%, #5b5de2);
}

.qe-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.qe-card:hover .qe-card__media img { transform: scale(1.06); }

.qe-card__ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .55);
}

.qe-card__ph svg { width: 42px; height: 42px; }

/* Two stacked washes rather than one flat tint: the top scrim keeps the card
   edge readable over a bright banner, the bottom one does the same for the
   date chip. */
.qe-card__scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(11, 16, 32, .22) 0%, rgba(11, 16, 32, 0) 42%),
        linear-gradient(0deg, rgba(11, 16, 32, .58) 0%, rgba(11, 16, 32, 0) 52%);
    transition: opacity .3s;
}

.qe-card:hover .qe-card__scrim { opacity: .82; }

.qe-card__date {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #fff;
    background: rgba(17, 12, 46, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .18);
}

.qe-card__date svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    opacity: .85;
}

/* The body is a two-column grid so the arrow keeps its corner while the title
   and the location stack down the left, however long either runs. */
.qe-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px 14px;
    flex: 1 1 auto;
    padding: 20px 22px 22px;
}

.qe-card__title {
    grid-column: 1;
    font-size: 16.5px;
    line-height: 1.42;
    font-weight: 750;
    letter-spacing: -.015em;
    color: #0b1020;
    margin: 0;
    min-width: 0;
    transition: color .2s;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qe-card:hover .qe-card__title { color: #4f46e5; }

.qe-card__meta {
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.qe-card__meta svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: #a78bfa;
}

.qe-card__arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    width: 32px;
    height: 32px;
    border-radius: 99px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #7c3aed;
    background: #f6f1ff;
    transition: color .25s, background .25s, transform .25s;
}

.qe-card__arrow svg { width: 15px; height: 15px; }

.qe-card:hover .qe-card__arrow {
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateX(3px);
}

/* ── empty state ────────────────────────────────────────────────────── */
/* This is the branch that renders today, so it gets the panel treatment the
   cards would otherwise occupy rather than sitting as unframed copy. */
.qe-empty {
    position: relative;
    overflow: hidden;
    max-width: 640px;
    margin: 0 auto;
    padding: 56px 40px 52px;
    text-align: center;
    border-radius: 28px;
    background: #fff;
    border: 1px solid #eae9f6;
    box-shadow: 0 30px 70px -44px rgba(79, 70, 229, .5);
}

/* Hairline of the brand ramp across the top edge. */
.qe-empty::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed 50%, #a22dea);
}

.qe-empty__ic {
    width: 60px;
    height: 60px;
    margin: 0 auto 22px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: #7c3aed;
    background: #f6f1ff;
}

.qe-empty__ic svg { width: 28px; height: 28px; }

.qe-empty__title {
    margin: 0 0 10px;
    font-size: clamp(19px, 1.7vw, 23px);
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0b1020;
}

.qe-empty__copy {
    max-width: 460px;
    margin: 0 auto;
    font-size: 15.5px;
    line-height: 1.75;
    color: #64748b;
}

/* ── closing band ───────────────────────────────────────────────────── */
.qe-cta {
    position: relative;
    overflow: hidden;
    padding: 74px 0 78px;
    background: linear-gradient(125deg, #241a63 0%, #3b2a9e 46%, #6d28d9 100%);
}

.qe-cta__orb {
    position: absolute;
    display: block;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}

.qe-cta__orb--a {
    width: 480px;
    height: 480px;
    top: -240px;
    left: -120px;
    background: radial-gradient(circle, rgba(162, 45, 234, .55), transparent 64%);
}

.qe-cta__orb--b {
    width: 420px;
    height: 420px;
    right: -140px;
    bottom: -220px;
    background: radial-gradient(circle, rgba(79, 70, 229, .6), transparent 64%);
}

.qe-cta__inner {
    position: relative;
    z-index: 5;
    text-align: center;
}

.qe-cta__title {
    margin: 0 0 14px;
    font-size: clamp(26px, 2.8vw, 38px);
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #fff;
}

.qe-cta__lede {
    max-width: 620px;
    margin: 0 auto 30px;
    font-size: clamp(15px, 1.15vw, 16.5px);
    line-height: 1.7;
    color: rgba(237, 233, 254, .84);
}

/* White on the dark band, inverting the ramp buttons the light pages use — one
   action, so it does not need a ghost partner to rank against. */
.qe-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: #3b2a9e;
    background: #fff;
    box-shadow: 0 18px 40px -18px rgba(9, 6, 40, .75);
    transition: transform .25s, box-shadow .25s, color .25s;
}

.qe-btn:hover {
    color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 26px 52px -20px rgba(9, 6, 40, .85);
}

.qe-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .85);
    outline-offset: 3px;
}

.qe-btn svg {
    flex: 0 0 auto;
    transition: transform .25s;
}

.qe-btn:hover svg { transform: translateX(3px); }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .qe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .qe-hero { padding: 54px 0 46px; }
    .qe-hero__inner { text-align: left; }
    .qe-crumbs ol { justify-content: flex-start; }
    .qe-hero__lede { margin-left: 0; }

    .qe-list { padding: 46px 0 66px; }
    .qe-grid { grid-template-columns: minmax(0, 1fr); }
    .qe-group + .qe-group { margin-top: 40px; }

    .qe-empty { padding: 44px 26px 40px; }

    .qe-cta { padding: 58px 0 62px; }
    .qe-btn { width: 100%; justify-content: center; }
}

/* ── reduced motion ─────────────────────────────────────────────────── */
/* The drifting aurora and the pulsing pip are decoration; the hover lifts and
   the banner zoom are feedback. Both go, rather than only the ambient pair. */
@media (prefers-reduced-motion: reduce) {
    .qe-hero__aurora i,
    .qe-eyebrow__pip {
        animation: none;
    }

    .qe-card,
    .qe-card__media img,
    .qe-card__arrow,
    .qe-btn,
    .qe-btn svg {
        transition: none;
    }

    .qe-card:hover,
    .qe-btn:hover {
        transform: none;
    }

    .qe-card:hover .qe-card__media img { transform: none; }
}
