
/* Buttons Start */
.main-button {
    --btn-lift: 0px;
    --btn-depth: 5px;
    --btn-glow: 0.28;
    position: relative;
    display: inline-block;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.42) 0%,
            rgba(255, 255, 255, 0.12) 28%,
            rgba(0, 0, 0, 0) 55%,
            rgba(0, 0, 0, 0.12) 100%
        ),
        linear-gradient(180deg, #79f095 0%, #56e373 48%, #2fbf55 100%);
    color: #062410;
    padding: .75rem 1.4rem;
    border: 1px solid rgba(8, 55, 22, 0.55);
    border-radius: .7rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
    cursor: pointer;
    outline: none;
    transform: translate3d(0, var(--btn-lift), 0);
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.14),
        0 var(--btn-depth) 0 0 #1b5429,
        0 calc(var(--btn-depth) + 2px) 8px rgba(0, 0, 0, 0.22),
        0 calc(var(--btn-depth) + 6px) 18px rgba(0, 0, 0, 0.18),
        0 0 20px rgba(86, 227, 115, var(--btn-glow));
    transition:
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.22s ease,
        filter 0.22s ease;
    will-change: transform, box-shadow;
}

.main-button:focus-visible {
    --btn-glow: 0.5;
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.14),
        0 var(--btn-depth) 0 0 #1f8a3a,
        0 calc(var(--btn-depth) + 2px) 8px rgba(0, 0, 0, 0.22),
        0 calc(var(--btn-depth) + 6px) 18px rgba(0, 0, 0, 0.18),
        0 0 0 3px rgba(86, 227, 115, 0.35),
        0 0 22px rgba(86, 227, 115, var(--btn-glow));
}

.main-button:hover {
    --btn-lift: -2px;
    --btn-depth: 7px;
    --btn-glow: 0.42;
    filter: saturate(1.05) brightness(1.03);
}

.main-button:active {
    --btn-lift: 3px;
    --btn-depth: 1px;
    --btn-glow: 0.18;
    filter: brightness(0.97);
    transition:
        transform 0.08s cubic-bezier(0.2, 0, 0.2, 1),
        box-shadow 0.08s cubic-bezier(0.2, 0, 0.2, 1),
        filter 0.08s ease;
}


/* .secondary-button {
    --btn-lift: 0px;
    position: relative;
    display: inline-block;
    color: #fff;
    padding: .75rem 1.4rem;
    border: 1px solid #fff;
    border-radius: .7rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
    cursor: pointer;
    outline: none;
    transform: translate3d(0, var(--btn-lift), 0);
    transition:
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.22s ease,
        filter 0.22s ease;
    will-change: transform, box-shadow;
}

.secondary-button:hover {
    --btn-lift: -2px;
    filter: saturate(1.05) brightness(1.03);
}

.secondary-button:active {
    --btn-lift: 3px;
    filter: brightness(0.97);
    transition:
        transform 0.08s cubic-bezier(0.2, 0, 0.2, 1),
        box-shadow 0.08s cubic-bezier(0.2, 0, 0.2, 1),
        filter 0.08s ease;
} */

/* Buttons End */



/* Layers Start */
.portrait-lock {
    z-index: 400;
}

.navbar {
    z-index: 100;
}

.service-modal-backdrop {
    z-index: 200;
}

.service-modal {
    z-index: 210;
}

.hero-content-text {
    z-index: 10;
}

.services-card {
    z-index: 8;
}

.services-potion-image {
    z-index: 7;
}

.footer-content {
    z-index: 4;
}

.footer-nav,
.footer-bar {
    z-index: 4;
}

.hero-bottom-dark-overlay {
    z-index: 6;
}

.hero-image {
    z-index: 3;
}

.hero-top-dark-overlay {
    z-index: 2;
}

.hero-content-image {
    z-index: 1;
}

.hero-bg-video {
    z-index: 0;
}

/* Layers End */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Carter One', cursive;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    overflow-x: hidden;
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: #56e373 #0a100c;
}

body {
    overflow-x: hidden;
}

.portrait-lock {
    display: none;
}

.portrait-lock-inner {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    padding: 1rem 1.35rem;
    border-radius: 1rem;
    border: 1px solid rgba(86, 227, 115, 0.45);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
        rgba(6, 10, 8, 0.94);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 28px rgba(86, 227, 115, 0.18),
        0 16px 36px rgba(0, 0, 0, 0.45);
}

.portrait-lock-phone {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    flex-shrink: 0;
}

.portrait-lock-phone-body {
    width: 1.35rem;
    height: 2.15rem;
    border: 2px solid #79f095;
    border-radius: 0.35rem;
    box-shadow: 0 0 12px rgba(86, 227, 115, 0.45);
    animation: portrait-lock-tilt 1.7s ease-in-out infinite;
}

.portrait-lock-phone-body::after {
    content: "";
    display: block;
    width: 0.45rem;
    height: 0.18rem;
    margin: 0.18rem auto 0;
    border-radius: 999px;
    background: #79f095;
}

.portrait-lock-title {
    color: #fff;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    line-height: 1.15;
}

.portrait-lock-copy {
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.85rem;
    line-height: 1.3;
}

@keyframes portrait-lock-tilt {
    0%,
    18% {
        transform: rotate(90deg);
    }

    48%,
    100% {
        transform: rotate(0deg);
    }
}

@media screen and (orientation: landscape) and (max-height: 540px) and (pointer: coarse) {
    html,
    body {
        overflow: hidden !important;
        height: 100%;
        touch-action: none;
    }

    .portrait-lock {
        display: flex;
        position: fixed;
        inset: 0;
        align-items: center;
        justify-content: center;
        padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
        background:
            radial-gradient(ellipse at center, rgba(18, 42, 24, 0.55), rgba(0, 0, 0, 0.92) 70%);
        backdrop-filter: blur(10px);
    }

    body > :not(.portrait-lock) {
        visibility: hidden;
        pointer-events: none;
    }
}

/* Game HUD scrollbar — forged crystal rail */
* {
    scrollbar-width: thin;
    scrollbar-color: #56e373 #0a100c;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background:
        linear-gradient(
            90deg,
            #050705 0%,
            #0c140e 42%,
            #0c140e 58%,
            #050705 100%
        ),
        #050705;
    box-shadow:
        inset 0 0 0 1px rgba(86, 227, 115, 0.14),
        inset 0 0 8px rgba(0, 0, 0, 0.8);
}

::-webkit-scrollbar-thumb {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.42) 0%,
            rgba(255, 255, 255, 0.12) 28%,
            rgba(0, 0, 0, 0) 55%,
            rgba(0, 0, 0, 0.16) 100%
        ),
        linear-gradient(180deg, #79f095 0%, #56e373 48%, #2fbf55 100%);
    border: 2px solid #041208;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0.16) 28%,
            rgba(0, 0, 0, 0) 55%,
            rgba(0, 0, 0, 0.12) 100%
        ),
        linear-gradient(180deg, #8ff5a8 0%, #62ea80 48%, #3acc5c 100%);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #4fd86a 0%, #2fbf55 100%);
}

::-webkit-scrollbar-corner {
    background: #000;
}

::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

body.nav-open {
    overflow: hidden;
}

img, h1, h2, p {
    user-select: none;
}

:root {
    --primary-color: #56e373;
    --ember-color: #e85d04;
}

.navbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 20px;
    width: 100%;
    left: 0;
    top: 0;
    position: fixed;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    transition: background 0.35s ease;
}

