/* Yama Games site styles.
   Breakpoints: mobile (default), 700px (tablet), 1024px (desktop), 1500px (widescreen, side borders show).
   Per-page theme variables live in theme-*.css. */

@font-face {
    font-family: "Open Sans";
    src: url("/assets/fonts/OpenSans-Variable.ttf") format("truetype");
    font-weight: 300 800;
    font-display: swap;
}
@font-face {
    font-family: "Jersey 10";
    src: url("/assets/fonts/Jersey10.ttf") format("truetype");
    font-display: swap;
}

:root {
    --col: 1200px;
    --gutter: 16px;
    --bg: #101216;
    --panel: #1a1d23;
    --panel-2: #232730;
    --line: #2f343f;
    --text: #eceff4;
    --muted: #a3acbb;
    --accent: #8fb8de;
    --accent-ink: #0c1218;
    --accent-2: #c9d3e0;
    --radius: 10px;
    --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --font-head: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --head-weight: 800;
    --head-case: none;
    --border-img: url("/assets/shared/border-yama.png");
    --border-size: 256px;
    --border-render: auto;
    --hero-pos: 50% 50%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image: var(--border-img);
    background-size: var(--border-size);
    background-repeat: repeat;
    background-position: center top;   /* tile from the middle so left and right borders mirror each other */
    image-rendering: var(--border-render);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.page {
    max-width: var(--col);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--panel);
    box-shadow: 0 0 0 1px #000, 0 0 60px rgba(0, 0, 0, .7);
    display: flex;
    flex-direction: column;
}
.page > main { flex: 1; }
.wrap { padding-inline: var(--gutter); max-width: 1000px; margin-inline: auto; }

h1, h2, h3 {
    font-family: var(--font-head);
    font-weight: var(--head-weight);
    text-transform: var(--head-case);
    line-height: 1.15;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 7vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(16, 18, 22, .94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}
.site-header .bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 6px 16px; padding: 8px var(--gutter); max-width: 1000px; margin-inline: auto;
}
.brand { display: flex; align-items: center; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0; padding: 0; list-style: none; }
.nav a {
    display: block; padding: 8px 10px; border-radius: 6px;
    color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--panel-2); color: var(--accent); }

/* ---------- buttons / badges ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 46px; padding: 10px 22px;
    border-radius: 8px; border: 2px solid var(--accent);
    background: var(--accent); color: var(--accent-ink);
    font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--panel-2); color: var(--accent-2); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
    display: inline-block; padding: 3px 12px; border-radius: 999px;
    background: var(--accent-2); color: var(--accent-ink);
    font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- hero ---------- */
.hero { position: relative; background: #000; }
.hero img { width: 100%; aspect-ratio: var(--hero-aspect-m, 16 / 9); object-fit: cover; object-position: var(--hero-pos); }
.hero::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
    background: linear-gradient(to bottom, transparent, var(--panel));
    pointer-events: none;
}
.hero-studio { padding: 48px var(--gutter) 24px; text-align: center; }
.hero-studio img { width: min(300px, 70vw); margin: 0 auto 8px; }
.hero-studio h1 { margin-bottom: .3em; }
.hero-studio .lede { margin-inline: auto; }

.title-block { padding: 8px var(--gutter) 24px; text-align: center; max-width: 1000px; margin-inline: auto; }
.title-block .logo { width: min(520px, 90%); margin: -8% auto 12px; position: relative; z-index: 1; }
.title-block .tagline { font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(1.3rem, 4.5vw, 2rem); margin: 0 0 12px; text-transform: var(--head-case); }
.title-block .meta { color: var(--muted); margin: 12px 0 20px; }
.title-block .btn-row { justify-content: center; }

.title-block .logo.flat { margin-top: 16px; }
@media (min-width: 700px) { .title-block .tagline.hero-dup { display: none; } }

/* ---------- sections ---------- */
section.block { padding: 36px 0; border-top: 1px solid var(--line); }
section.block:first-of-type { border-top: 0; }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.card-f {
    background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px;
}
.card-f h3 { color: var(--accent); }
.card-f p { margin: 0; color: var(--muted); }

.trailer {
    position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
    background: #000 center / cover no-repeat; border: 1px solid var(--line);
    display: grid; place-items: center; text-align: center;
}
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer .soon { background: rgba(0, 0, 0, .72); padding: 14px 22px; border-radius: 8px; font-weight: 800; }

.gallery { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin: 0; padding: 0; list-style: none; }
.gallery button {
    display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 8px;
    overflow: hidden; background: #000; cursor: zoom-in;
}
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .2s; }
.gallery button:hover img { transform: scale(1.04); }
dialog.lightbox {
    border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; color: var(--text);
}
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: 96vw; max-height: 80vh; margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { padding: 10px 0; }
.lightbox .lb-controls { display: flex; gap: 10px; justify-content: center; }

.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.facts div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 800; color: var(--accent); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 0; }

.cta-band {
    text-align: center; padding: 40px var(--gutter);
    background: var(--panel-2); border-block: 1px solid var(--line);
}
.cta-band .btn-row { justify-content: center; }

