/* ===========================================================
   Axora — Case File
   Palette:  --ax-bg #0A0E14   --ax-panel #10151D
             --ax-blue #7AA2FF --ax-indigo #6C7BFF
             --ax-cream #E7ECF5 --ax-muted #7C8494
             --ax-danger #FF8B7A (revoked / expired states only)
   Type:     IBM Plex Mono — the vault's own voice (display,
             clearance data, anything "read off" a credential)
             Space Grotesk — studio UI voice (labels, nav)
             Inter — reading copy
   Signature: the access card — a clearance badge with chip,
             mag-stripe and barcode, the way a keycard sits in
             a lanyard sleeve
=============================================================== */

.ax-page {
    background: var(--ax-bg);
    color: var(--ax-cream);
    overflow-x: clip;
}

.ax-page * {
    box-sizing: border-box;
}

.ax-page ::selection {
    background: var(--ax-blue);
    color: #0a0e14;
}

.ax-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 500 .72rem "JetBrains Mono", monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ax-blue);
}

.ax-eyebrow::before {
    content: "";
    width: 14px;
    height: 1px;
    background: var(--ax-blue);
}

/* ===========================
   Hero
=========================== */

.ax-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
    padding: 120px 64px 72px;
    border-bottom: 1px solid var(--ax-line);
    overflow: hidden;
}

/* Same atmosphere used for the Axora chapter on the projects
   page — a CRT scanline pass over a glitched wordmark — carried
   over here instead of inventing a new background motif. */
.ax-hero-atmosphere {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ax-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom,
            rgba(122, 162, 255, .05) 0px,
            rgba(122, 162, 255, .05) 1px,
            transparent 1px,
            transparent 3px);
    mix-blend-mode: overlay;
}

.ax-scanline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -140px;
    height: 140px;
    background: linear-gradient(to bottom, transparent, rgba(122, 162, 255, .1), transparent);
    animation: axScan 6s linear infinite;
}

@keyframes axScan {
    0% {
        top: -140px;
    }

    100% {
        top: 100%;
    }
}

.ax-glitch-type {
    position: absolute;
    top: 6%;
    right: -2%;
    margin: 0;
    font: 700 clamp(6rem, 17vw, 13rem) "JetBrains Mono", monospace;
    letter-spacing: -.02em;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(122, 162, 255, .16);
    user-select: none;
}

.ax-glitch-type::before,
.ax-glitch-type::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    -webkit-text-stroke: 0;
}

.ax-glitch-type::before {
    color: rgba(122, 162, 255, .26);
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    animation: axGlitch1 3.4s infinite linear;
}

.ax-glitch-type::after {
    color: rgba(108, 123, 255, .22);
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    animation: axGlitch2 2.7s infinite linear;
}

@keyframes axGlitch1 {

    0%,
    92%,
    100% {
        transform: translate(0, 0);
    }

    93% {
        transform: translate(-6px, 2px);
    }

    95% {
        transform: translate(4px, -2px);
    }

    97% {
        transform: translate(-3px, 1px);
    }
}

@keyframes axGlitch2 {

    0%,
    90%,
    100% {
        transform: translate(0, 0);
    }

    91% {
        transform: translate(5px, -1px);
    }

    94% {
        transform: translate(-4px, 2px);
    }

    97% {
        transform: translate(3px, -3px);
    }
}

.ax-hero-glow {
    position: absolute;
    top: -10%;
    right: -6%;
    width: 46vw;
    max-width: 620px;
    height: 46vw;
    max-height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 162, 255, .16), transparent 68%);
    filter: blur(10px);
    z-index: 0;
    pointer-events: none;
}

.ax-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.ax-hero-title {
    margin: 18px 0 22px;
    font: 500 clamp(2.8rem, 8vw, 6.2rem) "JetBrains Mono", monospace;
    line-height: .98;
    color: var(--ax-cream);
    letter-spacing: -.01em;
}

.ax-hero-title .ax-cursor {
    display: inline-block;
    width: .5ch;
    background: var(--ax-blue);
    animation: axBlink 1s step-end infinite;
}

@keyframes axBlink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

