/* ==========================================================================
   recycle.games — Editorial Gaming Archive
   Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white),
           #e8b84b (accent gold), #6c757d (muted gray)
   Fonts: Libre Baskerville (headings), Inter (body)
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    background-color: #1a1a2e;
    color: #f5f0e8;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */

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

em {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    color: #e8b84b;
}

/* ==========================================================================
   Common Elements
   ========================================================================== */

.chapter-number {
    display: block;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.875rem;
    color: #e8b84b;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.gold-rule {
    width: 60px;
    height: 1px;
    background: #e8b84b;
    margin: 2rem 0;
}

.gold-dot {
    color: #e8b84b;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #f5f0e8;
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 540px;
    line-height: 1.8;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 2rem;
    background: radial-gradient(ellipse at 50% 30%, rgba(74, 144, 217, 0.08) 0%, transparent 60%),
                #1a1a2e;
}

.hero-inner {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: #f5f0e8;
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.3s forwards;
}

.hero-subtitle {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-style: italic;
    color: #6c757d;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1s cubic-bezier(0.23, 1, 0.32, 1) 0.6s forwards;
}

.hero-annotation {
    font-size: 0.85rem;
    color: #6c757d;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    animation: heroFadeIn 1s cubic-bezier(0.23, 1, 0.32, 1) 1s forwards;
}

#hero .gold-rule {
    margin: 2rem auto;
    opacity: 0;
    animation: heroFadeIn 1s cubic-bezier(0.23, 1, 0.32, 1) 0.8s forwards;
}

#hero .chapter-number {
    opacity: 0;
    animation: heroFadeIn 1s cubic-bezier(0.23, 1, 0.32, 1) 0.1s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: heroFadeIn 1s cubic-bezier(0.23, 1, 0.32, 1) 1.5s forwards;
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6c757d;
}

.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { cy: 8; }
    50% { cy: 20; }
}

/* ==========================================================================
   Editorial Section
   ========================================================================== */

.section-editorial {
    padding: 8rem 2rem;
    display: flex;
    justify-content: center;
    background: #1a1a2e;
    border-top: 1px solid rgba(232, 184, 75, 0.1);
}

.editorial-inner {
    max-width: 700px;
    position: relative;
}

.pull-quote {
    margin-bottom: 2rem;
}

.pull-quote p {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.5;
    color: #f5f0e8;
    font-style: italic;
}

.editorial-body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #6c757d;
    margin-bottom: 2rem;
}

.margin-annotation {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 0;
    padding-left: 1.5rem;
    border-left: 2px solid rgba(232, 184, 75, 0.3);
    margin-top: 1.5rem;
}

.note-marker {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.75rem;
    color: #e8b84b;
    min-width: 1.2rem;
    line-height: 1.6;
}

.note-text {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    line-height: 1.6;
}

/* ==========================================================================
   Collection Section
   ========================================================================== */

.section-collection {
    padding: 6rem 2rem 8rem;
    max-width: 1200px;
    margin: 0 auto;
}

.collection-header {
    margin-bottom: 4rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.game-card {
    background: rgba(245, 240, 232, 0.03);
    border: 1px solid rgba(232, 184, 75, 0.12);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    cursor: pointer;
}

.game-card--large {
    grid-column: span 2;
}

.game-card:hover {
    transform: scale(1.03) translateY(-4px);
    border-color: rgba(232, 184, 75, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(232, 184, 75, 0.05);
}

.card-inner {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(232, 184, 75, 0.1);
}

.card-icon svg {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .card-icon svg {
    opacity: 1;
    transform: scale(1.1);
}

.card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #e8b84b;
    margin-bottom: 0.75rem;
    display: block;
}

.card-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.35rem;
    color: #f5f0e8;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-excerpt {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.7;
    flex: 1;
}

.card-footnote {
    display: block;
    margin-top: 1rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.75rem;
    font-style: italic;
    color: rgba(232, 184, 75, 0.5);
}

/* ==========================================================================
   Philosophy Section
   ========================================================================== */

.section-philosophy {
    padding: 8rem 2rem;
    background: linear-gradient(180deg, rgba(74, 144, 217, 0.04) 0%, transparent 100%);
    border-top: 1px solid rgba(232, 184, 75, 0.1);
}

.philosophy-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.philosophy-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.philosophy-heading {
    font-size: 1.25rem;
    color: #e8b84b;
    margin-bottom: 1rem;
}

.philosophy-col p {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.8;
}

.philosophy-col .margin-annotation {
    margin-top: 1.5rem;
}

/* ==========================================================================
   Index Section
   ========================================================================== */

.section-index {
    padding: 6rem 2rem 8rem;
    border-top: 1px solid rgba(232, 184, 75, 0.1);
}

.index-inner {
    max-width: 700px;
    margin: 0 auto;
}

.index-list {
    list-style: none;
    margin-top: 2rem;
}

.index-item {
    display: flex;
    align-items: baseline;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(245, 240, 232, 0.05);
    transition: background 0.3s ease;
}

.index-item:hover {
    background: rgba(232, 184, 75, 0.03);
}

.index-term {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.1rem;
    color: #f5f0e8;
    min-width: 140px;
}

.index-dots {
    flex: 1;
    border-bottom: 1px dotted rgba(108, 117, 125, 0.4);
    margin: 0 1rem;
    min-width: 2rem;
    position: relative;
    top: -4px;
}

.index-ref {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.9rem;
    color: #e8b84b;
    font-style: italic;
    white-space: nowrap;
}

/* ==========================================================================
   Colophon (Footer)
   ========================================================================== */

.section-colophon {
    padding: 6rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(232, 184, 75, 0.1);
    background: linear-gradient(180deg, #1a1a2e 0%, #12121e 100%);
}

.colophon-inner {
    max-width: 600px;
    margin: 0 auto;
}

.colophon-inner .gold-rule {
    margin: 2rem auto;
}

.colophon-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 2rem;
    color: #f5f0e8;
    margin-bottom: 0.5rem;
}

.colophon-sub {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.colophon-detail {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.colophon-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.colophon-link {
    font-size: 0.85rem;
    color: #e8b84b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.colophon-link:hover {
    color: #f5f0e8;
}

.colophon-sep {
    color: #6c757d;
    font-size: 0.75rem;
}

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-card--large {
        grid-column: span 2;
    }

    .philosophy-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .game-card--large {
        grid-column: span 1;
    }

    .hero-title {
        font-size: 3rem;
    }

    .pull-quote p {
        font-size: 1.3rem;
    }

    .index-term {
        min-width: 100px;
    }

    .colophon-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .colophon-sep {
        display: none;
    }
}