/* ============================================
   DDAZZL.com - Hexagonal Honeycomb Pop-Art
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-cream: #FFF8F0;
    --surface-lavender: #D4C5F9;
    --surface-mint: #B8F0D8;
    --accent-coral: #FF8A80;
    --accent-sky: #90CAF9;
    --text-primary: #2C2C3A;
    --text-secondary: #6B6B7B;
    --outline-plum: #4A3060;
    --highlight-yellow: #FFF59D;
    --shadow-lilac: #C4B0E0;
    --hex-size: 220px;
    --hex-gap: 8px;
    --border-thick: 3.5px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-cream);
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

a {
    color: var(--accent-coral);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--outline-plum);
}

/* --- Hex Background Pattern --- */
#hex-bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66ZM28 100L0 84L0 50L28 34L56 50L56 84L28 100Z' fill='none' stroke='%234A3060' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 56px 100px;
}

/* --- Water Caustics --- */
#water-caustics {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.caustic {
    position: absolute;
    border-radius: 50%;
    opacity: 0.04;
    filter: blur(60px);
}

.caustic-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-sky), transparent 70%);
    top: -100px;
    left: -100px;
    animation: causticDrift1 25s ease-in-out infinite;
}

.caustic-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--surface-mint), transparent 70%);
    top: 40%;
    right: -150px;
    animation: causticDrift2 30s ease-in-out infinite;
}

.caustic-3 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--surface-lavender), transparent 70%);
    bottom: -200px;
    left: 30%;
    animation: causticDrift3 22s ease-in-out infinite;
}

@keyframes causticDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(200px, 150px) scale(1.1); }
    66% { transform: translate(-100px, 300px) scale(0.9); }
}

@keyframes causticDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-250px, -100px) scale(1.15); }
    66% { transform: translate(-150px, 200px) scale(0.85); }
}

@keyframes causticDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(180px, -200px) scale(1.05); }
    66% { transform: translate(-120px, -100px) scale(1.1); }
}

/* --- Navigation --- */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 248, 240, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-thick) solid var(--outline-plum);
    padding: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-inner {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-hex {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    padding: 8px 18px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: var(--surface-lavender);
    border: none;
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 90px;
    text-align: center;
}

.nav-hex:hover {
    background: var(--highlight-yellow);
    color: var(--outline-plum);
}

.nav-hex.active {
    background: var(--accent-coral);
    color: #fff;
}

/* --- Scenes --- */
.scene {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 60px;
}

.scene-title {
    text-align: center;
    margin-bottom: 50px;
}

.scene-title h2 {
    font-size: 2.4rem;
    color: var(--outline-plum);
    margin-bottom: 10px;
}

.scene-subtitle {
    font-family: 'DM Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Ben-Day Dot Overlay --- */
.ben-day-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.06;
    background-image: radial-gradient(circle, var(--outline-plum) 1px, transparent 1px);
    background-size: 6px 6px;
    transition: opacity 0.4s ease;
}

.ben-day-large {
    background-image: radial-gradient(circle, var(--outline-plum) 2.5px, transparent 2.5px);
    background-size: 12px 12px;
}

/* --- Hexagonal Cells --- */
.hex-cell {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    transition: transform 0.4s ease-out, filter 0.4s ease-out, opacity 0.4s ease-out;
    position: relative;
    will-change: transform, filter;
}

.hex-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    overflow: hidden;
    border: var(--border-thick) solid var(--outline-plum);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.hex-lavender { background: var(--surface-lavender); }
.hex-mint { background: var(--surface-mint); }
.hex-sky { background: var(--accent-sky); }
.hex-sky-bg { background: rgba(144, 202, 249, 0.3); }
.hex-coral { background: var(--accent-coral); }
.hex-yellow { background: var(--highlight-yellow); }

/* Hex hover effect */
.hex-cell:hover {
    transform: scale(1.04);
    z-index: 10;
}

.hex-cell:hover .ben-day-overlay {
    opacity: 0.15;
}

.hex-cell:hover .hex-inner {
    box-shadow: 8px 12px 30px rgba(196, 176, 224, 0.5);
}

/* --- Blur-Focus Target --- */
.blur-target {
    filter: blur(12px);
    opacity: 0.6;
    transform: scale(0.85) rotate(-3deg);
    transition: filter 0.4s ease-out, opacity 0.4s ease-out, transform 0.4s ease-out;
}

.blur-target.in-view {
    filter: blur(0px);
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* --- Hero Cluster --- */
#hero {
    padding-top: 80px;
    min-height: 100vh;
}

.hero-cluster {
    display: grid;
    grid-template-columns: repeat(3, var(--hex-size));
    grid-template-rows: repeat(3, calc(var(--hex-size) * 0.87));
    gap: var(--hex-gap);
    align-items: center;
    justify-items: center;
    position: relative;
}

.hex-center {
    grid-column: 2;
    grid-row: 2;
    width: var(--hex-size);
    height: calc(var(--hex-size) * 1.15);
}

.hex-brand .hex-inner {
    background: var(--outline-plum);
    color: #fff;
}

.brand-title {
    font-size: 2.6rem;
    letter-spacing: 0.15em;
    color: var(--highlight-yellow);
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.brand-tagline {
    font-family: 'DM Mono', monospace;
    font-size: 0.85rem;
    color: var(--surface-mint);
    margin-top: 8px;
    position: relative;
    z-index: 2;
}

/* Hero surrounding hex positions */
.hex-surround {
    width: calc(var(--hex-size) * 0.75);
    height: calc(var(--hex-size) * 0.87);
}

.hex-pos-1 { grid-column: 1; grid-row: 1; }
.hex-pos-2 { grid-column: 2; grid-row: 1; }
.hex-pos-3 { grid-column: 3; grid-row: 1; }
.hex-pos-4 { grid-column: 1; grid-row: 3; }
.hex-pos-5 { grid-column: 2; grid-row: 3; }
.hex-pos-6 { grid-column: 3; grid-row: 3; }

/* Offset odd rows for honeycomb effect */
.hex-pos-1, .hex-pos-3 {
    transform: translateY(25px);
}

.hex-pos-1.in-view, .hex-pos-3.in-view {
    transform: translateY(25px) scale(1) rotate(0deg);
}

.hex-pos-4, .hex-pos-6 {
    transform: translateY(-25px);
}

.hex-pos-4.in-view, .hex-pos-6.in-view {
    transform: translateY(-25px) scale(1) rotate(0deg);
}

/* Fish SVGs */
.fish-svg {
    width: 80%;
    height: auto;
    position: relative;
    z-index: 2;
}

.fish-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.2s ease-out;
}

.fish-fill {
    transition: opacity 0.6s ease-out 1s;
}

.in-view .fish-path {
    stroke-dashoffset: 0;
}

.in-view .fish-fill {
    opacity: 0.5;
}

/* Gentle fish drift animation */
@keyframes fishDrift {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(4px) translateY(-3px); }
    50% { transform: translateX(-2px) translateY(2px); }
    75% { transform: translateX(3px) translateY(-1px); }
}

