/* ============================================================================
   MR. LAUNDRY — LAYOUT (header, nav, switchers, footer, cookie)
   Depends on design-system.css tokens. Single mobile-first system.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   HEADER / NAVBAR
--------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    max-width: var(--container);
    margin-inline: auto;
    padding: .6rem var(--gutter);
    min-height: var(--header-h);
}

.nav-brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; }
.nav-brand img { height: 48px; width: 48px; border-radius: 50%; background: #fff; padding: 2px; box-shadow: var(--shadow-sm); }
.nav-brand:hover img { opacity: .9; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand-name { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-md); color: var(--ink); letter-spacing: -.01em; }
.nav-brand-name b { color: var(--accent); }
.nav-brand-tag { font-size: var(--fs-xs); color: var(--ink-muted); }

/* Desktop phone strip */
.nav-phones { display: none; flex-direction: column; gap: 2px; margin-left: var(--sp-2); }
.nav-phone { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-muted); white-space: nowrap; }
.nav-phone a { color: var(--ink); font-weight: 700; }
.nav-phone .ic { color: var(--accent); }

/* Primary nav */
.nav-menu { display: none; align-items: center; gap: clamp(.6rem, 1.6vw, 1.4rem); }
.nav-menu a {
    color: var(--ink);
    font-weight: 600;
    font-size: var(--fs-sm);
    text-decoration: none;
    padding: .4rem 0;
    position: relative;
}
.nav-menu a::after {
    content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
    background: var(--accent-grad); transition: right var(--t) var(--ease);
}
.nav-menu a:hover { color: var(--accent); }
.nav-menu a:hover::after { right: 0; }
.nav-menu a[aria-current="page"] { color: var(--accent); }
.nav-menu a[aria-current="page"]::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: var(--sp-2); }

/* ---- Theme toggle ---- */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--r-md);
    background: var(--surface-2); border: 1px solid var(--border); color: var(--ink);
    cursor: pointer; font-size: 1.1rem; line-height: 1; transition: all var(--t) var(--ease);
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--accent); }
.theme-toggle .ic-light { display: none; }
.theme-toggle .ic-dark { display: none; }
.theme-toggle .ic-auto { display: inline; }
:root[data-theme="light"] .theme-toggle .ic-auto { display: none; }
:root[data-theme="light"] .theme-toggle .ic-light { display: inline; }
:root[data-theme="dark"]  .theme-toggle .ic-auto { display: none; }
:root[data-theme="dark"]  .theme-toggle .ic-dark { display: inline; }

/* ---- Language switcher (native <details>) ---- */
.lang-switch { position: relative; }
.lang-switch > summary {
    list-style: none; cursor: pointer; user-select: none;
    display: inline-flex; align-items: center; gap: 6px;
    height: 40px; padding: 0 .7rem; border-radius: var(--r-md);
    background: var(--surface-2); border: 1px solid var(--border); color: var(--ink);
    font-weight: 700; font-size: var(--fs-xs); transition: all var(--t) var(--ease);
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { border-color: var(--border-strong); color: var(--accent); }
.lang-switch[open] > summary { border-color: var(--accent); color: var(--accent); }
.lang-menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
    box-shadow: var(--shadow-md); padding: 6px; z-index: var(--z-drawer);
}
.lang-menu a {
    display: flex; align-items: center; gap: 10px; padding: .55rem .7rem;
    border-radius: var(--r-sm); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); text-decoration: none;
}
.lang-menu a:hover { background: var(--surface-2); color: var(--accent); }
.lang-menu a[aria-current="true"] { color: var(--accent); background: var(--neon-soft); }
.lang-menu .flag { font-size: 1.1rem; }

/* ---- Hamburger ---- */
.nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: var(--r-md);
    background: var(--surface-2); border: 1px solid var(--border); color: var(--ink);
    cursor: pointer; font-size: 1.4rem;
}
.nav-burger:hover { color: var(--accent); border-color: var(--border-strong); }

