/* --- 1. RESET & VARIABLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #020706;
    --accent-green: #19c37d;
    --accent-cyan: #2affb3;
    --text-light: #e8fff4;
    --transition: all 0.3s ease;
    --desktop-width: 80vw;
    --card-bg: rgba(10, 28, 21, 0.6);
    --card-border: rgba(42, 255, 179, 0.22);
    --nav-bg: rgba(2, 7, 6, 0.84);
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(42, 255, 179, 0.08), transparent 60%),
        radial-gradient(900px 500px at 90% 0%, rgba(25, 195, 125, 0.06), transparent 60%),
        linear-gradient(180deg, #010202 0%, #030807 40%, #020706 100%);
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

p {
    color: rgba(232, 255, 244, 0.88);
}

/* --- 2. LAYOUT ENGINE --- */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.content {
    position: relative;
    z-index: 1;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 20px 80px;
    width: 100%;
}

/* 60% width constraint */
section > h1, 
section > h2, 
section > p, 
section > .side-by-side, 
section > .projects,
section > .button-links,
section > .text,
.container {
    width: 100%;
    max-width: var(--desktop-width);
    margin-left: auto;
    margin-right: auto;
}

/* --- 3. NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 25px;
}

.logo img {
    height: 45px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 14px rgba(42, 255, 179, 0.35);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition);
}

/* --- 4. TYPOGRAPHY --- */
h1 { 
    font-size: clamp(2.5rem, 8vw, 4.5rem); 
    line-height: 1.1; 
    margin-bottom: 30px; 
}

h2 { 
    font-size: clamp(2rem, 5vw, 3rem); 
    margin-bottom: 25px; 
}

h3 { 
    font-size: 1.6rem; 
    margin-bottom: 15px; 
}

h1, h2, h3 {
    color: #f1fff8;
    letter-spacing: 0.01em;
}

#hello { 
    text-align: left; 
    align-items: flex-start; 
}

#hello > h1,
#hello > p,
#hello > .button-links {
    max-width: 60vw;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    text-shadow: 0 0 14px rgba(42, 255, 179, 0.35);
}

/* --- 5. COMPONENTS --- */
.side-by-side {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin-top: 40px;
}

.side-by-side .text {
    padding: 0;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.side-by-side ul {
    list-style: none;
    padding-left: 0;
}

.side-by-side li {
    position: relative;
    margin-bottom: 12px;
    padding-left: 26px;
}

.side-by-side li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent-cyan);
}

.side-by-side .image img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 15px;
    filter: grayscale(100%);
    border: 1px solid rgba(42, 255, 179, 0.2);
    box-shadow: 0 30px 45px rgba(0,0,0,0.42);
}

.button-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.button-link {
    background: linear-gradient(135deg, rgba(25, 195, 125, 0.2), rgba(42, 255, 179, 0.08));
    color: var(--text-light);
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    border: 1px solid rgba(42, 255, 179, 0.3);
    transition: var(--transition);
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.button-link:hover {
    background: linear-gradient(135deg, rgba(42, 255, 179, 0.32), rgba(25, 195, 125, 0.2));
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(10, 255, 176, 0.2);
}

nav a:focus-visible,
.button-link:focus-visible,
.hamburger:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 3px;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

#services .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 25px;
    text-align: left;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.project:hover {
    transform: translateY(-6px);
    border-color: rgba(42, 255, 179, 0.6);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(42, 255, 179, 0.12) inset;
}

.gradient-tile {
    background: linear-gradient(135deg, #0b241b 0%, #19c37d 50%, #2affb3 100%);
    width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 0 0 18px rgba(42, 255, 179, 0.2);
}

.project-image {
    margin-bottom: 14px;
}

.gradient-tile i {
    font-size: 1rem;
    color: #fff;
}

/* --- 6. PROCESS SECTION --- */
#process {
    --desktop-width: 80vw;
    width: 80vw;
    max-width: 1400px;
    margin: 0 auto;
}

.process-header {
    text-align: center;
    margin-bottom: 80px;
}

.process-header .eyebrow {
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.process-header h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin: 15px 0;
}

.process-header p {
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 20px;
}

.process-card {
    grid-column: span 2;
}

.process-card:nth-child(5) {
    grid-column: 2 / span 2;
}

.process-card {
    background: rgba(10, 28, 21, 0.52);
    border: 1px solid rgba(42, 255, 179, 0.2);
    border-radius: 20px;
    padding: 50px 25px;
    text-align: left;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(10px);
}

.process-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 40px rgba(0,0,0,0.45), 0 0 28px rgba(42, 255, 179, 0.16);
}