.navbar.scrolled {
    background: linear-gradient(
        180deg, #000 20%, #000, #000, #000d,#000a,transparent);
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    background-color: #000;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    /* background-image: url('../docs/reference/header3.png'); */
    background-image: url('assets/header_bg_image.webp');
    background-size: cover;
    background-position: center;
    overflow-y: hidden;
}

.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-actions {
    gap: 2rem;
    display: flex;
}

.hero.hero-video-ready .hero-bg-video {
    opacity: 1;
}

.hero.hero-video-ready {
    background-image: none;
}

.navbar-logo {
    display: block;
    width: 10rem;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.navbar-logo img {
    width: 100%;
    height: auto;
}

.navbar-menu {
    display: flex;
    gap: 4rem;
    margin-left: 3rem;
}

.navbar-menu-item {
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.navbar-menu-item a {
    color: inherit;
    text-decoration: none;
}

.navbar-menu-item:hover {
    transform: scale(1.05);
    color: var(--primary-color);
}

.navbar-toggle {
    display: none;
    position: relative;
    z-index: 2;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
}

.navbar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition:
        transform 0.22s ease,
        opacity 0.22s ease;
}

.navbar.is-open .navbar-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar.is-open .navbar-toggle span:nth-child(2) {
    opacity: 0;
}

.navbar.is-open .navbar-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero-top-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

.hero-bottom-dark-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

.hero-left-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

.hero-content {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: 10rem;
    color: #fff;
    text-align: left;
}

.hero-content-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 600;
    line-height: 5rem;
    margin-bottom: 1rem;
    background: linear-gradient(
        110deg,
        #fff 35%,
        rgba(255, 255, 255, 0.45) 50%,
        #fff 65%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 10s ease-in-out infinite;
}

@keyframes shine {
    0%, 50% {
        background-position: 100% 0;
    }
    25% {
        background-position: 0% 0;
    }
}


.hero-content h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.hero-content-image {
    position: absolute;
    top: 100%;
    bottom: 0;
    left: -50%;
    margin: auto;
    aspect-ratio: 1/1;
    width: 95vw;
    opacity: 0.2;
}


.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* add constant rotation animation to the image */
.hero-content-image img {
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


.section {
    min-height: 100vh;
    width: 100%;
}

.services {
    background-color: #000;
    padding: 5rem;
    position: relative;
}

.services-header {
    margin-bottom: 2rem;
}

.services h2 {
    color: #fff;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.services-card {
    position: relative;
    width: max(15vw, 200px);
    aspect-ratio: 5/8;
    padding-top: 3rem;
}

.services-card > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.services-card-glow {
    z-index: 1;
    pointer-events: none;
    animation: card-glow 2.8s ease-in-out infinite;
}

@keyframes card-glow {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

.services h3 {
    position: relative;
    z-index: 2;
    color: #fffc;
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: .5rem;
}

.services p {
    position: relative;
    z-index: 2;
    width: 70%;
    margin: auto;
    color: #eeec;
    font-size: .9rem;
    text-align: center;
    margin-top: .5rem;
}



.services-card-button {
    position: absolute;
    z-index: 2;
    width: 40%;
    font-size: .8rem;
    padding: .5rem;
    bottom: 7%;
    left: 0;
    right: 0;
    margin: auto;
    text-align: center;
    text-decoration: none;
}

.services-card-asset {
    width: 50%;
    aspect-ratio: 1/1;
    margin: auto;
    position: relative;
    z-index: 2;
    border-radius: 50%;
    /* overflow: hidden; */
    background: radial-gradient(
        circle,
        #56e37333 20%,
        /* rgba(86, 227, 115, 0.08) 22%, */
        rgba(0, 0, 0, 0.8) 70%,
        #000 100%
    );
    border: 1px solid #fff7;
    box-shadow: 0 0 10px 0 #fff5;
    overflow: hidden;
}

.services-card-asset img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.services-potion-image {
    position: absolute;
    top: -15%;
    right: -30%;
    width: 100%;
    object-fit: cover;
    height: 80vw;
    aspect-ratio: 1/1;
}

.services-potion-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.about {
    height: 100vh;
    width: 100%;
    background-color: #000;
    padding: 5rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-bg-image {
    position: absolute;
    bottom: -20%;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.about-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, .95), rgba(0, 0, 0, 0));
}

.about-content-overlay-2 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

.about-content {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    position: relative;
}

.about-scroll-image {
    height: 100%;
    width: 100%;
    margin: auto;
    object-fit: contain;
    position: absolute;
}

.about-content-text {
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    margin: auto;
    width: 20%;
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.about-content-text h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #000d;
}

.about-content-text p {
    margin: 0 0 1em;
    color: #000c;
}

.about-content-text p:last-child {
    margin-bottom: 0;
}

.about-type-cursor::after {
    content: "";
    display: inline-block;
    width: 0.08em;
    height: 1em;
    margin-left: 0.12em;
    background: currentColor;
    vertical-align: -0.1em;
    animation: about-cursor-blink 0.55s step-end infinite;
}

@keyframes about-cursor-blink {
    50% {
        opacity: 0;
    }
}

.contact {
    min-height: 100vh;
    width: 100%;
    background-color: #000;
    position: relative;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    width: 100%;
    min-height: 100vh;
    padding: 10%;
    position: relative;
    z-index: 2;
}

.contact-content-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.contact-content-left form {
    position: relative;
    max-width: 80%;
    width: 30rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.wishlist-toast {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.85rem);
    z-index: 5;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.85rem;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
        rgba(6, 10, 8, 0.92);
    backdrop-filter: blur(12px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 28px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 10px) scale(0.96);
    transition:
        opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.35s;
}

.wishlist-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(1);
}

.wishlist-toast-badge {
    flex-shrink: 0;
    min-width: 4.4rem;
    padding: 0.28rem 0.45rem;
    border-radius: 0.45rem;
    font-family: "Carter One", cursive;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-align: center;
    line-height: 1.1;
    border: 1px solid transparent;
}

.wishlist-toast-text {
    font-size: 0.92rem;
    line-height: 1.35;
    color: #fffc;
}

.wishlist-toast.is-error {
    border-color: rgba(255, 106, 74, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 18px rgba(255, 90, 60, 0.18),
        0 10px 28px rgba(0, 0, 0, 0.35);
}

.wishlist-toast.is-error .wishlist-toast-badge {
    color: #2a0b06;
    background: linear-gradient(180deg, #ff9a78 0%, #ff5a3c 100%);
    border-color: rgba(90, 18, 8, 0.45);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 2px 0 rgba(90, 18, 8, 0.45);
}

.wishlist-toast.is-success {
    border-color: rgba(86, 227, 115, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 20px rgba(86, 227, 115, 0.22),
        0 10px 28px rgba(0, 0, 0, 0.35);
}

.wishlist-toast.is-success .wishlist-toast-badge {
    color: #062410;
    background: linear-gradient(180deg, #79f095 0%, #2fbf55 100%);
    border-color: rgba(8, 55, 22, 0.45);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 2px 0 #1b5429;
}

.contact-content-left form button {
    width: 100%;
}

.wishlist-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}

.wishlist-submit:disabled {
    cursor: wait;
}

.wishlist-submit:disabled:hover,
.wishlist-submit:disabled:active {
    --btn-lift: 0px;
    --btn-depth: 5px;
    --btn-glow: 0.28;
    filter: none;
}

.wishlist-submit-label {
    position: relative;
    z-index: 1;
}

.wishlist-submit-light {
    display: none;
    pointer-events: none;
}

.wishlist-submit.is-loading {
    --btn-glow: 0.62;
}

.wishlist-submit.is-loading .wishlist-submit-light {
    display: block;
    position: absolute;
    inset: -20% -40%;
    z-index: 0;
    background: linear-gradient(
        105deg,
        transparent 32%,
        rgba(255, 255, 255, 0.08) 42%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(214, 255, 190, 0.55) 54%,
        rgba(255, 255, 255, 0.12) 62%,
        transparent 72%
    );
    transform: translateX(-60%) skewX(-18deg);
    animation: wishlist-light-sweep 1.15s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.wishlist-submit.is-loading .wishlist-submit-label {
    letter-spacing: 0.08em;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.45),
        0 1px 0 rgba(255, 255, 255, 0.28);
    animation: wishlist-label-glow 1.15s ease-in-out infinite;
}

@keyframes wishlist-light-sweep {
    0% {
        transform: translateX(-70%) skewX(-18deg);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    88% {
        opacity: 1;
    }
    100% {
        transform: translateX(70%) skewX(-18deg);
        opacity: 0;
    }
}

@keyframes wishlist-label-glow {
    0%,
    100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.15);
    }
}

.contact-content-left input {
    width: 100%;
    padding: 1.3rem 1.1rem;
    /* border-radius: 0.5rem;
    border: 1px solid #fff7;
    background-color: #000;
    color: #fff; */
    color: #fffc;
    border-radius: 50px;
    background-color: #000c;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 10px 2px #fff2;
    outline: none;
}

.contact-content-left input:focus {
    box-shadow: inset 0 0 10px 2px #e5d59caa;
}

.contact-content-left textarea {
    width: 100%;
    height: 10rem;
    padding: 1.3rem 1.1rem;
    color: #fffc;
    border-radius: 2rem;
    background-color: #000c;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 10px 2px #fff2;
    outline: none;
    resize: none;
}

.contact-content-left textarea:focus {
    box-shadow: inset 0 0 10px 2px #e5d59caa;
}

.contact-content-right {
    width: 40%;
    max-width: 36rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.portal-gate {
    position: relative;
    width: 100%;
    aspect-ratio: 800 / 1221;
}

.portal-gate-video {
    position: absolute;
    left: 34%;
    top: 17%;
    width: 30%;
    height: 75%;
    object-fit: cover;
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
    border-radius: 50% 50% 0 0 / 28% 28% 0 0;
}

.portal-gate img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.portal-gate img.portal-gate-lighten {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    animation: portal-gate-pulse 4.5s ease-in-out infinite;
}

@keyframes portal-gate-pulse {
    0%,
    8% {
        opacity: 0;
    }
    14% {
        opacity: 1;
    }
    22% {
        opacity: 0;
    }
    28% {
        opacity: 0;
    }
    34% {
        opacity: 1;
    }
    42% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.portal-gate-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 60%;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3), transparent);
}

.contact-content h2 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 0;
}

.contact-content p {
    color: #eeec;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.contact-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.contact-bg-image {
    animation: opacity-infinite 10s infinite;
}

@keyframes opacity-infinite {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
}

.footer {
    position: relative;
    width: 100%;
    min-height: auto;
    background-color: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
}

.footer-bg-image {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.footer-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 5rem 5rem 1rem;
    gap: 3rem;
}

.footer-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    z-index: 2;
}

.footer-logo {
    width: 11rem;
    margin-bottom: 1.25rem;
    margin-left: -.6rem;
}

.footer-headline {
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    background: linear-gradient(
        110deg,
        #fff 35%,
        rgba(255, 255, 255, 0.45) 50%,
        #fff 65%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 10s ease-in-out infinite;
}

.footer-tagline {
    font-size: 1.05rem;
    font-weight: 400;
    color: #eeec;
    margin-bottom: 1.75rem;
    max-width: 28rem;
    line-height: 1.45;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-cta {
    text-decoration: none;
    display: inline-block;
}

.footer-email {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(86, 227, 115, 0.35);
}

.footer-email:hover {
    color: #fff;
    text-shadow: 0 0 16px rgba(86, 227, 115, 0.7);
}
.footer-nav {
    position: relative;
    display: flex;
    gap: 5rem;
    padding: 2rem 5rem;
}

.footer-link-col {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-link-col h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.35rem;
    letter-spacing: 0.04em;
}

.footer-link-col a {
    color: #fffc;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-link-col a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.footer-bar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-copy {
    color: #fff8;
    font-size: 0.9rem;
}

/* Service drawer (centered modal) */
.service-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.4s ease,
        visibility 0.4s ease;
}

.service-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.service-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 1000px;
    max-width: 90vw;
    height: 800px;
    max-height: 90vh;
    padding: 3rem;
    background: #000;
    /* background:
        linear-gradient(180deg, rgba(20, 40, 24, 0.55) 0%, rgba(0, 0, 0, 0) 28%),
        linear-gradient(165deg, #0c120e 0%, #050705 55%, #000 100%); */
    border: 1px solid rgba(219, 253, 226, 0.05);
    border-radius: 3rem;
    box-shadow:
        inset 0 -10px 1px 1px rgba(219, 253, 226, 0.05),
        0 28px 80px rgba(0, 0, 0, 1),
        0 0 0 1px rgba(0, 0, 0, 1);
    transform: translate(-50%, -42%) scale(0.92);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        visibility 0.45s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.service-modal.is-open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.service-modal.is-open .service-modal-panel:not([hidden]) {
    animation: service-modal-content-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes service-modal-content-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-modal-close {
    position: absolute;
    top: 1.85rem;
    right: 1.85rem;
    z-index: 2;
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #e8ffe9;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    transition: scale 0.2s ease;
}

.service-modal-close:hover {
    scale: 1.1;
}

.service-modal-close:focus-visible {
    outline: 2px solid rgba(86, 227, 115, 0.65);
    outline-offset: 2px;
}

.service-modal-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-right: -2.5rem;
    padding-bottom: 10%;
}

.service-modal-scroll-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.9), transparent);
    user-select: none;
    pointer-events: none;
}

