/* =============================================
   GGOGGL.com - Memphis Design System
   Colors: #0D0D0D, #1E1E2E, #FF2E63, #08D9D6,
           #F5F749, #FFF8E7, #C4B7EB, #FF6E27
   Fonts: Anybody, DM Sans, Syne Mono
   ============================================= */

@property --wdth {
    syntax: '<number>';
    inherits: false;
    initial-value: 50;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0D0D0D;
    color: #FFF8E7;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* ---- SCAN LINES ---- */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 1px,
        rgba(0, 0, 0, 0.03) 1px,
        rgba(0, 0, 0, 0.03) 2px
    );
}

/* ---- TERRAZZO BACKGROUND ---- */
#terrazzo-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

#terrazzo-svg {
    width: 200%;
    height: 200%;
    animation: drift 60s linear infinite;
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to { transform: translate(-200px, -150px); }
}

/* ---- GLASSMORPHIC CARD ---- */
.glass-card {
    background: rgba(255, 248, 231, 0.08);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
    position: relative;
}

/* SVG noise texture for vintage feel on cards */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.04;
    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)'/%3E%3C/svg%3E");
    background-size: 128px 128px;
    border-radius: inherit;
}

/* ---- TYPOGRAPHY ---- */
.variable-width {
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-variation-settings: 'wdth' var(--wdth);
    --wdth: 50;
    transition: --wdth 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.variable-width.in-view {
    --wdth: 100;
}

.hero-headline {
    font-size: clamp(4rem, 10vw, 8rem);
    color: #FF2E63;
    line-height: 1;
    letter-spacing: -0.02em;
}

.hero-headline.in-view {
    --wdth: 150;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #FF2E63;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.tagline {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: #FFF8E7;
    line-height: 1.6;
}

.card-label,
.chip-label {
    font-family: 'Syne Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #08D9D6;
    display: block;
    margin-bottom: 0.5rem;
}

h3 {
    font-family: 'Anybody', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #F5F749;
    margin-bottom: 0.5rem;
}

/* ---- SECTION BLOCKS ---- */
.section-block {
    position: relative;
    z-index: 1;
    padding: 2rem;
}

/* ---- HERO ---- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    grid-template-rows: auto auto auto;
    gap: 1.5rem;
    max-width: 1400px;
    width: 100%;
}

.hero-block {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-block-1 {
    grid-column: 1 / 3;
    grid-row: 1;
    background: #1E1E2E;
    border-radius: 0;
    min-height: 200px;
}

.hero-block-2 {
    grid-column: 3;
    grid-row: 1;
    background: transparent;
    min-height: 200px;
}

.hero-block-3 {
    grid-column: 1;
    grid-row: 2;
    border-radius: 16px;
    padding: 2.5rem;
    min-height: 180px;
}

.hero-block-4 {
    grid-column: 2 / 4;
    grid-row: 2;
    background: #1E1E2E;
    border-radius: 24px;
    min-height: 180px;
    overflow: hidden;
}

.hero-block-5 {
    grid-column: 1;
    grid-row: 3;
    min-height: 150px;
}

.hero-block-6 {
    grid-column: 2;
    grid-row: 3;
    background: #1E1E2E;
    border-radius: 0 0 24px 0;
    min-height: 150px;
}

.hero-block-7 {
    grid-column: 3;
    grid-row: 3;
    min-height: 150px;
}

/* Terrazzo Panel */
.terrazzo-panel {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background:
        radial-gradient(ellipse 8px 12px at 20% 30%, #FF6E27 0%, transparent 100%),
        radial-gradient(ellipse 10px 6px at 50% 60%, #C4B7EB 0%, transparent 100%),
        radial-gradient(ellipse 6px 10px at 80% 20%, #FF2E63 0%, transparent 100%),
        radial-gradient(ellipse 12px 8px at 30% 80%, #F5F749 0%, transparent 100%),
        radial-gradient(ellipse 7px 11px at 70% 50%, #08D9D6 0%, transparent 100%),
        radial-gradient(ellipse 9px 7px at 10% 70%, #FF6E27 0%, transparent 100%),
        radial-gradient(ellipse 8px 10px at 90% 85%, #C4B7EB 0%, transparent 100%),
        radial-gradient(ellipse 11px 6px at 60% 15%, #FF2E63 0%, transparent 100%);
    opacity: 0.5;
}

.small-terrazzo {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background:
        radial-gradient(ellipse 5px 7px at 25% 35%, #FF6E27 0%, transparent 100%),
        radial-gradient(ellipse 6px 4px at 55% 65%, #C4B7EB 0%, transparent 100%),
        radial-gradient(ellipse 4px 6px at 75% 25%, #FF2E63 0%, transparent 100%),
        radial-gradient(ellipse 7px 5px at 35% 75%, #F5F749 0%, transparent 100%);
    opacity: 0.6;
}

/* ---- GEOMETRIC SHAPES ---- */
.geo-shape {
    width: 100px;
    height: 100px;
}

.shape-triangle {
    animation: rotateX 25s linear infinite;
}

.shape-cylinder {
    animation: rotateY 20s linear infinite;
}

.shape-cone {
    animation: rotateZ 15s linear infinite;
}

@keyframes rotateX {
    from { transform: rotateX(0deg); }
    to { transform: rotateX(360deg); }
}

@keyframes rotateY {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

@keyframes rotateZ {
    from { transform: rotateZ(0deg); }
    to { transform: rotateZ(360deg); }
}

.rotating-shape {
    width: 80px;
    height: 80px;
}

/* ---- SQUIGGLES ---- */
.squiggle {
    width: 100%;
    max-width: 300px;
}

.squiggle-draw path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 0.8s ease-out;
}

.squiggle-draw.drawn path {
    stroke-dashoffset: 0;
}

.squiggle-divider {
    position: relative;
    z-index: 1;
    padding: 1rem 0;
    overflow: hidden;
}

.squiggle-divider .squiggle {
    max-width: 100%;
    width: 100%;
    height: 60px;
}

/* ---- DOT GRID ---- */
.dot-grid {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle 2px, rgba(255, 248, 231, 0.15) 100%, transparent 100%);
    background-size: 20px 20px;
}

.dot-grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle 2px, rgba(255, 248, 231, 0.1) 100%, transparent 100%);
    background-size: 16px 16px;
    pointer-events: none;
}

/* ---- HALFTONE OVERLAY ---- */
.halftone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: radial-gradient(circle 1.5px, rgba(255, 248, 231, 0.08) 100%, transparent 100%);
    background-size: 6px 6px;
}

/* ---- CONTENT ZIGZAG ---- */
#zigzag {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.zigzag-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

.zigzag-left {
    flex-direction: row;
}

.zigzag-right {
    flex-direction: row-reverse;
}

.zigzag-large {
    flex: 0 0 65%;
    padding: 3rem;
    border-radius: 16px;
}

.zigzag-large p {
    font-size: 1.15rem;
    color: #FFF8E7;
    line-height: 1.7;
}

.zigzag-small {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #1E1E2E;
    border-radius: 0;
    padding: 2rem;
    overflow: hidden;
}

.zigzag-row:nth-child(even) .zigzag-small {
    border-radius: 24px;
}

.zigzag-row:nth-child(3) .zigzag-small {
    border-radius: 0 24px 0 24px;
}

/* ---- GALLERY ARCADE ---- */
#gallery {
    padding: 4rem 2rem;
    overflow: hidden;
}

.gallery-title {
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 2rem 1rem 3rem;
    scroll-snap-type: x mandatory;
    cursor: grab;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-track:active {
    cursor: grabbing;
}

.gallery-card {
    flex: 0 0 280px;
    height: 360px;
    border-radius: 16px;
    padding: 2rem;
    scroll-snap-align: start;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, backdrop-filter 0.3s ease;
    will-change: transform;
}

.card-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-inner p {
    font-size: 0.95rem;
    color: #C4B7EB;
    line-height: 1.6;
    margin-top: auto;
    flex: 1;
    display: flex;
    align-items: flex-end;
}

.card-shape {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 60px;
    height: 60px;
    z-index: 1;
}

/* ---- MEMPHIS TOWER ---- */
#tower {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tower-title {
    text-align: center;
    margin-bottom: 3rem;
}

.tower-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.tower-tier {
    position: relative;
    overflow: hidden;
}

.tier-1 {
    width: 100%;
    background: #1E1E2E;
    border-radius: 0;
}

.tier-2 {
    width: 80%;
    background: #1E1E2E;
    border-radius: 24px;
}

.tier-3 {
    width: 60%;
    background: #1E1E2E;
    border-radius: 0 16px 0 16px;
}

.tier-4 {
    width: 40%;
    background: #1E1E2E;
    border-radius: 16px;
}

.tier-content {
    padding: 2.5rem;
    border-radius: inherit;
    position: relative;
    z-index: 2;
}

.tier-content h3 {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.tier-content p {
    font-size: 1rem;
    color: #C4B7EB;
    line-height: 1.6;
}

.tier-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.terrazzo-pattern-1 {
    background:
        radial-gradient(ellipse 8px 12px at 15% 25%, #FF6E27 0%, transparent 100%),
        radial-gradient(ellipse 10px 6px at 45% 55%, #C4B7EB 0%, transparent 100%),
        radial-gradient(ellipse 6px 10px at 75% 15%, #FF2E63 0%, transparent 100%),
        radial-gradient(ellipse 12px 8px at 85% 75%, #F5F749 0%, transparent 100%);
    opacity: 0.15;
}

.zigzag-pattern {
    background: repeating-linear-gradient(
        135deg,
        transparent 0px,
        transparent 10px,
        rgba(255, 46, 99, 0.06) 10px,
        rgba(255, 46, 99, 0.06) 20px
    );
}

.stripe-pattern {
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 15px,
        rgba(8, 217, 214, 0.06) 15px,
        rgba(8, 217, 214, 0.06) 30px
    );
}

/* ---- FOOTER SCATTER ---- */
#footer {
    min-height: 80vh;
    padding: 6rem 2rem;
    background: #0D0D0D;
}

.footer-scatter {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 60vh;
}

.scatter-chip {
    position: absolute;
    left: var(--scatter-x);
    top: var(--scatter-y);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    max-width: 220px;
    z-index: 2;
}

.scatter-chip p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: #FFF8E7;
}

.scatter-shape {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 1;
}

.scatter-shape-1 {
    top: 5%;
    left: 35%;
    animation: rotateZ 18s linear infinite;
}

.scatter-shape-2 {
    top: 40%;
    left: 10%;
    animation: rotateX 22s linear infinite;
}

.scatter-shape-3 {
    top: 60%;
    right: 15%;
    animation: rotateY 16s linear infinite;
}

.scatter-shape-4 {
    top: 85%;
    left: 60%;
    animation: rotateZ 20s linear infinite;
}

.scatter-shape-5 {
    top: 30%;
    right: 5%;
    animation: rotateX 24s linear infinite;
}

.footer-brand {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.brand-text {
    font-size: clamp(3rem, 8vw, 6rem);
    color: #FF2E63;
    opacity: 0.15;
    line-height: 1;
}

/* ---- BLOCK ANIMATIONS (Magnetic Entry) ---- */
.block-animate {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.block-animate[data-origin="left"] {
    transform: translateX(-120px) scale(0.9);
}

.block-animate[data-origin="right"] {
    transform: translateX(120px) scale(0.9);
}

.block-animate[data-origin="top"] {
    transform: translateY(-120px) scale(0.9);
}

.block-animate[data-origin="bottom"] {
    transform: translateY(120px) scale(0.9);
}

.block-animate.visible {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .hero-block-1 {
        grid-column: 1 / -1;
    }

    .hero-block-4 {
        grid-column: 1 / -1;
    }

    .hero-block-7 {
        grid-column: 1 / -1;
    }

    .zigzag-row {
        flex-direction: column;
    }

    .zigzag-right {
        flex-direction: column;
    }

    .zigzag-large,
    .zigzag-small {
        flex: 0 0 auto;
        width: 100%;
    }

    .gallery-card {
        flex: 0 0 240px;
        height: 320px;
    }

    .tier-1, .tier-2, .tier-3, .tier-4 {
        width: 100%;
    }

    .scatter-chip {
        position: relative;
        left: auto;
        top: auto;
        margin-bottom: 1rem;
    }

    .footer-scatter {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: auto;
    }

    .scatter-shape {
        display: none;
    }

    .footer-brand {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 2rem;
        text-align: center;
    }
}

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

    .hero-block-1,
    .hero-block-4 {
        grid-column: 1;
    }

    .hero-headline {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .section-title {
        font-size: clamp(1.8rem, 6vw, 3rem);
    }

    .zigzag-large {
        padding: 2rem;
    }

    #gallery {
        padding: 2rem 1rem;
    }

    .gallery-card {
        flex: 0 0 220px;
        height: 300px;
    }
}
