/* ==========================================================================
   Absolve Digital - Digital Growth Operating System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Refined Premium Palette */
    --clr-bg: #fdfcfb; /* Soft Ivory */
    --clr-bg-alt: #f7f7f5; /* Light warm grey */
    --clr-bg-panel: #f0f4f8; /* Soft blue-tinted panel */
    --clr-bg-accent: #f5f2eb; /* Warm beige for editorial contrast */
    
    --clr-primary: #2b8ab2; /* Logo Blue/Teal */
    --clr-primary-light: rgba(43, 138, 178, 0.1);
    --clr-accent: #c49a45; /* Warm beige/gold highlight */
    
    --clr-nav-bg: #050505;
    --clr-nav-text: #ffffff;
    
    --clr-text-main: #1a1c20; /* Deep charcoal */
    --clr-text-muted: #6b6d76;
    
    --clr-border: rgba(26, 28, 32, 0.1);
    
    /* Typography */
    --font-main: 'Poppins', sans-serif;
    
    --step--2: clamp(0.7813rem, 0.7747rem + 0.0326vw, 0.8rem);
    --step--1: clamp(0.9375rem, 0.9158rem + 0.1087vw, 1rem);
    --step-0: clamp(1.125rem, 1.0815rem + 0.2174vw, 1.25rem);
    --step-1: clamp(1.35rem, 1.2761rem + 0.3696vw, 1.5625rem);
    --step-2: clamp(1.62rem, 1.5041rem + 0.5793vw, 1.9531rem);
    --step-3: clamp(1.944rem, 1.771rem + 0.8652vw, 2.4414rem);
    --step-4: clamp(2.5rem, 2.0827rem + 2vw, 3.5rem);
    --step-5: clamp(3rem, 2.5rem + 3vw, 5rem);

    /* Spacing & Layout */
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;
    
    --shadow-subtle: 0 4px 20px rgba(26, 28, 32, 0.04);
    --shadow-float: 0 20px 40px rgba(26, 28, 32, 0.08);
    
    --transition-fast: all 0.2s ease;
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: auto; /* Handled by JS lenis/custom or native smooth if wanted */ }

body {
    font-family: var(--font-main);
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Custom cursor */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; object-fit: cover; }

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--clr-primary);
}
.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--clr-primary);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}
.cursor-outline.hovering {
    width: 80px;
    height: 80px;
    background-color: rgba(43, 138, 178, 0.1);
    border-color: rgba(43, 138, 178, 0.3);
}

/* Parallax Background Icons */
.bg-icons-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: -1; overflow: hidden;
}
.bg-icon {
    position: absolute;
    opacity: 0.03;
    font-size: 3rem;
    color: var(--clr-text-main);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }
h5 { font-size: var(--step-1); }

p { font-size: var(--step-0); color: var(--clr-text-muted); margin-bottom: var(--space-md); }

.text-reveal { overflow: hidden; display: inline-block; }
.text-reveal span { display: inline-block; transform: translateY(100%); transition: var(--transition-smooth); }
.text-reveal.active span { transform: translateY(0); }

.highlight {
    position: relative;
    display: inline-block;
    color: var(--clr-primary);
}
.highlight::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 4px;
    background-color: var(--clr-accent); transition: width 1s ease 0.5s;
}
.highlight.active::after { width: 100%; }

/* ==========================================================================
   Layouts
   ========================================================================== */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; position: relative; }
.section-alt { background-color: var(--clr-bg-alt); }
.section-panel { background-color: var(--clr-bg-panel); }
.section-accent { background-color: var(--clr-bg-accent); }
.section-dark { background-color: var(--clr-nav-bg); color: white; }
.section-dark p { color: #a0a0a0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }

/* Bento Box Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(250px, auto);
    gap: var(--space-sm);
}
.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-wide { grid-column: span 2; }
.bento-tall { grid-row: span 2; }

@media (max-width: 992px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-large, .bento-wide, .bento-tall { grid-column: span 1; grid-row: span 1; }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: var(--clr-nav-bg);
    padding: 1.5rem 0; z-index: 1000;
    transition: var(--transition-smooth);
}
.navbar.scrolled { padding: 1rem 0; background: rgba(5,5,5,0.95); backdrop-filter: blur(10px); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo-container img { height: 48px; /* Slightly larger */ }

.nav-links { display: flex; align-items: center; gap: 2.5rem; }
.nav-item { position: relative; }
.nav-link {
    color: var(--clr-nav-text);
    font-size: var(--step--1); /* Slightly smaller */
    font-weight: 400;
    letter-spacing: 1px;
    display: flex; align-items: center; gap: 0.5rem;
    position: relative;
    padding: 0.5rem 0;
}
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
    background-color: var(--clr-primary); transition: var(--transition-smooth);
}
.nav-link:hover::after, .nav-item.active .nav-link::after { width: 100%; }

