/* ==========================================================================
   The Passing Bell — scenesterium.games
   Plain CSS, no frameworks. Palette drawn from the game: manor teal,
   candlelight amber, chalk white on near-black.
   ========================================================================== */

:root {
    --bg: #070b0a;
    --bg-alt: #0a100e;
    --panel: #0e1714;
    --line: rgba(233, 228, 216, 0.12);
    --line-soft: rgba(233, 228, 216, 0.07);
    --ink: #e9e4d8;
    --ink-dim: #9faaa5;
    --ink-faint: #6d7873;
    --teal: #7fa99c;
    --teal-deep: #12241f;
    --amber: #d9a45b;
    --amber-bright: #eebd76;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    --steam-navy: #1b2838;
    --steam-navy-hover: #2a475e;
    --serif: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --display: "Inkulinati", "Palatino Linotype", Palatino, Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Inkulinati — the game's own UI typeface, used for buttons and nav */
@font-face {
    font-family: "Inkulinati";
    src: url("fonts/Inkulinati-Regular.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--amber-bright); }

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

.skip-link {
    position: absolute;
    left: 16px; top: -60px;
    z-index: 300;
    background: var(--panel);
    color: var(--ink);
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: var(--ink); }

/* ---------- shared ---------- */

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.section { padding: 104px 0; }
.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 14px;
}
.eyebrow.center { text-align: center; }

h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin-bottom: 22px;
}
h2.center { text-align: center; }

.center { text-align: center; }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    font-family: var(--display);
    font-size: 19px;
    letter-spacing: 0.03em;
    line-height: 1;
    padding: 15px 28px;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn svg { width: 19px; height: 19px; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-2px); }

.btn-steam {
    background: var(--steam-navy);
    color: #dbe4ec;
    border-color: var(--steam-navy-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.btn-steam:hover {
    background: var(--steam-navy-hover);
    color: #ffffff;
}

.btn-outline {
    background: rgba(11, 17, 24, 0.4);
    border-color: rgba(42, 71, 94, 0.9);
    backdrop-filter: blur(6px);
}
.btn-outline:hover { background: var(--steam-navy); }

.btn-small { padding: 10px 16px; font-size: 16px; gap: 8px; }
.btn-small svg { width: 16px; height: 16px; }

/* ---------- header ---------- */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 14px 28px;
    background: linear-gradient(rgba(5, 8, 7, 0.65), rgba(5, 8, 7, 0));
    transition: background 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}
.site-header.scrolled {
    background: rgba(7, 11, 10, 0.88);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line-soft);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-size: 17px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; }

.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: 0.02em;
    color: var(--ink-dim);
}
.site-nav a:hover { color: var(--ink); }

.header-cta { margin-left: 4px; }

/* ---------- hero ---------- */

.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg);
}

.hero video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 8, 7, 0.6) 0%, rgba(5, 8, 7, 0.18) 30%, rgba(5, 8, 7, 0.22) 60%, rgba(5, 8, 7, 0.94) 100%),
        radial-gradient(ellipse 90% 80% at 50% 42%, rgba(5, 8, 7, 0) 32%, rgba(5, 8, 7, 0.45) 68%, rgba(4, 6, 5, 0.82) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-size: 17px;
    letter-spacing: 0.04em;
    color: var(--ink);
    padding: 10px 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(7, 11, 10, 0.45);
    backdrop-filter: blur(6px);
    margin-bottom: 26px;
}
.badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 10px var(--amber);
}

.hero-title {
    width: min(640px, 82vw);
    margin: 0 auto 18px;
    filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.8));
}

