@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
    --ink: #211b2b;
    --paper: #fff7ec;
    --pink: #ff6fae;
    --yellow: #ffe17a;
    --purple: #9b7bff;
    --mint: #9ce8c7;
    --muted: #746b79;
    --line: rgba(33, 27, 43, .15);
    --shadow: 7px 7px 0 var(--ink);
    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--paper);
    font-family: 'Nunito', system-ui, sans-serif;
    overflow-x: clip;
}
img { display: block; max-width: 100%; }
button, a { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.eyebrow {
    font: 700 .72rem/1.5 'Space Mono', monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.muted, .tiny-note { color: var(--muted); }
.tiny-note { font-size: .78rem; line-height: 1.5; margin-top: 18px; }

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 13px 22px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--ink);
    transition: transform .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.button:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
.button-primary { background: var(--yellow); color: var(--ink); }
.button-dark { background: var(--ink); color: white; }
.button-danger { background: #ff565f; color: white; }

/* Стартовый экран */
.intro-screen {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 24px;
    background: #211b2b;
    color: white;
    opacity: 1;
    transition: opacity .35s ease;
}
.intro-screen-hidden { opacity: 0; pointer-events: none; }
.intro-window {
    width: min(100%, 540px);
    padding: clamp(24px, 5vw, 48px);
    text-align: center;
    border: 2px solid rgba(255,255,255,.5);
    border-radius: 16px;
    background: #30263d;
    box-shadow: 12px 12px 0 rgba(0,0,0,.25);
}
.intro-window .eyebrow { color: var(--mint); }
.intro-window h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1.05; }
.intro-window .muted { color: #d2c9dc; }
.pixel-icon { font-size: 3.5rem; margin: 18px 0; }
.loading-track { height: 12px; overflow: hidden; margin: 26px 0; border: 1px solid #8c7b9e; border-radius: 20px; }
.loading-track span { display: block; width: 100%; height: 100%; background: var(--pink); transform-origin: left; animation: loading 1.8s ease-in-out infinite alternate; }

/* Главный экран */
.hero {
    position: relative;
    display: grid;
    min-height: 92svh;
    place-items: center;
    overflow: hidden;
    padding: 80px 24px;
    text-align: center;
    background: var(--pink);
    isolation: isolate;
}
.hero::before, .hero::after {
    position: absolute;
    z-index: -1;
    width: 300px;
    height: 300px;
    content: "";
    border: 3px solid rgba(33,27,43,.16);
    border-radius: 50%;
    pointer-events: none;
}
.hero::before { top: -130px; left: -80px; }
.hero::after { right: -100px; bottom: -150px; width: 420px; height: 420px; }
.hero-content { position: relative; width: min(100%, 850px); }
.hero-title {
    margin: 20px 0;
    font-size: clamp(3rem, 11vw, 7.5rem);
    font-weight: 900;
    line-height: .92;
    letter-spacing: -.07em;
    overflow-wrap: anywhere;
    text-shadow: 5px 5px 0 white;
}
.hero-title span { color: white; text-shadow: 5px 5px 0 var(--ink); }
.hero-subtitle { max-width: 580px; margin: 0 auto 28px; font-size: clamp(1rem, 2.5vw, 1.3rem); line-height: 1.5; }
.hero-sticker {
    position: absolute;
    z-index: 1;
    padding: 10px 14px;
    border: 2px solid var(--ink);
    background: var(--yellow);
    box-shadow: 4px 4px 0 var(--ink);
    font: 900 1rem 'Space Mono', monospace;
    transform: rotate(-12deg);
}
.sticker-one { top: 5%; left: 2%; }
.sticker-two { right: 0; bottom: 12%; transform: rotate(9deg); background: var(--mint); }

/* Общие секции */
.section { width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 100px 0; }
.section-heading { max-width: 700px; margin: 0 auto 42px; text-align: center; }
.section-heading .eyebrow { color: #8a60c9; }
.section-heading h2 { margin: 8px 0 12px; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; overflow-wrap: anywhere; }
.section-heading p:last-child { color: var(--muted); line-height: 1.65; }

.notice-card, .feed-card, .danger-panel {
    border: 2px solid var(--ink);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.notice-card { display: flex; gap: 20px; align-items: center; max-width: 800px; margin: auto; padding: 26px; background: var(--yellow); }
.notice-card h3 { margin: 0 0 6px; }
.notice-card p { margin: 0; line-height: 1.6; }
.notice-icon { flex: 0 0 auto; font-size: 2.5rem; }

/* Лента событий */
.feed-section { max-width: 1200px; }
.feed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 22px; }
.feed-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
    background: white;
}
.feed-card:nth-child(2) { background: var(--mint); transform: rotate(1deg); }
.feed-card:nth-child(3) { background: #e6ddff; }
.card-number { margin-bottom: 16px; color: var(--muted); font: 700 .68rem/1.5 'Space Mono', monospace; letter-spacing: .08em; }
.feed-card img { width: 100%; height: 220px; margin-bottom: 16px; border-radius: 10px; object-fit: cover; }
.feed-card h3 { margin: 4px 0 8px; font-size: 1.3rem; line-height: 1.2; }
.feed-card p { margin: 0; line-height: 1.6; }

/* Галерея мемов */
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.media-placeholder, .photo-placeholder {
    display: flex;
    min-width: 0;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    text-align: center;
    border: 2px dashed #8b6bc5;
    border-radius: 12px;
    color: #604b83;
    background: #e9e0ff;
    font-weight: 800;
}
.media-placeholder img, .photo-placeholder img {
    width: 100%;
    max-width: 100%;
    max-height: 340px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}
.placeholder-symbol { font: 700 .85rem/1.5 'Space Mono', monospace; letter-spacing: .04em; overflow-wrap: anywhere; }
.media-image { display: block; width: 100%; height: 100%; min-height: 220px; object-fit: cover; border: 2px solid var(--ink); border-radius: 12px; }

/* Большая фотография */
.photo-grid { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.photo-grid img { width: 100%; max-width: 900px; height: auto; border-radius: 16px; object-fit: contain; box-shadow: 8px 8px 0 rgba(33,27,43,.12); }
.photo-grid p:last-child { max-width: 900px; margin: 0; color: var(--muted); text-align: center; line-height: 1.6; }

/* Сертификат */
.certificate-section { max-width: 900px; }
.certificate {
    min-width: 0;
    padding: clamp(22px, 5vw, 54px);
    border: 8px double #98713d;
    outline: 2px solid #98713d;
    outline-offset: 6px;
    background: #fff0cf;
    color: #65451f;
    box-shadow: 10px 10px 0 rgba(33,27,43,.15);
}
.certificate-top, .certificate-label { text-align: center; font: 700 .75rem/1.6 'Space Mono', monospace; letter-spacing: .1em; }
.certificate h3 { margin: 14px 0; text-align: center; font-size: clamp(2rem, 7vw, 4rem); line-height: 1.05; }
.certificate > p { text-align: center; line-height: 1.6; }
.certificate-name { font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 900; overflow-wrap: anywhere; }
.certificate ul { max-width: 600px; margin: 25px auto; padding-left: 1.3em; line-height: 1.8; }
.certificate-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 35px; }
.certificate-footer span { display: flex; min-width: 0; flex: 1 1 0; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.fake-seal { display: grid; flex: 0 0 92px; width: 92px; height: 92px; place-items: center; border: 3px solid #b94b43; border-radius: 50%; color: #b94b43; font: 900 .7rem 'Space Mono', monospace; text-align: center; transform: rotate(-15deg); }
.certificate-disclaimer { margin-top: 30px; font-size: .75rem; }

/* Финальная кнопка и подвал */
.danger-section { padding-top: 40px; }
.danger-panel { padding: clamp(25px, 6vw, 60px); text-align: center; background: #e6ddff; }
.danger-panel h2 { margin: 10px 0; font-size: clamp(2.2rem, 6vw, 4rem); }
.danger-panel > p:not(.eyebrow) { max-width: 580px; margin: 0 auto 25px; line-height: 1.6; }
.danger-panel .tiny-note { margin-top: 22px; }
.site-footer { padding: 35px 20px; text-align: center; background: var(--ink); color: white; font: .7rem/2 'Space Mono', monospace; }
.site-footer p { overflow-wrap: anywhere; }
.site-footer a { color: var(--yellow); }

/* Шуточное системное окно */
.error-overlay { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(0,0,0,.82); }
.error-window { width: min(100%, 540px); padding: 0 22px 24px; border: 2px solid white; background: #e9e9e9; color: #171717; box-shadow: 0 15px 60px #000; }
.error-titlebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 -22px 22px; padding: 10px 14px; background: #28205b; color: white; font-weight: 800; }
.window-close { flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid white; background: #e65c5c; color: white; font-size: 1.2rem; }
.error-body { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.error-icon { flex: 0 0 auto; color: #d43d3d; font-size: 2.5rem; }
.error-body h2 { margin: 0 0 12px; font-size: 1.2rem; }
.error-body p { margin: 8px 0; line-height: 1.5; overflow-wrap: anywhere; }
.error-code { font: .8rem 'Space Mono', monospace; color: #a22; }
.error-window .button { width: 100%; }

@media (hover: hover) and (pointer: fine) {
    .feed-card { transition: transform .2s ease; }
    .feed-card:hover { transform: translateY(-5px); }
    .feed-card:nth-child(2):hover { transform: rotate(1deg) translateY(-5px); }
}