.process-card .step {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-cyan);
    color: #06281f;
    font-size: 0.8rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.process-card .icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(42, 255, 179, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-cyan);
}

.process-card p {
    font-size: 0.95rem;
    opacity: 0.86;
}

.process-cta {
    
    padding: 30px 40px;
    text-align: center;
}

.process-cta strong {
    color: var(--accent-cyan);
}

.cta .container {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 36px;
    max-width: 60vw;
    margin: 0 auto;
    text-align: center;
    text-shadow: 0 0 18px rgba(42, 255, 179, 0.15);
}

.cta .button-links {
    justify-content: center;
}

/* --- 7. DISCOVERY CALL MODAL --- */
.discovery-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.discovery-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.discovery-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 7, 6, 0.75);
    backdrop-filter: blur(4px);
}

.discovery-modal-dialog {
    position: relative;
    width: min(1100px, 100%);
    max-height: min(92vh, 920px);
    overflow: auto;
    display: grid;
    gap: 18px;
    grid-template-columns: 1.05fr 1fr;
    border-radius: 20px;
}

.discovery-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(42, 255, 179, 0.22);
    background: rgba(3, 12, 9, 0.85);
    color: var(--text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: var(--transition);
}

.discovery-modal-close:hover {
    border-color: rgba(42, 255, 179, 0.7);
    color: #fff;
}

.discovery-copy,
.discovery-form-wrap {
    background: rgba(10, 28, 21, 0.55);
    border: 1px solid rgba(42, 255, 179, 0.16);
    border-radius: 18px;
    padding: 28px;
    backdrop-filter: blur(10px);
}

.discovery-copy h2 {
    margin-bottom: 14px;
}

.discovery-lead {
    max-width: 60ch;
    margin-bottom: 24px;
}

.discovery-points {
    display: grid;
    gap: 10px;
}

.discovery-points p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.discovery-points i {
    color: var(--accent-cyan);
}

.discovery-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-group {
    position: relative;
}

.field-group-full {
    grid-column: 1 / -1;
}

.field-group input,
.field-group select,
.field-group textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(42, 255, 179, 0.2);
    background: rgba(3, 12, 9, 0.7);
    color: var(--text-light);
    padding: 22px 14px 10px;
    font: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.field-group select {
    appearance: none;
}

.field-group textarea {
    resize: vertical;
    min-height: 130px;
}

.field-group label {
    position: absolute;
    left: 14px;
    top: 13px;
    font-size: 0.92rem;
    color: rgba(232, 255, 244, 0.74);
    pointer-events: none;
    transform-origin: left top;
    transition: transform 0.22s ease, color 0.22s ease;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: none;
    border-color: rgba(42, 255, 179, 0.8);
    box-shadow: 0 0 0 3px rgba(42, 255, 179, 0.14);
}

.field-group input:hover,
.field-group select:hover,
.field-group textarea:hover {
    border-color: rgba(42, 255, 179, 0.45);
}

.field-group:focus-within label,
.field-group.has-value label,
.field-group select:valid + label {
    transform: translateY(-9px) scale(0.84);
    color: var(--accent-cyan);
}

.field-error {
    display: block;
    min-height: 18px;
    margin-top: 5px;
    font-size: 0.82rem;
    color: #ff8f8f;
}

.field-group.is-error input,
.field-group.is-error select,
.field-group.is-error textarea {
    border-color: rgba(255, 143, 143, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 143, 143, 0.16);
}

.hp-wrap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 210px;
    cursor: pointer;
}

.submit-btn .btn-loader {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid rgba(232, 255, 244, 0.35);
    border-top-color: #fff;
    display: none;
    animation: spin 0.8s linear infinite;
}

