/* --- Self-hosted Roboto (latin-ext covers German umlauts) --- */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/roboto-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/roboto-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/roboto-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/roboto-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   ECHO34121 — Simplified Stylesheet

   CSS concepts used:
   - Custom properties (variables) for theming
   - Flexbox for the horizontal layout
   - CSS transitions for hover/open animations
   - Absolute positioning for timeline events
   - Media query for mobile
   ============================================================ */

/* --- Variables -------------------------------------------- */
:root {
    --bg:      #111210;
    --text:    #f0eeeb;
    --accent:  #a9a49b;
    --border:  rgba(169, 164, 155, 0.2);
    --hover-bg: #2e4a5c;
    --link:    #a9a49b;
    --font:    'Roboto', Arial, Helvetica, sans-serif;
}

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

html {
    background: #111210;
}

body {
    font-family: var(--font);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.05em;
    background: #111210;
    color: var(--text);
    overflow: hidden;
    height: 100dvh;
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
}
a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* --- Canvas: horizontal row of columns -------------------- */
.canvas {
    display: flex;
    height: 100dvh;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
    /* Background lives here — scroll container background stays put
       while content scrolls, so the photo always covers the viewport */
    background: #111210 url('/black.jpg') center center / cover no-repeat;
}
.canvas.is-ready {
    opacity: 1;
}

/* --- 1. DRAWERS (left column) ----------------------------- */
.drawers {
    display: flex;
    height: 100%;
    width: max-content;
    flex-shrink: 0;
    position: relative;
}

