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

:root {
    --coral-pop: #FF6B6B;
    --electric-teal: #0097A7;
    --sunlit-yellow: #FFD93D;
    --hot-pink: #FF69B4;
    --vivid-lavender: #B388FF;
    --deep-charcoal: #2D2D3A;
    --cream-white: #FFF8F0;
    --slate: #4A4A5A;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cream-white);
    font-family: 'DM Sans', sans-serif;
    color: var(--slate);
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.65;
    letter-spacing: 0.005em;
    cursor: default;
    overflow-x: hidden;
}

/* Custom cursor */
.custom-cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--coral-pop);
    transform: rotate(45deg) translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.custom-cursor-active .custom-cursor {
    opacity: 1;
}

body.custom-cursor-active {
    cursor: none;
}

/* Bento Container */
.bento-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2vw;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: 12px;
}

/* Shared module styles */
.bento-module {
    position: relative;
    overflow: hidden;
    background: var(--cream-white);
    transition: clip-path 0.4s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
}

.bento-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 45deg at 30% 70%, #FF6B6B, #FFD93D, #0097A7, #B388FF, #FF69B4, #FF6B6B);
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
}

/* Hero Panel - cols 1-4, rows 1-2 */
.hero-panel {
    grid-column: 1 / 5;
    grid-row: 1 / 3;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
    background: var(--cream-white);
}

.hero-panel:hover {
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
    background-color: #FFFBF5;
}

#fractal-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    pointer-events: none;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 5.5rem);
    color: var(--deep-charcoal);
    letter-spacing: -0.02em;
    line-height: 1.1;
    opacity: 0;
    transition: opacity 1.2s ease;
}

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

.hero-tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--slate);
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 1s ease;
}

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

/* Sidebar Accent - cols 5-6, row 1 */
.sidebar-accent {
    grid-column: 5 / 7;
    grid-row: 1 / 2;
    min-height: 280px;
    clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%, 0 24px);
    background: var(--deep-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-accent:hover {
    clip-path: polygon(28px 0, 100% 0, 100% 100%, 0 100%, 0 28px);
    background-color: #33334A;
}

.sidebar-accent::before {
    opacity: 0.05;
}

.leaf-tessellation {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.leaf-svg {
    width: 300%;
    height: 300%;
    animation: leafRotate 120s linear infinite;
}

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

/* Statement Strip - cols 5-6, row 2 */
.statement-strip {
    grid-column: 5 / 7;
    grid-row: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
    background: var(--cream-white);
}

.statement-strip:hover {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    background-color: #FFFBF5;
}

.statement-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
    color: var(--deep-charcoal);
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-align: center;
}

/* Narrative Block A - cols 1-3, row 3 */
.narrative-a {
    grid-column: 1 / 4;
    grid-row: 3 / 4;
    padding: 2.5rem 2rem;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    background: var(--cream-white);
}

.narrative-a:hover {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    background-color: #FFFBF5;
}

.narrative-content {
    position: relative;
    z-index: 1;
}

.module-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    color: var(--deep-charcoal);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1.2rem;
}

.narrative-content p {
    margin-bottom: 1rem;
    color: var(--slate);
}

.micro-animation {
    margin: 1.5rem 0;
    width: 100%;
    height: 60px;
    position: relative;
    z-index: 1;
}

.line-drawing-svg {
    width: 100%;
    height: 100%;
}

.evolving-line {
    stroke: var(--electric-teal);
    stroke-width: 1;
    opacity: 0.4;
}

/* Narrative Block B - cols 4-6, row 3 */
.narrative-b {
    grid-column: 4 / 7;
    grid-row: 3 / 4;
    min-height: 320px;
    clip-path: polygon(0 16px, 16px 0, 100% 0, 100% 100%, 0 100%);
    background: var(--deep-charcoal);
}

.narrative-b:hover {
    clip-path: polygon(0 20px, 20px 0, 100% 0, 100% 100%, 0 100%);
    background-color: #33334A;
}

.narrative-b::before {
    opacity: 0.05;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Footer Strip - cols 1-6, row 4 */
.footer-strip {
    grid-column: 1 / 7;
    grid-row: 4 / 5;
    padding: 3rem 2rem 4rem;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, calc(100% - 24px) 100%, 24px 100%);
    background: var(--cream-white);
    position: relative;
}

.footer-strip:hover {
    clip-path: polygon(0 0, 100% 0, calc(100% - 28px) 100%, 28px 100%);
    background-color: #FFFBF5;
}

.footer-domain {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--slate);
    position: relative;
    z-index: 1;
}

