/* =========================================
   CSS VARIABLES & RESET
========================================= */
:root {
    --navy-blue:   #0a1930;
    --navy-light:  #1e3a5f;
    --rolex-green: #006039;
    --rolex-light: #00a86b;
    --white:       #ffffff;
    --off-white:   #f4f6f9;
    --text-gray:   #5a6a7e;
    --border:      rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--white);
    color: var(--navy-blue);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   LOADER  — white background
========================================= */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff; /* ← WHITE instead of black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.9s ease;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

#loader-video {
    width: 340px;   /* ← increased loader video size */
    height: auto;
    max-width: 80%;
}

/* =========================================
   MAIN CONTENT FADE-IN
========================================= */
#main-content {
    opacity: 0;
    transition: opacity 1.2s ease-in;
}

#main-content.visible {
    opacity: 1;
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 86px;
    background-color: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

/* ── Brand: video-only, no text ── */
.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

/* Larger header video logo */
.brand-video {
    height: 72px;          /* ← increased from 48 px */
    width: auto;
    border-radius: 6px;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.brand:hover .brand-video {
    transform: scale(1.05);
}

/* ── Nav links ── */
nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.98rem;
    position: relative;
    transition: color 0.3s ease;
}

/* Animated underline */
nav a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--rolex-green);
    transition: width 0.3s ease;
}

nav a:not(.nav-cta):hover::after,
nav a.active::after {
    width: 100%;
}

nav a:not(.nav-cta):hover,
nav a.active {
    color: var(--rolex-green);
}

.nav-cta {
    background-color: var(--navy-blue);
    color: var(--white) !important;
    padding: 0.65rem 1.6rem;
    border-radius: 30px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease !important;
}

.nav-cta:hover {
    background-color: var(--rolex-green) !important;
    transform: translateY(-2px);
}

.nav-cta::after {
    display: none !important;
}

/* =========================================
   HERO SECTION
========================================= */
#home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 5% 60px;
    background: radial-gradient(ellipse at top right, #e8f5ef 0%, var(--off-white) 50%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 168, 107, 0.06) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-block;
    background-color: rgba(0, 96, 57, 0.08);
    color: var(--rolex-green);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 96, 57, 0.15);
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

#home h1 {
    font-family: 'Fraunces', serif;
    font-size: 5.2rem;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--navy-blue) 20%, var(--rolex-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#home p {
    font-size: 1.25rem;
    color: var(--text-gray);
    max-width: 680px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   SHARED BUTTONS
========================================= */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    background-color: var(--rolex-green);
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 24px rgba(0, 96, 57, 0.25);
    font-family: 'DM Sans', sans-serif;
}

.btn-primary:hover {
    background-color: var(--navy-blue);
    box-shadow: 0 8px 24px rgba(10, 25, 48, 0.25);
    transform: translateY(-3px);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-blue);
    background-color: transparent;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid var(--navy-blue);
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: 'DM Sans', sans-serif;
}

.btn-secondary:hover {
    background-color: var(--navy-blue);
    color: var(--white);
    transform: translateY(-3px);
}

/* =========================================
   SHARED SECTION LABELS & TITLES
========================================= */
.section-label {
    display: inline-block;
    color: var(--rolex-green);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Fraunces', serif;
    font-size: 3rem;
    color: var(--navy-blue);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-gray);
    max-width: 600px;
    font-weight: 300;
}

/* =========================================
   EXPERTISE SECTION
========================================= */
#expertise {
    padding: 8rem 5%;
    background-color: var(--off-white);
}

.expertise-header {
    text-align: center;
    margin-bottom: 5rem;
}

.expertise-header .section-subtitle {
    margin: 0 auto;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    border-top: 4px solid transparent;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--rolex-green), var(--rolex-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-12px);
    border-top: 4px solid var(--rolex-green);
    box-shadow: 0 24px 50px rgba(0, 96, 57, 0.1);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-number {
    font-family: 'Fraunces', serif;
    font-size: 4rem;
    font-weight: 700;
    color: rgba(0, 96, 57, 0.08);
    line-height: 1;
    margin-bottom: 1.5rem;
    transition: color 0.4s ease;
}

.card:hover .card-number {
    color: rgba(0, 96, 57, 0.18);
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.75;
    font-weight: 300;
}

/* =========================================
   PHILOSOPHY SECTION
========================================= */
#philosophy {
    padding: 8rem 5%;
    background-color: var(--navy-blue);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

#philosophy::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 168, 107, 0.06) 0%, transparent 65%);
    top: -300px;
    left: -200px;
    pointer-events: none;
}

.philosophy-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.philosophy-left .section-label {
    color: var(--rolex-light);
}

.philosophy-left .section-title {
    color: var(--white);
}

.philosophy-left .section-subtitle {
    color: #94a3b8;
    margin-bottom: 2.5rem;
}

.philosophy-pillars {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.pillar {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.pillar-dot {
    width: 10px;
    height: 10px;
    background-color: var(--rolex-light);
    border-radius: 50%;
    margin-top: 7px;
    flex-shrink: 0;
}

.pillar-text strong {
    display: block;
    color: var(--white);
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.pillar-text p {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.7;
}

.philosophy-stat-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-box {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat-box:hover {
    border-color: var(--rolex-light);
    transform: translateY(-4px);
}

.stat-num {
    font-family: 'Fraunces', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--rolex-light);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 400;
}

/* =========================================
   CONTACT SECTION (portfolio — no form)
========================================= */
#contact {
    padding: 8rem 5%;
    background-color: var(--white);
    text-align: center;
}

.contact-inner {
    max-width: 650px;
    margin: 0 auto;
}

.contact-inner .section-subtitle {
    margin: 0 auto 2.5rem;
}

.contact-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   FOOTER
========================================= */
footer {
    background-color: var(--navy-blue);
    padding: 3rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Footer brand: larger logo next to cubit.systems */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.footer-logo {
    height: 52px;          /* ← increased footer logo size */
    width: auto;
    filter: brightness(0) invert(1); /* white logo on dark bg */
    transition: opacity 0.3s ease;
}

.footer-brand:hover .footer-logo {
    opacity: 0.8;
}

.footer-domain {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    color: var(--white);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.footer-brand:hover .footer-domain {
    color: var(--rolex-light);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--rolex-light);
}

.footer-copy {
    color: #64748b;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

/* =========================================
   SCROLL REVEAL ANIMATIONS
========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.85s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.34s; }

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 900px) {
    #home h1              { font-size: 3.2rem; }
    .section-title        { font-size: 2.2rem; }
    .philosophy-inner     { grid-template-columns: 1fr; gap: 3rem; }
    .footer-inner         { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    #home h1              { font-size: 2.5rem; }
    nav                   { gap: 1.2rem; }
    .nav-cta              { display: none; }
    .brand-video          { height: 54px; }
}