/* ============================================
   prototypic.dev - Y2K Futurism / Vintage Archive
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --sky-wash: #88B4C8;
    --sand-warm: #C8A87B;
    --drift-white: #F5F0E8;
    --tide-gray: #6B7B8B;
    --hud-cyan: #5CC8E8;
    --vintage-umber: #8B7355;
    --deep-ocean: #2C4054;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.8;
    color: var(--tide-gray);
    background-color: var(--drift-white);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--deep-ocean);
}

h1 {
    font-size: clamp(28px, 4vw, 52px);
}

h2 {
    font-size: clamp(24px, 3vw, 42px);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(20px, 2.5vw, 28px);
    margin-bottom: 0.75rem;
}

/* --- Typewriter Cursor --- */
.cursor {
    display: inline-block;
    width: 1px;
    height: 1em;
    background-color: var(--tide-gray);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.6s step-end infinite;
}

.cursor.cursor-hidden {
    animation: none;
    opacity: 0;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- HUD Overlay --- */
#hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#hud-overlay.visible {
    opacity: 1;
}

#hud-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hud-arc {
    fill: none;
    stroke: var(--hud-cyan);
    stroke-width: 1;
    opacity: 0.3;
}

.hud-line {
    stroke: var(--hud-cyan);
    stroke-width: 0.5;
    opacity: 0.2;
}

.hud-readout {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hud-cyan);
    opacity: 0.4;
}

.hud-readout-tl {
    top: 24px;
    left: 100px;
}

.hud-readout-tr {
    top: 24px;
    right: 100px;
    text-align: right;
}

.hud-readout-bl {
    bottom: 24px;
    left: 100px;
}

.hud-readout-br {
    bottom: 24px;
    right: 100px;
    text-align: right;
}

.hud-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.6;
    color: var(--hud-cyan);
}

.hud-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--hud-cyan);
}

/* --- Section: Time Capsule Hero --- */
.section-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sky-wash) 0%, var(--sand-warm) 100%);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.wordmark {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(32px, 5vw, 64px);
    color: var(--deep-ocean);
    min-height: 1.2em;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(14px, 1.8vw, 20px);
    color: var(--deep-ocean);
    opacity: 0;
    margin-top: 1rem;
    transition: opacity 1s ease;
}

.hero-subtitle.visible {
    opacity: 0.7;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 1.2s ease;
}

.scroll-indicator.visible {
    opacity: 0.5;
}

.scroll-arrow {
    display: block;
    width: 20px;
    height: 20px;
    border-right: 1px solid var(--deep-ocean);
    border-bottom: 1px solid var(--deep-ocean);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(8px); }
}

/* --- Section: Archive Gallery --- */
.section-archive {
    padding: 120px 24px;
    background: var(--drift-white);
    transition: background 0.6s ease;
}

.archive-container {
    max-width: 640px;
    margin: 0 auto;
}

.section-heading {
    text-align: center;
    min-height: 1.3em;
}

.archive-intro {
    text-align: center;
    font-style: italic;
    color: var(--tide-gray);
    margin-bottom: 4rem;
    opacity: 0.85;
}

/* Archive Entries */
.archive-entry {
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.archive-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Vintage Photo Treatment --- */
.vintage-photo {
    margin-bottom: 1.5rem;
}

.photo-mount {
    border: 12px solid var(--drift-white);
    outline: 1px solid var(--vintage-umber);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: var(--drift-white);
}

.photo-inner {
    width: 100%;
    aspect-ratio: 16 / 10;
    filter: sepia(0.25) contrast(0.9) brightness(1.05) saturate(0.8);
    background-size: cover;
    background-position: center;
}

/* Gradient placeholders simulating archived screenshots */
.gradient-placeholder {
    position: relative;
    overflow: hidden;
}

.gradient-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px
        );
}