.service-modal-scroll::-webkit-scrollbar {
    width: 10px;
}


.service-modal-panel[hidden] {
    display: none;
}

.service-modal-hero-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.service-modal-hero {
    display: block;
    width: 50%;
    min-width: 100px;
    max-width: 400px;
    min-height: 100px;
    max-height: 250px;
    margin: 0 auto 1.25rem;
    object-fit: contain;
    object-position: top;
    border-radius: 2rem;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}

.service-modal-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), transparent);
}

.service-modal h2 {
    color: rgba(238, 238, 204, 0.88);
    font-size: 2rem;
    text-align: center;
    margin: 0 0 1rem;
    line-height: 1.15;
    padding: 0 1.5rem;
}

.service-modal-body {
    color: rgba(238, 238, 204, 0.88);
    font-size: 1.05rem;
    line-height: 1.55;
    padding: 0 2rem 2.25rem;
    margin-right: 2rem;
}

.service-modal-body p {
    margin: 0 0 1rem;
}

.service-modal-features {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.service-modal-features li {
    position: relative;
    padding-left: 1.15rem;
    color: rgba(232, 255, 233, 0.9);
}

.service-modal-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #56e373;
    box-shadow: 0 0 0 2px rgba(86, 227, 115, 0.18);
}

.service-modal-media {
    margin: 1.35rem 0 1.6rem;
}

.service-modal-media figcaption {
    margin-top: 0.65rem;
    font-size: 0.92rem;
    line-height: 1.4;
    color: rgba(238, 238, 204, 0.62);
}

.service-modal-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 220px;
    padding: 1.5rem;
    border: 1.5px dashed rgba(86, 227, 115, 0.35);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(20, 40, 24, 0.45) 0%, rgba(0, 0, 0, 0.35) 100%),
        repeating-linear-gradient(
            -45deg,
            rgba(86, 227, 115, 0.04) 0,
            rgba(86, 227, 115, 0.04) 8px,
            transparent 8px,
            transparent 16px
        );
    text-align: center;
}

.service-modal-placeholder-label {
    color: #79f095;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.service-modal-placeholder-hint {
    max-width: 22rem;
    color: rgba(238, 238, 204, 0.72);
    font-size: 0.98rem;
    line-height: 1.4;
}

.service-modal-body img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    border-radius: 1rem;
    object-fit: contain;
}