/* ---------- studio game cards ---------- */
.game-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.game-card {
    display: flex; flex-direction: column;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.game-card img.cap { width: 100%; aspect-ratio: 920 / 430; object-fit: cover; }
.game-card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-card h3 { margin: 0; font-size: 1.5rem; }
.game-card p { margin: 0; color: var(--muted); flex: 1; }
.game-card.g-birds { --accent: #ffd23f; --accent-2: #fff0a8; --accent-ink: #2a1c00; }
.game-card.g-birds h3 { font-family: "Jersey 10", var(--font-head); font-weight: 400; font-size: 2.1rem; color: var(--accent); }
.game-card.g-slider { --accent: #6da6d1; --accent-2: #a9cbe6; --accent-ink: #0b1620; }
.game-card.g-slider h3 { color: var(--accent); }

/* ---------- press kit ---------- */
.press-layout { display: block; }
.press-nav { margin: 0 0 20px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.press-nav a {
    display: block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
    text-decoration: none; font-size: .9rem; font-weight: 600;
}
.press-nav a:hover { background: var(--panel-2); }
.press-section { padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.press-section:first-of-type { border-top: 0; }
.copy-box { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.copy-box p:last-of-type { margin-bottom: 10px; }
.dl-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.dl-item { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.dl-item .thumb {
    display: grid; place-items: center; padding: 10px; aspect-ratio: 16 / 10;
    background: repeating-conic-gradient(#2b2f38 0 25%, #20232a 0 50%) 0 0 / 20px 20px;
}
.dl-item .thumb img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.dl-item .info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; font-size: .85rem; }
.dl-item .info strong { word-break: break-word; }
table.req { border-collapse: collapse; width: 100%; margin-bottom: 18px; }
table.req th, table.req td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.req th { width: 9rem; color: var(--accent); font-weight: 700; }
.placeholder-note { border: 1px dashed var(--accent); border-radius: 8px; padding: 14px; color: var(--muted); }


/* ---------- forms (press page) ---------- */
.reveal { max-width: 720px; }
.reveal > summary { list-style: none; width: fit-content; user-select: none; }
.reveal > summary::-webkit-details-marker { display: none; }
.reveal[open] > summary { margin-bottom: 20px; }
.reveal .when-open { display: none; }
.reveal[open] .when-open { display: inline; }
.reveal[open] .when-closed { display: none; }
.form { display: grid; gap: 16px; max-width: 720px; }
.form .field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.form label, .form legend { font-weight: 700; font-size: .95rem; padding: 0; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input[type="text"], .form input[type="email"], .form input[type="url"], .form select, .form textarea {
    width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.form .hint { margin: 0; color: var(--muted); font-size: .85rem; }
.form .checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.form .checks label, .form .ack { font-weight: 400; display: flex; align-items: center; gap: 8px; }
.form input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.form .row2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border: 1px solid var(--accent); border-radius: 8px; padding: 14px 16px; background: var(--panel-2); }
.notice p { margin: 6px 0 12px; }
.notice .ack { font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: #6fdc8c; }
.form-status.err { color: #ff8a80; }
.turnstile-slot { min-height: 65px; }
@media (min-width: 700px) { .form .row2 { grid-template-columns: 1fr 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px var(--gutter); text-align: center; color: var(--muted); font-size: .9rem; background: var(--bg); }
.site-footer ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; }
.site-footer p { margin: 0; }

/* ---------- 700px: tablet ---------- */
@media (min-width: 700px) {
    :root { --gutter: 28px; }
    .hero img { aspect-ratio: 2.4 / 1; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .facts { grid-template-columns: repeat(2, 1fr); column-gap: 28px; }
    .game-grid { grid-template-columns: repeat(2, 1fr); }
    .dl-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-studio { padding-top: 72px; }
}

/* ---------- 1024px: desktop ---------- */
@media (min-width: 1024px) {
    .hero img { aspect-ratio: 3 / 1; }
    .cards.three { grid-template-columns: repeat(3, 1fr); }
    .dl-grid { grid-template-columns: repeat(3, 1fr); }
    .press-layout { display: grid; grid-template-columns: 200px 1fr; gap: 36px; max-width: 1100px; margin-inline: auto; padding-inline: var(--gutter); }
    .press-nav { position: sticky; top: 78px; align-self: start; flex-direction: column; flex-wrap: nowrap; }
    .press-nav a { border-radius: 6px; border-color: transparent; }
    .press-layout .wrap { padding-inline: 0; max-width: none; }
    .press-nav.inline { position: static; flex-direction: row; flex-wrap: wrap; }
    .press-nav.inline a { border-color: var(--line); border-radius: 999px; }
}

/* ---------- 1500px: widescreen (side border art visible) ---------- */
@media (min-width: 1500px) {
    :root { --col: 1240px; }
    .page { margin-block: 0; }
    .hero img { aspect-ratio: 3.1 / 1; }
    body { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .gallery img { transition: none; }
}
