/* ================================
   ORGANIC INTELLIGENCE DESIGN SYSTEM
   Di Legge Consulting
   ================================ */

:root {
    /* Organic Intelligence Color Palette */
    --ice-white: #EAF7FB;
    --deep-slate: #37707E;
    --primary-teal: #2BACC3;
    --electric-cyan: #3CD4E8;
    --muted-blue-grey: #7CA4B8;

    /* Semantic Colors */
    --bg-primary: #EAF7FB;
    --bg-contrast: #37707E;
    --text-primary: #37707E;
    --text-light: #7CA4B8;
    --button-primary: #2BACC3;
    --button-hover: #3CD4E8;
    --white: #ffffff;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Effects */
    --radius: 8px;
    --radius-sm: 4px;
    --shadow-teal: 0 4px 16px rgba(42, 172, 195, 0.15);
    --shadow-soft: 0 2px 12px rgba(55, 112, 126, 0.08);
}

/* ================================
   RESET & BASE
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-3xl) 0;
    position: relative;
    background: rgba(234, 247, 251, 0.85);
}

.section-dark {
    background: rgba(55, 112, 126, 0.85);
}

.section-dark * {
    color: var(--white) !important;
}

/* ================================
   SCROLL PROGRESS
   ================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-teal), var(--electric-cyan));
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ================================
   NEURAL NETWORK BACKGROUND
   ================================ */

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-primary);
}

.bg-shapes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, var(--muted-blue-grey) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, var(--muted-blue-grey) 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, var(--muted-blue-grey) 1px, transparent 1px),
        radial-gradient(circle at 90% 60%, var(--muted-blue-grey) 1px, transparent 1px),
        radial-gradient(circle at 10% 80%, var(--muted-blue-grey) 1px, transparent 1px),
        radial-gradient(circle at 60% 50%, var(--muted-blue-grey) 1px, transparent 1px);
    background-size: 800px 800px, 600px 600px, 700px 700px, 550px 550px, 650px 650px, 750px 750px;
    background-position: 0 0, 100px 50px, 200px 150px, 50px 200px, 150px 100px, 100px 100px;
    opacity: 0.1;
}

.shape,
.shape-1,
.shape-2,
.shape-3 {
    display: none;
}

/* ================================
   HEADER & NAVIGATION
   ================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid rgba(55, 112, 126, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow-soft);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.header-brand {
    font-size: 1.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    gap: 0;
}

.brand-di {
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--deep-slate);
    letter-spacing: 0.05em;
}

.brand-consulting {
    font-family: var(--font-heading);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--primary-teal);
    margin-top: -2px;
}

.header-logo {
    height: 50px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.header-logo:hover {
    opacity: 0.8;
}

.nav {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--electric-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-teal);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-teal);
    font-weight: 700;
}

.nav-link.active::after {
    width: 100%;
    background: var(--primary-teal);
}

/* ================================
   HERO SECTION
   ================================ */

.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl) 0;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/Gemini_Generated_Image_17udl217udl217ud.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    top: 0;
    right: -20%;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(61, 212, 232, 0.15), transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    color: var(--deep-slate);

    background: linear-gradient(135deg, var(--deep-slate), var(--primary-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    color: var(--deep-slate);
    /* fallback */
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.hero-text {
    font-size: 1.0625rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.cases-placeholder-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0 auto var(--spacing-xl);
    display: block;
    border-radius: var(--radius);
}

.gradient-text {
    background: linear-gradient(135deg, var(--deep-slate), var(--primary-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--deep-slate);
    /* fallback */
    display: inline-block;
}

/* ================================
   BUTTONS
   ================================ */

.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--button-primary);
    color: var(--white);
    border-color: var(--button-primary);
}

.btn-primary:hover {
    background: var(--button-hover);
    border-color: var(--button-hover);
    box-shadow: var(--shadow-teal);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--deep-slate);
    border-color: var(--deep-slate);
}

