/* Team Filtered — shared site styles. */

:root {
    --bg: #0b0c0e;
    --bg-deep: #070809;
    --surface: #131518;
    --surface-raised: #181b1e;
    --section-bg: rgba(19, 21, 24, 0.68);
    --section-width: 90vw;

    --text: #f2f4f2;
    --text-soft: #d6dbd7;
    --muted: #9ba39d;

    --green: #5fe894;
    --green-deep: #2fbd70;
    --mint: #a7f7c3;
    --lime: #d6f87e;
    --cream: #f0f0e7;

    --border: rgba(235, 245, 239, 0.14);
    --border-strong: rgba(235, 245, 239, 0.26);

    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-pixel: "Press Start 2P", "Courier New", monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 8rem;
}

body {
    min-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(95, 232, 148, 0.3);
    color: white;
}

:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 3px;
}

img,
video {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 0.7em;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    text-wrap: balance;
}

h1,
h2 {
    font-family: var(--font-pixel);
    font-weight: 400;
    line-height: 1.7;
}

h1 {
    color: var(--cream);
    font-size: clamp(1.55rem, 3.2vw, 2.5rem);
}

h2 {
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
}

h3 {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--green);
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--mint);
}

h2 a,
h3 a {
    color: inherit;
    text-decoration: none;
}

h2 a:hover,
h3 a:hover {
    color: var(--green);
}

strong {
    color: var(--cream);
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* ── Skip link ── */

.skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 100;
    padding: 0.75rem 1.1rem;
    background: var(--green);
    color: #062114;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
    color: #062114;
}

/* ── Navigation ── */

nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.75rem clamp(1rem, 4vw, 3rem);
    background: var(--surface);
    border-bottom: 2px solid var(--green);
}

nav > a {
    display: flex;
    flex: none;
}

nav img {
    width: 5rem;
    height: auto;
    padding: 0;
    transition: transform 0.2s ease;
}

nav img:hover {
    transform: scale(1.06) rotate(-1deg);
}

nav > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(0.35rem, 1.2vw, 1rem);
}

nav > div a {
    position: relative;
    padding: 0.55rem 0.35rem;
    color: var(--text-soft);
    font-family: var(--font-pixel);
    font-size: 0.58rem;
    line-height: 1.6;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

nav > div a::after {
    content: "";
    position: absolute;
    right: 0.35rem;
    bottom: 0.1rem;
    left: 0.35rem;
    height: 2px;
    background: linear-gradient(90deg, var(--green), var(--mint));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

nav > div a:hover {
    color: var(--text);
    text-decoration: none;
}

nav > div a:hover::after {
    transform: scaleX(1);
}

/* ── Layout ── */

main {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
}

main > section,
main > .story > section {
    width: var(--section-width);
    margin: clamp(0.75rem, 0.9vw, 1.25rem) auto;
    padding: clamp(1.5rem, 3vw, 3rem);
    background: var(--section-bg);
    border: 1px solid var(--border);
    scroll-margin-top: 8rem;
}

main > .story {
    width: 100%;
}

main > section > h2,
main > .story > section > h2 {
    margin-bottom: 1rem;
    color: var(--mint);
}

main > section > h2::before,
main > .story > section > h2::before {
    content: "";
    display: inline-block;
    width: 0.5em;
    height: 0.5em;
    margin-right: 0.6em;
    background: linear-gradient(135deg, var(--green), var(--mint));
    transform: translateY(-0.08em) rotate(45deg);
}

main > section > p,
main > .story > section > p {
    max-width: none;
    color: var(--text-soft);
}

header.story {
    width: 100%;
    padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) 1.5rem;
    text-align: center;
}

header.story h1,
main > .story h1 {
    margin-bottom: 0.5rem;
    color: var(--cream);
}

header.story p {
    max-width: none;
    color: var(--text-soft);
}

/* ── Hero ── */

.hero {
    position: relative;
    width: 100%;
    min-height: min(88vh, 60rem);
    padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem)
        clamp(4rem, 8vw, 7rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    top: 48%;
    left: 50%;
    z-index: -1;
    width: min(46rem, 90vw);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(95, 232, 148, 0.18),
        transparent 68%
    );
    pointer-events: none;
}

