/* =============================================
   toron.day - Goblincore Daily Chaos
   Colors: #1a1a2e, #4a90d9, #f5f0e8, #e8b84b, #6c757d
   Font: Inter
   ============================================= */

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

:root {
    --deep-base: #1a1a2e;
    --primary-blue: #4a90d9;
    --warm-offwhite: #f5f0e8;
    --accent-gold: #e8b84b;
    --muted-gray: #6c757d;
    --font-main: 'Inter', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--deep-base);
    font-family: var(--font-main);
    color: var(--warm-offwhite);
}

/* ---- Scroll Hint ---- */
.scroll-hint {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(26, 26, 46, 0.85);
    border: 1px solid var(--accent-gold);
    padding: 10px 24px;
    border-radius: 30px;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-hint.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.scroll-hint-arrow {
    font-size: 24px;
    color: var(--accent-gold);
    animation: bounceRight 1.5s ease-in-out infinite;
}

.scroll-hint-text {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: lowercase;
    color: var(--muted-gray);
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

/* ---- Horizontal Scroll Container ---- */
.horizontal-scroll {
    display: flex;
    width: 500vw;
    height: 100vh;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

/* ---- Panel Base ---- */
.panel {
    position: relative;
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    scroll-snap-align: start;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Vintage Overlay ---- */
.vintage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(232, 184, 75, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(74, 144, 217, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, rgba(26, 26, 46, 0.3) 0%, transparent 30%, transparent 70%, rgba(26, 26, 46, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ---- Noise Overlay ---- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---- Ripple Container ---- */
.ripple-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
    opacity: 0.6;
    transform: scale(0);
    animation: rippleExpand 1.2s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ---- Panel Indicators ---- */
.panel-indicators {
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 100;
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted-gray);
    opacity: 0.4;
    transition: all 0.4s ease;
    cursor: pointer;
}

.indicator.active {
    background: var(--accent-gold);
    opacity: 1;
    transform: scale(1.3);
}

/* ==========================================
   PANEL 1: HERO
   ========================================== */
.panel-hero {
    background: var(--deep-base);
    flex-direction: column;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.kinetic-title {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 1;
    text-transform: lowercase;
    letter-spacing: -0.03em;
}

.title-line {
    position: relative;
    display: inline-block;
    color: var(--warm-offwhite);
    animation: kineticBuzz 4s ease-in-out infinite;
}

.title-line-1 {
    animation-delay: 0s;
}

.title-line-2 {
    color: var(--accent-gold);
    animation-delay: 0.5s;
}

.title-dot {
    color: var(--primary-blue);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
    animation: dotPulse 2s ease-in-out infinite;
}

/* Glitch pseudo-elements for title */
.title-line::before,
.title-line::after {
    content: attr(data-glitch);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.title-line::before {
    color: var(--primary-blue);
    animation: glitch1 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.title-line::after {
    color: var(--accent-gold);
    animation: glitch2 3s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes kineticBuzz {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-0.5deg); }
    50% { transform: translateY(2px) rotate(0.3deg); }
    75% { transform: translateY(-1px) rotate(-0.2deg); }
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes glitch1 {
    0%, 90%, 100% { opacity: 0; transform: translate(0); }
    91% { opacity: 0.8; transform: translate(-3px, -2px); }
    93% { opacity: 0; transform: translate(3px, 1px); }
    95% { opacity: 0.6; transform: translate(-1px, 2px); }
    97% { opacity: 0; }
}

@keyframes glitch2 {
    0%, 85%, 100% { opacity: 0; transform: translate(0); }
    86% { opacity: 0.7; transform: translate(3px, 2px); }
    88% { opacity: 0; transform: translate(-2px, -1px); }
    92% { opacity: 0.5; transform: translate(1px, -2px); }
    94% { opacity: 0; }
}

.hero-tagline {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--muted-gray);
    text-transform: lowercase;
}

.hero-decoration {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-top: 30px;
    opacity: 0.7;
    animation: floatDecoration 6s ease-in-out infinite;
}

.mushroom-small {
    transform: translateY(10px);
}

@keyframes floatDecoration {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==========================================
   PANEL 2: TODAY'S FIND
   ========================================== */
.panel-find {
    background: linear-gradient(135deg, var(--deep-base) 0%, #1e1e38 50%, #1a1a2e 100%);
}

.panel-content {
    position: relative;
    z-index: 10;
    padding: 60px;
    max-width: 90vw;
}

.section-label {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    text-transform: lowercase;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

/* Glitch effect on section labels */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-glitch);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-text::before {
    color: var(--primary-blue);
    animation: glitch1 4s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
}

.glitch-text::after {
    color: var(--accent-gold);
    animation: glitch2 4s infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}

.find-card {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.find-image {
    border: 2px solid rgba(232, 184, 75, 0.3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.find-image svg {
    display: block;
}

/* Glitch effect on images */
.glitch-image {
    position: relative;
}

.glitch-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 0%,
        rgba(74, 144, 217, 0.03) 10%,
        transparent 10.5%,
        transparent 50%,
        rgba(232, 184, 75, 0.03) 50.5%,
        transparent 51%,
        transparent 100%
    );
    animation: scanline 8s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.find-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 400px;
}

.find-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.find-description {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--warm-offwhite);
    opacity: 0.85;
}

.find-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary-blue);
    background: rgba(74, 144, 217, 0.1);
    border: 1px solid rgba(74, 144, 217, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: 8px;
}

/* ==========================================
   PANEL 3: DAILY CHRONICLE
   ========================================== */
.panel-chronicle {
    background: linear-gradient(180deg, #1a1a2e 0%, #1c1c34 50%, #1a1a2e 100%);
}

.chronicle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
}

.chronicle-entry {
    background: rgba(245, 240, 232, 0.03);
    border: 1px solid rgba(232, 184, 75, 0.15);
    border-radius: 6px;
    padding: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    cursor: default;
}

.chronicle-entry:hover {
    transform: translateY(-4px);
    border-color: var(--accent-gold);
    background: rgba(232, 184, 75, 0.05);
}

.chronicle-time {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-gold);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}

.chronicle-text {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--warm-offwhite);
    opacity: 0.8;
}

/* ==========================================
   PANEL 4: GOBLIN GALLERY
   ========================================== */
.panel-gallery {
    background: linear-gradient(135deg, #1a1a2e 0%, #181830 100%);
}

.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 500px;
}

.gallery-item {
    position: relative;
    border: 1px solid rgba(232, 184, 75, 0.2);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.05) rotate(1deg);
    border-color: var(--accent-gold);
}

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

.gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(transparent, rgba(26, 26, 46, 0.9));
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: lowercase;
    color: var(--accent-gold);
}

/* ==========================================
   PANEL 5: CLOSING
   ========================================== */
.panel-closing {
    background: var(--deep-base);
    flex-direction: column;
}

.closing-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.closing-decoration {
    margin-bottom: 20px;
    animation: mothFloat 5s ease-in-out infinite;
}

@keyframes mothFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(2deg); }
    50% { transform: translateY(-4px) rotate(-1deg); }
    75% { transform: translateY(-10px) rotate(1deg); }
}

.closing-text {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    text-transform: lowercase;
    letter-spacing: -0.02em;
    color: var(--warm-offwhite);
}

.closing-subtext {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--muted-gray);
    text-transform: lowercase;
    max-width: 500px;
}

.closing-dots {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-gold);
    opacity: 0.5;
    animation: dotFade 2s ease-in-out infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.4s;
}

.dot:nth-child(3) {
    animation-delay: 0.8s;
}

@keyframes dotFade {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .find-card {
        flex-direction: column;
        align-items: center;
    }

    .chronicle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .gallery-mosaic {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 350px;
    }

    .panel-content {
        padding: 40px 30px;
    }
}

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

    .gallery-mosaic {
        max-width: 260px;
    }
}

/* ==========================================
   PANEL ENTRANCE ANIMATIONS
   ========================================== */
.panel-content,
.hero-content,
.closing-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.panel.in-view .panel-content,
.panel.in-view .hero-content,
.panel.in-view .closing-content {
    opacity: 1;
    transform: translateY(0);
}
