/* ==========================================================================
   Volchko Studio
   Theme: a winter-night wolf, sewn in Macedonian cross-stitch.
   ========================================================================== */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
    font-family: "Unbounded";
    src: url("../fonts/unbounded-latin-500-normal.woff2") format("woff2");
    font-weight: 500; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Unbounded";
    src: url("../fonts/unbounded-latin-700-normal.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Unbounded";
    src: url("../fonts/unbounded-cyrillic-500-normal.woff2") format("woff2");
    font-weight: 500; font-style: normal; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Unbounded";
    src: url("../fonts/unbounded-cyrillic-700-normal.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2");
    font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
    --night: #1B1E3A;       /* winter sky, page background */
    --night-deep: #14162E;  /* alternate bands */
    --snow: #EEF0F7;        /* text, white fur */
    --frost: #A3ABC9;       /* secondary text, thread outlines */
    --ember: #D9434B;       /* embroidery red, stitches */
    --ember-btn: #C4343B;   /* red for filled buttons (AA with white) */
    --amber: #F2B544;       /* wolf's eyes, focus */

    --font-display: "Unbounded", system-ui, sans-serif;
    --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

    --space-section: clamp(4.5rem, 10vw, 8rem);
    --stitch: 2px dashed;

    /* Bootstrap overrides */
    --bs-body-bg: var(--night);
    --bs-body-color: var(--snow);
    --bs-body-font-family: var(--font-body);
    --bs-body-font-size: 1.0625rem;
    --bs-body-line-height: 1.6;
    --bs-link-color-rgb: 238, 240, 247;
    --bs-link-hover-color-rgb: 242, 181, 68;
    --bs-secondary-color: var(--frost);
    --bs-border-color: rgba(163, 171, 201, .45);
}

[data-bs-theme="dark"] {
    --bs-body-bg: var(--night);
    --bs-body-color: var(--snow);
}

body {
    background: var(--night);
    color: var(--snow);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.15;
}
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }
p { max-width: 62ch; }

a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
    position: absolute;
    left: 1rem; top: -3rem;
    z-index: 1000;
    padding: .5rem 1rem;
    background: var(--amber);
    color: var(--night);
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(27, 30, 58, .9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(163, 171, 201, .15);
}
.site-header .navbar { padding-block: .85rem; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--snow);
}
.brand:hover { color: var(--snow); }
.brand-mark { width: 30px; height: 30px; }

.site-header .nav-link {
    color: var(--frost);
    font-weight: 700;
}
@media (min-width: 768px) {
    .site-header .nav-link { padding-inline: .9rem !important; }
}
.site-header .nav-link:hover,
.site-header .nav-link:focus-visible { color: var(--snow); }

.navbar-toggler {
    border: var(--stitch) var(--frost);
    border-radius: 4px;
    padding: .55rem .6rem;
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
}
.navbar-toggler:focus { box-shadow: none; }
.toggler-bar { display: block; width: 22px; height: 2px; background: var(--snow); }

/* ---------- Buttons ---------- */
.btn {
    --bs-btn-font-weight: 700;
    --bs-btn-padding-x: 1.4rem;
    --bs-btn-padding-y: .75rem;
    --bs-btn-border-radius: 4px;
    font-family: var(--font-body);
}
.btn-ember {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--ember-btn);
    --bs-btn-border-color: var(--ember-btn);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #A92B31;
    --bs-btn-hover-border-color: #A92B31;
    --bs-btn-active-bg: #922429;
    --bs-btn-active-border-color: #922429;
    --bs-btn-active-color: #fff;
}
/* A running stitch for the secondary button. */
.btn-thread {
    --bs-btn-color: var(--snow);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--frost);
    --bs-btn-hover-color: var(--night);
    --bs-btn-hover-bg: var(--snow);
    --bs-btn-hover-border-color: var(--snow);
    --bs-btn-active-color: var(--night);
    --bs-btn-active-bg: var(--frost);
    border-style: dashed;
    border-width: 2px;
}

/* ---------- Hero ---------- */
.hero {
    padding-block: clamp(3rem, 8vw, 6.5rem) var(--space-section);
}

.wordmark { margin: 0 0 1.25rem; line-height: .95; }
.wordmark-main {
    display: block;
    font-size: clamp(3.4rem, 10vw, 6.6rem);
    font-weight: 700;
    letter-spacing: -.035em;
}
.wordmark-sub {
    display: block;
    margin-top: .55rem;
    font-size: clamp(1.1rem, 2.6vw, 1.6rem);
    font-weight: 500;
    letter-spacing: .32em;
    color: var(--frost);
    padding-left: .2em;
}

