/* =========================================
   VARIABLES & COLOR SYSTEM
   ========================================= */
:root {
    --navy-deep: #0B1D3A;
    --navy-mid: #1A365D;
    --gold-light: #D4AF37;
    --gold-dark: #B58E26;
    --cream: #F8F5F0;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --font-display: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--navy-deep);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

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

a:hover, a:focus-visible {
    color: var(--white);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: 1rem; }

p { margin-bottom: 1.25rem; color: var(--text-main); }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.text-center { text-align: center; }

/* =========================================
   READING PROGRESS BAR
   ========================================= */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--white));
    width: 0%;
    z-index: 10000;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--gold-light);
}

/* =========================================
   NAVIGATION
   ========================================= */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    padding: 1rem 0;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(11, 29, 58, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
}

#nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

#nav-links a {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 0.25rem 0;
}

#nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-light);
    transition: width 0.3s var(--ease-out-expo);
}

#nav-links a:hover::after, #nav-links a:focus-visible::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    color: var(--navy-deep) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
    color: var(--navy-deep) !important;
}

.nav-cta::after { display: none !important; }

#menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10001;
}

#menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-toggle.active span:nth-child(2) { opacity: 0; }
#menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================
   HERO SECTION (Cinematic 3D Paint Flow)
   ========================================= */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
    background: radial-gradient(circle at 50% 50%, var(--navy-mid), var(--navy-deep));
}

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

.hero-depth {
    position: absolute;
    inset: 0;
    z-index: 1;
    transform-style: preserve-3d;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: floatDepth 12s infinite alternate var(--ease-out-expo);
}

.shape-1 {
    width: 400px; height: 400px;
    background: var(--gold-light);
    top: 10%; left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px; height: 300px;
    background: #3B82F6;
    bottom: 20%; right: 15%;
    animation-delay: -4s;
}

.shape-3 {
    width: 250px; height: 250px;
    background: #8B5CF6;
    top: 50%; left: 50%;
    animation-delay: -8s;
}

@keyframes floatDepth {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(50px, -50px, 100px) scale(1.1); }
}

.hero-content {
    text-align: center;
    z-index: 3;
    max-width: 900px;
}

.hero-sub {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-muted);
    max-width: 700px;
    margin: 1.5rem auto 2.5rem;
}

.reveal-text {
    opacity: 0;
    transform: translateY(40px);
    animation: textReveal 1.2s var(--ease-out-expo) forwards;
}

.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }

@keyframes textReveal {
    to { opacity: 1; transform: translateY(0); }
}

.btn-magnetic {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    color: var(--navy-deep);
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 60px;
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
    will-change: transform;
}

.btn-magnetic:hover {
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
    color: var(--navy-deep);
}

/* =========================================
   INTRODUCTION (Text Reveal + Parallax Layers)
   ========================================= */
.section-intro {
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
}

.bg-layers {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.layer {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: radial-gradient(ellipse at center, rgba(26, 54, 93, 0.4) 0%, transparent 70%);
    will-change: transform;
}

.l2 {
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
    animation: slowRotate 40s linear infinite;
}

@keyframes slowRotate {
    to { transform: rotate(360deg); }
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* =========================================
   COMPARISON (Morphing Background)
   ========================================= */
.section-comparison {
    padding: 8rem 0;
    position: relative;
}

.morph-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--navy-mid), var(--gold-dark));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 15s ease-in-out infinite;
    filter: blur(80px);
    opacity: 0.2;
    z-index: 0;
}

