/* window.css — project window, ported from the live site's general.css window styles */

/* The live site's case-study styles (projects.css) choose weights by family name — SFRegular,
   SFMedium, SFBold. On this site those names point at Circular Std, so windows match the rest. */
@font-face {
    font-family: 'SFRegular';
    src: url('/fonts/CircularStd-Book.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'SFMedium';
    src: url('/fonts/CircularStd-Medium.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'SFBold';
    src: url('/fonts/CircularStd-Bold.woff2') format('woff2');
    font-weight: bold;
    font-display: swap;
}

.window {
    --text-color: #000000;
    position: fixed;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    font-family: 'SFRegular', sans-serif;
}

.window-box {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.17);
}

.window-header {
    height: 36px;
    cursor: move;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    font-family: 'SFMedium', sans-serif;
    user-select: none;
    flex-shrink: 0;
}

.window-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.window-title {
    font-family: 'SFMedium', sans-serif;
    font-size: 13px;
    color: rgba(0,0,0,0.7);
    opacity: 0;
    transition: opacity 0.8s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.window-title.title-visible { opacity: 1; }

/* Traffic lights: larger transparent hitbox, small visible dot via ::before */
.window-close-btn,
.window-size-toggle-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: -8px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease;
}
.window-close-btn::before,
.window-size-toggle-btn::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    box-sizing: border-box;
    transition: opacity 0.15s ease;
}
.window-close-btn::before       { background: #ff5f57; }
.window-size-toggle-btn::before { background: #28c840; }

.window-close-btn::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M1.5 1.5L8.5 8.5M8.5 1.5L1.5 8.5' stroke='white' stroke-width='2' stroke-linecap='round' fill='none'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.window-size-toggle-btn::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.window-size-toggle-btn.small-mode::after {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M5 3L7 3L7 5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/><path d='M5 7L3 7L3 5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
}
.window-size-toggle-btn.large-mode::after {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M8.5 4L6 4L6 1.5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/><path d='M1.5 6L4 6L4 8.5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
}
.window-close-btn:hover::before,
.window-size-toggle-btn:hover::before { opacity: 0.85; }
.window-close-btn:hover::after,
.window-size-toggle-btn:hover::after  { opacity: 1; }

.window-content {
    overflow: auto;
    flex-grow: 1;
    color: var(--text-color);
}

/* Footer project nav with sliding pill */
.window-footer-nav {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-shrink: 0;
    align-self: center;
    padding: 3px;
    background: rgba(255,255,255,0.7);
    border-radius: 999px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.17);
    overflow: hidden;
}
.window-footer-nav:empty { display: none; }

.nav-pill-indicator {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 0;
    background: rgba(0,0,0,0.07); /* live: white-on-wallpaper; dark here for the white page */
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.nav-project-link {
    position: relative;
    z-index: 1;
    font-family: 'SFMedium', sans-serif;
    font-size: 12px;
    color: rgba(0,0,0,0.45);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: 6px 18px;
    transition: color 0.2s ease;
}
.nav-project-link:hover { color: rgba(0,0,0,0.8); }
.nav-project-link.nav-active {
    font-family: 'SFBold', sans-serif;
    color: #000000;
    cursor: default;
}

.window.is-fullscreen { gap: 0; }
.window.is-fullscreen .window-footer-nav {
    align-self: stretch;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 4px 0;
}
.window.is-fullscreen .nav-pill-indicator {
    top: 4px;
    bottom: 4px;
}

/* Case-study classes the live site defines in general.css (the rest come from projects.css) */
.case-study-wrapper {
    background: #ffffff;
    border-radius: 30px;
}
.bold { font-family: 'SFBold'; }
