/* === Salt Shaker Studio — Retro Design System === */
/* Windows 95-inspired UI components */

/* --- CSS Variables --- */
:root {
    /* Win95 System Colors */
    --win-bg:           #C0C0C0;
    --win-surface:      #D4D0C8;
    --win-dark:         #808080;
    --win-darker:       #404040;
    --win-light:        #FFFFFF;
    --win-lighter:      #DFDFDF;

    /* Title Bar */
    --titlebar-active:  #000080;
    --titlebar-end:     #1084D0;
    --titlebar-text:    #FFFFFF;
    --titlebar-inactive:#808080;

    /* Brand Colors */
    --brand-orange:     #E8922F;
    --brand-teal:       #2BB59C;
    --brand-peach:      #E6BCB3;

    /* Retro Link Colors */
    --link-default:     #0000EE;
    --link-visited:     #551A8B;
    --link-hover:       #EE0000;

    /* Text */
    --text-primary:     #000000;
    --text-secondary:   #333333;
    --text-on-dark:     #FFFFFF;

    /* Typography */
    --font-pixel:       'VT323', monospace;
    --font-mono:        'Courier New', Courier, monospace;
    --font-body:        'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
}

/* --- Base Styles --- */
body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-primary);
    background-color: var(--win-bg);
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0,0,0,0.015) 1px,
        rgba(0,0,0,0.015) 2px
    );
}

/* --- Links --- */
a {
    color: var(--link-default);
    text-decoration: underline;
    transition: color 0.1s;
}

a:visited {
    color: var(--link-visited);
}

a:hover {
    color: var(--link-hover);
}

a:focus-visible {
    outline: 1px dotted var(--text-primary);
    outline-offset: 2px;
}

/* --- Raised Panel (elevated, button-like) --- */
.retro-raised {
    background: var(--win-surface);
    border-top:    2px solid var(--win-light);
    border-left:   2px solid var(--win-light);
    border-bottom: 2px solid var(--win-darker);
    border-right:  2px solid var(--win-darker);
    box-shadow:
        inset 1px 1px 0 var(--win-lighter),
        inset -1px -1px 0 var(--win-dark);
}

/* --- Sunken Panel (inset, input-field-like) --- */
.retro-sunken {
    background: #FFFFFF;
    border-top:    2px solid var(--win-darker);
    border-left:   2px solid var(--win-darker);
    border-bottom: 2px solid var(--win-light);
    border-right:  2px solid var(--win-light);
    box-shadow:
        inset 1px 1px 0 var(--win-dark),
        inset -1px -1px 0 var(--win-lighter);
}

/* --- Retro Button --- */
.retro-button {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--win-surface);
    border-top:    2px solid var(--win-light);
    border-left:   2px solid var(--win-light);
    border-bottom: 2px solid var(--win-darker);
    border-right:  2px solid var(--win-darker);
    box-shadow:
        inset 1px 1px 0 var(--win-lighter),
        inset -1px -1px 0 var(--win-dark);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    min-width: 80px;
    user-select: none;
}

.retro-button:hover {
    color: var(--text-primary);
}

.retro-button:active,
.retro-button.active {
    border-top:    2px solid var(--win-darker);
    border-left:   2px solid var(--win-darker);
    border-bottom: 2px solid var(--win-light);
    border-right:  2px solid var(--win-light);
    box-shadow:
        inset 1px 1px 0 var(--win-dark),
        inset -1px -1px 0 var(--win-lighter);
    padding: calc(var(--space-sm) + 1px) calc(var(--space-md) - 1px) calc(var(--space-sm) - 1px) calc(var(--space-md) + 1px);
}

.retro-button:focus-visible {
    outline: 1px dotted var(--text-primary);
    outline-offset: -4px;
}

/* --- Retro Window --- */
.retro-window {
    background: var(--win-surface);
    border: 2px solid;
    border-color: var(--win-light) var(--win-darker) var(--win-darker) var(--win-light);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.retro-window__titlebar {
    background: linear-gradient(90deg, var(--titlebar-active), var(--titlebar-end));
    color: var(--titlebar-text);
    padding: 3px 4px;
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    gap: var(--space-sm);
}

.retro-window__title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 2px;
}

.retro-window__controls {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.retro-window__control {
    width: 16px;
    height: 14px;
    background: var(--win-surface);
    border: 1px solid;
    border-color: var(--win-light) var(--win-darker) var(--win-darker) var(--win-light);
    font-size: 9px;
    line-height: 12px;
    text-align: center;
    font-family: var(--font-mono);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.retro-window__menubar {
    background: var(--win-surface);
    padding: 2px var(--space-xs);
    font-size: 13px;
    border-bottom: 1px solid var(--win-dark);
    display: flex;
    gap: var(--space-md);
}

.retro-window__menubar span {
    padding: 1px var(--space-xs);
    cursor: default;
}

.retro-window__menubar span:first-child {
    text-decoration: underline;
}

.retro-window__body {
    padding: var(--space-md);
    background: var(--win-bg);
}

.retro-window__body--white {
    background: #FFFFFF;
}

/* --- Retro Horizontal Rule --- */
.retro-hr {
    border: none;
    height: 2px;
    background: var(--win-darker);
    box-shadow: 0 1px 0 var(--win-light);
    margin: var(--space-lg) 0;
}

/* --- Retro Progress Bar --- */
.progress-bar {
    height: 20px;
    background: var(--win-bg);
    border: 2px solid;
    border-color: var(--win-darker) var(--win-light) var(--win-light) var(--win-darker);
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: var(--brand-teal);
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 6px,
        rgba(255,255,255,0.15) 6px,
        rgba(255,255,255,0.15) 12px
    );
    transition: width 0.3s ease;
}

/* --- Retro Section Title --- */
.retro-section-title {
    font-family: var(--font-pixel);
    font-size: 32px;
    font-weight: normal;
    letter-spacing: 1px;
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    background: var(--win-surface);
    border-top:    2px solid var(--win-light);
    border-left:   2px solid var(--win-light);
    border-bottom: 2px solid var(--win-darker);
    border-right:  2px solid var(--win-darker);
    display: inline-block;
}

/* --- Retro Badge (footer decorations) --- */
.retro-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--win-surface);
    border: 1px solid;
    border-color: var(--win-light) var(--win-darker) var(--win-darker) var(--win-light);
}

/* --- Skip Link (accessibility) --- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--titlebar-active);
    color: var(--text-on-dark);
    padding: var(--space-sm) var(--space-md);
    z-index: 1000;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* --- Construction Stripe --- */
.construction-stripe {
    height: 12px;
    background: repeating-linear-gradient(
        -45deg,
        #FFD700,
        #FFD700 8px,
        #000000 8px,
        #000000 16px
    );
}

/* --- Status Tags --- */
.status-tag {
    display: inline-block;
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    border: 1px solid;
}

.status-tag--done {
    background: #90EE90;
    border-color: #228B22;
    color: #006400;
}

.status-tag--wip {
    background: #FFD700;
    border-color: #B8860B;
    color: #8B6914;
}

.status-tag--planned {
    background: var(--win-lighter);
    border-color: var(--win-dark);
    color: var(--text-secondary);
}