@media (max-width: 600px) {
    .service-modal {
        width: min(94vw, 100%);
        max-height: min(90vh, 900px);
        border-radius: 1.1rem;
    }

    .service-modal-scroll {
        padding: 0;
    }

    .service-modal h2 {
        font-size: 1.55rem;
    }

    .service-modal-body {
        padding: 0 1.35rem 1.75rem;
        font-size: 1rem;
        margin-right: 0;
    }

    .service-modal-placeholder {
        min-height: 160px;
        padding: 1.15rem;
    }

    .service-modal-hero {
        max-height: min(36vh, 280px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-modal-backdrop {
        transition: opacity 0.15s ease, visibility 0.15s ease;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .service-modal {
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }

    .service-modal:not(.is-open),
    .service-modal.is-open {
        transform: translate(-50%, -50%) scale(1);
    }

    .service-modal-backdrop.is-open {
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }

    .service-modal.is-open .service-modal-panel:not([hidden]) {
        animation: none;
    }

    .wishlist-toast {
        transition: opacity 0.15s ease, visibility 0.15s ease;
        transform: translate(-50%, 0) scale(1);
    }

    .wishlist-toast.is-visible {
        transform: translate(-50%, 0) scale(1);
    }
}


/* Media Queries Start */
@media (max-width: 1800px) {
    .services p {
        font-size: .7rem;
    }

    .services h3 {
        font-size: 1rem;
    }

    .services-card-button {
        font-size: .6rem;
        padding: .4rem;
    }

    .about-content-text h3 {
        font-size: 1.1rem;
    }

    .about-content-text p {
        font-size: .8rem;
    }

    .footer-headline {
        font-size: 2.2rem;
    }
}

@media (max-width: 1200px) {
    .footer-content,
    .footer-nav,
    .footer-bar {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .footer-nav {
        gap: 3.5rem;
    }

    .footer-headline {
        font-size: 2rem;
    }
}

@media (max-width: 1000px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 4rem 2rem 0;
        gap: 1.5rem;
    }

    .footer-main {
        align-items: center;
        max-width: 100%;
    }

    .footer-tagline {
        max-width: 24rem;
    }

    .footer-actions {
        justify-content: center;
    }

    .footer-character {
        flex: none;
        width: min(65vw, 300px);
        max-width: none;
        margin-bottom: 0;
    }

    .footer-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 2.5rem;
        padding: 2rem;
        text-align: left;
    }

    .footer-bar {
        flex-direction: column;
        padding: 1.1rem 2rem;
        text-align: center;
    }
}

@media (max-width: 800px) {
    .footer-headline {
        font-size: 1.7rem;
    }

    .footer-tagline {
        font-size: 0.95rem;
    }

    .footer-nav {
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .navbar {
        justify-content: space-between;
        padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
        padding-top: max(10px, env(safe-area-inset-top));
    }

    .navbar.is-open {
        background: #000;
    }

    .navbar-logo {
        width: 7.5rem;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: calc(4.75rem + env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 2rem max(1.25rem, env(safe-area-inset-left));
        min-height: 100dvh;
        background: rgba(0, 0, 0, 0.96);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-0.5rem);
        transition:
            opacity 0.22s ease,
            visibility 0.22s ease,
            transform 0.22s ease;
    }

    .navbar.is-open .navbar-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .navbar-menu-item {
        font-size: 1.15rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .navbar-menu-item a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.35rem 0;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .hero-content {
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-start;
        padding: clamp(5.5rem, 12vw, 8rem) 1.25rem 0;
        gap: 1rem;
    }

    .hero-content-text {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 9vw, 3.25rem);
        line-height: 1.1;
    }

    .hero-content h2 {
        font-size: 1rem;
        line-height: 1.45;
        max-width: 36rem;
    }

    .hero-content h2 br {
        display: none;
    }

    .hero-image {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        height: auto;
        max-height: 40vh;
        margin-top: auto;
    }

    .hero-image img {
        height: 40vh;
        max-height: 40vh;
        object-fit: contain;
        object-position: center bottom;
    }

    .hero-content-image {
        top: 55%;
        left: -35%;
        width: 140vw;
        opacity: 0.12;
    }

    .hero-left-dark-overlay {
        width: 100%;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0));
    }

    .services {
        padding: 3rem 1.25rem;
    }

    .services h2 {
        font-size: 2.2rem;
    }

    .services-card {
        width: min(100%, 18rem);
    }

    .services h3 {
        font-size: 1.15rem;
    }

    .services p {
        font-size: 0.9rem;
    }

    .services-card-button {
        font-size: 0.8rem;
        padding: 0.5rem;
        width: 48%;
    }

    .services-potion-image {
        opacity: 0.18;
        right: -42%;
        top: -8%;
        pointer-events: none;
    }

    .about {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 5.5rem 1.25rem 3rem;
    }

    .about-content {
        min-height: min(90vh, 36rem);
    }

    .about-scroll-image {
        position: relative;
        height: auto;
        max-height: 90vh;
    }

    .about-content-text {
        width: min(78%, 22rem);
        top: 16%;
        height: auto;
        padding: 0.75rem 1rem 1.25rem;
    }

    .about-content-text h3 {
        font-size: 1.2rem;
    }

    .about-content-text p {
        font-size: 0.92rem;
    }

    .contact {
        min-height: auto;
    }

    .contact-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: auto;
        padding: 5.5rem 1.25rem 2.5rem;
        gap: 1.5rem;
    }

    .contact-content-left {
        align-items: center;
        width: 100%;
    }

    .contact-content-left form {
        width: 100%;
        max-width: 28rem;
    }

    .contact-content h2 {
        font-size: clamp(1.75rem, 7vw, 2.4rem);
    }

    .contact-content p {
        font-size: 1rem;
    }

    .contact-content-right {
        width: min(100%, 18rem);
        max-width: 18rem;
    }
}

@media (max-width: 600px) {

    #home {
        position: relative;
        top: 1px;
    }

    .portal-gate {
        display: none;
    }
    
    .services {
        padding: 2.5rem 1rem;
    }

    .services h2 {
        font-size: 1.85rem;
    }

    .services-potion-image {
        display: none;
    }

    .about {
        padding: 4.75rem 0.85rem 2.5rem;
    }

    .about-content-text {
        width: min(62%, 22rem);
        top: 27%;
        padding: 0.5rem 0.7rem 1rem;
    }

    .about-content-text h3 {
        font-size: 0.95rem;
    }

    .about-content-text p {
        font-size: 0.7rem;
    }

    .contact-content {
        padding: 4.75rem 1rem 2rem;
    }

    .contact-content-right {
        width: min(70%, 14rem);
        max-width: 14rem;
    }

    .footer-content,
    .footer-nav,
    .footer-bar {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .footer-headline {
        font-size: 1.45rem;
    }

    .footer-nav {
        gap: 1.5rem;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .main-button {
        font-size: 0.9rem;
        padding: 0.55rem 1.15rem;
    }

    .services .main-button {
        bottom: 2.5rem;
    }

    .hero-image img {
        height: 70vh;
        max-height: 500px;
        object-fit: cover;
        object-position: center bottom;
        bottom: 1rem;
        position: relative;
    }

    .hero-content-image  {
        opacity: 0;
    }
}
/* Media Queries End */

/* Services detail chambers */
.services-page {
    background: #000;
}

.chambers {
    background: #000;
    padding-top: 4.5rem;
}

.chamber {
    --chamber-accent: var(--primary-color);
    --chamber-glow: rgba(86, 227, 115, 0.14);
    --chamber-glow-mid: rgba(86, 227, 115, 0.05);
    --chamber-glow-soft: rgba(86, 227, 115, 0.018);
    --glow-x: 78%;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    scroll-margin-top: 5.5rem;
    padding: clamp(2.75rem, 5.5vw, 4.5rem) clamp(1.5rem, 6vw, 5rem);
    opacity: 0;
    min-height: 70vh;
    transform: translateY(20px);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.55s ease;
}

#leaderboards, #economy {
    padding: 0;
    position: relative;
}

#leaderboards .chamber-grid,
#economy .chamber-grid {
    min-height: 70vh;
}

#leaderboards .chamber-copy,
#economy .chamber-copy {
    align-self: center;
}

#leaderboards .chamber-visual,
#economy .chamber-visual {
    min-height: 70vh;
    align-self: stretch;
    align-items: flex-end;
}

#leaderboards .chamber-char {
    width: 80%;
    max-width: none;
    position: absolute;
    bottom: 0;
    left: 50%;
    translate: -50% 0;
    object-position: bottom center;
}

#economy .chamber-char-btn {
    position: absolute;
    bottom: 0;
    left: 50%;
    translate: -50% 0;
    width: 140%;
    max-width: none;
}

