/*
=====================================================
AETHER SURFACES
=====================================================

Shared structural contracts for transferable Aether
surfaces. Mode styles supply placement and dimensions.
=====================================================
*/


.aether-index-header {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 4px 6px 10px;
}

.aether-index-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: invert(1) contrast(1.95) saturate(1.42) blur(3px);
    -webkit-backdrop-filter: invert(1) contrast(1.95) saturate(1.42) blur(3px);
}

.aether-index-header > * {
    position: relative;
    z-index: 2;
}


.aether-portrait-surface {
    --aether-portrait-background-inset: 0;
    --aether-portrait-content-inset:
        clamp(18px, 2.5vw, 28px);
    --aether-portrait-glitch-inset:
        var(--aether-portrait-content-inset);
    --aether-surface-filter:
        contrast(1.4);

    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    isolation: isolate;
    min-width: 0;
    min-height: 0;
    overflow: visible;
}

.aether-portrait-surface-background,
.aether-portrait-surface-glitch {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.aether-portrait-surface-background {
    inset: var(--aether-portrait-background-inset);
    z-index: 0;
    background: var(--aether-lens-fill);
    box-shadow: var(--aether-lens-shadow);
    backdrop-filter: var(--aether-lens-filter-soft);
    -webkit-backdrop-filter: var(--aether-lens-filter-soft);
    background-size: 100% 100%;
}

.aether-portrait-surface-visual {
    position: absolute;
    inset: var(--aether-portrait-content-inset);
    z-index: 2;
    display: grid;
    place-items: center;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    isolation: isolate;
    transition:
        transform var(--aether-motion-portrait-visual-transform-duration) ease;
}

.aether-portrait-surface-glitch {
    inset: var(--aether-portrait-glitch-inset);
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    isolation: isolate;
    overflow: visible;
}

.aether-portrait-surface-glitch.is-active {
    opacity: 1;
    visibility: visible;
}

.aether-portrait-surface-caption {
    position: absolute;
    left: 22px;
    bottom: 18px;
    z-index: 4;
    display: none;
    font-size: 9px;
    letter-spacing: 0.18em;
    opacity: 0.65;
}

.aether-portrait-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 1;
    filter: saturate(0.96) contrast(1.04);
}

.aether-portrait-sigil {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(140px, 20vw, 300px);
    aspect-ratio: 1;
    color: var(--aether-ui-bright, #f1f2f4);
    font-size: clamp(42px, 8vw, 112px);
    font-weight: 300;
    letter-spacing: 0.04em;
}


/*
=====================================================
INFORMATION SURFACE
=====================================================
*/


.aether-info-surface {
    --aether-info-content-padding:
        clamp(14px, 1.5vw, 22px);

    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    color: var(--aether-lens-ink);
    isolation: isolate;
    overflow: visible;
}

.aether-info-surface-background,
.aether-info-surface-glitch {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.aether-info-surface-background {
    z-index: 0;
    background: var(--aether-lens-fill);
    box-shadow: var(--aether-lens-shadow);
    backdrop-filter: var(--aether-lens-filter-soft);
    -webkit-backdrop-filter: var(--aether-lens-filter-soft);
}

.aether-info-surface-content {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: var(--aether-info-content-padding);
    transition:
        transform var(--aether-motion-surface-settle-duration)
            cubic-bezier(0.19, 1, 0.22, 1);
}

.aether-info-surface.is-shifting
.aether-info-surface-content {
    transform: translate3d(14px, 0, 0);
    opacity: 0.14;
    filter: blur(1px);
}

.aether-info-surface-glitch {
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    isolation: isolate;
    overflow: visible;
}

.aether-info-surface-glitch.is-active {
    opacity: 1;
    visibility: visible;
}
