/* 1. HYPER-MODERN FONTS */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Lato:wght@300;400;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --sapphire-dark: #0f172a;
    --sapphire-light: #1e3a8a;
    --gold: #dcb662; 
    --gold-bright: #ebd293;
    --ivory: #fdfbf7;
    --white: #ffffff;
    --text-muted: #94a3b8;
    
    --font-modern: 'Montserrat', sans-serif;
    --font-headline: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

/* 2. GLOBAL RESET & OVERFLOW PROTECTION */
html {
    box-sizing: border-box;
    background-color: var(--sapphire-dark);
    overflow-x: hidden;
}

*, *:before, *:after {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

/* 3. BASE STYLES & LIVING BACKGROUND */
body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--sapphire-dark);
    color: var(--ivory);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Layer 1: The Breathing Light Mesh */
body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -2;
    background: 
        radial-gradient(circle at 50% 50%, rgba(30, 58, 138, 0.45) 0%, transparent 40%),
        radial-gradient(circle at 30% 70%, rgba(220, 182, 98, 0.04) 0%, transparent 45%),
        radial-gradient(circle at 70% 30%, rgba(15, 23, 42, 0.9) 0%, transparent 50%);
    animation: livingMesh 28s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Layer 2: The Tactile Micro-Grain */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* The Organic Breathing Animation */
@keyframes livingMesh {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(45deg) scale(1.15); }
    100% { transform: rotate(90deg) scale(1); }
}
/* 4. TYPOGRAPHY & LAYOUT */
h1, h2, h3 {
    font-family: var(--font-headline);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 0;
}

/* TYPOGRAPHY UTILITY - PREVENTS AWKWARD LINE BREAKS */
.keep-together {
    white-space: nowrap;
}

/* 5. MISSION ZERO-INSPIRED FLOATING HEADER */
.floating-header {
    position: absolute; /* Changed from fixed to absolute */
    top: 25px; 
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1200px;
    z-index: 1000;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 25px;
    background-color: rgba(15, 23, 42, 0.65); /* Translucent Sapphire */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08); /* Engineered border */
    border-radius: 100px; /* The deep-tech 'Pill' shape */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.minimal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ivory);
}

.minimal-brand .brand-name {
    font-family: var(--font-headline);
    font-size: 1.15rem;
    font-weight: 400;
}

.minimal-brand .brand-name span {
    color: var(--gold);
    font-style: italic;
}

.engineered-nav {
    display: flex;
    align-items: center;
    gap: 5px; /* Tight gap for cohesive hover bounding */
}

.engineered-nav .nav-link {
    font-family: var(--font-modern);
    color: var(--ivory);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
}

/* Encapsulated Hover State */
.engineered-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.05); /* Soft structural highlight */
    color: var(--gold);
    opacity: 1;
}

/* Dedicated Header CTA Button */
.engineered-nav .nav-btn {
    font-family: var(--font-modern);
    color: var(--sapphire-dark);
    background-color: var(--gold);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 12px 28px;
    border-radius: 50px;
    margin-left: 15px;
    transition: all 0.3s ease;
}

.engineered-nav .nav-btn:hover {
    background-color: var(--gold-bright);
    transform: scale(1.02);
}

/* 6. LOGO ANIMATION WRAPPER */
.logo-animation-wrapper {
    width: 28px;
    height: 28px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 7. BUTTONS & FORMS */
.btn {
    display: inline-flex !important; 
    align-items: center;
    justify-content: center;
    padding: 15px 36px !important; 
    font-family: var(--font-modern);
    font-size: 0.85rem;
    font-weight: 500; 
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px; 
}

.btn-gold {
    background-color: var(--gold);
    color: var(--sapphire-dark);
    border: 1px solid var(--gold);
}

.btn-gold:hover {
    background-color: transparent;
    color: var(--gold);
}

.btn-outline {
    background-color: transparent;
    color: var(--ivory);
    border: 1px solid rgba(255, 255, 255, 0.4); 
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    background-color: rgba(212, 175, 55, 0.05);
}

.form-control {
    width: 100%;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ivory);
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 20px;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
}

.hidden-bot-field { 
    display: none; 
}

/* 8. THE 2D MOTION DIVIDER */
.gold-divider {
    height: 2px;
    width: 60px;
    background: var(--gold);
    margin: 15px auto 30px auto;
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.container:hover .gold-divider {
    width: 120px;
}

/* 9. CENTERED CINEMATIC HERO */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 160px; /* Updated to clear the new floating header */
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.overline {
    font-family: var(--font-modern);
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 25px;
    display: block;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 30px;
    margin-top: 0;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 45px;
    max-width: 650px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* 11. FEATURES GRID & 2D MOTION SVGS */
.features {
    padding: 80px 0 120px 0;
    background: transparent;
    position: relative;
    z-index: 2;
}

.features-header {
    text-align: center;
    margin-bottom: 70px;
}

.features-header h2 {
    font-size: 2.5rem;
    color: var(--ivory);
    margin-bottom: 15px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 50px 30px;
    text-align: center;
    border-radius: 6px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(220, 182, 98, 0.3); /* Subtle gold border on hover */
    transform: translateY(-5px);
}

.feature-icon {
    color: var(--gold);
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.feature-card h3 {
    font-family: var(--font-modern);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--ivory);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* 2D SVG Draw Animations */
.draw-circle { stroke-dasharray: 63; stroke-dashoffset: 63; transition: stroke-dashoffset 1s ease; }
.draw-line-1, .draw-line-2 { stroke-dasharray: 30; stroke-dashoffset: 30; transition: stroke-dashoffset 1s ease 0.3s; }
.draw-rect { stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 1s ease; }
.draw-cross { stroke-dasharray: 45; stroke-dashoffset: 45; transition: stroke-dashoffset 1s ease; }

.feature-card:hover .draw-circle,
.feature-card:hover .draw-line-1,
.feature-card:hover .draw-line-2,
.feature-card:hover .draw-rect,
.feature-card:hover .draw-cross {
    stroke-dashoffset: 0;
}

/* 12. DATA STATISTICS & SVG PROGRESS RINGS */
.data-section {
    padding: 80px 0 140px 0;
    background: transparent;
    position: relative;
    z-index: 2;
}

.data-header {
    text-align: center;
    margin-bottom: 70px;
}

.data-header h2 {
    font-size: 2.5rem;
    color: var(--ivory);
    margin-bottom: 15px;
}

.data-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.data-grid {
    gap: 60px;
}

.data-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.svg-ring-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 4;
}

.ring-progress {
    fill: none;
    stroke: var(--gold);
    stroke-width: 4;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-dasharray: 339; 
    stroke-dashoffset: 339;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-card:hover .draw-87 { stroke-dashoffset: 44; }  
.data-card:hover .draw-92 { stroke-dashoffset: 27; }  
.data-card:hover .draw-65 { stroke-dashoffset: 118; } 

.ring-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-headline);
    font-size: 2rem;
    color: var(--ivory);
}

.ring-number span {
    font-family: var(--font-modern);
    font-size: 1rem;
    color: var(--gold);
    margin-left: 2px;
}

.data-card h3 {
    font-family: var(--font-modern);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 15px;
}

.data-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 13. MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .floating-header {
        top: 15px;
        width: 95%;
    }
    
    .engineered-nav .nav-link {
        display: none; 
    }
    
    .engineered-nav .nav-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}