/* ============================================
   LLITTL.com - Candy-Bright Magazine Spread
   ============================================ */

:root {
    --canvas: #FAFAFA;
    --ink: #1A1A1A;
    --bubblegum: #FF6B9D;
    --spearmint: #00D4AA;
    --sunshine: #FFD23F;
    --grape: #9B5DE5;
    --tangerine: #F77F00;
    --mist: #E8E8E8;
    --text: #333333;
    --meta: #999999;
    --soft-gray: #BDBDBD;
}

/* ---- Reset & Base ---- */

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

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--canvas);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ---- Typography ---- */

.cover-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(96px, 12vw, 160px);
    letter-spacing: -0.01em;
    line-height: 0.92;
    color: var(--ink);
}

.cover-tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.65;
    color: var(--text);
    max-width: 380px;
    margin-top: 24px;
}

.pull-quote {
    font-family: 'Archivo Narrow', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--ink);
    border: none;
    padding: 0;
    position: relative;
}

.editorial-body p {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    max-width: 540px;
    margin-bottom: 1.2em;
}

.color-break-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(48px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: #FFFFFF;
    text-align: left;
}

.closing-word {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--text);
    text-align: center;
    letter-spacing: 0.05em;
}

.closing-domain {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink);
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.closing-domain.visible {
    opacity: 1;
}

/* ---- Folio Marks ---- */

.folio-mark {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.folio-mark--left {
    top: 32px;
    left: 32px;
}

.folio-mark--right {
    top: 32px;
    right: 32px;
    text-align: right;
}

.folio-mark--light .folio-number,
.folio-mark--light .folio-title {
    color: rgba(255, 255, 255, 0.5);
}

.folio-number,
.folio-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--soft-gray);
    display: block;
}

/* ---- Marginal Annotations ---- */

.marginal-annotation {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.marginal-annotation span {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--meta);
}

.marginal-annotation--right {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

/* ---- Spreads (Shared) ---- */

.spread {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
}

/* ---- Spread 1: Cover ---- */

.spread-cover {
    background-color: var(--canvas);
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: 1fr;
    gap: 16px;
    padding: 0 32px;
    align-items: center;
}

.cover-content {
    grid-column: 2 / 8;
    grid-row: 1;
    z-index: 2;
    padding-left: 16px;
}

.cover-image-container {
    grid-column: 10 / 17;
    grid-row: 1;
    height: 70vh;
    position: relative;
    z-index: 1;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cover-image {
    width: 40vw;
    max-width: 500px;
    height: auto;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.cover-image:hover {
    transform: translateY(-8px);
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.10));
}

.cover-image svg {
    width: 100%;
    height: auto;
    display: block;
}

.daisy-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.daisy-dots.visible {
    opacity: 1;
}

.daisy-dot {
    position: absolute;
}

.daisy-dot circle {
    fill: var(--sunshine);
    opacity: 0.4;
}

/* ---- Spread 2: Editorial ---- */

.spread-editorial {
    background-color: var(--canvas);
    display: grid;
    grid-template-columns: 60% 40%;
    grid-template-rows: 1fr;
}

.editorial-image-panel {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--spearmint);
}

.editorial-image-panel svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.editorial-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--spearmint);
    opacity: 0.15;
    pointer-events: none;
}

.editorial-text-panel {
    grid-column: 2;
    grid-row: 1;
    padding: 80px 48px 80px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.pull-quote {
    margin-left: -30px;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
    cursor: default;
}

.pull-quote::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--spearmint);
    transition: width 0.3s ease;
}

.pull-quote:hover {
    transform: translateY(-4px);
}

.pull-quote:hover::after {
    width: 100%;
}

.editorial-body {
    padding-right: 48px;
}

/* ---- Spread 3: Color Break ---- */

.spread-color-break {
    background-color: var(--bubblegum);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 80px 10vw;
    position: relative;
}

.diagonal-stripe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.08;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 9px,
        #FFFFFF 9px,
        #FFFFFF 12px
    );
}

.color-break-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.nature-icon {
    position: absolute;
    bottom: 60px;
    left: 80px;
    width: 24px;
    height: 24px;
    color: #FFFFFF;
    opacity: 0.6;
    transition: transform 0.25s ease, opacity 0.25s ease;
    cursor: default;
}

.nature-icon:hover {
    transform: scale(1.15) translateY(-3px);
    opacity: 1;
    color: var(--ink);
}

.nature-icon svg {
    width: 100%;
    height: 100%;
}

.chevron-ribbon {
    position: absolute;
    bottom: 24px;
    left: 0;
    width: 200%;
    height: 20px;
    pointer-events: none;
    z-index: 1;
}

/* ---- Spread 4: Gallery ---- */

.spread-gallery {
    background-color: var(--canvas);
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: 1fr;
    gap: 16px;
    padding: 0 32px;
    align-items: center;
    position: relative;
}

