/* ==========================================
   GenAI Driven Marketing — Daaf Laurens
   ========================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 300;
}

body.menu-open {
    overflow: hidden;
}

/* --- Custom Properties --- */
:root {
    --bg: #08080c;
    --bg-elevated: #0f0f15;
    --bg-card: #121219;
    --text: #ede8df;
    --text-dim: #8b8b93;
    --text-muted: #4a4a52;
    --accent: #e8943a;
    --accent-hover: #f0a848;
    --accent-dim: rgba(232, 148, 58, 0.12);
    --accent-glow: rgba(232, 148, 58, 0.06);
    --border: rgba(255, 255, 255, 0.05);
    --border-accent: rgba(232, 148, 58, 0.25);
    --radius: 16px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --transition: 0.5s var(--ease);
}

/* --- Grain Overlay --- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0.035;
    background-repeat: repeat;
    background-size: 150px 150px;
    mix-blend-mode: overlay;
}

/* --- Cursor Glow --- */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
    pointer-events: none;
    z-index: 2;
    will-change: transform;
    top: 0;
    left: 0;
}

/* --- Custom Cursor Dot --- */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    z-index: 10001;
    will-change: transform;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.3s ease,
                opacity 0.3s ease;
    mix-blend-mode: difference;
    opacity: 0;
}

.cursor-dot.visible {
    opacity: 1;
}

.cursor-dot.hovering {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--accent);
    mix-blend-mode: normal;
}

/* Hide default cursor everywhere */
.has-custom-cursor,
.has-custom-cursor *,
.has-custom-cursor *::before,
.has-custom-cursor *::after {
    cursor: none !important;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    font-weight: 700;
    line-height: 1.1;
}

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

a:hover {
    color: var(--accent);
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 64px);
}

.section {
    padding: clamp(80px, 12vw, 160px) 0;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: clamp(48px, 6vw, 80px);
    letter-spacing: -0.025em;
}

.section-label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

/* --- Selection --- */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ==========================================
   Navigation
   ========================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px clamp(24px, 5vw, 64px);
    transition: all 0.4s ease;
}

.nav.scrolled {
    padding: 16px clamp(24px, 5vw, 64px);
    background: rgba(8, 8, 12, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    color: var(--text) !important;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    color: var(--text) !important;
    opacity: 0.7;
}

.nav-logo-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-dim);
    position: relative;
    letter-spacing: 0.01em;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    width: 100%;
    background: var(--accent);
}

/* Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.35s var(--ease);
    transform-origin: center;
}

.nav-toggle.active span:first-child {
    transform: rotate(45deg) translate(2.5px, 2.5px);
}

.nav-toggle.active span:last-child {
    transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(8, 8, 12, 0.96);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 48px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--ease);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu a {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dim);
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
}

.mobile-menu a:hover {
    color: var(--accent);
    transform: translateX(8px);
}

/* ==========================================
   Hero
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 24px;
    margin-bottom: 100px;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 32px;
}

.hero-line {
    display: block;
    font-size: clamp(3.5rem, 7vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.92;
    opacity: 0;
    transform: translateY(50px) rotateX(15deg);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.hero-line:nth-child(2) {
    transition-delay: 0.15s;
}

.hero-line:nth-child(3) {
    transition-delay: 0.3s;
}

.hero-line.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

.hero-line--accent {
    background: linear-gradient(135deg, #e8943a 0%, #f2c55c 35%, #e87040 70%, #e8943a 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-line .letter {
    display: inline-block;
    transition: transform 0.35s var(--ease);
    cursor: default;
}

.hero-line .letter:hover {
    transform: translateY(-10px) rotate(-4deg) scale(1.05);
}

.hero-sub {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: var(--text-dim);
    font-weight: 300;
    line-height: 1.75;
    max-width: 460px;
    margin: 0 auto;
}

/* Hero Stats */
.hero-stats {
    position: absolute;
    bottom: clamp(60px, 8vw, 100px);
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(24px, 4vw, 48px);
}