.gp-1 {
    background: linear-gradient(160deg, #a8c4d4 0%, #7bacc2 30%, #c2b48a 70%, #d4c4a0 100%);
}

.gp-2 {
    background: linear-gradient(200deg, #b4a088 0%, #8ba4b8 40%, #6898b4 80%, #a0c0d0 100%);
}

.gp-3 {
    background: linear-gradient(130deg, #7ca8c0 0%, #a0b8a0 35%, #c4b888 65%, #d0c8a4 100%);
}

.gp-4 {
    background: linear-gradient(180deg, #88B4C8 0%, #a4c0cc 50%, #C8A87B 100%);
}

.gp-5 {
    background: linear-gradient(145deg, #6B7B8B 0%, #88B4C8 50%, #a8c8d8 100%);
}

.gp-6 {
    background: linear-gradient(210deg, #C8A87B 0%, #8B7355 50%, #6B7B8B 100%);
}

.gp-7 {
    background: linear-gradient(170deg, #2C4054 0%, #88B4C8 40%, #F5F0E8 100%);
}

.gp-8 {
    background: linear-gradient(190deg, #5CC8E8 0%, #88B4C8 50%, #C8A87B 100%);
}

.gp-9 {
    background: linear-gradient(155deg, #8B7355 0%, #C8A87B 40%, #88B4C8 80%, #5CC8E8 100%);
}

/* Entry text */
.entry-text {
    padding: 0 4px;
}

.entry-heading {
    min-height: 1.3em;
}

.entry-description {
    margin-bottom: 0.75rem;
    color: var(--tide-gray);
}

.entry-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--vintage-umber);
    opacity: 0.7;
}

/* --- Section: Photo Strip --- */
.section-photos {
    padding: 100px 24px;
    background: linear-gradient(180deg, var(--drift-white) 0%, #e8e0d4 50%, var(--drift-white) 100%);
}

.section-photos .section-heading {
    margin-bottom: 3rem;
}

.photo-strip-scroll {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 40px 24px;
    -webkit-overflow-scrolling: touch;
}

.photo-strip-scroll::-webkit-scrollbar {
    height: 4px;
}

.photo-strip-scroll::-webkit-scrollbar-track {
    background: rgba(107, 123, 139, 0.1);
    border-radius: 2px;
}

.photo-strip-scroll::-webkit-scrollbar-thumb {
    background: var(--vintage-umber);
    border-radius: 2px;
    opacity: 0.5;
}

.strip-photo {
    flex: 0 0 320px;
    scroll-snap-align: center;
}

.strip-photo .photo-mount {
    margin-bottom: 0.75rem;
}

.strip-photo .photo-inner {
    aspect-ratio: 4 / 3;
}

.photo-caption {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 13px;
    color: var(--vintage-umber);
    text-align: center;
    padding: 0 12px;
}

/* --- Section: Transmission Log --- */
.section-transmission {
    padding: 120px 24px;
    background: linear-gradient(180deg, var(--drift-white) 0%, #dde6ec 100%);
}

.transmission-container {
    max-width: 640px;
    margin: 0 auto;
}

.transmission-entries {
    margin-top: 2rem;
}

.transmission-entry {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(107, 123, 139, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.transmission-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.tx-timestamp {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hud-cyan);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.tx-message {
    color: var(--tide-gray);
    font-size: clamp(15px, 1.4vw, 17px);
}

/* --- Footer --- */
.section-footer {
    padding: 80px 24px;
    background: var(--deep-ocean);
    text-align: center;
}

.footer-content {
    max-width: 640px;
    margin: 0 auto;
}

.footer-wordmark {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 32px);
    color: var(--drift-white);
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.footer-tagline {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(13px, 1.3vw, 16px);
    color: var(--sky-wash);
    margin-bottom: 2rem;
    opacity: 0.7;
}

.footer-coordinates .hud-label {
    color: var(--hud-cyan);
    opacity: 0.3;
}

/* --- Gradient Section Backgrounds (scroll-driven) --- */
.section-archive.bg-shift-1 {
    background: linear-gradient(180deg, var(--drift-white) 0%, #e8edf0 100%);
}

.section-archive.bg-shift-2 {
    background: linear-gradient(180deg, #e8edf0 0%, #ede6da 100%);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .hud-readout {
        display: none;
    }

    .strip-photo {
        flex: 0 0 260px;
    }

    .archive-entry {
        margin-bottom: 3.5rem;
    }

    .section-archive {
        padding: 80px 20px;
    }

    .section-photos {
        padding: 80px 16px;
    }

    .section-transmission {
        padding: 80px 20px;
    }
}

@media (max-width: 480px) {
    .strip-photo {
        flex: 0 0 220px;
    }

    .photo-strip-scroll {
        gap: 16px;
        padding: 24px 16px;
    }
}
