@import url('home.css');
@import url('radfahrt.css');
@import url('scene.css');
@import url('guide.css');

/* ── Fonts (self-hosted) ─────────────────────────────────── */
@font-face {
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/figtree-v9-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/figtree-v9-latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Figtree';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/figtree-v9-latin-italic.woff2') format('woff2');
}
@font-face {
    font-family: 'Alegreya';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/alegreya-v41-latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Alegreya';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/alegreya-v41-latin-italic.woff2') format('woff2');
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ──────────────────────────────────────────────── */
:root {
    --bg:           #faf4e8;
    --surface:      #fff8ed;
    --ink:          #1c120a;
    --ink-mid:      #5a3e28;
    --ink-light:    #9a7a5a;
    --header-bg:    #2c1a0c;
    --header-text:  #faf4e8;
    --tour-color:   #888;
    --link-color:   var(--ink-mid);
    --radius:       10px;
    --radius-sm:    6px;
    --border:       2.5px solid #1c120a;
    --shadow:       4px 4px 0 #1c120a;
    --shadow-sm:    2px 2px 0 #1c120a;
    --transition:   0.2s ease;
    --f-display:    'Alegreya', Georgia, serif;
    --f-body:       'Figtree', sans-serif;
}

/* ── Body / Frame ────────────────────────────────────────── */
body {
    background: #1c120a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    font-family: var(--f-body);
}

.scene-frame {
    position: relative;
    width: 100vw;
    height: 56.25vw;
    max-height: 100vh;
    max-width: calc(100vh * 16 / 9);
    overflow: hidden;
    background: var(--bg);
}

/* ── Views ───────────────────────────────────────────────── */
.view {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    background: var(--bg);
}
.view.active-view { display: flex; }

/* ── Modal base ──────────────────────────────────────────── */
.modal-overlay {
    position: absolute;
    inset: 0;
    display: none;
    opacity: 0;
    transition: opacity var(--transition);
}
.modal-overlay.is-open         { 
    display: grid;
    place-items: center; 
}
.modal-overlay.is-open.visible { opacity: 1; }
/* ── Modal card ──────────────────────────────────────────── */
.modal-card {
    position: relative;
    background: var(--surface);
    border: var(--border);
    border-top: 5px solid var(--tour-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(20px, 2.8vw, 42px);
    width: 75%;
    height: auto;
    max-height: 85%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.85vw, 12px);
    scrollbar-width: thin;
    scrollbar-color: #c8bfaa transparent;
}

.modal-close-button {
    position: absolute;
    top: clamp(8px, 1vw, 14px);
    right: clamp(10px, 1.2vw, 16px);
    background: none;
    border: none;
    font-size: clamp(0.8rem, 1.1vw, 1rem);
    color: var(--ink-light);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}
.modal-close-button:hover { color: var(--ink); }

.modal-card .title {
    font-family: var(--f-display);
    font-size: clamp(0.9rem, 1.4vw, 1.3rem);
    color: var(--ink);
    line-height: 1.2;
    padding-right: 2em;
}

.modal-card .rule {
    height: 2px;
    background: var(--tour-color);
    opacity: 0.45;
    flex-shrink: 0;
}

.modal-card .desc {
    font-size: clamp(0.6rem, 0.88vw, 0.82rem);
    color: var(--ink-mid);
    line-height: 1.65;
}

.modal-card .link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: clamp(0.5rem, 0.74vw, 0.68rem);
    font-weight: 700;
    color: var(--link-color);
    text-decoration: none;
    margin-top: 2px;
    transition: opacity var(--transition);
}
.modal-card .link:hover { opacity: 0.7; }
.modal-card .link.hidden { display: none; }



.app-header {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.6vw, 24px);
    padding: clamp(10px, 1.4vw, 20px) clamp(20px, 2.8vw, 44px);
    background: var(--header-bg);
    border-bottom: 3px solid var(--ink);
    flex-shrink: 0;
}

.btn-back-main {
    font-family: var(--f-body);
    font-weight: 700;
    font-size: clamp(0.6rem, 0.9vw, 0.82rem);
    color: var(--header-text);
    background: none;
    border: 2px solid rgba(250,244,232,.45);
    border-radius: var(--radius-sm);
    padding: clamp(4px, 0.5vw, 7px) clamp(10px, 1.3vw, 18px);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}
.btn-back-main:hover {
    background: rgba(250,244,232,.12);
    border-color: var(--header-text);
}

.app-title {
    font-family: var(--f-display);
    font-size: clamp(1rem, 1.7vw, 1.6rem);
    color: var(--header-text);
    line-height: 1.1;
}

.app-hint {
    font-size: clamp(0.5rem, 0.75vw, 0.7rem);
    color: rgba(250,244,232,.6);
    font-style: italic;
}

/* ══════════════════════════════════════════════════════════
   Support / Credits modal — shown on load, reachable via info button
   ══════════════════════════════════════════════════════════ */

.support-overlay {
    position: absolute;
    inset: 0;
    z-index: 500;
    background: rgba(28,18,10,.72);
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-overlay.hidden { display: none; }

.support-card {
    position: relative;
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(20px, 2.8vw, 40px);
    width: min(85%, 480px);
    max-height: 85%;
    overflow-y: auto;
    text-align: center;
}

.support-heading {
    font-family: var(--f-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: clamp(0.7rem, 0.95vw, 0.85rem);
    color: var(--ink-mid);
}

.support-logo {
    display: block;
    margin: clamp(10px, 1.4vw, 16px) auto 0;
    min-width: 150px;
    max-width: 260px;
    max-height: 110px;
    width: auto;
    height: auto;
}

.support-rule {
    border: none;
    height: 2.5px;
    background: var(--ink);
    opacity: .25;
    margin: clamp(16px, 2vw, 24px) auto;
    width: 65%;
}

.support-credits-label {
    font-family: var(--f-display);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--ink);
    margin-bottom: 8px;
}

.support-credits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 clamp(18px, 2.4vw, 28px);
    color: var(--ink-mid);
    font-family: var(--f-body);
    font-size: clamp(0.8rem, 1vw, 0.92rem);
    line-height: 1.85;
}

.support-credits-list li::before { content: "– "; }

.support-cta {
    font-family: var(--f-body);
    font-weight: 700;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: var(--ink);
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: clamp(8px, 1.1vw, 12px) clamp(20px, 2.6vw, 32px);
    transition: transform var(--transition), box-shadow var(--transition);
}

.support-cta:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
}
.support-cta:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--ink);
}

.support-info-btn {
    position: absolute;
    bottom: clamp(12px, 1.8vw, 27px);
    right: clamp(12px, 1.8vw, 27px);
    z-index: 300;
    width: clamp(34px, 4.2vw, 44px);
    height: clamp(34px, 4.2vw, 44px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: var(--border);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(0.9rem, 1.3vw, 1.1rem);
    transition: transform var(--transition), box-shadow var(--transition);
}

.support-info-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
}