.hero-lede {
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    color: var(--snow);
    max-width: 28ch;
    margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* The logo sits in an embroidery hoop, which doubles as the moon. */
.hero-logo {
    position: relative;
    width: min(100%, 460px);
    aspect-ratio: 1;
    margin-inline: auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    will-change: transform;
}
/* The hoop lives on its own layer so it can appear after the intro. */
.hero-logo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        linear-gradient(rgba(163, 171, 201, .07) 1px, transparent 1px) 0 0 / 14px 14px,
        linear-gradient(90deg, rgba(163, 171, 201, .07) 1px, transparent 1px) 0 0 / 14px 14px,
        radial-gradient(circle at 50% 45%, #262A4D 0%, var(--night-deep) 72%);
    box-shadow:
        0 0 0 10px #2A2E52,
        0 0 0 12px rgba(163, 171, 201, .35),
        0 0 0 20px #2A2E52,
        0 0 0 22px rgba(163, 171, 201, .2);
}
.hero-logo .logo-stitched { position: relative; width: 66%; height: auto; overflow: visible; }

@media (max-width: 991.98px) {
    .hero-logo { width: min(72%, 340px); }
}

/* ---------- Logo animation: the wolf gets sewn, then opens its eyes ---------- */
.logo-stitched .st line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: sew .16s ease-out forwards;
    animation-delay: calc(var(--i) * 11ms + .2s);
}
.logo-stitched .st line + line {
    animation-delay: calc(var(--i) * 11ms + .28s);
}
@keyframes sew { to { stroke-dashoffset: 0; } }

.logo-stitched .eyes {
    transform-box: fill-box;
    transform-origin: center;
    animation: blink 7s 3.2s infinite;
}
.logo-stitched .eyes .st { animation: glow 1.2s 2.3s ease-out both; }
@keyframes glow {
    0%   { filter: none; }
    40%  { filter: drop-shadow(0 0 4px rgba(242, 181, 68, .95)); }
    100% { filter: drop-shadow(0 0 1.5px rgba(242, 181, 68, .5)); }
}
@keyframes blink {
    0%, 94%, 100% { transform: scaleY(1); }
    96%           { transform: scaleY(.1); }
}

/* ---------- Sections ---------- */
.band {
    background: var(--night-deep);
    padding-block: var(--space-section);
    border-block: var(--stitch) rgba(163, 171, 201, .22);
}
.about { padding-block: var(--space-section); }

.section-head { margin-bottom: 2.5rem; }
.section-head p { color: var(--frost); font-size: 1.15rem; margin: 0; }

/* ---------- Game slots ---------- */
.game {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: var(--stitch) rgba(163, 171, 201, .5);
    border-radius: 6px;
    padding: .75rem;
    background: var(--night);
}
.game-art {
    aspect-ratio: 4 / 3;
    border-radius: 3px;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.game-art img { width: 100%; height: 100%; object-fit: cover; }

/* Blank aida cloth: the game hasn't been sewn yet. */
.game-art.is-blank {
    background:
        radial-gradient(circle, rgba(27, 30, 58, .9) 1.3px, transparent 1.6px) 0 0 / 12px 12px,
        #2A2E52;
}
.game-art-note {
    font-size: .875rem;
    color: var(--frost);
    background: var(--night);
    padding: .3rem .7rem;
    border-radius: 3px;
}

.game-body { padding: 1.1rem .5rem .5rem; display: flex; flex-direction: column; flex: 1; }
.game-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .875rem;
    font-weight: 700;
    color: var(--amber);
    margin-bottom: .5rem;
}
.game-status::before {
    content: "";
    width: 10px; height: 10px;
    background:
        linear-gradient(45deg, transparent 42%, currentColor 42% 58%, transparent 58%),
        linear-gradient(-45deg, transparent 42%, currentColor 42% 58%, transparent 58%);
}
.game-status.status-available { color: #8FD3A8; }
.game-blurb { color: var(--snow); margin-bottom: .75rem; }
.game-platforms { color: var(--frost); font-size: .9375rem; margin-bottom: 0; margin-top: auto; }
.game-links { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }

/* ---------- About ---------- */
.name-card {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3.2rem, 9vw, 5.5rem);
    line-height: 1;
    color: var(--ember);
    margin: 0;
    display: inline-block;
}
/* The underline is a running stitch that sews itself in when it scrolls into view. */
.name-card::after {
    content: "";
    display: block;
    height: 4px;
    margin-top: 1.25rem;
    background: repeating-linear-gradient(90deg, var(--ember) 0 12px, transparent 12px 20px);
}
.js .name-card::after {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.2s steps(16, end) .2s;
}
.js .name-card.is-in::after { clip-path: inset(0 0 0 0); }
.about p em { font-style: italic; color: var(--snow); }