.stat {
    text-align: center;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

.stat-number {
    display: block;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.04em;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-text {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 32px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent));
    animation: scrollDrop 2s ease-in-out infinite;
}

@keyframes scrollDrop {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

/* ==========================================
   Projects
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(28px, 3vw, 40px);
    display: flex;
    flex-direction: column;
    min-height: 340px;
    transition: transform 0.5s var(--ease), border-color 0.5s ease, box-shadow 0.5s ease;
    cursor: pointer;
    overflow: hidden;
    will-change: transform;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--accent-dim),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.project-card:hover {
    border-color: var(--border-accent);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.5),
        0 0 48px var(--accent-glow);
}

.project-card:hover::before {
    opacity: 1;
}

.project-number {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.025);
    line-height: 1;
    position: absolute;
    top: 12px;
    right: 16px;
    pointer-events: none;
    transition: color 0.5s ease;
}

.project-card:hover .project-number {
    color: rgba(232, 148, 58, 0.06);
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.015em;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: var(--accent);
}

.project-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 24px;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    font-size: 0.72rem;
    padding: 5px 14px;
    border-radius: 100px;
    background: var(--accent-dim);
    color: var(--accent);
    letter-spacing: 0.02em;
    font-weight: 400;
    transition: all 0.3s ease;
}

.project-card:hover .project-tags span {
    background: rgba(232, 148, 58, 0.18);
}

.project-arrow {
    position: absolute;
    top: clamp(28px, 3vw, 40px);
    right: clamp(28px, 3vw, 40px);
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: all 0.4s var(--ease);
    z-index: 1;
}

.project-card:hover .project-arrow {
    color: var(--accent);
    transform: translateX(8px);
}

/* ==========================================
   Insights
   ========================================== */
.insights-list {
    display: flex;
    flex-direction: column;
}

.insight {
    display: flex;
    gap: clamp(24px, 4vw, 56px);
    padding: clamp(32px, 4vw, 52px) 0;
    border-top: 1px solid var(--border);
    align-items: flex-start;
    transition: all 0.4s ease;
}

.insight:last-child {
    border-bottom: 1px solid var(--border);
}

.insight:hover {
    padding-left: 12px;
}

.insight-number {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: var(--accent);
    opacity: 0.3;
    line-height: 1.2;
    flex-shrink: 0;
    min-width: 44px;
    transition: opacity 0.4s ease;
}

.insight:hover .insight-number {
    opacity: 0.8;
}

.insight-content h3 {
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    margin-bottom: 10px;
    letter-spacing: -0.015em;
    transition: color 0.3s ease;
}

.insight:hover .insight-content h3 {
    color: var(--accent);
}

.insight-content p {
    font-size: 0.92rem;
    color: var(--text-dim);
    line-height: 1.75;
    max-width: 580px;
}

/* ==========================================
   Forward
   ========================================== */
.section--forward {
    position: relative;
    overflow: hidden;
}

.section--forward::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
    pointer-events: none;
}

.forward-content {
    position: relative;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.forward-quote {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    margin: 28px 0 32px;
    border: none;
    padding: 0;
}

.forward-quote em {
    color: var(--accent);
    font-style: italic;
}

.forward-text {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.75;
    max-width: 500px;
    margin: 0 auto;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-name {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
}

.footer-minor {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ==========================================
   Scroll Animations
   ========================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
    transition-delay: calc(var(--delay, 0) * 0.1s);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1024px) {
    .hero-line {
        font-size: clamp(3rem, 7vw, 5.5rem);
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-divider {
        height: 24px;
    }

    .insight {
        flex-direction: column;
        gap: 8px;
    }

    .insight:hover {
        padding-left: 0;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .cursor-glow,
    .cursor-dot {
        display: none;
    }

    .hero-sub br {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-line {
        font-size: clamp(2.8rem, 16vw, 5rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .stat-divider {
        width: 32px;
        height: 1px;
    }

    .scroll-indicator {
        display: none;
    }

    .project-card {
        min-height: auto;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-line {
        opacity: 1;
        transform: none;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}
