/* Vitakka AI — Style System */

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Custom Properties */
:root {
    --bg-white: #FFFFFF;
    --bg-light: #F7F7F8;
    --bg-dark: #1B1B2F;
    --bg-darker: #151525;
    --accent-orange: #F05F40;
    --accent-red: #E63946;
    --text-dark: #1B1B2F;
    --text-mid: #555;
    --text-light: #FFFFFF;
    --text-muted: #999;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
}

/* ========================================
   NAVIGATION
   ======================================== */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.92);
    padding: 1rem 3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

nav img {
    max-height: 40px;
    transition: transform 0.3s ease;
}

nav img:hover {
    transform: scale(1.05);
}

.nav-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2.5rem;
}

.nav-item {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--accent-orange);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: var(--accent-orange);
    color: white;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--accent-orange);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--accent-orange);
    color: white;
}

/* ========================================
   HERO SECTION — White bg, centered logo + original text style
   ======================================== */

#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 2rem 2rem;
    background: var(--bg-white);
}

.hero-logo {
    max-width: 420px;
    width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

#hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-mid);
    max-width: 600px;
    margin: 0.75rem auto 1.5rem;
    line-height: 1.7;
}

.btn-cta {
    display: inline-block;
    background: var(--accent-orange);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 95, 64, 0.3);
}

.btn-cta:hover {
    background: var(--accent-red);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

/* ========================================
   PROBLEM SECTION — Dark contrast band
   ======================================== */

#problem {
    padding: 5rem 2rem;
    text-align: center;
    background-color: var(--bg-dark);
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
}

.problem-text {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.highlight {
    color: var(--accent-orange);
    font-weight: 600;
}

/* ========================================
   SERVICES SECTION — Light gray
   ======================================== */

#services,
#training {
    padding: 6rem 2rem;
    background: var(--bg-light);
}

#services h2,
#training h2 {
    text-align: center;
    color: var(--text-dark);
    font-family: var(--font-heading);
    margin-bottom: 3rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 2rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--accent-orange);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(240, 95, 64, 0.12);
}

.service-card.expanded {
    border-color: var(--accent-orange);
    box-shadow: 0 4px 15px rgba(240, 95, 64, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.service-card h3,
.service-card p,
.service-card .client-tag,
.service-card .service-detail {
    position: relative;
    z-index: 1;
}

.service-card h3 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    font-size: 1.25rem;
}

.service-card p {
    color: var(--text-mid);
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.service-detail {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
}

.service-card.expanded .service-detail {
    max-height: 500px;
}

/* Growth Graph Card */
.graph-card {
    cursor: default;
}

.growth-graph {
    width: 100%;
    height: 80px;
    margin-top: 0.75rem;
}

.growth-line {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
}

.graph-card.visible .growth-line {
    animation: drawLine 2s ease-out forwards;
}

.graph-card.visible .growth-fill {
    animation: showFill 2s ease-out 1.5s forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

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

.card-toggle {
    color: var(--accent-orange);
    font-size: 1.5rem;
    transition: transform 0.3s;
    font-weight: 300;
}

.service-card.expanded .card-toggle {
    transform: rotate(45deg);
}

/* Matrix Code Rain Canvas */
.matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 8px;
    z-index: 0;
}


/* Service Fragment Content */
.service-bullets {
    list-style: none;
    padding: 1rem 0 0 0;
    margin: 0;
}

.service-bullets li {
    padding: 0.5rem 0 0.5rem 1rem;
    border-left: 2px solid var(--accent-orange);
    margin-bottom: 0.5rem;
    color: var(--text-mid);
    font-size: 0.9rem;
}

/* ========================================
   CLIENTS SECTION — Light gray (matches Services)
   ======================================== */

#clients {
    padding: 6rem 2rem;
    background: var(--bg-light);
}

#clients h2 {
    text-align: center;
    color: var(--text-dark);
    font-family: var(--font-heading);
    margin-bottom: 2.5rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.client-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.client-logos img {
    height: 40px;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.client-logos img:hover {
    filter: grayscale(0);
    opacity: 1;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.client-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-orange);
    margin-top: 0.25rem;
}

/* ========================================
   PROOF / TIMELINE SECTION — White
   ======================================== */

#proof {
    padding: 6rem 2rem;
    text-align: center;
    background: var(--bg-white);
}

#proof h2 {
    color: var(--text-dark);
    font-family: var(--font-heading);
    margin-bottom: 3rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.timeline {
    display: flex;
    justify-content: center;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-orange), transparent);
    opacity: 0.2;
    z-index: 0;
}

.timeline-item {
    text-align: center;
    flex: 1;
    min-width: 200px;
    position: relative;
    z-index: 1;
}

.timeline-year {
    display: block;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--accent-orange);
    font-family: var(--font-heading);
}

.timeline-item p {
    color: var(--text-mid);
    margin-top: 0.5rem;
    font-size: 1.05rem;
}

/* ========================================
   CONTACT / CTA SECTION — Dark
   ======================================== */

#contact {
    padding: 6rem 2rem;
    text-align: center;
    background: var(--bg-dark);
}

#contact h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    font-family: var(--font-heading);
}

.contact-sub {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
    font-size: 1.1rem;
}

form {
    max-width: 500px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input,
textarea {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1rem;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1rem;
}

input:focus,
textarea:focus {
    border-color: var(--accent-orange);
    outline: none;
    background: rgba(255, 255, 255, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

textarea {
    resize: vertical;
}

.contact-alt {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.contact-alt a {
    color: var(--accent-orange);
    text-decoration: none;
}

.contact-alt a:hover {
    color: var(--accent-red);
}

/* ========================================
   FOOTER — Dark
   ======================================== */

footer {
    padding: 2rem;
    text-align: center;
    background: var(--bg-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

footer a {
    color: var(--accent-orange);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent-red);
}

.built-with {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card.fade-in:nth-child(1) { transition-delay: 0s; }
.service-card.fade-in:nth-child(2) { transition-delay: 0.1s; }
.service-card.fade-in:nth-child(3) { transition-delay: 0.2s; }
.service-card.fade-in:nth-child(4) { transition-delay: 0.3s; }

/* ========================================
   POLISH
   ======================================== */

::selection {
    background: var(--accent-orange);
    color: white;
}

::-moz-selection {
    background: var(--accent-orange);
    color: white;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    #hero {
        padding-top: 80px;
    }

    .hero-logo {
        max-width: 320px;
    }

    .hero-content {
        padding: 0 1rem;
    }

    #problem, #services, #training, #proof, #contact {
        padding: 4rem 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .timeline {
        gap: 2rem;
    }

    .timeline-item {
        min-width: 150px;
    }

    .timeline::before {
        display: none;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.75rem 1rem;
    }

    nav img {
        max-height: 30px;
    }

    .nav-menu {
        display: none;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    #hero {
        padding: 70px 1.5rem 3rem;
    }

    .hero-logo {
        max-width: 250px;
    }

    #hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-sub {
        font-size: 1.1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.5rem;
    }

    .timeline {
        flex-direction: column;
        gap: 2rem;
    }

    .timeline-item {
        min-width: unset;
    }

    form {
        padding: 0 0.5rem;
    }

    .problem-text {
        font-size: 1.1rem;
    }
}