.gallery-grid {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: repeat(12, 1fr);
    gap: 16px;
    height: 80vh;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background-color: var(--canvas);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
    cursor: default;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
}

.gallery-item svg {
    width: 100%;
    height: 100%;
    display: block;
}

.gallery-item--large {
    grid-column: 2 / 9;
    grid-row: 1 / 11;
}

.gallery-item--medium {
    grid-column: 10 / 14;
    grid-row: 3 / 10;
}

.gallery-item--small {
    grid-column: 14 / 16;
    grid-row: 5 / 9;
}

.gallery-caption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--meta);
    background-color: rgba(250, 250, 250, 0.85);
    padding: 4px 8px;
}

.gallery-annotation {
    position: absolute;
    bottom: 48px;
    right: 48px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.annotation-label {
    font-family: 'Archivo Narrow', sans-serif;
    font-weight: 600;
    font-size: 14px;
    font-style: italic;
    color: var(--text);
}

.annotation-detail {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--meta);
}

/* ---- Spread 5: Closing ---- */

.spread-closing {
    background-color: var(--canvas);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.closing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.circle-grid-pattern {
    width: 200px;
    height: 200px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 16px;
    opacity: 0;
    transition: opacity 2s ease;
}

.circle-grid-pattern.visible {
    opacity: 1;
}

.circle-grid-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--mist);
}

/* ---- Retro Pattern: Daisy Dots ---- */
/* Generated via JS as SVG elements */

/* ---- Retro Pattern: Circle Grid (background) ---- */

.circle-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
    background-image: radial-gradient(circle, var(--mist) 4px, transparent 4px);
    background-size: 24px 24px;
}

/* ---- Scroll Entrance Animations ---- */

.spread-enter .cover-title,
.spread-enter .cover-tagline,
.spread-enter .cover-image,
.spread-enter .pull-quote,
.spread-enter .editorial-body,
.spread-enter .color-break-text,
.spread-enter .gallery-item,
.spread-enter .closing-word,
.spread-enter .closing-domain {
    opacity: 0;
    transform: translateY(20px);
}

.spread-animate .cover-title {
    animation: fadeInUp 0.5s ease-out 0ms forwards;
}

.spread-animate .cover-tagline {
    animation: fadeInUp 0.5s ease-out 80ms forwards;
}

.spread-animate .cover-image {
    animation: fadeInUp 0.5s ease-out 160ms forwards;
}

.spread-animate .pull-quote {
    animation: fadeInUp 0.5s ease-out 0ms forwards;
}

.spread-animate .editorial-body {
    animation: fadeInUp 0.5s ease-out 80ms forwards;
}

.spread-animate .color-break-text {
    animation: fadeInUp 0.5s ease-out 0ms forwards;
}

.spread-animate .gallery-item--large {
    animation: fadeInUp 0.5s ease-out 0ms forwards;
}

.spread-animate .gallery-item--medium {
    animation: fadeInUp 0.5s ease-out 80ms forwards;
}

.spread-animate .gallery-item--small {
    animation: fadeInUp 0.5s ease-out 160ms forwards;
}

.spread-animate .closing-word {
    animation: fadeInUp 0.5s ease-out 0ms forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Chevron Ribbon Animation ---- */

.chevron-ribbon svg {
    animation: chevronScroll 4s linear infinite;
}

@keyframes chevronScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* ---- Responsive Adjustments ---- */

@media (max-width: 900px) {
    .spread-cover {
        grid-template-columns: 1fr;
        padding: 80px 24px;
        align-items: flex-start;
    }

    .cover-content {
        grid-column: 1;
        grid-row: 1;
        padding-left: 0;
        padding-top: 80px;
    }

    .cover-image-container {
        grid-column: 1;
        grid-row: 1;
        position: absolute;
        bottom: 40px;
        right: 0;
        height: auto;
    }

    .cover-image {
        width: 60vw;
    }

    .spread-editorial {
        grid-template-columns: 1fr;
        grid-template-rows: 50% 50%;
    }

    .editorial-text-panel {
        padding: 40px 24px;
    }

    .pull-quote {
        margin-left: 0;
    }

    .marginal-annotation--right {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 32px;
        flex-direction: row;
        gap: 16px;
    }

    .spread-color-break {
        padding: 60px 24px;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        padding: 40px 0;
    }

    .gallery-item--large {
        grid-column: 1 / -1;
        grid-row: 1;
        height: 40vh;
    }

    .gallery-item--medium {
        grid-column: 1;
        grid-row: 2;
        height: 25vh;
    }

    .gallery-item--small {
        grid-column: 2;
        grid-row: 2;
        height: 25vh;
    }

    .gallery-annotation {
        bottom: 16px;
        right: 24px;
    }
}
