/* ============================================
   gabs.boo — Haunted Value Discovery
   Colors: #8B7355, #F5F0E8, #5C8A6E, #C45B5B, #A09888, #E8C86A, #2A2218
   Fonts: Alfa Slab One, Nunito, Inconsolata
   ============================================ */

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

:root {
    --warm-earth: #8B7355;
    --ghost-white: #F5F0E8;
    --phantom-green: #5C8A6E;
    --hidden-cost-red: #C45B5B;
    --fog-gray: #A09888;
    --candle-flicker: #E8C86A;
    --deep-shadow: #2A2218;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.6vw, 19px);
    line-height: 1.7;
    color: var(--ghost-white);
    background-color: var(--warm-earth);
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
    font-family: 'Alfa Slab One', serif;
    font-weight: 400;
    line-height: 1.2;
}

h2 {
    font-size: clamp(28px, 5vw, 60px);
}

h3 {
    font-size: clamp(20px, 3vw, 32px);
}

.ghost-data {
    font-family: 'Inconsolata', monospace;
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 700;
    color: var(--candle-flicker);
    display: block;
    margin-bottom: 0.5rem;
}

/* ============================================
   FLOATING SHAPES
   ============================================ */

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    opacity: 0;
}

.shape-rect {
    border-radius: 4px;
}

.shape-circle {
    border-radius: 50%;
}

.shape-1 {
    width: 100px;
    height: 60px;
    background: rgba(92, 138, 110, 0.1);
    top: 20%;
    right: -120px;
    animation: drift1 20s ease-in-out infinite;
    animation-delay: 0.5s;
}

.shape-2 {
    width: 50px;
    height: 50px;
    background: rgba(245, 240, 232, 0.05);
    top: 60%;
    right: -70px;
    animation: drift2 18s ease-in-out infinite;
    animation-delay: 0.7s;
}

.shape-3 {
    width: 80px;
    height: 45px;
    background: rgba(92, 138, 110, 0.08);
    top: 35%;
    left: -100px;
    animation: drift3 22s ease-in-out infinite;
    animation-delay: 0.9s;
}

.shape-4 {
    width: 40px;
    height: 40px;
    background: rgba(245, 240, 232, 0.06);
    top: 75%;
    left: -60px;
    animation: drift4 25s ease-in-out infinite;
    animation-delay: 1.1s;
}

.shape-5 {
    width: 120px;
    height: 50px;
    background: rgba(92, 138, 110, 0.06);
    top: 10%;
    left: 50%;
    animation: drift5 17s ease-in-out infinite;
    animation-delay: 1.3s;
}

.shape-6 {
    width: 60px;
    height: 60px;
    background: rgba(232, 200, 106, 0.06);
    top: 50%;
    right: 10%;
    animation: drift6 23s ease-in-out infinite;
    animation-delay: 1.5s;
}

.shape-7 {
    width: 70px;
    height: 40px;
    background: rgba(245, 240, 232, 0.04);
    top: 85%;
    left: 30%;
    animation: drift7 19s ease-in-out infinite;
    animation-delay: 1.7s;
}

@keyframes drift1 {
    0%   { transform: translateX(0) translateY(0); opacity: 0; }
    10%  { opacity: 0.8; }
    50%  { transform: translateX(-60vw) translateY(-30px); }
    90%  { opacity: 0.8; }
    100% { transform: translateX(-110vw) translateY(10px); opacity: 0; }
}

@keyframes drift2 {
    0%   { transform: translateX(0) translateY(0); opacity: 0; }
    10%  { opacity: 0.7; }
    50%  { transform: translateX(-50vw) translateY(40px); }
    90%  { opacity: 0.7; }
    100% { transform: translateX(-100vw) translateY(-20px); opacity: 0; }
}

@keyframes drift3 {
    0%   { transform: translateX(0) translateY(0); opacity: 0; }
    10%  { opacity: 0.8; }
    50%  { transform: translateX(55vw) translateY(-20px); }
    90%  { opacity: 0.8; }
    100% { transform: translateX(110vw) translateY(30px); opacity: 0; }
}

@keyframes drift4 {
    0%   { transform: translateX(0) translateY(0); opacity: 0; }
    10%  { opacity: 0.6; }
    50%  { transform: translateX(45vw) translateY(-50px); }
    90%  { opacity: 0.6; }
    100% { transform: translateX(95vw) translateY(10px); opacity: 0; }
}

