:root {
    --ink-900: #163045;
    --ink-700: #24566a;
    --ink-500: #3a7085;

    --surface-base: rgba(255, 255, 255, 0.84);
    --surface-strong: rgba(255, 255, 255, 0.93);
    --surface-card: rgba(255, 255, 255, 0.97);

    --brand-pink: #ef476f;
    --brand-orange: #ff8a00;
    --brand-yellow: #ffd166;
    --brand-green: #06d6a0;
    --brand-blue: #118ab2;
    --brand-purple: #9b5de5;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;

    --shadow-soft: 0 10px 32px rgba(22, 48, 69, 0.14);
    --shadow-hover: 0 18px 38px rgba(22, 48, 69, 0.2);

    --content-max: 1160px;
    --section-space: clamp(2rem, 4vw, 4rem);
    --focus-ring: 3px solid var(--brand-blue);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink-900);
    background-image: url('../images/background-playful.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.52));
    pointer-events: none;
}

.page-shell,
.skip-link {
    position: relative;
    z-index: 1;
}

.page-shell {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 1rem clamp(1rem, 3vw, 2rem) 2rem;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    background: #fff;
    color: var(--ink-900);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    font-weight: 700;
}

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

.top-nav {
    position: sticky;
    top: 0.8rem;
    z-index: 20;
    margin-bottom: 1rem;
}

.nav-list {
    margin: 0;
    padding: 0.65rem;
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    background: var(--surface-base);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-700);
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
}

.nav-link.is-active,
.nav-link[aria-current="page"] {
    color: #fff;
    background: linear-gradient(120deg, var(--brand-purple), var(--brand-blue));
    box-shadow: 0 6px 16px rgba(17, 138, 178, 0.28);
}

.hero {
    margin-top: 0.75rem;
    margin-bottom: var(--section-space);
    background: var(--surface-base);
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(9px);
    padding: clamp(1.4rem, 4vw, 2.4rem);
    text-align: center;
}

.hero-logo {
    width: min(76vw, 300px);
    height: auto;
    display: block;
    margin: 0 auto 1.1rem;
}

.hero-subtitle {
    margin: 0.5rem auto 0;
    max-width: 48ch;
}

.hero-actions {
    margin-top: 1.35rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.section-stack {
    display: grid;
    gap: var(--section-space);
}

.content-section {
    background: var(--surface-strong);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    padding: clamp(1rem, 2.8vw, 1.9rem);
}

.section-header {
    margin: 0 0 1.15rem;
    text-align: center;
}

.section-subtitle {
    margin: 0 auto 1.1rem;
    text-align: center;
    color: var(--ink-700);
    max-width: 56ch;
}

.cards-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cards-grid.cards-grid-tight {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.book-card,
.album-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.95);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.book-card:hover,
.album-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card-media,
.card-image-container,
.book-image-container,
.album-image-container {
    width: 100%;
    background: #f5f7fb;
    overflow: hidden;
}

.ratio-book,
.card-image-container.book,
.book-image-container {
    aspect-ratio: 3 / 4;
}

.ratio-album,
.card-image-container.album,
.album-image-container {
    aspect-ratio: 1 / 1;
}

.card-image,
.book-image,
.album-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.card:hover .card-image,
.book-card:hover .book-image,
.album-card:hover .album-image {
    transform: scale(1.04);
}

.card-body,
.card-content,
.book-content,
.album-content {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem;
    flex-grow: 1;
}

.card-title,
.book-title,
.album-title {
    margin: 0;
}

.card-subtitle,
.book-subtitle,
.album-subtitle {
    margin: 0;
    color: var(--ink-700);
}

.card-actions {
    margin-top: auto;
    display: grid;
    gap: 0.55rem;
}

.streaming-buttons {
    margin-top: auto;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.btn,
.card-btn,
.view-all-link,
.book-btn,
.album-btn,
.overlay-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 2.6rem;
    width: 100%;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, var(--brand-orange), var(--brand-pink));
    box-shadow: 0 5px 14px rgba(239, 71, 111, 0.3);
    padding: 0.5rem 1rem;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn:hover,
.card-btn:hover,
.view-all-link:hover,
.book-btn:hover,
.album-btn:hover,
.overlay-button:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
}

.btn.btn-secondary {
    background: linear-gradient(120deg, var(--brand-blue), var(--brand-purple));
    box-shadow: 0 5px 14px rgba(17, 138, 178, 0.25);
}

.btn.btn-ghost {
    background: #fff;
    color: var(--ink-700);
    border: 1px solid #d3e6ef;
    box-shadow: none;
}

.game-frame-wrap {
    margin-top: 0.8rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 4px solid rgba(255, 255, 255, 0.82);
}

.game-frame {
    display: block;
    width: min(100%, 800px);
    aspect-ratio: 4 / 3;
    border: none;
}

.content-note {
    margin-top: 0.95rem;
    color: var(--ink-700);
    text-align: center;
}

.site-footer {
    margin-top: var(--section-space);
    text-align: center;
    color: var(--ink-700);
    font-weight: 700;
}

a:focus-visible,
button:focus-visible,
iframe:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 3px;
}

@media (max-width: 860px) {
    body {
        background-attachment: scroll;
    }

    .game-frame {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .page-shell {
        padding-top: 0.65rem;
    }

    .nav-list {
        border-radius: var(--radius-md);
    }

    .streaming-buttons {
        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;
    }
}
