:root {
    --ink: #17212b;
    --muted: #53606d;
    --paper: #ffffff;
    --surface: #f2f5f7;
    --line: #dbe2e8;
    --red: #c92e2c;
    --yellow: #f5c542;
    --blue: #1976d2;
    --footer: #17212b;
    --content-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: 0;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px max(20px, calc((100% - var(--content-width)) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.brand {
    flex: 0 0 auto;
    color: var(--red);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(12px, 2vw, 28px);
    font-size: 14px;
    font-weight: 700;
}

.site-nav a {
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.site-nav a.is-active {
    color: var(--red);
    font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--blue);
    border-bottom-color: var(--yellow);
}

.menu-toggle {
    display: none;
}

.hero,
.section {
    width: min(100% - 40px, var(--content-width));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    min-height: min(700px, calc(100vh - 64px));
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
    padding: clamp(56px, 9vw, 116px) 0;
}

.hero-copy {
    max-width: 540px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1,
.section h2,
.site-footer h2,
.pokedex-card h3,
.feature-card h3 {
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0;
}

.hero h1 {
    max-width: 100%;
    font-size: clamp(42px, 6vw, 76px);
    font-weight: 900;
}

.hero-copy > p:not(.eyebrow) {
    max-width: 35rem;
    margin: 22px 0 28px;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 19px);
}

.primary-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 2px solid var(--red);
    border-radius: 6px;
    color: #ffffff;
    background: var(--red);
    font-weight: 800;
}

.primary-link:hover,
.primary-link:focus-visible {
    border-color: var(--blue);
    background: var(--blue);
}

.hero-art {
    position: relative;
    width: min(100%, 580px);
    min-height: clamp(360px, 42vw, 520px);
    margin-left: auto;
}

.hero-art img {
    position: absolute;
    width: clamp(160px, 28vw, 310px);
    max-height: min(48vw, 380px);
    object-fit: contain;
    filter: drop-shadow(0 16px 14px rgba(23, 33, 43, 0.18));
}

.hero-art img:nth-child(1) {
    z-index: 3;
    bottom: 2%;
    left: 0;
}

.hero-art img:nth-child(2) {
    z-index: 2;
    top: 0;
    right: 1%;
}

.hero-art img:nth-child(3) {
    z-index: 1;
    right: 6%;
    bottom: 0;
}

.section {
    padding: clamp(56px, 8vw, 96px) 0;
}

.section-tint {
    width: 100%;
    padding-right: max(20px, calc((100% - var(--content-width)) / 2));
    padding-left: max(20px, calc((100% - var(--content-width)) / 2));
    background: var(--surface);
}

.section-heading {
    margin-bottom: clamp(24px, 4vw, 40px);
}

.section h2,
.site-footer h2 {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 900;
}

.pokedex-grid,
.feature-grid,
.moments-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
}

.pokedex-card,
.feature-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.pokedex-card {
    display: grid;
    grid-template-rows: minmax(160px, 230px) auto auto 1fr;
    padding: 20px;
    overflow: hidden;
}

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

.type {
    width: fit-content;
    max-width: 100%;
    margin: 14px 0 8px;
    padding: 3px 9px;
    border-radius: 4px;
    color: #ffffff;
    background: var(--blue);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pokedex-card:nth-child(2) .type,
.pokedex-card:nth-child(5) .type {
    background: var(--red);
}

.pokedex-card:nth-child(3) .type,
.pokedex-card:nth-child(4) .type {
    color: var(--ink);
    background: var(--yellow);
}

.pokedex-card h3,
.feature-card h3 {
    font-size: 23px;
    font-weight: 900;
}

.pokedex-card > p:last-child,
.feature-card p {
    margin: 8px 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.feature-card {
    position: relative;
    min-height: 220px;
    padding: clamp(22px, 3vw, 32px);
}

.feature-number {
    display: block;
    margin-bottom: 36px;
    color: var(--red);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.feature-card:nth-child(2) .feature-number {
    color: var(--blue);
}

.feature-card:nth-child(3) .feature-number {
    color: #b68600;
}

.moment-card {
    min-height: clamp(220px, 27vw, 320px);
    border-radius: 8px;
    background-color: #dce7ee;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.moment-charizard {
    background-image: url("../img/charizard.png");
    background-color: #f3c5a8;
}

.moment-gengar {
    background-image: url("../img/gengar.png");
    background-color: #d6c2db;
}

.moment-blastoise {
    background-image: url("../img/blastoise.png");
    background-color: #b9d8eb;
}

.site-footer {
    display: flex;
    justify-content: center;
    text-align: center;
    padding: clamp(42px, 7vw, 72px) max(20px, calc((100% - var(--content-width)) / 2));
    color: #f4f7f9;
    background: var(--footer);
}

.footer-info {
    display: flex;
    flex-direction: column;
    width: min(100%, 720px);
    align-items: center;
    gap: 12px;
}

.site-footer .eyebrow {
    margin-bottom: 0;
    color: var(--yellow);
}

.site-footer h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.site-footer address {
    color: #c6d0d8;
    font-style: normal;
    overflow-wrap: anywhere;
}

.site-footer address {
    max-width: 620px;
}

.site-footer a {
    color: var(--yellow);
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--yellow);
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

@media (max-width: 720px) {
    .site-header {
        min-height: 58px;
        flex-wrap: wrap;
        align-items: center;
        padding: 12px 16px 0;
    }

    .brand {
        padding-top: 2px;
        font-size: 20px;
    }

    .menu-toggle {
        display: block;
        border: 0;
        color: var(--ink);
        background: transparent;
        font: inherit;
        cursor: pointer;
    }

    .site-nav {
        display: none;
        width: 100%;
        padding: 0 0 18px;
        flex-direction: column;
        gap: 14px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero,
    .section {
        width: min(100% - 32px, var(--content-width));
    }

    .hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        gap: 28px;
        padding: 56px 0 48px;
    }

    .hero-art {
        min-height: min(92vw, 410px);
        margin: 0 auto;
    }

    .hero-art img {
        width: clamp(138px, 48vw, 240px);
        max-height: min(62vw, 280px);
    }

    .section-tint {
        width: 100%;
        padding-right: 16px;
        padding-left: 16px;
    }

    .pokedex-grid,
    .feature-grid,
    .moments-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pokedex-card {
        grid-template-rows: minmax(210px, 54vw) auto auto auto;
    }

    .moment-card {
        min-height: min(74vw, 340px);
    }

    .site-footer {
        padding-right: 16px;
        padding-left: 16px;
    }
}

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

    .reveal {
        transition: none;
        transform: none;
    }
}