.btn-secondary:hover {
    background: var(--deep-slate);
    color: var(--white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ================================
   TYPOGRAPHY
   ================================ */

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    color: var(--deep-slate);

    background: linear-gradient(135deg, var(--deep-slate), var(--primary-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    color: var(--deep-slate);
    /* fallback */
}

.section-dark .section-title {
    background: linear-gradient(135deg, var(--electric-cyan), var(--white));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--white);
    /* fallback */
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.section-text {
    font-size: 1.0625rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

.section-dark .section-text {
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

/* ================================
   SERVICE CARDS
   ================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.service-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius);
    box-shadow: var(--shadow-teal);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    position: relative;
    overflow: hidden;
    /* For the top bar */
    border: 1px solid rgba(43, 172, 195, 0.05);
}

/* Sliding top gradient bar */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-teal), var(--electric-cyan));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(42, 172, 195, 0.25);
    /* Teal glow */
    border-color: rgba(43, 172, 195, 0.2);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.card-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
    display: block;
    transition: transform 0.4s ease;
}

.service-card:hover .card-icon-img {
    transform: scale(1.15) rotate(-3deg);
    /* Icon animation */
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--deep-slate);
    margin-bottom: var(--spacing-sm);
}

.card-text {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.card-glow {
    display: none;
}

.glass {
    /* No glass effect needed for Organic Intelligence */
}

/* ================================
   CONTENT SECTIONS
   ================================ */

.content-section {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.content-block {
    max-width: 900px;
    margin: 0 auto;
}

.content-block-with-image {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.content-block-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

@media (max-width: 768px) {
    .content-block-with-image {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .content-block-img {
        max-width: 300px;
        margin: 0 auto;
    }
}

.content-block-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--deep-slate);
    margin-bottom: var(--spacing-md);
}

.section-dark .content-block-title {
    color: var(--white);
}

.content-block-text {
    font-size: 1.0625rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.8;
}

.section-dark .content-block-text {
    color: var(--white);
}

/* ================================
   PAGE HEADERS
   ================================ */

.page-header {
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
    margin-top: 80px;
    text-align: center;

    position: relative;
    overflow: hidden;
}

.page-header .page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
    background-attachment: fixed;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: var(--spacing-md);
    color: var(--deep-slate);

    background: linear-gradient(135deg, var(--deep-slate), var(--primary-teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    color: var(--deep-slate);
    /* fallback */
}

.page-intro {
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
}

.page-header-img {
    width: 100%;
    max-width: 1000px;
    height: auto;
    margin: var(--spacing-xl) auto;
    display: block;
    border-radius: var(--radius);
}

.about-logo {
    width: 200px;
    height: auto;
    margin: var(--spacing-xl) auto 0;
    display: block;
}

/* ================================
   SERVICE DETAIL SECTIONS
   ================================ */

.service-detail {
    max-width: 900px;
    margin: 0 auto;
}

.service-detail-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
    display: block;
}

.service-number {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-teal);
    letter-spacing: 0.15em;
    margin-bottom: var(--spacing-sm);
}

.service-detail-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--deep-slate);
    margin-bottom: var(--spacing-xl);
}

.section-dark .service-detail-title {
    color: var(--white);
}

.service-description {
    font-size: 1.0625rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.8;
}

.section-dark .service-description {
    color: var(--white);
}

.service-subsection {
    margin-bottom: var(--spacing-xl);
}

.subsection-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-teal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-sm);
}

.section-dark .subsection-title {
    color: var(--electric-cyan);
}

.subsection-text {
    font-size: 1.0625rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.8;
}

.section-dark .subsection-text {
    color: var(--white);
}

/* ================================
   CONTACT FORM
   ================================ */

.contact-section {
    max-width: 600px;
    margin: 0 auto;
}

.contact-intro,
.contact-engagement {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.contact-form {
    text-align: left;
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--deep-slate);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-primary) !important;
    /* Force overrides section-dark */
    background: var(--white);
    border: 2px solid rgba(55, 112, 126, 0.2);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(42, 172, 195, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    margin-top: var(--spacing-lg);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ================================
   FOOTER
   ================================ */

.footer {
    background: var(--bg-contrast);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.footer-text {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.05em;
}

/* ================================
   ANIMATIONS
   ================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .header .container {
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Page-specific backgrounds for parallax effect */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.services-bg {
    background-image: url('images/Gemini_Generated_Image_leu7h3leu7h3leu7.jpg');
}

.cases-bg {
    background-image: url('images/Gemini_Generated_Image_5on1h55on1h55on1.jpg');
}

.delivery-bg {
    background-image: url('images/Gemini_Generated_Image_leu7h3leu7h3leu7.jpg');
}

/* Delivery page header background */
.page-background.delivery-bg {
    background-image: url("images/Gemini_Generated_Image_5on1h55on1h55on1.jpg");
}