/* Obsidian Hawk public site — one bundled stylesheet (no @import waterfall, no inline styles). */

/* ---------- fonts (self-hosted) ---------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/inter-v20-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/inter-v20-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/rajdhani-v17-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/rajdhani-v17-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/rajdhani-v17-latin-700.woff2') format('woff2'); }

/* ---------- tokens ---------- */
:root {
    --bg-dark: #0a0b0d;
    --bg-card: #121418;
    --bg-card-hover: #1a1d24;
    --bg-input: #08090b;
    --accent: #17b9ce;
    --accent-bright: #00e5ff;
    --accent-glow: rgba(23, 185, 206, .3);
    --text-main: #e1e4e8;
    --text-muted: #8b949e;
    --text-soft: #c2c9d6;
    --border: #262a33;
    --danger: #ff6b6b;
    --font-heading: 'Rajdhani', 'Arial Narrow', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 8px;
    --header-h: 77px;
}

/* ---------- base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}
/* Fixed studio backdrop on its own layer: cheaper than background-attachment: fixed on mobile */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(10, 11, 13, .85), rgba(5, 5, 7, .95)), url('/assets/images/studio-bg.jpg') center / cover no-repeat;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color .3s ease, text-shadow .3s ease; }
a:hover { color: var(--accent-bright); text-shadow: 0 0 8px var(--accent-glow); }
h1, h2, h3 { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; color: #fff; line-height: 1.2; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
strong { color: #fff; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 2000; background: var(--accent); color: #000; padding: .5rem 1rem; border-radius: 4px; font-weight: 600; }
.skip-link:focus { top: 1rem; color: #000; }

/* ---------- header & navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 11, 13, .9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 2rem; }
.brand-logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo:hover { text-shadow: none; }
.brand-logo img { height: 45px; width: auto; filter: drop-shadow(0 0 5px var(--accent-glow)); }
.brand-title { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-menu > ul { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-link { position: relative; padding: 5px 0; color: var(--text-main); font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent); box-shadow: 0 0 8px var(--accent); transition: width .3s ease; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: .5rem; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 25px; height: 3px; background: var(--text-main); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* language dropdown */
.lang-selector-container { margin-left: .75rem; }
.custom-dropdown { position: relative; }
.dropdown-trigger {
    display: flex; align-items: center; gap: .5rem;
    background: rgba(13, 15, 18, .85); color: var(--accent);
    font-family: var(--font-heading); font-size: .85rem; font-weight: 700; letter-spacing: 1.5px;
    padding: .4rem .75rem; border: 1px solid var(--border); border-radius: 4px; cursor: pointer;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.dropdown-trigger:hover, .custom-dropdown.open .dropdown-trigger { border-color: var(--accent); background: #0d0f12; box-shadow: 0 0 10px var(--accent-glow); }
.dropdown-arrow { width: 0; height: 0; border-top: 5px solid var(--accent); border-right: 4px solid transparent; border-left: 4px solid transparent; transition: transform .25s ease; }
.custom-dropdown.open .dropdown-arrow { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute; top: calc(100% + .5rem); right: 0; min-width: 100%; z-index: 100;
    list-style: none; padding: .3rem 0; background: #0d0f12; border: 1px solid var(--border); border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .6), 0 0 10px rgba(0, 240, 255, .15);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.custom-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.lang-globe { flex-shrink: 0; }
.dropdown-item { display: block; white-space: nowrap; padding: .45rem 1rem; color: #e0e6ed; font-family: var(--font-heading); font-size: .85rem; font-weight: 600; letter-spacing: 1px; }
.dropdown-item:hover, .dropdown-item:focus-visible { background: rgba(0, 240, 255, .1); color: var(--accent); text-shadow: none; }
.dropdown-item.active { color: var(--accent); font-weight: 700; }

/* ---------- layout ---------- */
main { flex: 1; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 3rem 2rem; }
.narrow { max-width: 800px; margin: 0 auto; }
.page-title { font-size: 2rem; margin-bottom: .5rem; }
.page-lead { color: var(--text-muted); margin-bottom: 2.5rem; }
.page-intro { text-align: center; margin-bottom: 3rem; }
.page-intro h1 { margin-top: 1rem; font-size: 2rem; }
.empty-state { color: var(--text-muted); text-align: center; padding: 3rem 0; }

.site-footer { margin-top: auto; padding: 2rem 1rem; background: #050507; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: .9rem; }
.footer-sub { margin-top: .5rem; font-size: .8rem; color: #6b7280; }

/* ---------- components ---------- */
.card {
    position: relative; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 2rem; margin-bottom: 2rem;
    transition: background .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity .3s ease; }
.card:hover { background: var(--bg-card-hover); border-color: rgba(23, 185, 206, .4); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.card:hover::before { opacity: 1; }
.card-title { color: var(--accent); font-size: 1.3rem; margin-bottom: 1rem; }
.card p + p { margin-top: 1rem; }

.btn {
    display: inline-block; padding: .8rem 2rem; border: 0; border-radius: 4px; cursor: pointer;
    background: linear-gradient(135deg, #17b9ce 0%, #0d6b77 100%); color: #fff;
    font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    transition: background .3s ease, box-shadow .3s ease, color .3s ease;
}
.btn:hover, .btn:focus-visible { background: linear-gradient(135deg, #00e5ff 0%, #17b9ce 100%); box-shadow: 0 0 15px var(--accent-glow); color: #000; text-shadow: none; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- home ---------- */
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero-logo { width: 100%; max-width: 320px; height: auto; margin-bottom: 2rem; filter: brightness(1.6) contrast(.9) drop-shadow(0 0 12px var(--accent-glow)) drop-shadow(0 0 25px rgba(0, 0, 0, .9)); }
.hero p { max-width: 600px; margin: 0 auto 2rem; font-size: 1.2rem; color: var(--text-muted); }

/* ---------- about ---------- */
.about-logo { width: 120px; height: auto; filter: drop-shadow(0 0 10px var(--accent-glow)); }

/* ---------- error page ---------- */
.error-page { text-align: center; padding: 3rem 0; }
.error-code { font-family: var(--font-heading); font-size: 5rem; font-weight: 700; line-height: 1; color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); }
.error-page h1 { margin: 1rem 0 .5rem; }

/* ---------- sound archive ---------- */
.track-list { display: flex; flex-direction: column; gap: .75rem; max-width: 900px; margin: 0 auto; }
.track-item { background: rgba(18, 22, 28, .85); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius); overflow: hidden; transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease; }
.track-item:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(0, 189, 196, .15); }
.track-item[open] { background: rgba(22, 28, 36, .95); border-color: var(--accent); }

.track-summary { display: flex; align-items: center; gap: 1rem; padding: .75rem 1.25rem; cursor: pointer; list-style: none; user-select: none; }
.track-summary::-webkit-details-marker { display: none; }
.track-summary::after { content: '\276F'; margin-left: .5rem; font-size: .85rem; color: var(--text-muted); transition: transform .3s ease; }
.track-item[open] .track-summary::after { transform: rotate(90deg); color: var(--accent); }

.track-thumb { width: 48px; height: 48px; flex-shrink: 0; object-fit: cover; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .1); }
.track-thumb-empty { display: block; background: linear-gradient(135deg, #1a1d24, #0a0b0d); }
.track-meta { display: flex; flex-direction: column; flex-grow: 1; gap: .2rem; min-width: 0; }
.track-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: #fff; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-genre { font-size: .8rem; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-play { padding: .55rem 1.4rem; font-size: .95rem; min-width: 7.5rem; text-align: center; }
.btn-play.playing { background: var(--accent); color: #000; animation: pulse-glow 2s infinite alternate; }
@keyframes pulse-glow { from { box-shadow: 0 0 8px var(--accent-glow); } to { box-shadow: 0 0 20px var(--accent-glow), 0 0 30px var(--accent); } }

.track-details { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .05); background: rgba(0, 0, 0, .2); animation: fade-in .3s ease-out; }
.track-desc { font-size: .9rem; line-height: 1.5; color: var(--text-soft); margin-bottom: 1rem; }
.track-player { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 1rem; background: rgba(0, 0, 0, .3); border: 1px solid var(--border); border-radius: 6px; }
.waveform-container { width: 100%; height: 50px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(23, 185, 206, .2); border-radius: 6px; overflow: hidden; }
.waveform-canvas { display: block; width: 100%; height: 100%; }
.audio-time { visibility: hidden; margin-top: .6rem; font-family: var(--font-heading); font-size: .9rem; color: var(--text-muted); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.audio-time.visible { visibility: visible; }
.time-current { color: var(--accent); font-weight: 600; }

@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
    :root { --header-h: 70px; }
    .nav-container { padding: .85rem 1.25rem; }
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed; top: var(--header-h); left: 0; right: 0;
        background: var(--bg-dark); border-bottom: 1px solid var(--border); box-shadow: 0 10px 27px rgba(0, 0, 0, .9);
        transform: translateX(-100%); visibility: hidden; transition: transform .3s ease, visibility .3s;
    }
    .nav-menu.open { transform: none; visibility: visible; }
    .nav-menu > ul { flex-direction: column; gap: 1.5rem; padding: 2rem 0; }
    .lang-selector-container { margin-left: 0; }
    .dropdown-menu { right: 50%; transform: translate(50%, -8px); }
    .custom-dropdown.open .dropdown-menu { transform: translate(50%, 0); }
    .container { padding: 2rem 1.25rem; }
    .hero p { font-size: 1.05rem; }
}

@media (max-width: 600px) {
    .brand-logo img { height: 36px; }
    .brand-title { font-size: 1rem; letter-spacing: .5px; }
    .container { padding: 1.5rem .75rem; }
    .card { padding: 1.25rem; }
    .track-summary { display: grid; grid-template-columns: auto 1fr auto; row-gap: .6rem; column-gap: .75rem; padding: .85rem .75rem; }
    .track-thumb { width: 42px; height: 42px; }
    .track-title { font-size: .95rem; white-space: normal; overflow-wrap: anywhere; }
    .track-genre { font-size: .72rem; white-space: normal; }
    .track-summary::after { grid-column: 3; grid-row: 1; justify-self: end; margin-left: 0; }
    .track-summary .btn-play { grid-column: 1 / -1; grid-row: 2; width: 100%; padding: .55rem 0; font-size: .85rem; }
    .track-details { padding: .85rem .75rem; }
    .track-desc { font-size: .85rem; line-height: 1.45; }
    .track-player { padding: .75rem; }
    .waveform-container { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Maintenance mode ---------- */
.maintenance-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-block: 2rem; }
.maintenance-logo { display: block; width: 96px; height: 96px; margin: 0 auto 1.25rem; object-fit: contain; }
.maintenance-banner { background: #b45309; color: #fff; text-align: center; font-size: .875rem; line-height: 1.4; padding: .5rem 1rem; }
.maintenance-banner a { color: #fff; font-weight: 600; text-decoration: underline; margin-left: .5rem; }

/* ---------- Draft preview (admin only) ---------- */
.preview-banner { background: #1d4ed8; color: #fff; text-align: center; font-size: .875rem; line-height: 1.4; padding: .5rem 1rem; }
.preview-banner a { color: #fff; font-weight: 600; text-decoration: underline; margin-left: .75rem; }
