@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    /* ── PRIMARY KLEUR — uncomment om te testen ─────────────────────── */
    /* --color-primary: 107 158 120; */
    /* 🥑 Avocado Groen   #6B9E78  (huidig) */
    /* --color-primary: 244 161 64; */
    /* 🥭 Mango Oranje    #F4A140          */
    /* --color-primary: 210  84  43; */
    /* 🍊 Blood Orange    #D2542B          */
    --color-primary: 232 115 90;
    /* 🍑 Papaja Koraal   #E8735A          */
    /* --color-primary: 123  94 167; */
    /* 🍇 Passievrucht    #7B5EA7          */
    /* --color-primary: 141 182   0; */
    /* 🍋 Citroengeel     #8DB600          */
    /* --color-primary:   0 137 123; */
    /* 🍃 Tropisch Teal   #00897B          */
    /* --color-primary: 107 158 120; */
    /* #6B9E78 */
    --color-secondary: 74 111 165;
    /* #4A6FA5 */
    --color-bg-light: 248 249 250;
    /* #F8F9FA */
    --color-bg-dark: 10 10 10;
    /* #0a0a0a */
    --color-surface-light: 255 255 255;
    /* #FFFFFF */
    --color-surface-dark: 18 18 18;
    /* #121212 */
    --color-text-light: 31 41 55;
    /* #1F2937 */
    --color-text-dark: 243 244 246;
    /* #F3F4F6 */
    --color-accent-red: 230 57 70;
    /* #E63946 */
    --color-logo-grey: 118 118 118;
    /* #767676 */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: rgb(var(--color-bg-dark));
    color: rgb(var(--color-text-dark));
    cursor: none;
    overflow-x: hidden;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgb(var(--color-primary));
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s;
    will-change: transform, width, height;
}

.custom-cursor.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(var(--color-primary) / 0.3);
    border: 1px solid rgb(var(--color-primary));
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.02em;
}

.will-change-transform {
    will-change: transform;
}

.img-parallax-container {
    overflow: hidden;
    border-radius: 1.5rem;
    will-change: transform;
}

.img-parallax {
    width: 100%;
    height: 130%;
    object-fit: cover;
    transform: translateY(-15%);
    will-change: transform;
}

/* Prevent flash of unstyled text */
.reveal-text,
.hero-text,
.hero-sub,
.hero-buttons,
.nav-logo,
.nav-links {
    visibility: hidden;
}

/* Theme Transitions */
html {
    transition: background-color 0.5s ease, color 0.5s ease;
}

body:not(.dark) {
    background-color: #F8F9FA;
    color: #1F2937;
}

body:not(.dark) .custom-cursor {
    mix-blend-mode: difference;
    background-color: #ffffff;
}

body:not(.dark) .hero-text {
    color: #1F2937;
}

/* Restore primary colour for ALL text-primary elements in light mode.
   body:not(.dark) .hero-text (above) has specificity 0,2,1 — this rule
   has the same specificity but comes later, so it wins for elements
   that have both classes, AND covers all other text-primary elements
   across the page (services, reveals, footer, etc.) */
body:not(.dark) .text-primary {
    color: rgb(var(--color-primary));
}

body:not(.dark) .nav-logo img {
    filter: invert(0);
}

body:not(.dark) .glow-orb {
    mix-blend-mode: multiply;
}

body:not(.dark) .img-parallax-container .absolute.inset-0 {
    background-color: rgba(var(--color-primary) / 0.05);
}

/* Logo Visibility Fixes - Light Mode */
body:not(.dark) .nav-logo img {
    filter: invert(1) brightness(0) contrast(200%);
    opacity: 0.9 !important;
}

/* Navbar Scroll Effect */
nav .max-w-7xl {
    --nav-bg: transparent;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease;
}

div.nav-scrolled {
    --nav-bg: rgba(10, 10, 10, 0.85);
    /* Dark mode default */
    background-color: var(--nav-bg) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body:not(.dark) div.nav-scrolled {
    --nav-bg: rgba(248, 249, 250, 0.85);
    /* Light mode override */
    background-color: var(--nav-bg) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* ============================
   Spotlight Border Hover Effect
   A premium "Antigravity" glowing border that tracks the cursor
   by using a CSS mask to cut out the inner area.
   ============================ */
.spotlight-card {
    position: relative;
    /* transition default shadow */
    transition: box-shadow 0.3s ease;
}

.spotlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    /* The width of the glowing border */

    /* The radial gradient follows the --x and --y variables */
    background: radial-gradient(500px circle at var(--x, 50%) var(--y, 50%),
            rgb(var(--color-primary)),
            transparent 40%);

    /* CSS Mask magic to cut out the inside, leaving only the 1px padding border! */
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 10;
}

body:not(.dark) .spotlight-card::before {
    background: radial-gradient(300px circle at var(--x, 50%) var(--y, 50%),
            rgb(var(--color-primary)),
            transparent 40%);
}

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

/* ── Mobile / Touch Responsive Fixes ──────────────────────────────── */

/* Hide custom cursor on touch devices — no mouse pointer exists */
@media (hover: none) {
    .custom-cursor {
        display: none !important;
    }

    /* Restore native cursor */
    * {
        cursor: auto !important;
    }
}

/* Hero floating images — prevent text overlap on mobile */
@media (max-width: 767px) {
    .hero-float-img {
        opacity: 0.25 !important;
        transform: scale(0.65) !important;
        pointer-events: none;
    }

    /* Push the fig image to right edge, away from text */
    .hero-float-img:first-of-type {
        right: -20px !important;
        top: 20px !important;
    }

    /* Push the avocado to bottom, below buttons */
    .hero-float-img:last-of-type {
        bottom: -30px !important;
        left: -20px !important;
    }
}