@charset "utf-8";

:root {
    --blue: #356d9f;
    --blue-deep: #214e78;
    --honey: #f6aa1c;
    --honey-deep: #b96508;
    --cream: #fff9ec;
    --cream-deep: #f8ebcc;
    --ink: #29251f;
    --muted: #6b6256;
    --berry: #8f1738;
    --white: #fff;
    --purple: #8a43b8;
    --green: #4d8a36;
    --coral: #c74d43;
    --line: rgba(79, 58, 25, 0.14);
    --shadow-sm: 0 4px 14px rgba(75, 53, 20, 0.09);
    --shadow-lg: 0 18px 45px rgba(75, 53, 20, 0.15);
    --radius: 22px;
    --content: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 15%, rgba(246, 170, 28, 0.09) 0 2px, transparent 2.5px) 0 0 / 38px 38px,
        linear-gradient(180deg, var(--cream) 0%, #fffdf7 55%, var(--cream) 100%);
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--honey);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: var(--ink);
    background: var(--white);
    font-weight: 700;
    transform: translateY(-180%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: relative;
    z-index: 10;
    color: var(--white);
    background: var(--blue);
    box-shadow: 0 4px 18px rgba(33, 78, 120, 0.2);
}

.brand-bar {
    background:
        linear-gradient(90deg, rgba(33, 78, 120, 0.12), transparent 42%, rgba(33, 78, 120, 0.16)),
        var(--blue);
}

.brand-link {
    display: block;
    width: min(100%, 960px);
    margin: 0 auto;
}

.brand-banner {
    display: block;
    width: 100%;
    height: auto;
}

.site-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: var(--berry);
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    max-width: var(--content);
    margin: 0 auto;
    padding: 0.3rem 1rem;
    list-style: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
}

main {
    min-height: 52vh;
}

.page-shell {
    width: min(calc(100% - 2rem), var(--content));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: clamp(1.35rem, 3vw, 2.25rem);
    border: 1px solid rgba(185, 101, 8, 0.18);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 219, 0.94));
    box-shadow: var(--shadow-lg);
}

.hero::after {
    position: absolute;
    right: -48px;
    bottom: -75px;
    width: 230px;
    height: 230px;
    border: 28px double rgba(246, 170, 28, 0.12);
    border-radius: 42% 58% 50% 50%;
    content: "";
    transform: rotate(28deg);
}

.hero-compact {
    padding-block: clamp(1.2rem, 2.5vw, 1.8rem);
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.75rem;
    color: var(--honey-deep);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 24px;
    height: 3px;
    border-radius: 3px;
    background: var(--honey);
    content: "";
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 1.15;
}

h1 {
    max-width: 800px;
    margin-bottom: 0.65rem;
    color: var(--blue-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4.25vw, 3.45rem);
    letter-spacing: -0.04em;
}

.hero-compact h1 {
    font-size: clamp(1.9rem, 3.75vw, 3rem);
}

