/* Quiet Music: shared styles for header, menus and footer.
   Used by the inner pages (privacy, 404 and the sections to come). */

:root {
    --bg-color: #0f141e;
    --text-color: #d1dce8;
    --muted-color: #a0b3c2;
    --accent-color: #5c9eab;
    --header-bg: #151b26;
    --section-bg: #121822;
    --line: rgba(255, 255, 255, 0.06);
    --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    background-color: var(--bg-color);
    color: var(--text-color);
}

main { flex: 1; }

/* HEADER */
.site-header {
    position: relative;
    background-color: var(--header-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo img {
    height: 72px;
    width: auto;
    display: block;
}

/* FLOATING SIDE MENU (desktop) */
.side-menu {
    position: fixed;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: rgba(15, 20, 30, 0.55);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(92, 158, 171, 0.05) inset;
    animation: menuFadeIn 0.8s ease 0.3s both;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(-20px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

.side-menu-title,
.mobile-menu-title {
    display: block;
    text-align: center;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-color);
    border-bottom: 1px solid var(--line);
}

.side-menu-title {
    font-size: 0.62rem;
    opacity: 0.75;
    padding: 0.4rem 0 0.6rem;
    margin-bottom: 0.25rem;
}

.mobile-menu-title {
    font-size: 0.7rem;
    opacity: 0.8;
    padding: 0 0 1rem;
    margin-bottom: 0.5rem;
}

.side-menu a {
    position: relative;
    display: block;
    padding: 0.75rem 1.2rem 0.75rem 1.5rem;
    color: rgba(209, 220, 232, 0.72);
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 10px;
    transition: color 0.3s ease, background 0.3s ease, padding 0.3s ease;
    white-space: nowrap;
}

.side-menu a::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: var(--accent-color);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.side-menu a:hover,
.side-menu a:focus-visible,
.side-menu a[aria-current="page"] {
    color: var(--text-color);
    background: rgba(92, 158, 171, 0.1);
    padding-left: 1.7rem;
    outline: none;
}

.side-menu a:hover::before,
.side-menu a:focus-visible::before,
.side-menu a[aria-current="page"]::before {
    transform: translateY(-50%) scaleY(1);
}

/* HAMBURGER (mobile only) */
.hamburger {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    z-index: 210;
}

.hamburger:hover { background: rgba(92, 158, 171, 0.12); border-color: rgba(92, 158, 171, 0.4); }

.hamburger-box {
    width: 22px;
    height: 16px;
    position: relative;
}

.hamburger-box span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: transform 0.35s ease, top 0.35s ease, opacity 0.2s ease;
}

.hamburger-box span:nth-child(1) { top: 0; }
.hamburger-box span:nth-child(2) { top: 7px; }
.hamburger-box span:nth-child(3) { top: 14px; }

.hamburger.active .hamburger-box span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.hamburger.active .hamburger-box span:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-box span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* MOBILE MENU PANEL */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 6, 12, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 190;
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 80%;
    max-width: 320px;
    background: rgba(15, 20, 30, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1), visibility 0s linear 0.4s;
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    gap: 0.4rem;
}
.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1), visibility 0s;
}

.mobile-menu a {
    position: relative;
    display: block;
    padding: 1rem 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.mobile-menu a:hover,
.mobile-menu a:active,
.mobile-menu a:focus-visible,
.mobile-menu a[aria-current="page"] {
    background: rgba(92, 158, 171, 0.12);
    border-color: rgba(92, 158, 171, 0.3);
    color: var(--accent-color);
    outline: none;
}

/* FOOTER */
.site-footer {
    background-color: var(--header-bg);
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #6f7d8c;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.4rem 1.4rem;
}

.footer-legal a {
    color: #8fa4b5;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
    color: var(--text-color);
}

/* Text pages: keep a 760px column clear of the floating side menu (about 250px
   wide). The column stays centred and only moves right when it would touch it. */
@media (min-width: 1101px) {
    main.with-side-menu { padding-left: max(16px, calc(1356px - 100vw)); }
}

@media (max-width: 1100px) {
    .side-menu { display: none; }
    .hamburger { display: flex; }
}

@media (max-width: 850px) {
    .site-header { padding: 0.8rem 1rem; }
    .logo img { height: 52px; }
    .site-footer { padding: 1.2rem 1rem; font-size: 0.8rem; }
}

/* Narrow phones: keep the logo clear of the menu button */
@media (max-width: 420px) {
    .logo img { height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .side-menu { animation: none; }
}