.ax-hero-sub {
    max-width: 46ch;
    font: 400 1.05rem/1.6 "Inter", sans-serif;
    color: var(--ax-muted);
}

.ax-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--ax-line);
}

.ax-hero-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ax-hero-meta-item dt {
    font: 500 .66rem "Space Grotesk", sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ax-muted);
}

.ax-hero-meta-item dd {
    margin: 0;
    font: 400 .9rem "JetBrains Mono", monospace;
    color: var(--ax-cream);
}

.ax-status-dot {
    margin-bottom: 2px;
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ax-blue);
    margin-right: 6px;
    box-shadow: 0 0 0 3px rgba(122, 162, 255, .18);
}

/* ===========================
   Shared section rhythm
=========================== */

.ax-section {
    padding: 96px 64px;
    border-bottom: 1px solid var(--ax-line);
}

.ax-section-head {
    max-width: 640px;
    margin-bottom: 48px;
}

.ax-section-title {
    margin: 14px 0 0;
    font: 500 clamp(1.7rem, 3.2vw, 2.4rem) "Space Grotesk", sans-serif;
    letter-spacing: -.01em;
    color: var(--ax-cream);
}

.ax-section-title em {
    font-family: "JetBrains Mono", monospace;
    font-style: normal;
    color: var(--ax-blue);
}

/* ===========================
   The Brief
=========================== */

.ax-brief {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 64px;
    align-items: start;
}

.ax-brief-copy p {
    margin: 0 0 18px;
    font: 400 1.02rem/1.7 "Inter", sans-serif;
    color: var(--ax-muted);
    max-width: 56ch;
}

.ax-brief-copy p:last-child {
    margin-bottom: 0;
}

.ax-brief-copy strong {
    color: var(--ax-cream);
    font-weight: 500;
}

.ax-brief-copy code {
    font-family: "JetBrains Mono", monospace;
    font-size: .92em;
    color: var(--ax-blue);
    background: rgba(122, 162, 255, .1);
    padding: .1em .4em;
    border-radius: 3px;
}

/* --- Access card: the signature element --- */

.ax-card {
    position: relative;
    background: linear-gradient(155deg, var(--ax-panel-2), var(--ax-panel));
    border: 1px solid var(--ax-line);
    border-radius: 14px;
    padding: 26px 26px 22px;
    max-width: 340px;
    justify-self: end;
    box-shadow: 0 24px 48px rgba(0, 0, 0, .45);
}

.ax-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.ax-card-chip {
    width: 34px;
    height: 26px;
    border-radius: 4px;
    background: linear-gradient(155deg, var(--ax-blue), var(--ax-indigo));
    position: relative;
    opacity: .9;
}

.ax-card-chip::before,
.ax-card-chip::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    height: 1px;
    background: rgba(10, 14, 20, .35);
}

.ax-card-chip::before {
    top: 8px;
}

.ax-card-chip::after {
    top: 16px;
}

.ax-card-label {
    font: 500 .64rem "Space Grotesk", sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ax-muted);
}

.ax-card-rows {
    margin: 0 0 20px;
}

.ax-card-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-top: 1px dashed var(--ax-line);
    font: 400 .82rem "JetBrains Mono", monospace;
}

.ax-card-row:first-child {
    border-top: none;
}

.ax-card-row dt {
    color: var(--ax-muted);
}

.ax-card-row dd {
    margin: 0;
    color: var(--ax-cream);
    text-align: right;
}

.ax-card-row dd.ax-ok {
    color: var(--ax-blue);
}

/* barcode strip, cut off at the card edges */
.ax-card-barcode {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 30px;
    margin: 0 -26px -22px;
    padding: 10px 26px;
    border-top: 1px solid var(--ax-line);
    background: rgba(0, 0, 0, .18);
    border-radius: 0 0 14px 14px;
}

.ax-card-barcode span {
    display: block;
    width: 2px;
    background: var(--ax-muted);
    opacity: .55;
}

/* ===========================
   Pull quote
=========================== */

.ax-quote {
    text-align: center;
    padding: 110px 64px;
}

.ax-quote blockquote {
    margin: 0 auto;
    max-width: 780px;
    font: 500 clamp(1.4rem, 2.8vw, 2.1rem) "JetBrains Mono", monospace;
    line-height: 1.45;
    color: var(--ax-cream);
}