.hero-copy {
    max-width: 690px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.section-heading {
    margin-bottom: 1.4rem;
}

.section-heading h2 {
    margin-bottom: 0.4rem;
    color: var(--blue-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 4vw, 2.55rem);
}

.section-heading p {
    margin-bottom: 0;
    color: var(--muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.category-card {
    --accent: var(--honey);
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.15rem;
    min-height: 178px;
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-top: 5px solid var(--accent);
    border-radius: var(--radius);
    color: var(--ink);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.category-card::after {
    position: absolute;
    right: -34px;
    bottom: -38px;
    width: 115px;
    height: 100px;
    border: 12px solid color-mix(in srgb, var(--accent) 13%, transparent);
    border-radius: 50%;
    content: "";
}

.category-card:hover {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card-arcade {
    --accent: var(--purple);
}

.card-university {
    --accent: #1683b8;
}

.card-magazine {
    --accent: var(--green);
}

.card-brickworks {
    --accent: var(--coral);
}

.category-icon-wrap {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 20px;
    background: color-mix(in srgb, var(--accent) 10%, white);
}

.category-icon {
    width: 62px;
    height: 62px;
    object-fit: contain;
    transition: transform 180ms ease;
}

.category-card:hover .category-icon {
    transform: rotate(-3deg) scale(1.06);
}

.card-kicker {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.category-content {
    position: relative;
    z-index: 1;
}

.category-content h2,
.category-content h3 {
    margin-bottom: 0.45rem;
    color: var(--blue-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
}

.category-content p {
    margin-bottom: 0.75rem;
    color: var(--muted);
}

.card-action {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 800;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
}

.game-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    min-width: 0;
    min-height: 178px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.game-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.game-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-body {
    display: flex;
    min-width: 0;
    padding: 1rem;
    flex-direction: column;
}

.game-tag {
    align-self: flex-start;
    margin-bottom: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    color: var(--honey-deep);
    background: #fff2cb;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.game-body h2,
.game-body h3 {
    margin-bottom: 0.45rem;
    color: var(--blue-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
}

.game-body p {
    margin-bottom: 0.65rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

.game-body .card-action {
    margin-top: auto;
    color: var(--purple);
}

.feature-list {
    display: grid;
    gap: 1.5rem;
}

.feature-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.feature-art {
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
}

.feature-content {
    display: flex;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    flex-direction: column;
}

.feature-content h2,
.feature-content h3 {
    margin-bottom: 0.7rem;
    color: var(--blue-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.feature-content p {
    max-width: 560px;
    color: var(--muted);
    font-size: 1.05rem;
}

.button {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 46px;
    margin-top: 0.4rem;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue-deep);
    font-weight: 800;
    text-decoration: none;
    transition: background-color 160ms ease, transform 160ms ease;
}

.button:hover {
    background: var(--blue);
    transform: translateY(-2px);
}

.storybook-shell {
    width: min(calc(100% - 2rem), 980px);
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.25rem;
    color: var(--blue-deep);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.storybook-heading {
    max-width: 760px;
    margin: 0 auto 1.5rem;
    text-align: center;
}

.storybook-heading .eyebrow {
    justify-content: center;
}

.storybook-heading h1 {
    margin-inline: auto;
}

.storybook-heading > p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.storybook {
    padding: clamp(0.75rem, 2vw, 1.25rem);
    border: 1px solid rgba(185, 101, 8, 0.2);
    border-radius: 28px;
    background: linear-gradient(145deg, #fffdf8, #f5e8c9);
    box-shadow: var(--shadow-lg);
}

.storybook-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1rem, 2.5vw, 1.75rem);
    align-items: stretch;
}

.storybook-stage {
    display: grid;
    overflow: hidden;
    min-height: min(48vw, 460px);
    border-radius: 18px;
    background: #17130f;
    place-items: center;
}

.storybook-page {
    width: 100%;
    height: min(48vw, 460px);
    object-fit: contain;
}

.storybook-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.storybook-text {
    min-width: 0;
}

.storybook-caption-heading {
    margin: 0 0 0.5rem;
    color: var(--blue-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.storybook-caption {
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.6;
}

.storybook-content .ad-container {
    margin: 0;
}

.storybook-controls {
    margin-top: auto;
}

.storybook-toolbar {
    display: grid;
    grid-template-columns: minmax(112px, 1fr) auto minmax(112px, 1fr);
    gap: 1rem;
    align-items: center;
}

.story-button {
    min-width: 140px;
    min-height: 44px;
    padding: 0.55rem 1rem;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue-deep);
    font: inherit;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.storybook-content .story-button {
    min-width: 0;
}

.story-button:first-child {
    justify-self: start;
}

.story-button:last-child {
    justify-self: end;
}

.story-button:disabled {
    color: #776f64;
    background: #e2ddd2;
    cursor: not-allowed;
}

.page-status {
    margin: 0;
    color: var(--blue-deep);
    font-weight: 800;
    text-align: center;
}

.page-picker {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.page-dot {
    width: 14px;
    height: 14px;
    padding: 0;
    border: 2px solid var(--blue-deep);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.page-dot[aria-current="page"] {
    background: var(--honey);
    box-shadow: inset 0 0 0 2px var(--white);
}

.keyboard-hint {
    margin: 0.65rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

.workshop {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
    gap: 2rem;
    align-items: center;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4rem);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, #fff, #fff2ec);
    box-shadow: var(--shadow-lg);
}

.workshop h2 {
    margin-bottom: 0.65rem;
    color: var(--blue-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
}

.workshop p {
    max-width: 600px;
    color: var(--muted);
}

.workshop-art {
    position: relative;
    display: grid;
    min-height: 260px;
    place-items: center;
}

.workshop-art::before,
.workshop-art::after {
    position: absolute;
    width: 180px;
    height: 155px;
    border: 20px solid rgba(199, 77, 67, 0.1);
    content: "";
    transform: rotate(30deg);
}

.workshop-art::after {
    width: 120px;
    height: 105px;
    border-color: rgba(246, 170, 28, 0.14);
    transform: translate(72px, -48px) rotate(30deg);
}

.workshop-art img {
    position: relative;
    z-index: 1;
    width: 150px;
    filter: drop-shadow(0 16px 18px rgba(82, 52, 25, 0.18));
}

.ad-container {
    width: 100%;
    margin: 2.5rem 0;
    padding: 0.65rem;
    border: 1px solid rgba(41, 37, 31, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
}

.ad-label {
    margin-bottom: 0.35rem;
    color: #7d756b;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

.adsbygoogle {
    min-height: 120px;
    border-radius: 8px;
    background: rgba(236, 232, 223, 0.55);
}

.small-screen-ad {
    display: none !important;
}

.large-screen-ad {
    display: block !important;
}

.site-footer {
    color: rgba(255, 255, 255, 0.86);
    background: var(--berry);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    width: min(calc(100% - 2rem), var(--content));
    margin: 0 auto;
    padding: 2.25rem 0;
}

.footer-title {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-copy,
.copyright {
    margin: 0;
    font-size: 0.88rem;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem 1rem;
    margin: 0 0 0.5rem;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.footer-meta {
    text-align: right;
}

@media (max-width: 820px) {
    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-card,
    .workshop {
        grid-template-columns: 1fr;
    }

    .feature-art {
        max-height: 340px;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .workshop-art {
        grid-row: 1;
        min-height: 210px;
    }

    .storybook-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-list {
        justify-content: flex-start;
        overflow-x: auto;
        padding-inline: 0.75rem;
        scrollbar-width: none;
    }

    .nav-list::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        white-space: nowrap;
    }

    .page-shell {
        width: min(calc(100% - 1.25rem), var(--content));
        padding: 2rem 0 3rem;
    }

    .hero {
        margin-bottom: 1.5rem;
        border-radius: 22px;
    }

    .card-grid,
    .game-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 0;
        padding: 1.2rem;
    }

    .category-icon-wrap {
        width: 64px;
        height: 64px;
        border-radius: 17px;
    }

    .category-icon {
        width: 54px;
        height: 54px;
    }

    .game-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .feature-card,
    .workshop,
    .storybook {
        border-radius: 22px;
    }

    .storybook-shell {
        width: min(calc(100% - 1.25rem), 980px);
    }

    .storybook-stage {
        min-height: 70vw;
    }

    .storybook-page {
        height: 70vw;
    }

    .storybook-toolbar {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .page-status {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .story-button:last-child {
        justify-self: stretch;
    }

    .story-button {
        width: 100%;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .footer-meta {
        text-align: left;
    }

    .small-screen-ad {
        display: block !important;
    }

    .large-screen-ad {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .category-card {
        grid-template-columns: 1fr;
    }

    .hero::after,
    .category-card::after {
        opacity: 0.65;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.container {
    width: min(calc(100% - 2rem), var(--content));
    margin: 0 auto;
}

.content,
.wide_content {
    width: 100%;
}

.sidebar1,
.sidebar2,
.narrow_sidebar1,
.narrow_sidebar2 {
    max-width: 100%;
}

.game_description {
    font-size: 0.85rem;
}

.game_title {
    font-size: 1.2rem;
}

.quiz_title {
    font-size: 1.5rem;
}

.topic {
    font-size: 1rem;
}