#economy .chamber-char {
    width: 100%;
    max-width: none;
    object-position: bottom center;
}

#analytics .chamber-char {
    width: 100%;
}

#vault .chamber-char {
    filter: unset;
}

.chamber.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.chamber--green {
    --chamber-accent: var(--primary-color);
    --chamber-glow: rgba(86, 227, 115, 0.14);
    --chamber-glow-mid: rgba(86, 227, 115, 0.05);
    --chamber-glow-soft: rgba(86, 227, 115, 0.018);
}

.chamber--ember {
    --chamber-accent: var(--ember-color);
    --chamber-glow: rgba(232, 93, 4, 0.16);
    --chamber-glow-mid: rgba(232, 93, 4, 0.06);
    --chamber-glow-soft: rgba(232, 93, 4, 0.02);
}

.chamber--live {
    --chamber-accent: var(--ember-color);
    --chamber-glow: rgba(232, 93, 4, 0.18);
    --chamber-glow-mid: rgba(232, 93, 4, 0.07);
    --chamber-glow-soft: rgba(232, 93, 4, 0.025);
}

.chamber--flip {
    --glow-x: 22%;
}

/* Soft forge atmosphere — wide wash, faint grain */
.chamber::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #000;
    background-image:
        radial-gradient(
            ellipse 95% 95% at var(--glow-x) 48%,
            var(--chamber-glow) 0%,
            var(--chamber-glow-mid) 38%,
            var(--chamber-glow-soft) 62%,
            transparent 88%
        ),
        radial-gradient(
            ellipse 140% 80% at 50% 110%,
            rgba(255, 255, 255, 0.018) 0%,
            transparent 58%
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.8 0 0 0 0 0.35 0 0 0 0.022 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: auto, auto, 180px 180px;
    background-position: center, center, center;
    opacity: 1;
    transition:
        opacity 0.55s ease,
        background-image 0.55s ease;
}

/* Soft black blend from the top bar into the first chamber */
.chamber:first-child {
    --glow-y: 58%;
}

.chamber:first-child::before {
    background-image:
        linear-gradient(
            180deg,
            #000 0%,
            #000 18%,
            rgba(0, 0, 0, 0.85) 32%,
            rgba(0, 0, 0, 0.35) 48%,
            transparent 68%
        ),
        radial-gradient(
            ellipse 95% 95% at var(--glow-x) var(--glow-y, 48%),
            var(--chamber-glow) 0%,
            var(--chamber-glow-mid) 38%,
            var(--chamber-glow-soft) 62%,
            transparent 88%
        ),
        radial-gradient(
            ellipse 140% 80% at 50% 110%,
            rgba(255, 255, 255, 0.018) 0%,
            transparent 58%
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.8 0 0 0 0 0.35 0 0 0 0.022 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: auto, auto, auto, 180px 180px;
}

.chamber--ember::before,
.chamber--live::before {
    background-image:
        radial-gradient(
            ellipse 95% 95% at var(--glow-x) 48%,
            var(--chamber-glow) 0%,
            var(--chamber-glow-mid) 38%,
            var(--chamber-glow-soft) 62%,
            transparent 88%
        ),
        radial-gradient(
            ellipse 140% 80% at 50% 110%,
            rgba(232, 93, 4, 0.03) 0%,
            transparent 58%
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.85 0 0 0 0 0.3 0 0 0 0 0.08 0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Soft black blend from the last ember chamber into the footer */
#live-pulse::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7.5rem;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        to top,
        #000 0%,
        rgba(0, 0, 0, 0.72) 38%,
        rgba(0, 0, 0, 0.28) 68%,
        transparent 100%
    );
}

.chamber-break,
.chamber-footer-break {
    position: relative;
    z-index: 5;
    height: 0;
    margin: 0;
    pointer-events: none;
    overflow: visible;
}

.chamber-break::before,
.chamber-break::after,
.chamber-footer-break::before,
.chamber-footer-break::after {
    content: "";
    position: absolute;
    top: 0;
    height: 1px;
    transform: translateY(-50%);
    pointer-events: none;
}

.chamber-break::before,
.chamber-footer-break::before {
    left: 4%;
    right: calc(50% + 1.65rem);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.12) 12%,
        rgba(255, 255, 255, 0.55) 72%,
        rgba(255, 255, 255, 0.85) 100%
    );
}

.chamber-break::after,
.chamber-footer-break::after {
    left: calc(50% + 1.65rem);
    right: 4%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.55) 28%,
        rgba(255, 255, 255, 0.12) 88%,
        transparent 100%
    );
}

.chamber-footer-break::before {
    right: calc(50% + 0.35rem);
}

.chamber-footer-break::after {
    left: calc(50% + 0.35rem);
}

.chamber-break-core {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 1;
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 50%;
    background: transparent;
    transform: translate(-50%, -50%);
}

.chamber-break-ring {
    position: absolute;
    inset: -18%;
    border-radius: 50%;
    background: url("assets/spell_ring_transparent.png") center / contain no-repeat;
    mix-blend-mode: screen;
    animation: chamber-break-spin 48s linear infinite;
}

@keyframes chamber-break-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.chamber-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
    gap: clamp(1.75rem, 4.5vw, 4rem);
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
}

.chamber--flip .chamber-grid {
    direction: rtl;
}

.chamber--flip .chamber-grid > * {
    direction: ltr;
}

.chamber-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    max-width: 34rem;
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s,
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s;
}

.chamber.is-visible .chamber-copy {
    opacity: 1;
    transform: translateY(0);
}

.chamber-label {
    margin: 0;
    color: var(--chamber-accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: color 0.4s ease;
}

.chamber-title,
.services-page .chamber-title,
.services-page .chamber h1.chamber-title,
.services-page .chamber h2.chamber-title {
    margin: 0;
    color: #fff !important;
    font-size: clamp(1.85rem, 3.6vw, 2.85rem);
    line-height: 1.12;
    letter-spacing: 0.01em;
}

.services-page .chamber-label {
    color: var(--chamber-accent);
}

.chamber--ember .chamber-label,
.chamber--live .chamber-label,
.chamber--ember .chamber-title,
.chamber--live .chamber-title {
    color: #fff !important;
}

.chamber-body {
    margin: 0;
    color: rgba(238, 238, 220, 0.72);
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    line-height: 1.55;
}

.chamber-bullets {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.chamber-bullets--row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
}

.chamber-bullets li {
    position: relative;
    padding-left: 1.15rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.98rem;
    line-height: 1.4;
}

.chamber-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 0.45rem;
    height: 0.45rem;
    background: var(--chamber-accent);
    transition: background 0.35s ease;
}

.chamber-bullets--cycle li {
    padding-left: 0;
}

.chamber-bullets--cycle li::before {
    display: none;
}

.chamber-bullets--command li {
    padding-left: 0;
}

.chamber-bullets--command li::before {
    display: none;
}

.chamber-caption {
    margin: 0;
    color: rgba(238, 238, 220, 0.55);
    font-size: 0.92rem;
    line-height: 1.4;
}

#command .chamber-caption {
    min-height: 2.8em;
}

.chamber-action {
    appearance: none;
    border: 1px solid rgba(86, 227, 115, 0.45);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    padding: 0.55rem 1.2rem;
    border-radius: 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

.chamber-action:hover:not(:disabled) {
    background: rgba(86, 227, 115, 0.14);
    transform: translateY(-1px);
}

.chamber--ember .chamber-action,
.chamber-action--ember {
    border-color: rgba(232, 93, 4, 0.55);
}

.chamber--ember .chamber-action:hover:not(:disabled),
.chamber-action--ember:hover:not(:disabled) {
    background: rgba(232, 93, 4, 0.16);
}

.chamber-action:disabled {
    opacity: 0.65;
    cursor: default;
}

.chamber-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: clamp(380px, 50vw, 640px);
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
}

.chamber.is-visible .chamber-visual {
    opacity: 1;
    transform: translateY(0);
}

.chamber-char-btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 0.5rem;
}