.footer-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: conic-gradient(from 45deg at 50% 100%, #FF6B6B, #FFD93D, #0097A7, #B388FF, #FF69B4, #FF6B6B);
    opacity: 0.08;
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,1) 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,1) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Scroll-reveal animation */
.bento-module {
    opacity: 0;
    transform: translateY(20px);
}

.bento-module.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Link styles */
a {
    color: var(--electric-teal);
    text-decoration: none;
    position: relative;
    display: inline-block;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 0.5px;
    background: var(--electric-teal);
    transform: scaleX(0) rotate(3deg);
    transform-origin: left;
    transition: transform 0.25s ease, height 0.25s ease, background-color 0.25s ease;
}

a:hover::after {
    transform: scaleX(1) rotate(3deg);
    height: 2px;
    background: var(--hot-pink);
}

/* Diagonal accent borders on modules */
.narrative-a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--hot-pink);
    transform: skewY(-2deg);
    z-index: 2;
}

.statement-strip::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--vivid-lavender);
    transform: skewY(-2deg);
    z-index: 2;
}

/* Petal scatter on footer */
.footer-strip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle 8px at 10% 30%, #FFD93D26 0%, transparent 100%),
        radial-gradient(circle 12px at 25% 70%, #FFD93D1A 0%, transparent 100%),
        radial-gradient(circle 10px at 45% 20%, #FFD93D20 0%, transparent 100%),
        radial-gradient(circle 16px at 60% 65%, #FFD93D1A 0%, transparent 100%),
        radial-gradient(circle 8px at 75% 40%, #FFD93D26 0%, transparent 100%),
        radial-gradient(circle 14px at 90% 75%, #FFD93D1A 0%, transparent 100%),
        radial-gradient(circle 10px at 35% 50%, #FFD93D20 0%, transparent 100%),
        radial-gradient(circle 12px at 80% 15%, #FFD93D1A 0%, transparent 100%),
        radial-gradient(circle 8px at 55% 85%, #FFD93D26 0%, transparent 100%),
        radial-gradient(circle 14px at 15% 60%, #FFD93D1A 0%, transparent 100%);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

/* Monospace accent text */
.mono-accent {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--electric-teal);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bento-module {
        opacity: 1;
        transform: none;
    }

    .bento-module.revealed {
        transition: none;
    }

    .leaf-svg {
        animation: none;
    }

    .hero-title,
    .hero-tagline {
        opacity: 1;
        transition: none;
    }
}

/* Responsive: tablet */
@media (max-width: 768px) {
    .bento-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .hero-panel {
        grid-column: 1 / 3;
        grid-row: auto;
        min-height: 80vh;
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    }

    .hero-panel:hover {
        clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    }

    .sidebar-accent {
        grid-column: 1 / 2;
        grid-row: auto;
        min-height: 200px;
        clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
    }

    .sidebar-accent:hover {
        clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px);
    }

    .statement-strip {
        grid-column: 2 / 3;
        grid-row: auto;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    }

    .statement-strip:hover {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
    }

    .narrative-a {
        grid-column: 1 / 3;
        grid-row: auto;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    }

    .narrative-a:hover {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    }

    .narrative-b {
        grid-column: 1 / 3;
        grid-row: auto;
        min-height: 250px;
        clip-path: polygon(0 10px, 10px 0, 100% 0, 100% 100%, 0 100%);
    }

    .narrative-b:hover {
        clip-path: polygon(0 14px, 14px 0, 100% 0, 100% 100%, 0 100%);
    }

    .footer-strip {
        grid-column: 1 / 3;
        grid-row: auto;
        clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 10px 100%);
    }

    .footer-strip:hover {
        clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 14px 100%);
    }
}

/* Responsive: mobile */
@media (max-width: 480px) {
    .bento-container {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 3vw;
    }

    .hero-panel {
        grid-column: 1;
        min-height: 70vh;
        clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
    }

    .hero-panel:hover {
        clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    }

    .sidebar-accent {
        grid-column: 1;
        min-height: 180px;
        clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    }

    .sidebar-accent:hover {
        clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
    }

    .statement-strip {
        grid-column: 1;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
    }

    .statement-strip:hover {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    }

    .narrative-a {
        grid-column: 1;
        padding: 2rem 1.5rem;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    }

    .narrative-a:hover {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    }

    .narrative-b {
        grid-column: 1;
        min-height: 220px;
        clip-path: polygon(0 8px, 8px 0, 100% 0, 100% 100%, 0 100%);
    }

    .narrative-b:hover {
        clip-path: polygon(0 12px, 12px 0, 100% 0, 100% 100%, 0 100%);
    }

    .footer-strip {
        grid-column: 1;
        clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 8px 100%);
    }

    .footer-strip:hover {
        clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 12px 100%);
    }

    .statement-text {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }
}
