@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');

:root {
    /* Colors - Precise Perform Palette */
    --black: #000000;
    --white: #FFFFFF;
    --grey-100: #F7F7F7;
    --grey-200: #F2F2F2;
    --grey-300: #E5E5E5;
    --grey-900: #111111;
    
    --primary: var(--black);
    --bg-main: var(--white);
    --bg-alt: var(--grey-200);
    --text-main: var(--black);
    --text-muted: #555555;
    --border-light: rgba(0, 0, 0, 0.05);
    
    /* Typography - Refined Manrope */
    --font-main: 'Manrope', sans-serif;
    
    /* Spacing - Precise Perform Padding */
    --section-padding-top: 100px;
    --section-padding-bottom: 40px;
    --container-max: 1200px;
    
    /* Effects - Refined Pill Shapes */
    --radius-pill: 24px; 
    --transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, .stat-value {
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

h1 { font-size: 72px; }
h2 { font-size: clamp(40px, 5vw, 64px); }
h3 { font-size: 24px; }

p {
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.01em;
    font-weight: 400;
    opacity: 0.8;
}

a, button {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }

/* Layout Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding-top) 0 var(--section-padding-bottom);
}

.grid { display: grid; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* Buttons - Precise Perform Pill Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    background: var(--black);
    color: var(--white);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.05em;
    gap: 12px;
    border-radius: var(--radius-pill);
    border: none;
}

.btn-icon {
    width: 32px;
    height: 32px;
    background: var(--white);
    color: var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-right: -16px; /* Offset for pill style with icon */
    transform: scale(0.85);
}

.btn-icon i {
    transition: transform 0.3s ease;
    transform: rotate(-45deg);
}

.btn:hover .btn-icon i {
    transform: rotate(0deg);
}

.btn-secondary {
    background: var(--grey-200);
    color: var(--black);
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Header & Nav - Transparent overlay */
header {
    height: 80px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
    color: var(--white);
    transition: background 0.3s;
}

.header-logo {
    display: flex;
    align-items: center;
    height: 24px;
    line-height: 1;
}

header.scrolled {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-weight: 400;
    font-size: 14px;
    color: var(--white);
    opacity: 0.8;
}

.nav-link:hover {
    opacity: 1;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    background: url('hero_motion_blur.png') no-repeat center center;
    background-size: cover;
    color: var(--white);
    padding: 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5); /* Dimming overlay for readability */
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    max-width: 600px;
}

.section-tag-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.tag-line {
    width: 32px;
    height: 1px;
    background: rgba(255,255,255,0.5);
}

.hero .section-tag {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
}

.hero h1 {
    font-size: 84px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.8;
    line-height: 1.6;
}

.btn-white {
    background: var(--white);
    color: var(--black);
}

.btn-white .btn-icon {
    background: var(--black);
    color: var(--white);
}

.btn-glass {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    height: 48px;
    padding: 0 24px;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.btn-glass:hover {
    background: rgba(255,255,255,0.2);
}

/* Glass Geometrical Metrics (Integrated into Hero) */
.hero-metrics-glass {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 100%;
    z-index: 10;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(0,0,0,0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-metric-block {
    padding: 40px 30px;
    border-right: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
    text-align: left;
}

.hero-metric-block:last-child {
    border-right: none;
}

.hero-metric-val {
    font-size: 48px;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}

.hero-metric-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

/* Service Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.grid-item {
    padding: 40px;
    background: var(--grey-100);
    border-radius: 32px; /* Slightly rounded for cards like Perform */
}

/* FAQ Section */
.container-narrow {
    max-width: 736px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-header {
    text-align: center;
    margin-bottom: 64px;
}

.faq-title {
    font-size: 64px;
    margin-top: 16px;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.faq-list {
    border-top: 1px solid var(--border-light);
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.faq-question {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question h3 {
    font-size: 20px;
    font-weight: 500;
    color: var(--black);
    letter-spacing: -0.02em;
}

.faq-icon-wrapper {
    width: 32px;
    height: 32px;
    background: var(--grey-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s var(--transition);
}

.faq-icon {
    width: 12px;
    height: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: var(--black);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Horizontal line */
.faq-icon::before {
    width: 12px;
    height: 2px;
}

/* Vertical line */
.faq-icon::after {
    width: 2px;
    height: 12px;
}

/* Active State Styles */
.faq-item.active .faq-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 300px; /* Large enough for content */
    opacity: 1;
}

.faq-answer-content {
    padding-bottom: 24px;
    transform: translateY(-10px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-answer-content {
    transform: translateY(0);
}

.faq-answer-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 600px;
}

/* Dark Section */
.section-dark {
    background: var(--black);
    color: var(--white);
}

.section-dark .grid-item {
    background: #111;
}

.cta-massive {
    padding: 160px 0;
    text-align: center;
}

.cta-massive h2 { font-size: clamp(60px, 12vw, 140px); }

/* The System Section - Snake Timeline */
#system {
    padding: 140px 0;
    background: var(--bg-main);
}

.system-header {
    text-align: center;
    margin-bottom: 80px;
}

.system-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Dynamic SVG drawn by JS – sits behind cards */
.system-svg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

.system-svg-container svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.snake-path-bg {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.snake-path-progress {
    fill: none;
    stroke: var(--black);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Follower circle – standard HTML div, always a perfect circle */
.snake-follower {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: var(--black);
    border: 3px solid var(--white);
    border-radius: 50%;
    z-index: 10;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px var(--black);
    will-change: top, left;
}

.mobile-system-line, .mobile-system-progress {
    display: none;
}

/* Each step is a two-column grid row: [line-side | card-side] */
.system-step {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 220px;
    margin-bottom: 40px;
    z-index: 2;
}

.system-step:last-child {
    margin-bottom: 0;
}

/* "left-line" = line runs on the left half, card sits in the right half */
.system-step.left-line .system-content {
    grid-column: 2;
}

/* "right-line" = line runs on the right half, card sits in the left half */
.system-step.right-line .system-content {
    grid-column: 1;
}

.system-content {
    padding: 10px 24px;
}

.system-card {
    background: var(--white);
    padding: 36px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    transition: var(--transition);
}

.system-card:hover {
    border-color: var(--black);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.step-number {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.3;
    margin-bottom: 14px;
    display: block;
}

.system-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.system-card p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.6;
}

.visual-placeholder {
    margin-top: 20px;
    background: var(--grey-100);
    border: 1px dashed var(--border-light);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-muted);
    border-radius: 10px;
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
    .system-svg-container,
    .snake-follower {
        display: none !important;
    }

    .system-timeline {
        padding-left: 0;
        border-left: none;
    }

    .mobile-system-line {
        display: block;
        position: absolute;
        left: 16px;
        top: 0;
        bottom: 0;
        width: 3px;
        background: var(--border-light);
        border-radius: 2px;
    }

    .mobile-system-progress {
        display: block;
        position: absolute;
        left: 16px;
        top: 0;
        width: 3px;
        background: var(--black);
        height: 0;
        transition: height 0.1s linear;
        border-radius: 2px;
    }

    .system-step {
        display: block;
        min-height: auto;
        margin-bottom: 60px;
        padding-left: 50px;
    }

    .system-content {
        width: 100%;
        padding: 0;
    }

    .system-step::before {
        content: '';
        position: absolute;
        left: 17.5px;
        top: 28px;
        width: 14px;
        height: 14px;
        background: var(--white);
        border: 3px solid var(--border-light);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        z-index: 3;
        transition: border-color 0.3s;
    }

    .system-step.active::before {
        border-color: var(--black);
        background: var(--black);
    }
}

/* Animation */
@keyframes revealUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    animation: revealUp 1s var(--transition) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 1024px) {
    .grid-container { grid-template-columns: 1fr 1fr; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .grid-container { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: 1fr; }
    h1 { font-size: 48px; }
}
