/* mac.css – BUW overrides + responsive tweaks */

body {
    background: #c3c3c3;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: Chicago_12, Chicago, sans-serif;
}

.desktop {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    width: min(95%, 960px);
    margin-top: 2rem;
}

.desktop-icons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    margin-top: 1.5rem;
}

.desktop-icon {
    --tilt: 0deg;
    --offset-x: 0px;
    --offset-y: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem 0.5rem;
    text-decoration: none;
    color: var(--secondary);
    font-family: Chicago_12, Chicago, sans-serif;
    font-size: 1rem;
    letter-spacing: 0.25px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--box-shadow);
    transform: translate(var(--offset-x), var(--offset-y))
        rotate(var(--tilt));
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.desktop-icon img {
    width: 72px;
    height: 72px;
    margin-bottom: 0.5rem;
}

.desktop-icon span {
    margin-top: 0.25rem;
}

.desktop-icon:focus,
.desktop-icon:hover {
    box-shadow: 4px 4px;
    transform:
        translate(var(--offset-x), var(--offset-y)) rotate(0deg) scale(1.02);
}

.desktop-icon--docs {
    --tilt: -4deg;
    --offset-x: 8px;
    --offset-y: -16px;
}

.desktop-icon--apps {
    --tilt: 3deg;
    --offset-x: 12px;
    --offset-y: 10px;
    align-self: flex-end;
}

/* Menu bar */
ul[role="menu-bar"] > [role="menu-item"] {
    font-family: Chicago_12;
    font-weight: bold;
    font-size: 1.3rem; /* tweak until it feels right */
    letter-spacing: 0.5px; /* optional, to match chunky look */
}

/* Match menu bar font to the title bar */
ul[role="menu-bar"] > [role="menu-item"],
ul[role="menu-bar"] > [role="menu-item"] a,
ul[role="menu-bar"] > [role="menu-item"] span {
    font-family: Chicago_12;
    font-weight: bold;
    font-size: 1.5rem; /* same size as window title */
    line-height: 1.2;
    letter-spacing: 0.5px;
    color: var(--secondary);
    text-decoration: none;
}

ul[role="menu-bar"] > [role="menu-item"]:hover,
ul[role="menu-bar"] > [role="menu-item"]:focus-within {
    color: var(--primary);
}

ul[role="menu-bar"] > [role="menu-item"]:hover a,
ul[role="menu-bar"] > [role="menu-item"]:focus-within a,
ul[role="menu-bar"] > [role="menu-item"]:hover span,
ul[role="menu-bar"] > [role="menu-item"]:focus-within span {
    color: var(--primary);
}

ul[role="menu-bar"] {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    width: 100%;
    background: var(--primary);
    border-bottom: 2px solid var(--secondary);
}

ul[role="menu-bar"] > [role="menu-item"] {
    padding: 6px 10px;
}

/* Window tweaks */
.window {
    max-width: 640px;
    width: 90%;
    min-width: 280px;
    margin-top: 0;
}

.window-body {
    padding: 1.5rem;
    text-align: center;
}

.title-bar {
    border-bottom: 2px solid var(--secondary); /* extra bottom border */
}

.cta {
    margin-top: 1.5rem;
}

.links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 600px;
    max-width: 95%;
}

.modal.active {
    display: block;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* Responsive iframe */
iframe {
    width: 100%;
    max-width: 100%;
    border: none;
}

.beehiiv-embed {
    display: block;
    width: 100%;
    max-width: 557px;
    height: 277px;
    margin: 0 auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Hide CTA until revealed */
#backIssues {
    display: none;
    margin-top: 1.5rem;
}
#backIssues.show {
    display: block;
}

.signup-confirm {
    margin-top: 1rem;
}

/* Responsive tweaks for phones */
@media (max-width: 768px) {
    .desktop {
        flex-direction: column;
        align-items: center;
        margin-top: 1.5rem;
        gap: 1.5rem;
    }

    .window {
        width: 95%;
    }

    .window-body {
        padding: 1rem;
    }

    .desktop-icons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        margin-top: 0;
    }

    .desktop-icon {
        --tilt: 0deg;
        --offset-x: 0px;
        --offset-y: 0px;
    }

    .desktop-icon--apps {
        align-self: center;
    }

    .links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    ul[role="menu-bar"] {
        font-size: 0.9em;
    }

    .title-bar .title {
        font-size: 1.2rem;
    }

    .modal {
        width: 95%;
        left: 2.5%;
        transform: none;
    }
}