/* Dropdown */
.dropdown-menu {
    position: absolute; top: 100%; left: -20px;
    background-color: var(--clr-nav-bg);
    min-width: 320px;
    padding: 1.5rem;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: var(--transition-smooth);
    border-top: 2px solid var(--clr-primary);
}
.nav-item.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-link {
    color: #aaa; display: block; padding: 0.8rem;
    font-size: var(--step--1); transition: var(--transition-fast);
}
.dropdown-link:hover { color: white; background: rgba(255,255,255,0.05); padding-left: 1.2rem; border-radius: 4px; }

/* Mobile Menu */
.hamburger { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
@media (max-width: 992px) {
    .nav-links { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: var(--clr-nav-bg); flex-direction: column; justify-content: center; transition: var(--transition-smooth); }
    .nav-links.active { right: 0; }
    .hamburger { display: block; z-index: 1001; }
    .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; border: none; }
    .nav-item.dropdown.active .dropdown-menu { display: block; }
}

/* ==========================================================================
   Buttons & UI Elements
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 1.2rem 2.5rem; border-radius: 50px;
    font-size: var(--step--1); font-weight: 500; text-transform: uppercase; letter-spacing: 1px;
    position: relative; overflow: hidden; border: none; cursor: none;
    transition: var(--transition-smooth);
}
.btn-primary { background-color: var(--clr-primary); color: white; }
.btn-primary::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0%; height: 100%;
    background-color: var(--clr-text-main); transition: var(--transition-smooth); z-index: 1;
}
.btn-primary span { position: relative; z-index: 2; }
.btn-primary:hover::before { width: 100%; }

.btn-outline { background-color: transparent; border: 1px solid var(--clr-text-main); color: var(--clr-text-main); }
.btn-outline:hover { background-color: var(--clr-text-main); color: var(--clr-bg); }

/* Magnetic Wrap */
.magnetic-wrap { display: inline-block; }

/* Bento Blocks */
.bento-block {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-subtle);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex; flex-direction: column;
}
.bento-block:hover { transform: translateY(-5px); box-shadow: var(--shadow-float); }
.bento-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0.8; transition: transform 1s; }
.bento-block:hover .bento-img { transform: scale(1.05); }
.bento-content { position: relative; z-index: 2; margin-top: auto; }
.bento-dark { background: var(--clr-text-main); color: white; }
.bento-dark p { color: #ccc; }

/* Marquee */
.marquee-wrapper { overflow: hidden; white-space: nowrap; padding: 2rem 0; background: var(--clr-primary-light); }
.marquee { display: inline-block; animation: marquee 30s linear infinite; }
.marquee span { font-size: var(--step-3); font-weight: 700; color: transparent; -webkit-text-stroke: 1px var(--clr-primary); margin: 0 2rem; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ==========================================================================
   Specific Layouts
   ========================================================================== */
/* Command Table Hero */
.hero-command {
    min-height: 100vh; display: flex; align-items: center;
    padding-top: 100px; position: relative;
}
.hero-visual-layer {
    position: relative; height: 600px; width: 100%;
}
.hero-visual-layer .hero-img-wrap {
    width: 100%; height: 100%; border-radius: var(--radius-lg); overflow: hidden; position: relative;
}
.chip {
    position: absolute; background: white; padding: 1rem 1.5rem;
    border-radius: 50px; font-weight: 500; font-size: var(--step--1);
    box-shadow: var(--shadow-float); display: flex; align-items: center; gap: 0.5rem;
    z-index: 10;
}
.chip i { color: var(--clr-primary); }
.chip-1 { top: 10%; left: -5%; } .chip-2 { bottom: 20%; right: -5%; } .chip-3 { top: 50%; right: 10%; }

/* Scroll Story */
.story-wrapper { height: 300vh; position: relative; }
.story-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.story-step { position: absolute; width: 100%; opacity: 0; transform: translateY(50px); transition: var(--transition-smooth); }
.story-step.active { opacity: 1; transform: translateY(0); }

/* Editorial Image Blocks */
.editorial-img { position: relative; border-radius: var(--radius-md); overflow: hidden; }
.editorial-img img { transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1); }
.editorial-img:hover img { transform: scale(1.05); }

/* UI Abstractions (Service Pages) */
.ui-diagram {
    background: white; border: 1px solid var(--clr-border); border-radius: var(--radius-md);
    padding: 2rem; position: relative; box-shadow: var(--shadow-subtle);
}
.ui-node {
    background: var(--clr-bg-panel); padding: 1.5rem; border-radius: var(--radius-sm);
    margin-bottom: 1rem; border-left: 4px solid var(--clr-primary);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-up { opacity: 0; transform: translateY(40px); transition: var(--transition-smooth); }
.fade-up.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Scroll Progress */
.scroll-progress {
    position: fixed; top: 0; left: 0; width: 0%; height: 3px;
    background: var(--clr-primary); z-index: 9999;
}

/* Layered CTA */
.layered-cta {
    background: var(--clr-text-main); color: white;
    border-radius: var(--radius-lg); padding: var(--space-xl) var(--space-md);
    text-align: center; position: relative; overflow: hidden;
}
.layered-cta::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(43,138,178,0.2) 0%, transparent 60%);
    z-index: 0;
}
.layered-cta-content { position: relative; z-index: 1; }