/* ---------- Contact ---------- */
.contact-email {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    word-break: break-word;
}
.contact-fallback { color: var(--frost); }

.contact-form .form-label { font-weight: 700; }
.contact-form .form-control {
    background: var(--night);
    color: var(--snow);
    border: 2px solid rgba(163, 171, 201, .4);
    border-radius: 4px;
    padding: .7rem .9rem;
}
.contact-form .form-control:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(242, 181, 68, .25);
    background: var(--night);
    color: var(--snow);
}
.contact-form .form-text { color: var(--frost); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice {
    padding: 1rem 1.15rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border: 2px solid;
    font-weight: 700;
}
.notice-success { border-color: #8FD3A8; color: #CDEFD9; background: rgba(143, 211, 168, .08); }
.notice-error   { border-color: var(--ember); color: #FFD6D8; background: rgba(217, 67, 75, .1); }

/* ---------- Legal page ---------- */
.legal { padding-block: clamp(3rem, 7vw, 5rem) var(--space-section); }
.legal-body { max-width: 68ch; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .5rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2.5rem; margin-bottom: .75rem; }
.legal-date { color: var(--frost); margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 0 2.5rem; color: var(--frost); font-size: .9375rem; }
.band + .site-footer, main > :last-child { margin-bottom: 0; }
.stitch-rule {
    height: 10px;
    margin-bottom: 1.75rem;
    background:
        linear-gradient(45deg, transparent 42%, var(--ember) 42% 58%, transparent 58%) 0 0 / 14px 10px space no-repeat,
        linear-gradient(-45deg, transparent 42%, var(--ember) 42% 58%, transparent 58%) 0 0 / 14px 10px space no-repeat;
    opacity: .7;
}
.site-footer .stitch-rule { margin-top: 2.5rem; }
.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
    align-items: center;
}
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; }
.footer-links a { color: var(--frost); }
.footer-links a:hover { color: var(--snow); }

/* ---------- Intro: the wolf alone, then it settles into the hoop ----------
   html.intro        set in <head> on the first home page visit of a session
   html.intro-ready  JS has moved the logo to the middle of the screen
   html.intro-out    the logo flies to its spot and the page appears
*/
html.intro body { overflow: hidden; }
html.intro .site-header,
html.intro .hero-copy > *,
html.intro main > section:not(.hero),
html.intro .site-footer { opacity: 0; }
html.intro .hero-copy > * { transform: translateY(18px); }
html.intro .hero-logo { visibility: hidden; }
html.intro.intro-ready .hero-logo { visibility: visible; }
html.intro .hero-logo::before { opacity: 0; transform: scale(.82); }

html.intro.intro-out .hero-logo {
    transition: transform 1.05s cubic-bezier(.7, 0, .2, 1);
}
html.intro.intro-out .hero-logo::before {
    opacity: 1;
    transform: none;
    transition: opacity .5s .75s, transform .9s .7s cubic-bezier(.2, 1.3, .4, 1);
}
html.intro.intro-out .site-header,
html.intro.intro-out main > section:not(.hero),
html.intro.intro-out .site-footer {
    opacity: 1;
    transition: opacity .6s 1.1s;
}
html.intro.intro-out .hero-copy > * {
    opacity: 1;
    transform: none;
    transition: opacity .6s ease-out, transform .8s cubic-bezier(.2, .9, .3, 1);
}
html.intro.intro-out .hero-copy > :nth-child(1) { transition-delay: .85s; }
html.intro.intro-out .hero-copy > :nth-child(2) { transition-delay: 1s; }
html.intro.intro-out .hero-copy > :nth-child(3) { transition-delay: 1.15s; }

/* Skipping the intro finishes the sewing instantly. */
html.skip-sew .logo-stitched .st line { animation: none; stroke-dashoffset: 0; }

/* ---------- Game cards land on the page as you scroll to them ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(56px) rotate(var(--tilt, -2deg));
    transition:
        opacity .5s ease-out var(--delay, 0s),
        transform .9s cubic-bezier(.2, 1.25, .35, 1) var(--delay, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .logo-stitched .st line,
    .logo-stitched .eyes,
    .logo-stitched .eyes .st {
        animation: none !important;
        stroke-dashoffset: 0;
    }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .js .name-card::after { clip-path: none; transition: none; }
    html { scroll-behavior: auto !important; }
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