@keyframes morph {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    25% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    75% { border-radius: 50% 30% 50% 70% / 40% 70% 40% 60%; }
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.depth-card {
    background: rgba(11, 29, 58, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
}

.depth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.depth-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

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

.card-icon {
    width: 64px;
    height: 64px;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
}

/* =========================================
   SERVICES (Interactive 3D Cards)
   ========================================= */
.section-services {
    padding: 8rem 0;
    background: linear-gradient(180deg, var(--navy-deep) 0%, #061022 100%);
}

.section-desc {
    max-width: 800px;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 4rem;
}

.cards-3d {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    perspective: 1200px;
}

.tilt-card {
    background: linear-gradient(145deg, rgba(26, 54, 93, 0.5), rgba(11, 29, 58, 0.8));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s linear;
    will-change: transform;
    overflow: hidden;
}

.card-shine {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tilt-card:hover .card-shine { opacity: 1; }

/* =========================================
   PROCESS (Animated Timeline)
   ========================================= */
.section-process {
    padding: 8rem 0;
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto 0;
    padding-left: 3rem;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold-light), transparent);
}

.step {
    position: relative;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s var(--ease-out-expo);
}

.step.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.step-marker {
    position: absolute;
    left: -3rem;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--navy-deep);
    border: 2px solid var(--gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gold-light);
    transform: translateX(-50%);
    left: -2.05rem;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.step-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

/* =========================================
   BENEFITS (Floating Motion)
   ========================================= */
.section-benefits {
    padding: 8rem 0;
    background: radial-gradient(circle at 80% 20%, rgba(26, 54, 93, 0.6), var(--navy-deep));
}

.floating-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.float-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    animation: gentleFloat 6s ease-in-out infinite;
}

.float-item:nth-child(2) { animation-delay: -1.5s; }
.float-item:nth-child(3) { animation-delay: -3s; }
.float-item:nth-child(4) { animation-delay: -4.5s; }

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.icon-wrap {
    width: 48px;
    height: 48px;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
}

/* =========================================
   EXPERTISE (Glassmorphism Wide)
   ========================================= */
.section-expertise {
    padding: 8rem 0;
}

.wide-card {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.wide-card p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* =========================================
   FAQ (Smooth Accordion)
   ========================================= */
.section-faq {
    padding: 8rem 0;
    background: linear-gradient(180deg, #061022 0%, var(--navy-deep) 100%);
}

.accordion {
    max-width: 800px;
    margin: 3rem auto 0;
}

.accordion-item {
    border-bottom: 1px solid var(--glass-border);
}

.accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-display);
    transition: color 0.3s ease;
}

.accordion-trigger:hover, .accordion-trigger:focus-visible {
    color: var(--gold-light);
    outline: none;
}

.chevron {
    width: 24px;
    height: 24px;
    transition: transform 0.4s var(--ease-out-expo);
    flex-shrink: 0;
    margin-left: 1rem;
}

.accordion-trigger[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.accordion-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s var(--ease-out-expo), padding 0.5s ease;
    padding: 0 0;
}

.accordion-panel.is-open {
    max-height: 300px;
    padding-bottom: 1.5rem;
}

.accordion-panel p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* =========================================
   CTA (Light Trails)
   ========================================= */
.section-cta {
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.light-trails {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.15), transparent 60%);
}

.light-trails::before, .light-trails::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    animation: trailMove 4s linear infinite;
}

.light-trails::before { top: 30%; left: -200px; animation-delay: 0s; }
.light-trails::after { bottom: 30%; right: -200px; animation-delay: -2s; animation-direction: reverse; }

@keyframes trailMove {
    0% { transform: translateX(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(calc(100vw + 400px)); opacity: 0; }
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.btn-magnetic.primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    color: var(--navy-deep);
}

.btn-magnetic.secondary {
    background: transparent;
    border: 2px solid var(--gold-light);
    color: var(--gold-light);
}

.btn-magnetic.secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--white);
}

/* =========================================
   FOOTER (Ambient Motion)
   ========================================= */
#footer {
    padding: 5rem 0 2rem;
    position: relative;
    border-top: 1px solid var(--glass-border);
    overflow: hidden;
}

.ambient-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(26, 54, 93, 0.5), transparent 50%);
    animation: ambientPulse 8s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 { margin-bottom: 1rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.95rem; }

.footer-contact h3, .footer-social h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.footer-contact p { margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.95rem; }
.footer-contact a { color: var(--text-main); }

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--gold-light);
    color: var(--navy-deep);
    border-color: var(--gold-light);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* =========================================
   BACK TO TOP
   ========================================= */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--gold-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s var(--ease-out-expo);
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    background: var(--gold-light);
    color: var(--navy-deep);
}

#back-to-top svg { width: 20px; height: 20px; }

/* =========================================
   SCROLL REVEAL UTILITY
   ========================================= */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal.delay-1 { transition-delay: 0.15s; }
.scroll-reveal.delay-2 { transition-delay: 0.3s; }

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    .cards-3d { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    #menu-toggle { display: flex; }
    
    #nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: rgba(11, 29, 58, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 1.5rem;
        transition: right 0.5s var(--ease-out-expo);
        border-left: 1px solid var(--glass-border);
    }
    
    #nav-links.open { right: 0; }
    
    .grid-2, .cards-3d, .floating-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-card { padding: 2rem; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .floating-shape { display: none; }
    .morph-bg { width: 300px; height: 300px; }
}

/* =========================================
   ACCESSIBILITY & REDUCED MOTION
   ========================================= */
:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    
    .reveal-text {
        opacity: 1;
        transform: none;
    }
}