.chamber-char-btn:focus-visible {
    outline: 2px solid rgba(86, 227, 115, 0.65);
    outline-offset: 6px;
}

.chamber-action:focus-visible,
.realm-toggle-btn:focus-visible,
.command-mod:focus-visible {
    outline: 2px solid rgba(86, 227, 115, 0.65);
    outline-offset: 3px;
}

/* Uniform large characters — no float */
.chamber-char {
    position: relative;
    z-index: 1;
    width: 800px;
    max-width: 60vw;
    object-fit: contain;
    filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5));
    animation: none;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.4s ease;
}

.chamber-ring {
    position: absolute;
    z-index: 0;
    width: min(120%, 820px);
    height: auto;
    opacity: 0.88;
    animation: none;
    transition:
        opacity 0.45s ease,
        filter 0.45s ease;
}

/* ——— Identity portal — segmented rune arcs ——— */
.chamber-portal-gate {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.chamber-portal-gate-svg {
    width: min(88%, 560px);
    aspect-ratio: 1;
    overflow: visible;
}

.portal-seg {
    fill: none;
    stroke-linecap: round;
    transform-origin: 100px 100px;
    transition:
        stroke 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.55s ease,
        filter 0.55s ease;
}

.portal-seg--outer {
    stroke: rgba(86, 227, 115, 0.28);
    stroke-width: 1.6;
    stroke-dasharray: 28 18 10 18 34 22;
    stroke-dashoffset: 40;
    opacity: 0.55;
}

.portal-seg--mid {
    stroke: rgba(86, 227, 115, 0.38);
    stroke-width: 2.2;
    stroke-dasharray: 42 24 16 20;
    stroke-dashoffset: 60;
    opacity: 0.5;
}

.portal-seg--inner {
    stroke: rgba(86, 227, 115, 0.45);
    stroke-width: 1.4;
    stroke-dasharray: 18 14 8 16 22 12;
    stroke-dashoffset: 30;
    opacity: 0.6;
}

.portal-bloom {
    position: absolute;
    width: min(70%, 400px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(86, 227, 115, 0.16) 0%,
        rgba(86, 227, 115, 0.04) 45%,
        transparent 72%
    );
    opacity: 0.35;
    transform: scale(0.85);
    filter: blur(4px);
    transition:
        opacity 0.7s ease,
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.chamber.is-portal-open .portal-seg--outer {
    stroke: rgba(140, 255, 180, 0.75);
    stroke-dashoffset: 0;
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(86, 227, 115, 0.35));
}

.chamber.is-portal-open .portal-seg--mid {
    stroke: rgba(86, 227, 115, 0.85);
    stroke-dashoffset: 0;
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(86, 227, 115, 0.4));
}

.chamber.is-portal-open .portal-seg--inner {
    stroke: rgba(200, 255, 220, 0.9);
    stroke-dashoffset: 0;
    opacity: 1;
}

.chamber.is-portal-open .portal-bloom {
    opacity: 1;
    transform: scale(1.12);
}

.chamber.is-portal-open .chamber-char {
    filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.45))
        drop-shadow(0 0 28px rgba(86, 227, 115, 0.2));
}

.chamber.is-portal-shimmer .portal-bloom {
    animation: portal-bloom-pulse 0.95s ease;
}

.chamber.is-portal-shimmer .portal-seg--mid {
    animation: portal-arc-flash 0.95s ease;
}

@keyframes portal-bloom-pulse {
    0% {
        opacity: 0.55;
        transform: scale(0.95);
        filter: blur(4px) brightness(1);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
        filter: blur(6px) brightness(1.55);
    }
    100% {
        opacity: 1;
        transform: scale(1.12);
        filter: blur(4px) brightness(1);
    }
}

@keyframes portal-arc-flash {
    0% {
        filter: brightness(1);
    }
    35% {
        filter: brightness(1.8) drop-shadow(0 0 14px rgba(86, 227, 115, 0.6));
    }
    100% {
        filter: brightness(1) drop-shadow(0 0 10px rgba(86, 227, 115, 0.4));
    }
}

/* ——— Two Realms ——— */
.chamber-visual--blend {
    overflow: hidden;
}

.realm-heat {
    position: absolute;
    top: -2%;
    left: 50%;
    z-index: 0;
    width: 62%;
    height: 48%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(86, 227, 115, 0.28) 0%,
        rgba(86, 227, 115, 0.08) 42%,
        transparent 72%
    );
    filter: blur(22px);
    opacity: 0.78;
    transform: translateX(-50%) rotate(-18deg) translateY(-8%);
    transition:
        background 0.55s ease,
        opacity 0.55s ease;
    pointer-events: none;
}

.chamber.is-realm-live .realm-heat,
.chamber--live .realm-heat {
    background: radial-gradient(
        circle,
        rgba(232, 93, 4, 0.32) 0%,
        rgba(232, 93, 4, 0.1) 42%,
        transparent 72%
    );
    opacity: 0.9;
}

.chamber.is-realm-live .chamber-ring,
.chamber--live .chamber-ring {
    opacity: 1;
    filter: saturate(1.15) brightness(1.05);
}

.chamber.is-realm-pulse .realm-heat {
    animation: chamber-realm-glow 0.7s ease;
}

@keyframes chamber-realm-glow {
    0% {
        opacity: 0.65;
        filter: blur(22px) brightness(1);
        transform: translateX(-50%) rotate(-18deg) translateY(-8%);
    }
    40% {
        opacity: 1;
        filter: blur(28px) brightness(1.3);
        transform: translateX(-50%) rotate(-14deg) translateY(-10%) scale(1.08);
    }
    100% {
        opacity: 0.9;
        filter: blur(22px) brightness(1);
        transform: translateX(-50%) rotate(-18deg) translateY(-8%);
    }
}

/* ——— Two Realms — green ↔ orange wipe ——— */
@property --wipe {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 0%;
}

#two-realms {
    --wipe: 0%;
    --chamber-accent: var(--primary-color);
    transition: --wipe 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

#two-realms.is-realm-live,
#two-realms.chamber--live {
    --wipe: 100%;
    --chamber-accent: var(--ember-color);
    --chamber-glow: rgba(232, 93, 4, 0.16);
    --chamber-glow-mid: rgba(232, 93, 4, 0.06);
    --chamber-glow-soft: rgba(232, 93, 4, 0.02);
}

/* Keep a steady green chamber wash; color swap is the wipe layers */
#two-realms::before {
    background-color: #000;
    background-image:
        radial-gradient(
            ellipse 95% 95% at var(--glow-x) 48%,
            rgba(86, 227, 115, 0.14) 0%,
            rgba(86, 227, 115, 0.05) 38%,
            rgba(86, 227, 115, 0.018) 62%,
            transparent 88%
        ),
        radial-gradient(
            ellipse 140% 80% at 50% 110%,
            rgba(255, 255, 255, 0.018) 0%,
            transparent 58%
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.8 0 0 0 0 0.35 0 0 0 0.022 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: auto, auto, 180px 180px;
}

.realm-atmosphere {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.realm-layer {
    position: absolute;
    inset: 0;
}

.realm-layer--green {
    background:
        radial-gradient(
            ellipse 90% 85% at 28% 45%,
            rgba(86, 227, 115, 0.28) 0%,
            rgba(40, 140, 80, 0.1) 42%,
            transparent 72%
        ),
        radial-gradient(
            ellipse 70% 60% at 70% 70%,
            rgba(86, 227, 115, 0.1) 0%,
            transparent 65%
        ),
        linear-gradient(
            160deg,
            rgba(12, 36, 20, 0.72) 0%,
            rgba(4, 12, 8, 0.35) 55%,
            rgba(2, 8, 4, 0.15) 100%
        );
    z-index: 0;
}

.realm-layer--orange {
    background:
        radial-gradient(
            ellipse 90% 85% at 72% 48%,
            rgba(255, 120, 40, 0.32) 0%,
            rgba(232, 93, 4, 0.12) 42%,
            transparent 72%
        ),
        radial-gradient(
            ellipse 70% 60% at 30% 70%,
            rgba(232, 93, 4, 0.12) 0%,
            transparent 65%
        ),
        linear-gradient(
            200deg,
            rgba(48, 16, 4, 0.78) 0%,
            rgba(24, 8, 2, 0.4) 55%,
            rgba(12, 4, 0, 0.18) 100%
        );
    z-index: 1;
    /* Hidden on the right; expands left→right on LIVE */
    clip-path: inset(0 calc(100% - var(--wipe)) 0 0);
    transition: clip-path 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.realm-wipe-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--wipe);
    z-index: 2;
    width: 3px;
    translate: -50% 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 245, 210, 0.15) 12%,
        rgba(255, 240, 200, 0.95) 50%,
        rgba(255, 245, 210, 0.15) 88%,
        transparent 100%
    );
    box-shadow:
        0 0 12px 2px rgba(255, 220, 150, 0.55),
        0 0 36px 8px rgba(86, 227, 115, 0.22),
        0 0 36px 8px rgba(232, 93, 4, 0.22);
    opacity: 0;
    transition:
        left 0.85s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease,
        box-shadow 0.4s ease;
}

