/*
   TOM.COOL STUDIO LAUNCHER
   The shared service switcher. Each studio supplies only --launcher-accent
   and --launcher-accent-rgb so the behaviour stays identical while the
   surrounding site keeps its own character.
*/
:root {
    --launcher-accent: #a5b4fc;
    --launcher-accent-rgb: 165, 180, 252;
}

.site-apps {
    --launcher-accent: #a5b4fc;
    --launcher-accent-rgb: 165, 180, 252;
    position: relative;
    z-index: 3201;
}

/* A compact entry point for special-purpose root pages that intentionally do
   not use the standard full header (errors, portal and transactional flows). */
.utility-apps-launcher {
    position: fixed !important;
    z-index: 10000 !important;
    top: max(.75rem, env(safe-area-inset-top));
    right: max(.75rem, env(safe-area-inset-right));
}

.site-apps-toggle {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 5px);
    gap: 4px;
    place-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    color: rgba(255, 255, 255, .88);
    background: linear-gradient(145deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025));
    box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 8px 22px rgba(0, 0, 0, .16);
    cursor: pointer;
    isolation: isolate;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease, transform .2s ease;
}

.site-apps-toggle::before {
    position: absolute;
    z-index: -1;
    inset: 5px;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 20%, rgba(var(--launcher-accent-rgb), .24), transparent 62%);
    content: '';
    opacity: 0;
    transform: scale(.82);
    transition: opacity .2s ease, transform .2s ease;
}

.site-apps-toggle span {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .05);
    transition: background .2s ease, box-shadow .2s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}

.site-apps-toggle:hover,
.site-apps-toggle[aria-expanded="true"] {
    border-color: rgba(var(--launcher-accent-rgb), .72);
    color: #fff;
    background: linear-gradient(145deg, rgba(var(--launcher-accent-rgb), .28), rgba(255, 255, 255, .06));
    box-shadow: 0 12px 30px rgba(var(--launcher-accent-rgb), .18), inset 0 1px rgba(255, 255, 255, .14);
    transform: translateY(-1px);
}

.site-apps-toggle:hover::before,
.site-apps-toggle[aria-expanded="true"]::before { opacity: 1; transform: scale(1); }
.site-apps-toggle:hover span:nth-child(odd),
.site-apps-toggle[aria-expanded="true"] span:nth-child(odd) {
    background: var(--launcher-accent);
    box-shadow: 0 0 10px rgba(var(--launcher-accent-rgb), .7);
    transform: scale(1.25);
}

.site-apps-toggle:focus-visible,
.site-apps-menu a:focus-visible {
    outline: 2px solid var(--launcher-accent);
    outline-offset: 3px;
}