.in-view .fish-svg {
    animation: fishDrift 6s ease-in-out infinite;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-hint-text {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--outline-plum);
    border-bottom: 2px solid var(--outline-plum);
    transform: rotate(45deg);
    margin: 0 auto;
}

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

/* --- About Cluster --- */
.about-cluster {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 900px;
}

.hex-wide {
    width: 420px;
    height: 280px;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
}

.hex-wide .hex-inner {
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
    padding: 40px 50px;
}

.hex-wide h2 {
    font-size: 1.4rem;
    color: var(--outline-plum);
    margin-bottom: 12px;
}

.hex-wide p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.hex-small {
    width: 160px;
    height: 185px;
}

/* --- Features Cluster --- */
.features-cluster {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 780px;
    margin: 0 auto;
}

.hex-feature {
    width: 240px;
    height: 280px;
    justify-self: center;
}

.hex-feature:nth-child(even) {
    transform: translateY(30px);
}

.hex-feature:nth-child(even).in-view {
    transform: translateY(30px) scale(1) rotate(0deg);
}

.hex-feature .hex-inner {
    padding: 25px 20px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.hex-feature h3 {
    font-size: 0.9rem;
    color: var(--outline-plum);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.hex-caption {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

/* --- Speech Bubbles --- */
.speech-bubble {
    background: var(--highlight-yellow);
    border: var(--border-thick) solid var(--outline-plum);
    border-radius: 20px;
    padding: 30px 35px;
    max-width: 500px;
    position: relative;
    margin: 20px 0 20px 60px;
    transition: filter 0.4s ease-out, opacity 0.4s ease-out, transform 0.4s ease-out;
}

.speech-bubble-right {
    margin-left: auto;
    margin-right: 60px;
}

.speech-text {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.speech-author {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

.speech-tail {
    position: absolute;
    bottom: -20px;
    left: 40px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 22px solid var(--outline-plum);
}

.speech-tail::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: -11px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 18px solid var(--highlight-yellow);
}

.speech-tail-right {
    left: auto;
    right: 40px;
}

/* --- Showcase Cluster --- */
.showcase-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

.showcase-fish {
    width: 100px;
    height: auto;
}

/* --- Contact Scene --- */
.scene-contact {
    position: relative;
}

.contact-cluster {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.hex-contact-main {
    width: 380px;
    height: 420px;
}

.hex-contact-main h2 {
    font-size: 2rem;
    color: var(--outline-plum);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.contact-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.contact-links {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.contact-link {
    font-family: 'DM Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-coral);
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.contact-link:hover {
    border-bottom-color: var(--accent-coral);
    color: var(--outline-plum);
}

.contact-divider {
    font-family: 'DM Mono', monospace;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.hex-escape {
    width: 130px;
    height: 150px;
    opacity: 0.5;
}

.hex-escape-1 {
    transform: translate(-80px, -40px);
}

.hex-escape-2 {
    transform: translate(80px, 40px);
}

.hex-escape-1.in-view {
    transform: translate(-80px, -40px) scale(1) rotate(0deg);
    opacity: 0.4;
}

.hex-escape-2.in-view {
    transform: translate(80px, 40px) scale(1) rotate(0deg);
    opacity: 0.4;
}

.fish-departing {
    width: 70%;
    height: auto;
    opacity: 0.7;
}

/* --- Footer --- */
#main-footer {
    position: relative;
    z-index: 2;
    margin-top: -20px;
}

.footer-hex-strip {
    background: var(--outline-plum);
    clip-path: polygon(3% 0%, 97% 0%, 100% 50%, 97% 100%, 3% 100%, 0% 50%);
    padding: 30px 50px;
    position: relative;
    overflow: hidden;
}

.footer-hex-strip .ben-day-overlay {
    opacity: 0.08;
    background-image: radial-gradient(circle, rgba(255,255,255,0.5) 1px, transparent 1px);
    background-size: 8px 8px;
}

.footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.footer-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--highlight-yellow);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    color: var(--surface-mint);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--highlight-yellow);
}

.footer-copy {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: var(--shadow-lilac);
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    :root {
        --hex-size: 160px;
    }

    .nav-hex {
        font-size: 0.6rem;
        padding: 6px 12px;
        min-width: 70px;
    }

    .hero-cluster {
        grid-template-columns: repeat(2, var(--hex-size));
        grid-template-rows: repeat(4, calc(var(--hex-size) * 0.87));
    }

    .hex-center {
        grid-column: 1 / 3;
        grid-row: 1;
        justify-self: center;
    }

    .hex-pos-1 { grid-column: 1; grid-row: 2; }
    .hex-pos-2 { grid-column: 2; grid-row: 2; }
    .hex-pos-3 { grid-column: 1; grid-row: 3; }
    .hex-pos-4 { grid-column: 2; grid-row: 3; }
    .hex-pos-5 { grid-column: 1; grid-row: 4; }
    .hex-pos-6 { grid-column: 2; grid-row: 4; }

    .hex-pos-1, .hex-pos-3, .hex-pos-4, .hex-pos-6 {
        transform: none;
    }

    .hex-pos-1.in-view, .hex-pos-3.in-view,
    .hex-pos-4.in-view, .hex-pos-6.in-view {
        transform: scale(1) rotate(0deg);
    }

    .hex-wide {
        width: 320px;
        height: 240px;
    }

    .hex-wide .hex-inner {
        padding: 30px 35px;
    }

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

    .hex-feature {
        width: 180px;
        height: 210px;
    }

    .scene-title h2 {
        font-size: 1.8rem;
    }

    .brand-title {
        font-size: 2rem;
    }

    .speech-bubble {
        margin-left: 20px;
        margin-right: 20px;
        max-width: 100%;
    }

    .speech-bubble-right {
        margin-left: 20px;
    }

    .hex-contact-main {
        width: 300px;
        height: 350px;
    }

    .footer-hex-strip {
        clip-path: none;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    :root {
        --hex-size: 130px;
    }

    .hero-cluster {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 12px;
    }

    .hex-center {
        grid-column: 1;
        width: 200px;
        height: 230px;
    }

    .hex-surround {
        width: 130px;
        height: 150px;
    }

    .hex-pos-1, .hex-pos-2, .hex-pos-3,
    .hex-pos-4, .hex-pos-5, .hex-pos-6 {
        grid-column: 1;
        grid-row: auto;
    }

    .features-cluster {
        grid-template-columns: 1fr;
    }

    .hex-feature:nth-child(even) {
        transform: none;
    }

    .hex-feature:nth-child(even).in-view {
        transform: scale(1) rotate(0deg);
    }

    .hex-wide {
        width: 280px;
        height: 220px;
    }

    .about-cluster {
        flex-direction: column;
    }

    .nav-inner {
        gap: 2px;
    }

    .nav-hex {
        font-size: 0.55rem;
        padding: 5px 8px;
        min-width: 55px;
    }
}