@keyframes drift5 {
    0%   { transform: translateX(0) translateY(0); opacity: 0; }
    10%  { opacity: 0.7; }
    50%  { transform: translateX(-30vw) translateY(60px); }
    90%  { opacity: 0.7; }
    100% { transform: translateX(20vw) translateY(-30px); opacity: 0; }
}

@keyframes drift6 {
    0%   { transform: translateX(0) translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.6; }
    50%  { transform: translateX(-20vw) translateY(-40px) rotate(15deg); }
    90%  { opacity: 0.6; }
    100% { transform: translateX(-50vw) translateY(20px) rotate(-5deg); opacity: 0; }
}

@keyframes drift7 {
    0%   { transform: translateX(0) translateY(0); opacity: 0; }
    10%  { opacity: 0.5; }
    50%  { transform: translateX(25vw) translateY(-70px); }
    90%  { opacity: 0.5; }
    100% { transform: translateX(-15vw) translateY(30px); opacity: 0; }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--warm-earth);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(48px, 12vw, 140px);
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    opacity: 0;
}

.title-gabs {
    color: var(--ghost-white);
    display: inline-block;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 400ms ease, transform 400ms ease;
}

.title-gabs.animate-in {
    opacity: 1;
    transform: scale(1);
}

.title-boo {
    color: transparent;
    -webkit-text-stroke: 2px var(--ghost-white);
    display: inline-block;
    opacity: 0;
    position: relative;
}

.title-boo.animate-in {
    opacity: 1;
}

.hero-title.visible {
    opacity: 1;
}

.hero-tagline {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(16px, 2vw, 24px);
    color: var(--fog-gray);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 600ms ease 2s, transform 600ms ease 2s;
}

.hero-tagline.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Ghost SVG Dividers */
.ghost-divider {
    display: block;
    width: 200px;
    max-width: 80%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.ghost-divider-hero {
    margin-top: 3rem;
}

.ghost-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1.2s ease;
}

.ghost-path.drawn {
    stroke-dashoffset: 0;
}

.ghost-eye {
    transition: opacity 300ms ease 1s;
}

.ghost-eye.visible {
    opacity: 0.7;
}

/* ============================================
   FLICKER EFFECT
   ============================================ */

@keyframes flicker {
    0%   { opacity: 1; }
    20%  { opacity: 0.4; }
    40%  { opacity: 1; }
    60%  { opacity: 0.6; }
    80%  { opacity: 1; }
    100% { opacity: 1; }
}

.flickering {
    animation: flicker 200ms ease-in-out;
}

/* ============================================
   BENTO GRID SECTION
   ============================================ */

.bento-section {
    padding: 6rem 2rem;
    position: relative;
    background-color: var(--deep-shadow);
}

.section-title {
    text-align: center;
    color: var(--ghost-white);
    margin-bottom: 3rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(160, 152, 136, 0.1);
    border: 1px solid rgba(160, 152, 136, 0.1);
    opacity: 0;
    transition: opacity 800ms ease;
}

.bento-grid.visible {
    opacity: 1;
}

.bento-cell {
    position: relative;
    min-height: 220px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 300ms ease, box-shadow 300ms ease;
    overflow: hidden;
}

.bento-wide {
    grid-column: span 2;
}

.bento-tall {
    grid-row: span 2;
}

.cell-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cell-content h3 {
    margin-bottom: 0.75rem;
    color: var(--ghost-white);
}

.cell-content p {
    color: var(--fog-gray);
    font-size: clamp(14px, 1.4vw, 17px);
    max-width: 400px;
    margin: 0 auto;
}

.cell-icon {
    margin-bottom: 1rem;
}