.submit-btn.is-loading .btn-loader {
    display: inline-block;
}

.submit-btn.is-loading .btn-text {
    opacity: 0.9;
}

.submit-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.form-status {
    min-height: 24px;
    font-size: 0.92rem;
    padding: 4px 0;
}

.form-status.is-error {
    color: #ffb2b2;
}

.form-status.is-success {
    color: #9ef8d0;
    animation: soft-pop 0.45s ease;
}

.trust-line {
    font-size: 0.86rem;
    opacity: 0.84;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes soft-pop {
    0% {
        opacity: 0;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#solution > .section-kicker,
#solution > h2,
#solution > .side-by-side,
#case_studies > .section-kicker,
#case_studies > h2,
#case_studies > .side-by-side,
#services > .section-kicker,
#services > h2,
#services > .projects {
    max-width: 70vw;
}

@media (min-width: 769px) {
    #solution > .section-kicker,
    #solution > h2,
    #case_studies > .section-kicker,
    #case_studies > h2,
    #services > .section-kicker,
    #services > h2,
    .cta .section-kicker,
    .cta h2 {
        text-align: center;
        justify-content: center;
    }
}

/* --- 7. MOBILE RESPONSIVENESS --- */
@media (max-width: 1024px) {
    section > h1, 
    section > h2, 
    section > p, 
    section > .side-by-side, 
    section > .projects,
    section > .button-links,
    section > .text,
    .container {
        max-width: 90vw; 
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .discovery-modal-dialog {
        grid-template-columns: 1fr;
    }

    .process-card {
        grid-column: span 1;
    }

    .process-card:nth-child(5),
    .process-card:nth-child(6),
    .process-card:nth-child(7) {
        grid-column: auto;
    }
}

@media (min-width: 992px) {
    .side-by-side {
        flex-direction: row;
        align-items: center;
    }

    .side-by-side.reverse {
        flex-direction: row-reverse;
    }

    .side-by-side .image,
    .side-by-side .text {
        flex: 1;
    }

    .side-by-side .image {
        min-height: 360px;
        display: flex;
    }

    .side-by-side .image img {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-links {
        position: fixed;
        top: 75px;
        left: -100%;
        flex-direction: column;
        background: var(--primary-green);
        width: 100%;
        height: calc(100vh - 75px);
        padding: 50px;
        transition: 0.4s ease;
        text-align: center;
    }

    .nav-links.active { left: 0; }

    nav .button-link { display: none; }

    .cta .container {
        padding: 26px;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .discovery-modal {
        padding: 14px;
    }

    .discovery-modal-dialog {
        max-height: 95vh;
    }

    .discovery-copy,
    .discovery-form-wrap {
        padding: 22px 18px;
    }

    .side-by-side .text,
    .side-by-side .image {
        min-height: auto;
    }

    section > h1,
    section > h2,
    section > p,
    section > .side-by-side,
    section > .projects,
    section > .button-links,
    section > .text,
    .container,
    #hello > h1,
    #hello > p,
    #hello > .button-links,
    #solution > .section-kicker,
    #solution > h2,
    #solution > .side-by-side,
    #case_studies > .section-kicker,
    #case_studies > h2,
    #case_studies > .side-by-side,
    #services > .section-kicker,
    #services > h2,
    #services > .projects,
    .cta .container {
        max-width: 80vw;
    }

    section,
    section h1,
    section h2,
    section h3,
    section p,
    section li,
    .process-header,
    .process-cta,
    .cta .container {
        text-align: left;
    }

    .process-header p {
        margin: 0;
    }

    .section-kicker {
        justify-content: flex-start;
    }

    #services .projects {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 8. ANIMATIONS --- */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation: none !important;
        transition: none !important;
    }

    section {
        opacity: 1;
        transform: none;
    }
}

/* --- 9. FOOTER --- */
footer {
    padding: 50px 20px;
    text-align: center;
    opacity: 0.85;
    border-top: 1px solid rgba(42, 255, 179, 0.14);
    background: linear-gradient(180deg, rgba(2, 7, 6, 0), rgba(2, 7, 6, 0.55));
}