.ax-quote cite {
    display: block;
    margin-top: 24px;
    font: 500 .72rem "Space Grotesk", sans-serif;
    font-style: normal;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ax-muted);
}

/* ===========================
   Chapter nav (prev/next + back)
=========================== */

.ax-chapternav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 64px;
    gap: 24px;
    flex-wrap: wrap;
}

.ax-chapternav-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ax-muted);
    font: 400 .85rem "Inter", sans-serif;
    transition: color .25s ease;
}

.ax-chapternav-link:hover {
    color: var(--ax-blue);
}

.ax-chapternav-link svg {
    width: 16px;
    height: 16px;
    transition: transform .25s ease;
}

.ax-chapternav-link.next:hover svg {
    transform: translateX(3px);
}

.ax-chapternav-link.back:hover svg {
    transform: translateX(-3px);
}

/* ===========================
   Focus visibility
=========================== */

.ax-page a:focus-visible,
.ax-page button:focus-visible {
    outline: 2px solid var(--ax-blue);
    outline-offset: 3px;
}

/* ===========================
   Sidebar offset — matches every other page on the site
=========================== */

@media (min-width: 1025px) {

    .ax-hero,
    .ax-section,
    .ax-quote,
    .ax-chapternav {
        margin-left: var(--sidebar-w);
    }
}

/* ===========================
   Responsive
=========================== */

@media (max-width: 1024px) {

    .ax-hero,
    .ax-section,
    .ax-quote,
    .ax-chapternav {
        padding-left: 28px;
        padding-right: 28px;
    }

    .ax-brief {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .ax-card {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .ax-hero {
        min-height: auto;
        padding-top: 96px;
        padding-bottom: 48px;
    }

    .ax-hero-meta {
        gap: 20px;
    }
}

/* ===========================
   Dashboard screen frame
=========================== */

.ax-screen {
    border: 1px solid var(--ax-line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--ax-panel);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .45);
}

.ax-screen-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--ax-panel-2);
    border-bottom: 1px solid var(--ax-line);
}

.ax-screen-dot {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ax-muted);
    opacity: .4;
}

.ax-screen-url {
    flex: 1;
    min-width: 0;
    margin-left: 10px;
    font: 400 .78rem "JetBrains Mono", monospace;
    color: var(--ax-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ax-screen-body {
    line-height: 0;
}

.ax-screen-body img {
    width: 100%;
    height: auto;
    display: block;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: rgba(0, 0, 0, .82);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}

.lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
    transform: scale(.96);
    transition: transform .25s ease;
}

.lightbox-overlay.is-open .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
}

.lightbox-close svg {
    width: 18px;
    height: 18px;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, .16);
}

/* ===========================
   Visit button — "swipe to enter"
=========================== */

.ax-visit-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 36px;
    padding: 13px 22px 13px 18px;
    background: rgba(122, 162, 255, .08);
    border: 1px solid rgba(122, 162, 255, .35);
    border-radius: 8px;
    color: var(--ax-cream);
    font: 500 .82rem "JetBrains Mono", monospace;
    letter-spacing: .04em;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .25s ease, background .25s ease, transform .2s ease;
}

.ax-visit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent, rgba(122, 162, 255, .18), transparent);
    transform: translateX(-120%);
    transition: transform .5s ease;
}

.ax-visit-btn:hover {
    background: rgba(122, 162, 255, .14);
    border-color: var(--ax-blue);
    transform: translateY(-1px);
}

.ax-visit-btn:hover::before {
    transform: translateX(120%);
}

.ax-visit-btn:active {
    transform: translateY(0);
}

.ax-visit-btn .ax-visit-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ax-blue);
    box-shadow: 0 0 0 3px rgba(122, 162, 255, .18);
    flex-shrink: 0;
}

.ax-visit-btn svg {
    width: 14px;
    height: 14px;
    stroke: var(--ax-blue);
    transition: transform .25s ease;
}

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

.ax-visit-btn:focus-visible {
    outline: 2px solid var(--ax-blue);
    outline-offset: 3px;
}