/* archetypos.dev - Terminal + Coastal Observatory */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-navy: #0b1a2b;
    --navy: #142d3e;
    --parchment: #f0ebe3;
    --warm-sand: #e8dcc8;
    --amber: #d4a54a;
    --teal: #7eb8c9;
    --terracotta: #c4835a;
    --lavender: #8b7fa3;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-navy);
    color: var(--parchment);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
}

.chapter {
    min-height: 100vh;
    padding: 6rem 4rem;
    position: relative;
}

.full-viewport {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Terminal Intro */
#terminal-intro {
    background: var(--deep-navy);
    flex-direction: column;
}

.terminal-content {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    letter-spacing: 0.04em;
    color: var(--amber);
    max-width: 700px;
    width: 100%;
}

.cursor-line {
    display: block;
    margin-bottom: 1rem;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--amber);
}

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

.boot-sequence {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--teal);
    line-height: 1.8;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.boot-sequence.visible {
    opacity: 1;
}

.prompt {
    color: var(--terracotta);
}

/* Observatory Section */
#observatory {
    background: linear-gradient(180deg, var(--deep-navy) 0%, var(--navy) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
    padding: 8rem 4rem;
    position: relative;
}

.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--lavender);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.display-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    color: var(--parchment);
    line-height: 1.2;
    margin-bottom: 2rem;
}

.display-heading em {
    font-style: italic;
    color: var(--teal);
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--warm-sand);
    max-width: 600px;
}

.constellation-bg {
    position: absolute;
    top: 0;
    right: -100px;
    width: 400px;
    height: 400px;
    opacity: 0.15;
}

/* Archetype Cards */
#archetypes {
    background: var(--navy);
    padding: 8rem 4rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto 0;
}

.glass-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(126, 184, 201, 0.15);
    border-radius: 12px;
    padding: 2rem;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    cursor: default;
}

.glass-card:hover {
    border-color: rgba(212, 165, 74, 0.5);
    box-shadow: 0 0 30px rgba(212, 165, 74, 0.08);
}

.constellation-svg {
    width: 100%;
    height: 140px;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.card-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--amber);
    display: block;
    margin-bottom: 0.75rem;
}

.card-desc {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-style: italic;
    color: var(--warm-sand);
    line-height: 1.6;
}

/* System Section */
#system {
    background: linear-gradient(180deg, var(--navy) 0%, var(--deep-navy) 100%);
    padding: 8rem 4rem;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    max-width: 1100px;
    margin: 2rem auto 0;
}

.system-block {
    border-left: 2px solid var(--teal);
    padding-left: 1.5rem;
}

.system-block h3 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--teal);
    margin-bottom: 1rem;
}

.system-block p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--warm-sand);
}

/* Closing Terminal */
#closing {
    background: var(--deep-navy);
    flex-direction: column;
    position: relative;
}

.closing-terminal {
    color: var(--teal);
    line-height: 2;
}

.mono {
    color: var(--amber);
}

.output-line {
    color: var(--parchment);
    opacity: 0.7;
}

.fade-in-last {
    animation: fadeInSlow 2s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

@keyframes fadeInSlow {
    to { opacity: 0.7; }
}

.horizon-line {
    position: absolute;
    bottom: 20%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--teal) 30%, var(--amber) 50%, var(--teal) 70%, transparent 100%);
    opacity: 0.3;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .chapter {
        padding: 4rem 2rem;
    }

    #observatory {
        padding: 6rem 2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}