/* ---- Mobile drawer ---- */
.drawer {
    position: fixed; inset: 0 0 0 auto; width: min(86vw, 340px);
    background: var(--surface); border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform var(--t) var(--ease-out);
    z-index: var(--z-drawer); padding: calc(var(--header-h) + 1rem) var(--sp-5) var(--sp-6);
    display: flex; flex-direction: column; gap: var(--sp-4); overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer a { color: var(--ink); font-weight: 700; font-size: var(--fs-md); text-decoration: none; }
.drawer a:hover { color: var(--accent); }
.drawer-close { position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--r-md); color: var(--ink); font-size: 1.3rem; cursor: pointer; }
.drawer-divider { height: 1px; background: var(--border); margin: var(--sp-2) 0; }
.drawer-phone { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-muted); }
.drawer-phone a { font-size: var(--fs-md); }
.drawer .drawer-langs { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer .drawer-langs a { font-size: var(--fs-sm); padding: .4rem .8rem; border: 1px solid var(--border); border-radius: var(--r-pill); }
.drawer .drawer-langs a[aria-current="true"] { color: var(--accent); border-color: var(--accent); }

.scrim {
    position: fixed; inset: 0; background: rgba(2, 6, 16, .5);
    opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease); z-index: var(--z-overlay);
}
.scrim.show { opacity: 1; pointer-events: auto; }

/* Responsive: reveal desktop layout */
@media (min-width: 720px) {
    .nav-phones { display: flex; }
}
@media (min-width: 980px) {
    .nav-menu { display: flex; }
    .nav-burger { display: none; }
}

/* ---------------------------------------------------------------------------
   FOOTER
--------------------------------------------------------------------------- */
.site-footer {
    background: var(--surface-inv);
    color: var(--ink-inv);
    padding-block: var(--sp-8) var(--sp-6);
    margin-top: var(--sp-9);
}
:root[data-theme="dark"] .site-footer,
:root:not([data-theme="light"]) .site-footer { background: #05080f; }
.footer-grid {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: grid; gap: var(--sp-6);
    grid-template-columns: 1fr;
}
.footer-brand .nav-brand-name { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.62); font-size: var(--fs-sm); margin-top: var(--sp-3); max-width: 42ch; }
.footer-col h4 { color: #fff; font-size: var(--fs-sm); letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col a { color: rgba(255,255,255,.72); font-size: var(--fs-sm); text-decoration: none; }
.footer-col a:hover { color: var(--neon); }
.footer-social { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.footer-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: var(--r-md);
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #fff;
    font-size: 1.2rem; transition: all var(--t) var(--ease);
}
.footer-social a:hover { background: var(--accent); color: var(--on-accent); border-color: transparent; transform: translateY(-3px); }
.footer-bottom {
    max-width: var(--container); margin: var(--sp-7) auto 0; padding: var(--sp-5) var(--gutter) 0;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between;
    color: rgba(255,255,255,.55); font-size: var(--fs-xs);
}
@media (min-width: 760px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------------------------------------------------------------------------
   COOKIE BANNER (fixed, works in all viewports + themes)
--------------------------------------------------------------------------- */
.cookie-banner {
    position: fixed; left: 50%; bottom: var(--sp-4); transform: translateX(-50%) translateY(150%);
    width: min(620px, calc(100vw - 2rem)); z-index: var(--z-toast);
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg); padding: var(--sp-4) var(--sp-5);
    display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
    opacity: 0; transition: transform var(--t-slow) var(--ease-out), opacity var(--t-slow) var(--ease-out);
}
.cookie-banner.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.cookie-banner p { margin: 0; flex: 1; min-width: 240px; font-size: var(--fs-sm); color: var(--ink-muted); }
.cookie-banner a { font-weight: 700; }
.cookie-banner .btn { padding: .7rem 1.4rem; }