/* Line visible while sweeping; soft fade at the ends */
#two-realms.is-realm-wiping .realm-wipe-line {
    opacity: 1;
}

#two-realms.is-realm-live .realm-wipe-line,
#two-realms.chamber--live .realm-wipe-line {
    box-shadow:
        0 0 14px 3px rgba(255, 200, 120, 0.65),
        0 0 40px 10px rgba(232, 93, 4, 0.35);
}

#two-realms.is-realm-live .realm-heat,
#two-realms.chamber--live .realm-heat {
    background: radial-gradient(
        circle,
        rgba(255, 140, 50, 0.36) 0%,
        rgba(232, 93, 4, 0.12) 42%,
        transparent 72%
    );
}

/* Two Realms — larger maze, bubble, and figure */
#two-realms .chamber-visual {
    min-height: clamp(440px, 56vw, 720px);
}

#two-realms .chamber-ring {
    width: min(165%, 720px);
    max-width: 60vw;
}

/* ——— Vault — treasure glow + ring ——— */
.vault-glow {
    position: absolute;
    z-index: 0;
    width: 68%;
    height: 58%;
    bottom: 6%;
    left: 50%;
    translate: -50% 0;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(232, 176, 48, 0.28) 0%,
        rgba(86, 227, 115, 0.1) 42%,
        transparent 72%
    );
    filter: blur(28px);
    opacity: 0.9;
    pointer-events: none;
    animation: vault-glow-breathe 4.2s ease-in-out infinite;
}

@keyframes vault-glow-breathe {
    0%,
    100% {
        opacity: 0.75;
        transform: scale(0.96);
    }
    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

#vault .chamber-ring {
    width: min(118%, 780px);
    opacity: 0.72;
    filter: saturate(0.85) brightness(1.05);
}

#vault .chamber-char {
    width: min(100%, 820px);
    max-height: 760px;
}

#vault .vault-char-glow {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

#vault .chamber-visual:hover .vault-char-glow,
#vault .chamber-visual:focus-within .vault-char-glow {
    opacity: 1;
}

/* ——— War Table ——— */
.war-board {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.3rem 1.25rem;
    align-items: baseline;
    padding: 1.1rem 1.35rem;
    border-left: 3px solid var(--ember-color);
    background: rgba(232, 93, 4, 0.06);
    min-width: min(100%, 20rem);
    transition:
        background 0.35s ease,
        box-shadow 0.35s ease;
}

.war-board.is-flash {
    animation: war-board-flash 0.55s ease;
}

@keyframes war-board-flash {
    0% {
        background: rgba(232, 93, 4, 0.06);
        box-shadow: none;
    }
    35% {
        background: rgba(232, 93, 4, 0.22);
        box-shadow: 0 0 28px rgba(232, 93, 4, 0.35);
    }
    100% {
        background: rgba(232, 93, 4, 0.06);
        box-shadow: none;
    }
}

.war-board-label {
    grid-column: 1;
    color: rgba(238, 238, 220, 0.55);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.war-board-rank {
    grid-column: 2;
    color: #fff;
    font-size: 2.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

.chamber.is-war-climbed .war-board-rank {
    color: #ffb347;
}

.war-board-ticks {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.war-board-ticks span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.3s ease;
}

.war-board-ticks span.is-on {
    background: rgba(232, 93, 4, 0.85);
}

.chamber-char.is-clashing {
    animation: war-ember-spark 0.5s ease;
}

@keyframes war-ember-spark {
    0% {
        filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5)) brightness(1);
    }
    40% {
        filter: drop-shadow(0 18px 40px rgba(232, 93, 4, 0.45)) brightness(1.22);
    }
    100% {
        filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5)) brightness(1);
    }
}

/* ——— economy ——— */
.economy-meter {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    width: fit-content;
}

.economy-gold-wrap {
    position: relative;
    display: inline-block;
}

.economy-gold {
    color: #ffc857;
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.economy-gold-label {
    color: rgba(238, 238, 220, 0.5);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.economy-ledger {
    position: absolute;
    right: -3rem;
    bottom: -0.5em;
    margin: 0;
    white-space: nowrap;
    color: #ffc857;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.economy-ledger.is-flash {
    opacity: 1;
}

/* ——— Entity Support ——— */
#codex .chamber-char {
    width: min(62%, 480px);
    max-width: 48vw;
}

/* ——— Management System / Real Live Updates ——— */
#command .chamber-char,
#live-pulse .chamber-char {
    width: min(62%, 480px);
    max-width: 48vw;
}

/* ——— Command ——— */
.command-mod {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font: inherit;
    text-align: left;
    padding: 0.15rem 0 0.15rem 1.15rem;
    cursor: pointer;
    position: relative;
    width: 100%;
    transition: color 0.25s ease;
}

.command-mod::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.45rem;
    height: 0.45rem;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.command-mod:hover,
.command-mod.is-active,
.command-mod:focus-visible {
    color: #fff;
    outline: none;
}

.command-mod:hover::before,
.command-mod.is-active::before,
.command-mod:focus-visible::before {
    background: var(--chamber-accent);
    box-shadow: 0 0 10px var(--chamber-glow);
}

.command-nodes {
    position: absolute;
    inset: 8% 6%;
    z-index: 2;
    pointer-events: none;
}

.command-node {
    position: absolute;
    padding: 0.4rem 0.75rem;
    border-radius: 0.4rem;
    border: 1px solid var(--chamber-glow);
    background: rgba(0, 0, 0, 0.3);
    color: rgba(238, 238, 220, 0.28);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.08;
    transform: translateY(0);
    transition:
        opacity 0.35s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.3s ease;
}

.command-node[data-node="keys"] {
    top: 12%;
    left: 8%;
}

.command-node[data-node="dash"] {
    top: 8%;
    right: 10%;
}

.command-node[data-node="rev"] {
    bottom: 18%;
    left: 14%;
}

.command-node.is-lit {
    opacity: 1;
    color: #e8ffe8;
    border-color: var(--chamber-accent);
    background: rgba(0, 0, 0, 0.62);
    box-shadow: 0 0 28px var(--chamber-glow);
    animation: command-node-bob 1.8s ease-in-out infinite;
}

@keyframes command-node-bob {
    0%,
    100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.18);
    }
}

