/* =========================================
   VARIABLES & DESIGN SYSTEM
   ========================================= */
:root {
    /* Colors - Premium Dark Mode */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.15);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);

    --error: #ef4444;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Shadows & Glass */
    --glass-bg: rgba(15, 15, 15, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.03);
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    position: relative;
}

::selection {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.section-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: inline-block;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
    max-width: 800px;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Buttons */
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: var(--transition-normal);
    cursor: pointer;
}

.primary-btn:hover {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-hover);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.primary-btn.lg-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.logo-link {
    display: flex;
    align-items: center;
    height: 32px;
}

.logo-img {
    height: 150%;
    object-fit: contain;
    /* Ensure white logo if original is black */
}

.logo-text {
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 1.25rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .nav-right .nav-link {
        display: none;
        /* Hidden on mobile per user request */
    }

    .primary-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding: 0 5%;
    overflow: hidden;
}

/* Video & Fallback Background */
.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    /* Dim for readability */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 100%);
    z-index: 2;
}

/* Premium CSS Fallback if Video is missing */
.hero-bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--bg-primary);
    overflow: hidden;
}

/* Add a subtle flowing gradient layer if no video */
.hero-bg-canvas::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    animation: rotateFlow 30s linear infinite;
}

@keyframes rotateFlow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin-top: 5vh;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    letter-spacing: -0.05em;
    line-height: 0.95;
    background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease 0.2s forwards;
}

.section-break-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 2rem 0 3rem;
    opacity: 0;
    animation: fadeIn 1s ease 0.8s forwards;
}

.horizontal-line {
    width: 1px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--border-hover), transparent);
    margin-bottom: 1rem;
}

.arrow-down i {
    font-size: 1.5rem;
    color: var(--text-secondary);
    animation: floating 2s ease-in-out infinite;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 600px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease 0.6s forwards;
}

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* =========================================
   THE PROBLEM SECTION
   ========================================= */
.problem-section {
    background-color: var(--bg-primary);
}

.problem-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.problem-text {
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    font-weight: 300;
    line-height: 1.4;
    color: var(--text-secondary);
    max-width: 900px;
}

.error-text {
    /* Subtle red hue to emphasize "Instead, they get..." */
    background: linear-gradient(90deg, #a1a1aa 0%, #71717a 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.solution-card {
    padding: 3rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 900px;
    box-shadow: var(--shadow-glow);
}

.solution-icon {
    font-size: 2.5rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.solution-text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.cta-wrapper {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    section {
        padding: 50px 0;
        /* Compress global padding deeply on mobile */
    }

    .solution-card {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .section-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        margin-bottom: 1rem;
    }
}

/* =========================================
   WHAT WE DO SECTION
   ========================================= */
.what-we-do-section {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    padding: 2.5rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 60%);
    opacity: 0;
    transition: var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
}

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

.service-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    border: 1px solid var(--border-subtle);
}

.service-icon-wrapper i {
    font-size: 1.75rem;
    color: var(--text-primary);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.service-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon-wrapper {
        width: 40px;
        height: 40px;
        margin-bottom: 1rem;
    }

    .service-icon-wrapper i {
        font-size: 1.25rem;
    }

    .service-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .service-desc {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* =========================================
   FRAMEWORK SECTION
   ========================================= */
.framework-section {
    background-color: var(--bg-primary);
    padding: 100px 0;
}

.framework-visual {
    position: relative;
    margin-top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-left: 2rem;
}

.loop-path {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2rem;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--border-hover) 20%, var(--border-hover) 80%, transparent);
    z-index: 0;
}

.framework-step {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.framework-section.active .framework-step {
    opacity: 1;
    transform: translateX(0);
    transition-delay: var(--delay);
}

.step-node {
    width: 60px;
    height: 60px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-left: -31px;
    /* Center onto the line */
    box-shadow: 0 0 0 10px var(--bg-primary);
    transition: var(--transition-normal);
}

.framework-step:hover .step-node {
    border-color: var(--text-primary);
    color: var(--text-primary);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.05), 0 0 0 10px var(--bg-primary);
}

.step-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    flex-grow: 1;
    max-width: 600px;
    transition: var(--transition-normal);
}

.framework-step:hover .step-content {
    border-color: var(--border-hover);
    transform: translateX(10px);
}

.step-content h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 768px) {
    .framework-visual {
        padding-left: 1rem;
        margin-top: 2rem;
        gap: 1rem;
    }

    .loop-path {
        left: 1rem;
    }

    .step-node {
        width: 40px;
        height: 40px;
        margin-left: -21px;
        font-size: 0.85rem;
    }

    .framework-step {
        gap: 1rem;
    }

    .step-content {
        padding: 1rem;
    }

    .step-content h4 {
        font-size: 1.1rem;
    }

    .step-content p {
        font-size: 0.85rem;
    }
}

/* =========================================
   CONTACT FORM
   ========================================= */
.contact-section {
    background-color: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    align-items: flex-start;
}

.contact-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.contact-form-wrapper {
    padding: 3rem;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

input,
select,
textarea {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--text-primary);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a1a1aa' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.submit-btn {
    margin-top: 1rem;
    grid-column: 1 / -1;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: center;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .contact-form {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-primary);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 1.25rem;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-link:hover {
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* =========================================
   FLOATING CTA
   ========================================= */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition-normal);
}

.floating-cta:hover {
    transform: translateY(-5px);
    background: var(--text-secondary);
}

.ping-indicator {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    /* green indicator */
    border-radius: 50%;
    position: relative;
}

.ping-indicator::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    background-color: rgba(16, 185, 129, 0.4);
    border-radius: 50%;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* =========================================
   ANIMATIONS & REVEALS
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}