:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --accent-gradient: linear-gradient(90deg, #ffffff, #a0a0a0, #ffffff);
    /* Alternative subtle color gradient */
    --hover-gradient: linear-gradient(45deg, #ffffff, #dcdcdc, #888888, #ffffff);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Custom cursor */
}

h1,
h2,
h3,
h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* Utilities */
.full-height {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gradient-text {
    background: linear-gradient(90deg, #fff 0%, #666 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
    display: inline-block;
}

.highlight {
    color: #fff;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.highlight:hover {
    border-color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Hero */
.hero {
    align-items: flex-start;
    padding-top: 20vh;
    position: relative;
}

.mega-text {
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards;
}

.intro-text {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    max-width: 60ch;
    color: #aaa;
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.5s;
}

/* Engagement */
.engagement {
    gap: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 5rem);
    margin-bottom: 1rem;
    position: relative;
    border-top: 1px solid #333;
    padding-top: 1rem;
    width: 100%;
}

.subtitle {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 3rem;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.question-item {
    border-left: 1px solid #333;
    padding-left: 2rem;
    transition: border-color 0.3s ease;
}

.question-item:hover {
    border-left-color: #fff;
}

.question-item h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.question-item p {
    color: #bbb;
}

/* Services */
.services {
    padding: 10vh 0;
}

.service-list {
    margin-top: 4rem;
}

.service-item {
    border-bottom: 1px solid #222;
    padding: 4rem 0;
    transition: transform 0.3s ease;
}

.service-item:hover {
    /*    transform: translateX(10px);*/
    background: linear-gradient(90deg, #0a0a0a, transparent);
}

.service-header {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.service-number {
    font-family: 'Space Grotesk', monospace;
    color: #444;
    font-size: 1.5rem;
}

.service-item h3 {
    font-size: 2.5rem;
}

.service-desc {
    font-size: 1.2rem;
    color: #ccc;
    max-width: 800px;
    margin-left: 4rem;
}

/* About / USP */
.usp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    margin-top: 4rem;
}

.usp-item h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.usp-item p {
    color: #999;
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid #333;
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    color: #666;
}

/* Custom Cursor */
.cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid #fff;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

@media (max-width: 768px) {
    .service-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .service-desc {
        margin-left: 0;
    }

    .mega-text {
        font-size: 3rem;
    }

    .cursor-follower {
        display: none;
    }
}

/* Utilities for JS Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Canvas Background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.4;
    /* Subtle background */
    pointer-events: none;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1000;
}

/* Cursor Active State */
.cursor-follower.active {
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(2.5);
    border-color: transparent;
}

/* --- Simulator Page Styles --- */
.simulator-body {
    overflow: hidden;
    /* App-like feel */
    height: 100vh;
}

.sim-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 5vw;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #050505;
    /* Solid bg to block scroll */
    border-bottom: 1px solid #222;
    /* Definition */
}

.back-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: #fff;
}

.sim-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    height: 100vh;
    padding-top: 120px;
    /* Increased clearance for fixed nav */
    gap: 0.5rem;
}

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    margin-top: -6px;
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #333;
    border-radius: 2px;
}

.value-display {
    font-size: 0.8rem;
    color: #00aaff;
    /* Electric Blue Accent */
    text-align: right;
    font-family: 'Space Grotesk', monospace;
}

.control-desc {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

.sim-result {
    margin-top: auto;
    border-top: 1px solid #333;
    padding-top: 80px;
    /* Space for nav */
}

.sim-controls {
    padding: 1rem 5vw 2rem 5vw;
    /* Reduced top padding */
    padding-right: 2rem;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Tighter gap */
    overflow-y: auto;
    /* Restore scroll safety */
    background: #050505;
    z-index: 10;
    height: 100%;
    justify-content: flex-start;
    /* Fix clipping issue */
}

.control-group label {
    display: flex;
    /* Align icon inline */
    align-items: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #a0a0a0;
}

.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border: 1px solid #666;
    border-radius: 50%;
    font-size: 10px;
    margin-left: 8px;
    cursor: help;
    position: relative;
    color: #666;
    transition: all 0.3s;
}

.info-icon:hover {
    border-color: #fff;
    color: #fff;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #111;
    color: #ccc;
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    position: absolute;
    z-index: 100;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    pointer-events: none;
    border: 1px solid #333;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.info-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.range-wrapper {
    display: flex;
    flex-direction: column;
}

.result-box {
    background: #111;
    padding: 1.5rem;
    border: 1px solid #333;
    margin: 1rem 0;
}

.friction-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.score-number {
    font-size: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    color: #fff;
}

.diagnosis-text {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.4;
}

.cta-button {
    width: 100%;
    padding: 1rem;
    background: #fff;
    color: #000;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.cta-button:hover {
    background: #ccc;
    transform: translateY(-2px);
}

.sim-visual {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #111 0%, #050505 70%);
}

.visual-overlay {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-family: monospace;
    color: #444;
    user-select: none;
}

@media (max-width: 900px) {
    .sim-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        height: auto;
        overflow-y: auto;
    }

    .simulator-body {
        overflow-y: auto;
        height: auto;
    }

    .sim-controls {
        border-right: none;
        border-bottom: 1px solid #222;
    }

    .sim-visual {
        min-height: 50vh;
    }
}