.cell-illustration {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Visible cells */
.bento-cell-visible {
    background-color: var(--deep-shadow);
}

.bento-cell-visible .cell-content {
    opacity: 1;
}

/* Hidden (ghost-reveal) cells */
.bento-cell-hidden {
    background-color: var(--deep-shadow);
    cursor: pointer;
}

.bento-cell-hidden .cell-content {
    opacity: 0;
    transition: opacity 300ms ease;
}

.bento-cell-hidden:hover,
.bento-cell-hidden.revealed {
    background-color: var(--ghost-white);
    box-shadow: 0 0 20px rgba(92, 138, 110, 0.2);
}

.bento-cell-hidden:hover .cell-content,
.bento-cell-hidden.revealed .cell-content {
    opacity: 1;
}

.bento-cell-hidden:hover .cell-content h3,
.bento-cell-hidden.revealed .cell-content h3 {
    color: var(--deep-shadow);
}

.bento-cell-hidden:hover .cell-content p,
.bento-cell-hidden.revealed .cell-content p {
    color: var(--warm-earth);
}

.bento-cell-hidden:hover .ghost-data,
.bento-cell-hidden.revealed .ghost-data {
    color: var(--hidden-cost-red);
}

/* Tease animation for hidden cells */
@keyframes cellTease {
    0%   { background-color: var(--deep-shadow); }
    20%  { background-color: var(--ghost-white); }
    30%  { background-color: var(--ghost-white); }
    50%  { background-color: var(--deep-shadow); }
    100% { background-color: var(--deep-shadow); }
}

@keyframes contentTease {
    0%   { opacity: 0; }
    20%  { opacity: 0.6; }
    30%  { opacity: 0.6; }
    50%  { opacity: 0; }
    100% { opacity: 0; }
}

.bento-cell-hidden.tease {
    animation: cellTease 800ms ease forwards;
}

.bento-cell-hidden.tease .cell-content {
    animation: contentTease 800ms ease forwards;
}

/* ============================================
   GHOST TRAIL SECTION
   ============================================ */

.ghost-trail-section {
    padding: 6rem 2rem;
    position: relative;
    background-color: var(--warm-earth);
}

.ghost-divider-trail {
    margin-bottom: 4rem;
}

.trail-content {
    max-width: 800px;
    margin: 0 auto;
}

.trail-item {
    padding: 3rem 0;
    border-bottom: 1px solid rgba(160, 152, 136, 0.2);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.trail-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.trail-item:last-child {
    border-bottom: none;
}

.trail-item h3 {
    color: var(--candle-flicker);
    margin-bottom: 1rem;
}

.trail-item p {
    color: var(--ghost-white);
}

/* Afterimage effect */
.afterimage-target {
    position: relative;
}

.afterimage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.08;
    transform: translate(4px, 4px);
    filter: blur(1px);
    z-index: -1;
    transition: opacity 2s ease;
}

.afterimage.fading {
    opacity: 0;
}

/* ============================================
   REVEAL SECTION
   ============================================ */

.reveal-section {
    padding: 6rem 2rem;
    background-color: var(--deep-shadow);
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ghost-divider-reveal {
    margin-bottom: 3rem;
}

.reveal-content {
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.reveal-title {
    color: var(--candle-flicker);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

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

.reveal-subtitle {
    color: var(--fog-gray);
    font-size: clamp(16px, 1.8vw, 22px);
    margin-bottom: 3rem;
    opacity: 0;
    transition: opacity 600ms ease 200ms;
}

.reveal-subtitle.visible {
    opacity: 1;
}

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

.reveal-cell {
    background-color: rgba(139, 115, 85, 0.15);
    border: 1px solid rgba(160, 152, 136, 0.15);
    padding: 2.5rem 1.5rem;
    border-radius: 4px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 400ms ease, transform 400ms ease, background-color 300ms ease, box-shadow 300ms ease;
}

.reveal-cell.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-cell:hover {
    background-color: rgba(139, 115, 85, 0.25);
    box-shadow: 0 0 30px rgba(92, 138, 110, 0.15);
}

.reveal-number {
    font-size: clamp(32px, 5vw, 48px);
    color: var(--candle-flicker);
}

.reveal-label {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-size: clamp(13px, 1.2vw, 16px);
    color: var(--fog-gray);
    margin-top: 0.5rem;
}

.reveal-coda {
    font-family: 'Alfa Slab One', serif;
    font-size: clamp(20px, 3vw, 36px);
    color: var(--phantom-green);
    opacity: 0;
    transition: opacity 800ms ease 600ms;
}

.reveal-coda.visible {
    opacity: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */

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

    .bento-wide {
        grid-column: span 2;
    }

    .bento-tall {
        grid-row: span 1;
    }

    .reveal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .bento-wide {
        grid-column: span 1;
    }

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

    .hero-title {
        font-size: clamp(40px, 14vw, 80px);
    }

    .title-boo {
        -webkit-text-stroke-width: 1.5px;
    }

    .bento-cell {
        min-height: 180px;
    }
}
