/* luminous.quest — styles.css */

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

:root {
    --deep-umber: #2d2018;
    --warm-parchment: #f2e6d4;
    --terracotta: #b8704a;
    --sienna: #9c4d2e;
    --antique-gold: #c49a3a;
    --sand: #d4b896;
    --iron-oxide: #6b3a22;
    --parchment-shadow: #e0cdb5;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: var(--deep-umber);
    background: var(--warm-parchment);
    background-image: repeating-conic-gradient(
        from 0deg at 50% 50%,
        rgba(180, 160, 130, 0.03) 0deg,
        transparent 1deg,
        transparent 90deg
    );
}

h1, h2, h3 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    letter-spacing: 0.015em;
    line-height: 1.15;
}

/* Stratum base */
.stratum {
    padding: clamp(6rem, 12vh, 10rem) 0;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Stratum I — The Surface */
.stratum-surface {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.emblem-container {
    position: absolute;
    top: 28%;
    right: 30%;
}

.pixel-emblem {
    display: grid;
    grid-template-columns: repeat(8, clamp(6px, 1vw, 10px));
    grid-template-rows: repeat(8, clamp(6px, 1vw, 10px));
}

.pixel-emblem .px {
    display: block;
    border-radius: 0;
}

#hero-emblem {
    animation: seal-turn 60s linear infinite;
}

.site-title {
    position: absolute;
    bottom: 35%;
    left: 20%;
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--deep-umber);
}

/* Transmission bars */
.transmission-bar {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 2rem 0;
}

.transmission-bar span {
    display: block;
    width: clamp(20px, 4vw, 40px);
    height: 8px;
}

.transmission-bar.dark {
    background: var(--deep-umber);
}

/* Stratum II — The Artifacts */
.stratum-artifacts {
    padding-left: 8%;
    padding-right: 8%;
}

.artifacts-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(1rem, 2vw, 2rem);
}

.specimen-card {
    background: var(--parchment-shadow);
    border: 1px solid var(--sand);
    border-radius: 2px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: 0 4px 20px rgba(74, 52, 32, 0.12);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.specimen-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(74, 52, 32, 0.18);
}

.specimen-card:hover .pixel-icon .px {
    background-color: var(--antique-gold) !important;
}

.card-tall {
    grid-column: 2 / 6;
    grid-row: 1 / 3;
}

.card-wide {
    grid-column: 7 / 12;
    grid-row: 1 / 2;
}

.card-medium {
    grid-column: 5 / 8;
    grid-row: 3 / 4;
}

.specimen-card h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: 0.75rem 0 0.5rem;
    color: var(--deep-umber);
}

.specimen-card p {
    color: #4a3420;
    max-width: 38em;
}

.pixel-label {
    font-family: 'Silkscreen', cursive;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--terracotta);
    display: block;
    margin-top: 1rem;
}

.pixel-icon {
    display: grid;
    grid-template-columns: repeat(7, 3px);
    grid-template-rows: repeat(7, 3px);
    gap: 1px;
    margin-bottom: 0.5rem;
}

.pixel-icon .px {
    display: block;
    transition: background-color 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Stratum III — The Transmission */
.stratum-transmission {
    background: var(--deep-umber);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 4vw, 4rem);
}

.stratum-transmission .section-headline {
    color: var(--warm-parchment);
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.cityscape {
    display: grid;
    grid-template-columns: repeat(64, 4px);
    grid-template-rows: repeat(16, 4px);
    gap: 2px;
    justify-content: center;
}

.cityscape .cx {
    display: block;
}

.transmission-text {
    color: var(--sand);
    max-width: 38em;
    text-align: center;
    padding: 0 2rem;
}

/* Stratum IV — The Archive */
.stratum-archive {
    padding-left: 8%;
    padding-right: 8%;
}

.archive-content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(1rem, 2vw, 2rem);
}

.archive-content h2 {
    grid-column: 3 / 11;
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--deep-umber);
    margin-bottom: 1rem;
}

.archive-content p {
    grid-column: 3 / 11;
    color: #4a3420;
    max-width: 38em;
    margin-bottom: 1.5rem;
}

/* Stratum V — The Seal */
.stratum-seal {
    background: var(--deep-umber);
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.seal-emblem {
    display: flex;
    justify-content: center;
}

#seal-emblem {
    animation: seal-turn 60s linear infinite;
}

.seal-text {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    color: var(--warm-parchment);
    font-size: clamp(1rem, 2vw, 1.3rem);
    letter-spacing: 0.015em;
}

/* Keyframes */
@keyframes seal-turn {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Beacon blink */
@keyframes beacon-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-tall,
    .card-wide,
    .card-medium {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .archive-content h2,
    .archive-content p {
        grid-column: 1 / -1;
    }

    .emblem-container {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 2rem;
    }

    .site-title {
        position: relative;
        bottom: auto;
        left: auto;
        text-align: center;
    }

    .stratum-surface {
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
}
