/* Explain: Styles for reusable UI components like buttons, cards, and images. */
.retro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.8rem 1.5rem;
    border: 3px solid var(--text-color);
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    box-shadow: 4px 4px 0 var(--text-color);
}

.retro-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--text-color);
}

.retro-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 var(--text-color);
}

.retro-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.retro-btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
}

.retro-btn-accent {
    background: var(--accent-color);
    color: var(--text-color);
}

.retro-btn-accent:hover {
    background: var(--accent-hover);
    color: var(--text-color);
}

.retro-btn-ghost {
    background: var(--surface-color);
    color: var(--text-color);
}

.retro-btn-ghost:hover {
    background: var(--background-color);
    color: var(--text-color);
}

.retro-btn-sm {
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
}

/* ---------- Cards ---------- */
.retro-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    border: 3px solid var(--text-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 6px 6px 0 var(--shadow-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.retro-card:hover {
    transform: translateY(-4px);
    box-shadow: 10px 10px 0 var(--shadow-color);
}

.retro-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.35rem;
}

.card-heading {
    font-family: var(--font-heading);
    color: var(--text-color);
}

.card-desc {
    color: var(--text-muted);
}

/* ---------- Images & frames ---------- */
.photo-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 3px solid var(--text-color);
    background: var(--surface-alt);
    box-shadow: 6px 6px 0 var(--shadow-color);
}

.photo-frame img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.photo-caption {
    padding: 0.1rem 0.6rem;
    background: var(--surface-alt);
    border-top: 3px solid var(--text-color);
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: var(--text-muted);
}

/* ---------- Pills & badges ---------- */
.tag-pill {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-pill);
    background: var(--secondary-color);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.icon-badge {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    border: 3px solid var(--text-color);
    background: var(--accent-color);
    color: var(--text-color);
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* ---------- Stats ---------- */
.retro-stat-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.retro-stat {
    background: var(--background-color);
    border: 3px solid var(--text-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 5px 5px 0 var(--shadow-color);
}

.retro-stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.9rem;
    color: var(--primary-color);
}

.retro-stat-label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ---------- Specs & timeline ---------- */
.spec-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.spec-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px dotted var(--border-color);
    font-size: 0.97rem;
}

.spec-list span:first-child {
    font-weight: 700;
    color: var(--text-muted);
}

.spec-list span:last-child {
    font-weight: 600;
    text-align: right;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 2rem;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 4px;
    border-radius: 2px;
    background: repeating-linear-gradient(
        180deg,
        var(--primary-color) 0 12px,
        var(--accent-color) 12px 24px
    );
}

.timeline li {
    position: relative;
    padding-block: 0.5rem 1.4rem;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -2rem;
    top: 0.9rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--text-color);
}

.timeline .year {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* ---------- Version rows ---------- */
.version-row {
    display: grid;
    gap: 1.75rem;
    align-items: center;
}

@media (min-width: 900px) {
    .version-row {
        grid-template-columns: 1fr 1fr;
        gap: 2.75rem;
    }

    .version-row:nth-child(even) .photo-frame {
        order: 2;
    }
}

/* ---------- Call-out band ---------- */
.cta-band {
    position: relative;
    overflow: hidden;
    background: var(--teal-deep);
    border: 4px solid var(--text-color);
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
    box-shadow: 8px 8px 0 var(--shadow-color);
}

.cta-band-turquoise {
    background: var(--turquoise-color);
}

@media (min-width: 768px) {
    .cta-band { padding: 4rem 3rem; }
}

/* ---------- Forms ---------- */
.form-retro label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
    font-size: 0.92rem;
}

.form-retro input,
.form-retro textarea,
.form-retro select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 3px solid var(--text-color);
    border-radius: var(--radius-md);
    background: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-retro input::placeholder,
.form-retro textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.form-retro input:focus,
.form-retro textarea:focus,
.form-retro select:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.form-status {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    min-height: 3.25rem;
    padding: 0.85rem 1rem;
    border: 3px solid var(--text-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    font-weight: 600;
}

.form-status:empty {
    display: none;
}

/* ---------- Text panels ---------- */
.text-panel {
    background: var(--background-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.4rem;
}

@media (min-width: 768px) {
    .text-panel {
        padding: 2.5rem 2.25rem;
    }
}

.text-panel-alt {
    background: var(--background-color);
}

.text-panel-roomy {
    padding: 2.4rem 1.75rem;
}

@media (min-width: 768px) {
    .text-panel-roomy {
        padding: 3.75rem 3rem;
    }
}

/* ---------- Production model thumbnails ---------- */
.model-thumb {
    display: block;
    overflow: hidden;
    border-bottom: 3px solid var(--text-color);
    background: var(--surface-alt);
}

.model-thumb img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.retro-card:hover .model-thumb img {
    transform: scale(1.05);
}

.model-thumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ---------- File uploads ---------- */
.upload-field {
    display: flex;
    flex-direction: column;
}

.upload-field .upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-field .upload-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3.6rem;
    margin-bottom: 0;
    padding: 0.85rem 1rem;
    border: 3px dashed var(--text-color);
    border-radius: var(--radius-md);
    background: var(--background-color);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.upload-field .upload-box i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.upload-field .upload-box:hover {
    background: var(--surface-alt);
}

.upload-field .upload-input:focus-visible + .upload-box {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.upload-field.has-file .upload-box {
    border-style: solid;
    border-color: var(--primary-color);
    background: var(--surface-alt);
    color: var(--primary-hover);
}

.upload-field.has-file .upload-box i {
    color: var(--primary-hover);
}

.upload-filename {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--text-muted);
    word-break: break-word;
}

.upload-filename:empty {
    display: none;
}

/* ---------- Updates page layout ---------- */
.updates-layout {
    display: grid;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 900px) {
    .updates-layout {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.updates-text h2:first-child {
    margin-top: 0;
}

.updates-photos {
    display: grid;
    gap: 1.25rem;
}

.updates-photo {
    display: block;
    width: 100%;
    padding: 0;
    border: 3px solid var(--text-color);
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
    box-shadow: 6px 6px 0 var(--shadow-color);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.updates-photo:hover {
    transform: translate(-2px, -2px);
    box-shadow: 9px 9px 0 var(--shadow-color);
}

.updates-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 3;
    object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
    .updates-photo { transition: none; }
}