.site-apps-menu {
    position: absolute;
    z-index: 3200;
    display: block !important;
    top: calc(100% + 12px);
    right: 0;
    width: min(26.5rem, calc(100vw - 24px));
    padding: .85rem;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 1.25rem;
    color: #f8f8ff;
    background:
        radial-gradient(circle at 100% 0, rgba(var(--launcher-accent-rgb), .16), transparent 38%),
        rgba(12, 13, 25, .97);
    box-shadow: 0 26px 70px rgba(0, 0, 0, .5), inset 0 1px rgba(255, 255, 255, .1);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.site-apps-menu[hidden] { display: none !important; }
.site-apps-menu::before { content: none !important; }
.site-apps-menu .site-apps-tile::before { content: none !important; display: none !important; }

.site-apps-intro {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: .7rem;
    align-items: center;
    margin: .1rem .15rem .8rem;
}

.site-apps-intro-mark {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border: 1px solid rgba(var(--launcher-accent-rgb), .33);
    border-radius: .82rem;
    color: var(--launcher-accent);
    background: rgba(var(--launcher-accent-rgb), .12);
    font-size: .88rem;
    font-weight: 900;
    letter-spacing: -.08em;
}

.site-apps-eyebrow {
    display: block;
    margin-bottom: .1rem;
    color: var(--launcher-accent);
    font-size: .63rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.site-apps-intro p { margin: 0; color: rgba(255, 255, 255, .68); font-size: .79rem; line-height: 1.25; }

.site-apps-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .42rem;
    width: 100%;
}

.site-apps-tile {
    display: grid;
    grid-template-columns: 2.2rem minmax(0, 1fr) .8rem;
    gap: .58rem;
    align-items: center;
    min-width: 0;
    min-height: 3.9rem;
    padding: .58rem;
    border: 1px solid transparent;
    border-radius: .88rem;
    color: #f8f8ff;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

/* Override the previous studio-specific menu grids without touching the rest
   of each studio's navigation. */
.site-apps-menu .site-apps-tile {
    grid-template-columns: 2.2rem minmax(0, 1fr) .8rem;
    grid-template-rows: none;
    column-gap: .58rem;
    row-gap: 0;
}

.site-apps-menu .site-apps-copy b,
.site-apps-menu .site-apps-copy small { grid-column: auto; }

.site-apps-tile:first-child { grid-column: 1 / -1; min-height: 3.55rem; }
.site-apps-tile:hover {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    transform: translateY(-1px);
}

.site-apps-tile[aria-current="page"] {
    border-color: rgba(var(--launcher-accent-rgb), .28);
    background: rgba(var(--launcher-accent-rgb), .12);
}

.site-apps-mark {
    display: grid;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    border-radius: .7rem;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #38bdf8);
    box-shadow: inset 0 1px rgba(255, 255, 255, .18);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: -.04em;
}

.site-apps-copy { display: grid; min-width: 0; gap: .06rem; }
.site-apps-copy b { overflow: hidden; font-size: .8rem; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.site-apps-copy small { overflow: hidden; color: rgba(255, 255, 255, .55); font-size: .65rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.site-apps-arrow { color: rgba(255, 255, 255, .35); font-size: .9rem; transition: color .18s ease, transform .18s ease; }
.site-apps-tile:hover .site-apps-arrow { color: var(--launcher-accent); transform: translate(1px, -1px); }

.site-apps-tile[data-app-tone="design"] .site-apps-mark { background: linear-gradient(135deg, #f59e0b, #fb7185); }
.site-apps-tile[data-app-tone="web"] .site-apps-mark { background: linear-gradient(135deg, #6366f1, #06b6d4); }
.site-apps-tile[data-app-tone="help"] .site-apps-mark { background: linear-gradient(135deg, #f97316, #facc15); }
.site-apps-tile[data-app-tone="bedrijf"] .site-apps-mark { background: linear-gradient(135deg, #2dd4bf, #60a5fa); }
.site-apps-tile[data-app-tone="ai"] .site-apps-mark { background: linear-gradient(135deg, #06b6d4, #22c55e); }
.site-apps-tile[data-app-tone="security"] .site-apps-mark { background: linear-gradient(135deg, #ef4444, #f97316); }

.site-apps-contact {
    display: flex;
    gap: .45rem;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    margin-top: .65rem;
    border: 1px solid rgba(var(--launcher-accent-rgb), .27);
    border-radius: .76rem;
    color: var(--launcher-accent);
    background: rgba(var(--launcher-accent-rgb), .08);
    font-size: .74rem;
    font-weight: 750;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.site-apps-contact:hover { color: #fff; background: rgba(var(--launcher-accent-rgb), .18); transform: translateY(-1px); }

/* The central site has one panel shared by its desktop and mobile buttons. */
.site-apps-menu--root {
    position: fixed;
    top: 4.65rem;
    right: clamp(1rem, 3vw, 2.6rem);
}

@media (max-width: 760px) {
    .site-apps-menu { width: min(26.5rem, calc(100vw - 20px)); padding: .7rem; }
    .site-apps-menu--root { top: 4rem; right: .625rem; }
    .site-apps-intro { margin-bottom: .65rem; }
    .site-apps-tile { min-height: 3.65rem; padding: .5rem; }
    .site-apps-mark { width: 2rem; height: 2rem; }
}

@media (max-width: 370px) {
    .site-apps-menu { width: calc(100vw - 16px); padding: .55rem; }
    .site-apps-grid { gap: .3rem; }
    .site-apps-menu .site-apps-tile { grid-template-columns: 1.9rem minmax(0, 1fr); gap: .42rem; min-height: 3.45rem; }
    .site-apps-mark { width: 1.9rem; height: 1.9rem; }
    .site-apps-arrow { display: none; }
    .site-apps-copy small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .site-apps-toggle,
    .site-apps-toggle::before,
    .site-apps-toggle span,
    .site-apps-tile,
    .site-apps-arrow,
    .site-apps-contact { transition: none; }
}