.hero-tagline {
    font-style: italic;
    font-size: clamp(16px, 2.2vw, 19px);
    color: var(--ink-dim);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    margin-bottom: 34px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-controls {
    position: absolute;
    right: 20px; bottom: 20px;
    z-index: 3;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.hero:hover .hero-controls,
.hero-controls:focus-within { opacity: 1; }

/* touch devices have no hover — keep the sound button reachable */
@media (hover: none) {
    .hero-controls { opacity: 1; }
}

.icon-btn {
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 11, 10, 0.55);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { border-color: var(--amber); color: var(--amber-bright); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* play/pause + mute icon state (JS toggles .is-active) */
.ico-play, .ico-sound { display: none; }
#playPauseBtn.is-paused .ico-play { display: block; }
#playPauseBtn.is-paused .ico-pause { display: none; }
#muteBtn.is-unmuted .ico-sound { display: block; }
#muteBtn.is-unmuted .ico-muted { display: none; }

.scroll-hint {
    position: absolute;
    left: 50%; bottom: 22px;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--ink-dim);
    animation: bob 2.4s ease-in-out infinite;
}
.scroll-hint svg { width: 30px; height: 30px; fill: currentColor; }
.scroll-hint:hover { color: var(--ink); }

@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

/* ---------- about ---------- */

.about-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
    align-items: center;
}

.about-text p { color: var(--ink-dim); margin-bottom: 18px; }
.about-text h2 { color: var(--ink); }
.about-text em { color: var(--ink); }

.about-art img {
    border-radius: 10px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 28px;
    margin-top: 26px;
}
.feature-list li {
    position: relative;
    padding-left: 22px;
    font-size: 15.5px;
    color: var(--ink-dim);
}
.feature-list li::before {
    content: "";
    position: absolute;
    left: 2px; top: 0.62em;
    width: 7px; height: 7px;
    background: var(--ink);
    transform: rotate(45deg);
}

/* ---------- the house / residents ---------- */

.house-section {
    position: relative;
    overflow: hidden;
}
.house-bg {
    position: absolute;
    inset: 0;
    background: url("img/house-bg.jpg") center 30% / cover no-repeat;
    opacity: 0.13;
    pointer-events: none;
}
.house-section .container { position: relative; }

.selection-pill {
    display: table;
    margin: 0 auto 30px;
    font-family: var(--display);
    font-size: 16px;
    letter-spacing: 0.06em;
    color: var(--teal);
    padding: 9px 22px;
    border: 1px solid rgba(127, 169, 156, 0.4);
    border-radius: 999px;
}

.house-intro {
    max-width: 640px;
    margin: 0 auto 56px;
    color: var(--ink-dim);
    font-style: italic;
    text-align: center;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* frameless figure: sprite fills the column, text floats over its legs,
   on hover the sprite itself gets a soft silhouette glow */
.cast-card {
    position: relative;
}

.cast-figure {
    position: relative;
    height: 560px;
}

.cast-sprite {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transition: opacity 0.4s ease, transform 0.5s ease, filter 0.4s ease;
    filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.6));
}
.cast-sprite.is-hover {
    opacity: 0;
    transform: scale(1.03);
}
.cast-card:hover .cast-sprite.is-default {
    opacity: 0;
    transform: scale(0.985);
}
.cast-card:hover .cast-sprite.is-hover {
    opacity: 1;
    transform: scale(1);
}

/* layered drop-shadows follow the sprite's outline, not a box */
.cast-card:hover .cast-sprite {
    filter:
        drop-shadow(0 20px 26px rgba(0, 0, 0, 0.55))
        drop-shadow(0 0 1.5px rgba(238, 189, 118, 0.4))
        drop-shadow(0 0 5px rgba(140, 190, 170, 0.22))
        drop-shadow(0 0 12px rgba(140, 190, 170, 0.12));
}

.cast-info {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: 70px 16px 24px;
    text-align: center;
    background: linear-gradient(180deg,
        rgba(7, 11, 10, 0) 0%,
        rgba(7, 11, 10, 0.66) 46%,
        rgba(7, 11, 10, 0.94) 100%);
    border-radius: 0 0 14px 14px;
    pointer-events: none;
}
.cast-info h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.cast-info p {
    font-size: 15.5px;
    color: var(--ink-dim);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* ---------- demo band ---------- */

.house-section { border-bottom: none; }

.demo-band {
    background: linear-gradient(180deg,
        var(--bg-alt) 0%,
        rgba(18, 36, 31, 0.85) 45%,
        var(--bg) 100%);
    padding: 72px 0;
}
.demo-band-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

/* ---------- press & contact ---------- */

.press-compact { max-width: 640px; text-align: center; }
.press-note { color: var(--ink-dim); margin-bottom: 26px; }
.press-mail {
    display: inline-block;
    font-size: 22px;
    color: var(--amber);
    border-bottom: 1px solid rgba(217, 164, 91, 0.4);
    padding-bottom: 2px;
    margin-bottom: 34px;
}
.press-mail:hover { color: var(--amber-bright); }

.contact-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
}
.contact-row a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--display);
    font-size: 18px;
    color: var(--ink-dim);
}
.contact-row a svg { width: 17px; height: 17px; fill: currentColor; }
.contact-row a:hover { color: var(--ink); }

/* ---------- footer ---------- */

.site-footer {
    padding: 72px 24px 48px;
    text-align: center;
    border-top: 1px solid var(--line-soft);
}
.footer-logo {
    width: 200px;
    margin: 0 auto 28px;
    opacity: 0.9;
}
.footer-fine { font-size: 13.5px; color: var(--ink-faint); }

/* ---------- reveal on scroll ---------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 920px) {
    .site-nav { display: none; }
    .site-header { justify-content: space-between; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-art { order: -1; }
    .cast-grid { grid-template-columns: 1fr 1fr; }
    .cast-card:nth-child(3) {
        grid-column: span 2;
        width: 60%;
        max-width: 440px;
        justify-self: center;
    }
}

@media (max-width: 640px) {
    .section { padding: 76px 0; }
    .site-header { padding: 10px 14px; gap: 10px; }
    .brand { font-size: 13px; letter-spacing: 0.14em; gap: 8px; }
    .brand img { width: 26px; height: 26px; }
    .header-cta { padding: 8px 12px; font-size: 12.5px; letter-spacing: 0.02em; }
    .cast-grid { grid-template-columns: 1fr; }
    .cast-card:nth-child(3) {
        grid-column: span 1;
        width: auto;
        max-width: none;
        justify-self: stretch;
    }
    .cast-figure { height: 430px; }
    .feature-list { grid-template-columns: 1fr; }
    .hero-ctas .btn { width: 100%; max-width: 340px; }
    .contact-row { gap: 22px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-hint { animation: none; }
    .btn:hover, .cast-card:hover { transform: none; }
    .cast-sprite { transition: none; }
}