/* Each drawer = a thin "spine" + a hidden panel */
.drawer {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* The clickable spine (vertical tab) */
.drawer-spine {
    position: relative;
    width: 56px;
    height: 100%;
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: var(--text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 5px;
    writing-mode: vertical-rl;
    transform: rotate(180deg) translateX(-0.7px);
    white-space: nowrap;
    text-transform: uppercase;
    font-family: var(--font);
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 2px;
    opacity: 1;
    text-shadow: none;
    transition: opacity 0.25s ease, color 0.25s ease;
    padding: 15px 15px 15px 15px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

/* Separator line on the right only */
.drawer-spine::after {
    content: "";
    position: absolute;
    right: 0;
    top: 5px;
    bottom: 5px;
    width: 1px;
    background: var(--border);
}

.drawer-spine:hover {
    opacity: 1;
    background: rgba(180, 175, 170, 0.12);
}


.drawer-spine .spine-title {
    display: block;
    font-weight: 400;
    letter-spacing: 2.5px;
    line-height: 1;
}

.drawer-spine .spine-subtitle {
    display: block;
    font-size: 0.7em;
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 1px;
    pointer-events: none;
}

/* Now playing static spine */
.now-playing-spine {
    position: relative;
    width: 56px;
    height: 100%;
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 5px;
    writing-mode: vertical-rl;
    transform: rotate(180deg) translateX(-0.7px);
    white-space: nowrap;
    text-transform: uppercase;
    font-family: var(--font);
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 2px;
    padding: 15px 15px 15px 15px;
    box-sizing: border-box;
}

.now-playing-spine::after {
    content: "";
    position: absolute;
    right: 0;
    top: 5px;
    bottom: 5px;
    width: 1px;
    background: var(--border);
}

.now-playing-spine .spine-title {
    display: block;
    font-weight: 400;
    letter-spacing: 2.5px;
    line-height: 1;
}

.now-playing-spine .spine-subtitle {
    display: block;
    font-size: 0.7em;
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: 1px;
}

@keyframes blink-on-air {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.now-playing-spine.is-on-air .spine-subtitle {
    animation: blink-on-air 1.2s step-start infinite;
}

/* The expandable panel content */
.drawer-panel {
    position: relative;
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.3s ease 0.2s;
}

/* When the drawer is open */
.drawer.is-open .drawer-panel {
    width: 640px;
    opacity: 1;
    overflow-y: auto;
}

.drawer-content h3 {
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.5;
    margin-top: 8px;
}

.drawer-content {
    width: 640px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-content h2 {
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.drawer-content .meta {
    font-size: 0.7rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.drawer-content .body {
    margin-top: 8px; /* adds to the 16px flex gap = ~24px total above description */
    font-size: 0.85rem;
    line-height: 1.6;
    opacity: 0.8;
}

.drawer-content .links {
    position: absolute;
    bottom: 30px;
    left: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.drawer-content .links a {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    color: var(--text);
    border-bottom: none;
}

.drawer-content .links a:hover {
    opacity: 1;
    color: var(--text);
    border-bottom: none;
}

/* --- 2. PLAYER (center column) ---------------------------- */
.player-column {
    /* equilateral-triangle width proportion */
    width: calc(100dvh * 0.866 + 40px);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
}

.player {
    width: 100%;
    height: 100%;
    background: transparent;
}

/* Play/pause button — block element filling the player, scrolls naturally */
.play-btn {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s;
}
.play-btn:active {
    transform: scale(0.98);
}

/* clip-path triangle — contained within play-btn bounds */
.play-icon {
    position: absolute;
    inset: 8px;
    background: url('/triangle.jpg') center / cover no-repeat;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    transition: background 0.2s;
}

.pause-icon {
    display: none;
    position: absolute;
    inset: 8px;
    align-items: center;
    justify-content: center;
    gap: 8%;
}
.pause-icon span {
    width: 39%;
    height: 100%;
    background-image: url('/sky.jpg');
    background-size: cover;
    background-position: center;
}

/* When playing, swap icons */
.player.is-playing .play-icon  { display: none; }
.player.is-playing .pause-icon { display: flex; }

/* Visualiser and now-playing float at the bottom of the column */
.visualiser {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    height: 60px;
    pointer-events: none;
    background: transparent;
}

.now-playing {
    position: absolute;
    bottom: 88px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.6;
    pointer-events: none;
}


/* --- 3. TIMELINE (schedule grid) -------------------------- */
.timeline {
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Hour labels — hidden until timeline is hovered */
.timeline-hours {
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 100%;
    border-right: 1px solid transparent;
    z-index: 2;
    background: transparent;
    transition: border-color 0.2s;
}
.timeline:hover .timeline-hours {
    border-right-color: transparent;
}

.timeline-hour {
    position: absolute;
    left: 0;
    width: 100%;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-top: 1px solid transparent;
    color: var(--text);
    opacity: 0;
    transition: opacity 0.2s, border-color 0.2s;
}
.timeline:hover .timeline-hour {
    opacity: 1;
}

/* The grid area where events live */
.timeline-grid {
    position: absolute;
    top: 0;
    left: 48px;
    overflow: visible;
}

/* Day label — hidden until hovered */
.timeline-day-label {
    position: absolute;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 4px;
    text-align: center;
    opacity: 0;
    color: var(--text);
    transition: opacity 0.2s;
    pointer-events: none;
}
.timeline:hover .timeline-day-label {
    opacity: 1;
}

/* Day column vertical line — hidden until hovered */
.timeline-day-line {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: transparent;
    transition: background 0.2s;
    pointer-events: none;
}
.timeline:hover .timeline-day-line {
    background: transparent;
}

/* Individual event */
.timeline-event {
    position: absolute;
    background: transparent;
    padding: 2px 6px;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    z-index: 10;
    opacity: 1;
    text-shadow: none;
    font-family: var(--font);
    font-weight: 400;
    transition: color 0.25s ease, background 0.25s ease;
    /* fade out at right edge */
    -webkit-mask-image: linear-gradient(to right, black 75%, transparent 100%);
            mask-image: linear-gradient(to right, black 75%, transparent 100%);
    color: var(--text);
}
.timeline-event:hover {
    -webkit-mask-image: none;
            mask-image: none;
    overflow: visible;
    z-index: 9999;
}

.event-content {
    display: inline-block;
}

.event-title {
    display: block;
    font-weight: 400;
    letter-spacing: 2.5px;
}

.event-subtitle {
    display: none;
    font-size: 0.55rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--text);
}

.timeline-event:hover .event-content {
    background-image: url('/timetable.jpg');
    background-size: cover;
    background-position: center;
    padding: 4px 8px;
    color: var(--accent);
}

.timeline-event:hover .event-title {
    color: var(--accent);
}

.timeline-event:hover .event-subtitle {
    display: block;
    color: var(--accent);
}

/* --- 4. INFO & CONTACT (right column) --------------------- */
.info-column {
    width: 300px;
    min-width: 280px;
    flex-shrink: 0;
    margin-left: 112px;
    display: flex;
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
}

.info-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.8;
    color: var(--text);
    opacity: 1;
    max-height: 400px;
    overflow-y: auto;
}

/* Contact form pushed to bottom */
.contact-form {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text);
    opacity: 1;
}

.form-group input,
.form-group textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font);
    font-weight: 400;
    font-size: 0.85rem;
    padding: 8px 0;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
    transition: color 0.2s;
}
.form-group input:hover::placeholder,
.form-group textarea:hover::placeholder,
.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    color: var(--accent);
}

/* Honeypot field — hidden from humans, visible to bots */
.honey {
    position: absolute;
    left: -9999px;
}

/* Submit button */
.submit-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    opacity: 1;
    font-family: var(--font);
    font-weight: 400;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.submit-btn:hover {
    opacity: 1;
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* Form feedback message */
.form-feedback {
    font-size: 0.75rem;
    min-height: 1.5em;
}
.form-feedback.success { color: #00f420; }
.form-feedback.error   { color: var(--accent); }

/* --- 5. MODAL (event detail popup) ------------------------ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    /* no dimming — page stays fully visible behind */
    background: transparent;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.modal-overlay.is-open {
    display: flex;
}

.modal {
    background-image: url('/timetable.jpg');
    background-size: cover;
    background-position: center;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    color: var(--accent);
    pointer-events: all;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.4rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.modal-close:hover {
    opacity: 0.5;
}

.modal-meta {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin-bottom: 12px;
    color: var(--accent);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    color: var(--accent);
}

.modal-body {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--accent);
    white-space: pre-line;
}

/* --- 6. ARCHIVE PLAYER ------------------------------------ */
.archive-player {
    display: flex;
    align-items: center;
    gap: 14px;
}

.archive-play-btn {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    color: var(--text);
}

.archive-play-icon {
    width: 100%;
    height: 100%;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.archive-pause-icon {
    display: none;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.archive-play-btn:hover .archive-play-icon,
.archive-play-btn:hover .archive-pause-icon {
    opacity: 1;
}

.archive-player.is-playing .archive-play-icon  { display: none; }
.archive-player.is-playing .archive-pause-icon { display: block; }

.archive-player audio {
    display: none;
}

.archive-time {
    font-family: monospace;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--text);
    opacity: 0.5;
}

.archive-cur {
    cursor: text;
    border-radius: 2px;
    padding: 0 1px;
    min-width: 2ch;
}
.archive-cur:focus {
    outline: none;
    opacity: 1;
    background: rgba(169, 164, 155, 0.15);
}

/* --- 7. RESPONSIVE (mobile: stack vertically) ------------- */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }
    .canvas {
        flex-direction: column;
        width: 100%;
        height: auto;
    }
    .drawers {
        flex-direction: row;
        height: auto;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .drawer {
        flex-direction: column;
        height: auto;
    }
    .drawer-spine {
        writing-mode: horizontal-tb;
        transform: none;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: auto;
        height: 48px;
        padding: 0 16px;
        gap: 8px;
        border-right: 1px solid var(--border);
        border-bottom: none;
    }
    .drawer-panel {
        transition: height 0.6s ease, opacity 0.3s ease 0.1s;
    }
    .drawer.is-open .drawer-panel {
        width: 100%;
        height: auto;
    }
    .player-column {
        width: 100%;
        max-width: none;
        min-height: 320px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .timeline {
        height: 400px;
        overflow: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .info-column {
        width: 100%;
        min-height: auto;
    }
}