/* ——— Live Pulse — ring ripple ——— */
.chamber-broadcast {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    width: min(62%, 480px);
    max-width: 48vw;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.chamber-broadcast::before,
.chamber-broadcast::after {
    content: "";
    position: absolute;
    width: 82%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid rgba(232, 93, 4, 0.5);
    box-shadow: 0 0 24px rgba(232, 93, 4, 0.25);
    opacity: 0;
    transform: scale(0.55);
}

.chamber-broadcast.is-broadcasting {
    opacity: 1;
}

.chamber-broadcast.is-broadcasting::before {
    animation: publish-ripple 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.chamber-broadcast.is-broadcasting::after {
    animation: publish-ripple 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
}

@keyframes publish-ripple {
    0% {
        opacity: 0.85;
        transform: scale(0.55);
    }
    100% {
        opacity: 0;
        transform: scale(1.55);
    }
}

.pulse-sync {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
}

.pulse-sync-count {
    color: var(--chamber-accent);
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pulse-sync-label {
    color: rgba(238, 238, 220, 0.5);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chamber-publish {
    margin-top: 0.1rem;
    font-size: 1rem;
    padding: 0.65rem 1.5rem;
}

.chamber-char.is-anvil-hit {
    animation: anvil-hit 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes anvil-hit {
    0% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(10px);
    }
    60% {
        transform: translateY(4px);
    }
    100% {
        transform: translateY(0);
    }
}

/* ——— analytics — floating speech near face ——— */
.analytics-whisper {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 48%;
    max-width: min(48%, 16rem);
    margin: 0;
    padding: 0.55rem 0.8rem;
    border-radius: 1rem 1rem 1rem 0.3rem;
    border: 1px solid rgba(232, 93, 4, 0.45);
    background: rgba(24, 10, 4, 0.82);
    color: rgba(238, 238, 220, 0.95);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.analytics-whisper::before {
    content: "";
    position: absolute;
    left: 1rem;
    bottom: -7px;
    width: 12px;
    height: 12px;
    background: rgba(24, 10, 4, 0.82);
    border-right: 1px solid rgba(232, 93, 4, 0.45);
    border-bottom: 1px solid rgba(232, 93, 4, 0.45);
    transform: rotate(45deg);
}

.analytics-whisper.is-visible,
.analytics-whisper.is-typing {
    opacity: 1;
}

.analytics-whisper.is-typing::after {
    content: "▍";
    display: inline-block;
    margin-left: 1px;
    animation: analytics-caret 0.7s step-end infinite;
}

@keyframes analytics-caret {
    50% {
        opacity: 0;
    }
}

.chamber-char.is-reading {
    animation: analytics-glow 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes analytics-glow {
    0% {
        filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5)) brightness(1);
    }
    40% {
        filter: drop-shadow(0 20px 42px rgba(232, 93, 4, 0.35)) brightness(1.12);
    }
    100% {
        filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5)) brightness(1);
    }
}

.realm-toggle {
    display: inline-flex;
    gap: 0.55rem;
    margin-top: 0.25rem;
}

.realm-toggle-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    color: #fff;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

.realm-toggle-btn:hover {
    transform: translateY(-1px);
}

.realm-toggle-btn.is-active {
    background: var(--chamber-accent);
    border-color: var(--chamber-accent);
    color: #062410;
    box-shadow: 0 0 18px rgba(86, 227, 115, 0.28);
}

.chamber--live .realm-toggle-btn.is-active {
    color: #fff;
    box-shadow: 0 0 18px rgba(232, 93, 4, 0.35);
}

@media (max-width: 900px) {
    .chamber-break-core {
        width: 2.65rem;
        height: 2.65rem;
    }

    .chamber-break::before {
        left: 5%;
        right: calc(50% + 1.4rem);
    }

    .chamber-break::after {
        left: calc(50% + 1.4rem);
        right: 5%;
    }

    .chamber {
        padding: clamp(2.25rem, 6vw, 3.25rem) clamp(1.15rem, 5vw, 2rem);
        min-height: 0;
    }

    #leaderboards,
    #economy {
        padding: clamp(2.25rem, 6vw, 3.25rem) clamp(1.15rem, 5vw, 2rem);
        padding-bottom: 0;
    }

    #leaderboards .chamber-grid,
    #leaderboards .chamber-visual,
    #economy .chamber-grid,
    #economy .chamber-visual {
        min-height: 0;
    }

    .chamber-grid,
    .chamber--flip .chamber-grid {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 1.35rem;
    }

    .chamber-copy {
        max-width: none;
        order: 1;
        gap: 0.75rem;
        width: 100%;
    }

    .chamber-visual {
        order: 2;
        min-height: 0;
        max-width: 100%;
        overflow: hidden;
    }

    #analytics .chamber-visual {
        overflow: visible;
    }

    .chamber-char {
        width: min(100%, 420px);
        max-width: 100%;
        max-height: 280px;
        position: relative;
        bottom: auto;
    }

    .chamber-action,
    .realm-toggle-btn {
        min-height: 44px;
    }

    .realm-toggle {
        flex-wrap: wrap;
        width: 100%;
    }

    .chamber-ring {
        width: min(100%, 420px);
    }

    .war-board {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .command-nodes {
        inset: 4% 2%;
    }

    .command-node {
        font-size: 0.65rem;
    }

    .command-mod {
        min-height: 44px;
        width: 100%;
    }

    .chamber-portal-gate-svg {
        width: min(92%, 400px);
    }

    #leaderboards .chamber-char,
    #economy .chamber-char,
    #analytics .chamber-char {
        width: min(100%, 420px);
        max-width: 100%;
        max-height: 280px;
        position: relative;
        bottom: auto;
        left: auto;
        translate: none;
    }

    #economy .chamber-char-btn {
        position: relative;
        bottom: auto;
        left: auto;
        translate: none;
        width: 100%;
        max-width: 100%;
    }

    #vault .chamber-char {
        width: min(100%, 420px);
        max-height: 280px;
    }

    #vault .chamber-ring {
        width: min(110%, 480px);
    }

    .economy-ledger {
        font-size: 0.82rem;
        max-width: 100%;
    }

    #two-realms .chamber-visual {
        min-height: 0;
    }

    #two-realms .chamber-ring {
        width: min(110%, 480px);
    }

    #two-realms .chamber-char {
        width: min(100%, 420px);
        max-height: 280px;
    }

    #two-realms .realm-heat {
        width: 70%;
        height: 52%;
    }

    .analytics-whisper {
        top: -1.15rem;
        left: 50%;
        translate: -50% 0;
        width: max-content;
        max-width: calc(100% - 1.25rem);
        margin-top: 0;
        padding: 0.45rem 0.7rem;
        font-size: 0.78rem;
        line-height: 1.35;
        overflow-wrap: break-word;
        box-sizing: border-box;
    }

    .analytics-whisper::before {
        left: 50%;
        margin-left: -6px;
    }

    #codex .chamber-char,
    #command .chamber-char,
    #live-pulse .chamber-char {
        width: min(100%, 360px);
        max-width: 100%;
        max-height: 280px;
    }

    /* First chamber: fade atmosphere + portal into the break instead of a hard clip */
    #authentication {
        padding-bottom: 3.5rem;
        -webkit-mask-image: linear-gradient(
            180deg,
            #000 0%,
            #000 calc(100% - 6.5rem),
            transparent 100%
        );
        mask-image: linear-gradient(
            180deg,
            #000 0%,
            #000 calc(100% - 6.5rem),
            transparent 100%
        );
    }

    #authentication .chamber-visual {
        overflow: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chamber {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .chamber-copy,
    .chamber-visual {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .chamber-char,
    .chamber-ring,
    .chamber-break-ring,
    .command-node.is-lit {
        animation: none !important;
        transition: none;
    }

    .chamber-broadcast.is-broadcasting::before,
    .chamber-broadcast.is-broadcasting::after {
        animation: none;
        opacity: 0.35;
        transform: scale(1.4);
    }

    .portal-seg,
    .portal-bloom,
    .realm-heat,
    .realm-layer--orange,
    .realm-wipe-line,
    .vault-glow,
    .vault-char-glow,
    .command-node,
    .economy-ledger,
    .analytics-whisper {
        transition: none;
        animation: none !important;
    }

    #two-realms {
        transition: none;
    }

    .chamber.is-portal-shimmer .portal-bloom,
    .chamber.is-portal-shimmer .portal-seg--mid,
    .chamber.is-realm-pulse .realm-heat,
    .chamber-char.is-clashing,
    .chamber-char.is-anvil-hit,
    .chamber-char.is-reading,
    .war-board.is-flash {
        animation: none;
    }

    .portrait-lock-phone-body {
        animation: none;
        transform: none;
    }
}

