/*
 * theme.css
 * Shared look for Home, Games, Team, Journal and journal articles.
 * Load it after basic_styles.css. The Hallow page and admin do not use it on purpose.
 */

@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&display=swap");

:root {
    /* Colors */
    --ink: #0b0a12;
    --ink-2: #141120;
    --ink-3: #221a33;
    --paper: #f1e6d0;
    --paper-ink: #332e3d;
    --sap: #e8577a;
    --sap-deep: #c33c54;
    --moon: #f4e9b8;
    --fg: #ffffff;
    --muted: #bdb7cc;
    --line: rgba(241, 230, 208, 0.14);

    /* Game theme colors */
    --pumpkin: #f58f38;
    --teal: #29a8b3;
    --crimson: #e2434f;
    --gold: #edba54;

    /* Sticky notes */
    --sticky-1: #fae38c;
    --sticky-2: #fac2cc;
    --sticky-3: #bae0e6;
    --sticky-4: #d9cbf2;

    /* Type */
    --display: 'MadimiOne-Regular', 'Trebuchet MS', sans-serif;
    --body: 'Rubik-Regular', system-ui, sans-serif;
    --body-light: 'Rubik-Light', system-ui, sans-serif;
    --hand: 'Caveat', 'Comic Sans MS', cursive;

    --wrap: 1200px;
}

/* Base overrides for themed pages */

body {
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink) 40%, var(--ink-3) 140%) fixed;
    color: var(--fg);
    font-family: var(--body);
    font-size: 18px;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.05;
    text-wrap: balance;
}

p {
    font-size: inherit;
}

a {
    color: inherit;
}

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

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px dashed var(--moon);
    outline-offset: 4px;
}

/* Page wrappers */

.site-main {
    position: relative;
    flex: 1;
    padding-top: var(--navbar-height);
}

.band {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.inner {
    max-width: var(--wrap);
    margin: 0 auto;
}

/* Sticker buttons */

.btn {
    --c: var(--sap);
    --sh: var(--paper);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--display);
    font-size: 18px;
    line-height: 1;
    color: var(--ink);
    text-decoration: none;
    background: var(--c);
    border: 2.5px solid var(--ink);
    border-radius: 12px;
    padding: 16px 26px;
    box-shadow: 5px 5px 0 var(--sh);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--sh);
}

.btn:active {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 var(--sh);
}

.btn.paper {
    --c: var(--paper);
    --sh: var(--sap);
}

.btn.small {
    font-size: 15px;
    padding: 11px 18px;
    border-radius: 10px;
    box-shadow: 4px 4px 0 var(--sh);
}

/* Square icon-only button (social links). */
.btn.icon {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 4px 4px 0 var(--sh);
    flex: 0 0 auto;
}

.btn.icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Handwriting, tape and tags */

.scrawl {
    font-family: var(--hand);
    font-size: 27px;
    line-height: 1.1;
    color: var(--paper);
}

.tape {
    position: absolute;
    width: 96px;
    height: 30px;
    background: rgba(241, 230, 208, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    z-index: 2;
}

.tag {
    display: inline-block;
    width: fit-content;
    font-family: var(--display);
    font-size: 15px;
    letter-spacing: 0.04em;
    color: var(--c, var(--sap));
    border: 1.5px dashed var(--c, var(--sap));
    border-radius: 999px;
    padding: 5px 14px;
}

.kicker {
    font-family: var(--display);
    font-size: 22px;
    color: var(--sap);
}

/* Section heading with the hand-drawn underline */

.heading {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 36px;
    margin-bottom: 72px;
}

.heading h2 {
    position: relative;
    font-size: clamp(52px, 7vw, 84px);
    padding-bottom: 18px;
}

.heading h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: min(420px, 100%);
    height: 22px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 22' preserveAspectRatio='none'%3E%3Cpath d='M4 14 C 80 4, 160 20, 240 10 S 380 4, 416 12' stroke='%23e8577a' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left / 100% 100%;
}

/* Page hero: shared header for Games, Team and Journal */

.page-hero {
    position: relative;
    text-align: center;
    padding-block: clamp(60px, 8vw, 110px) 64px;
    display: grid;
    gap: 22px;
    justify-items: center;
}

.page-hero-kicker {
    font-family: var(--display);
    font-size: 21px;
    color: var(--muted);
}

.page-hero-title {
    font-size: clamp(46px, 7vw, 84px);
    max-width: 14ch;
}

.page-hero-lede {
    color: var(--muted);
    font-family: var(--body-light);
    font-size: 21px;
    max-width: 60ch;
}

.page-hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Sparkle doodles, added by js/decor.js to any [data-sparkles] element */

[data-sparkles] {
    position: relative;
}

.sparkle {
    position: absolute;
    width: 28px;
    height: 28px;
    z-index: 2;
    pointer-events: none;
}

/* Game images, titles and meta (Home rows and Games cards) */

.media {
    position: relative;
}

.media > a {
    display: block;
    border-radius: 14px;
}

.shot {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    border: 3px solid var(--c);
    box-shadow: 10px 10px 0 var(--c);
    background: var(--ink-2);
    transition: transform 0.2s ease;
}

.media > a:hover .shot {
    transform: translate(-3px, -3px);
}

.pixel {
    image-rendering: pixelated;
}

/* Title on the left, genre tag pushed right. */
.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px 16px;
    flex-wrap: wrap;
}

.top .tag {
    margin-left: auto;
    white-space: nowrap;
}

.top h3 a {
    text-decoration: none;
}

.top h3 a:hover {
    color: var(--c);
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.meta span + span::before {
    content: "✦";
    color: var(--c, var(--sap));
    margin-right: 16px;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    align-items: center;
    padding-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
    .btn, .shot {
        transition: none;
    }
}