.logo {
    width: min(34rem, 82vw);
    height: auto;
    filter: drop-shadow(0 0 1.5rem rgba(95, 232, 148, 0.35));
    animation: logo-float 7s ease-in-out infinite;
}

@keyframes logo-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero h1 {
    max-width: 26ch;
    margin: 1.75rem auto 0.75rem;
    color: var(--cream);
    font-size: clamp(1.3rem, 2.9vw, 2.1rem);
    font-weight: 400;
    line-height: 1.7;
}

#typing {
    max-width: 52ch;
    min-height: 1.8em;
    margin: 0.35rem auto 0;
    color: var(--green);
    font-size: 1rem;
    line-height: 1.7;
}

#typing::after {
    content: "|";
    margin-left: 0.1em;
    color: var(--green);
    font-weight: 300;
    animation: caret-blink 1.1s steps(1) infinite;
}

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

/* ── Buttons and links ── */

.link-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.9rem;
    margin-top: 2rem;
}

.link-btns a {
    color: #062114;
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1rem 1.4rem;
    background: linear-gradient(180deg, #a6f3c0, var(--green));
    color: #062114;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 0.3rem 0 var(--green-deep),
        0 1rem 2rem rgba(0, 0, 0, 0.25);
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    line-height: 1.6;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease,
        color 0.15s ease;
}

.btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
}

.btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(180deg, #c9f8d9, var(--mint));
    border-color: transparent;
    color: #062114;
    box-shadow:
        0 0.45rem 0 var(--green-deep),
        0 1.2rem 2.4rem rgba(0, 0, 0, 0.25);
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 0.1rem 0 var(--green-deep);
}

.link-logo {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
}

.other_page {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--green);
    font-family: var(--font-pixel);
    font-size: 0.58rem;
    line-height: 1.8;
    text-decoration: none;
    text-transform: uppercase;
}

.other_page::after {
    content: "→";
    font-family: var(--font-body);
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.other_page:hover {
    color: var(--mint);
    text-decoration: underline;
}

.other_page:hover::after {
    transform: translateX(0.25rem);
}

/* ── Galleries ── */

.gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.gallery-item {
    flex: 1 1 16rem;
    min-width: 0;
    max-width: 24rem;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-item img,
.gallery-item video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 30rem;
    object-fit: contain;
    border: 2px solid rgba(235, 245, 239, 0.3);
    transition: border-color 0.2s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    border-color: var(--green);
}

.gallery-item audio {
    display: block;
    width: 100%;
}

.gallery-item p {
    margin: 0.5rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
}

.gallery-item a {
    color: var(--green);
    text-decoration: none;
}

.gallery-item a:hover {
    color: var(--mint);
    text-decoration: underline;
}

.gallery-item .license {
    font-size: 0.75rem;
    opacity: 0.75;
}

.gallery-item .asset-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin: 0.5rem 0 0;
}

.gallery-item .asset-tag {
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--border-strong);
    font-size: 0.7rem;
}

.asset-error {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 8rem;
    padding: 1.25rem;
    border: 2px dashed var(--lime);
    color: var(--lime);
}

.asset-error p {
    margin: 0.2rem 0;
    color: inherit;
}

.no-bio {
    opacity: 0.7;
    font-style: italic;
}

/* ── Shared card grid ── */

.characters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    align-items: stretch;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

/* ── Responsive shell ── */

@media (max-width: 720px) {
    nav {
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.6rem 1rem;
    }

    nav img {
        width: 4.25rem;
    }

    nav > div {
        justify-content: center;
        gap: 0.15rem 0.6rem;
    }

    nav > div a {
        padding: 0.35rem 0.2rem;
        font-size: 0.5rem;
    }

    .hero {
        min-height: auto;
        padding-top: 2.5rem;
    }

    .hero h1 {
        font-size: clamp(1.15rem, 5.5vw, 1.45rem);
    }

    #typing {
        font-size: 1rem;
    }

    .link-btns {
        flex-direction: column;
        width: 100%;
    }

    .link-btns a,
    .link-btns .btn {
        width: 100%;
    }

    main > section,
    main > .story > section {
        padding: 1.25rem;
    }

    .gallery-item {
        flex-basis: 100%;
        max-width: 100%;
    }

    .characters {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
