:root {
    /* Colors */
    --bg-dark: #0a0e17;
    /* Deep Navy/Charcoal */
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(10, 14, 23, 0.9);

    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #facc15;
    /* Yellow */
    --accent-secondary: #e2e8f0;
    /* Beige/Off-white */
    --accent-glow: rgba(250, 204, 21, 0.15);
    --accent-hover-bg: rgba(250, 204, 21, 0.1);

    --border-light: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 5rem 2rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll from wide elements */
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img,
svg {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.highlight {
    color: var(--accent-primary);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
    position: relative;
}

/* Seamless Section Transitions */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(10, 14, 23, 0), var(--bg-dark));
    pointer-events: none;
    z-index: 1;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-dark);
    border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
    background-color: #fbbf24;
    border-color: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.3);
}

.btn-primary::after {
    content: '→';
    margin-left: 0.5rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: all var(--transition-fast);
}

.btn-primary:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* 1. Header & Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition-smooth);
    background-color: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-cta {
    display: none;
}

@media(min-width: 768px) {
    .nav-cta {
        display: inline-flex;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Hamburger */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 0;
}

.bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    transform-origin: left;
}

/* Hamburger Animation */
.hamburger-menu.is-active .bar:nth-child(1) {
    transform: rotate(45deg);
}

.hamburger-menu.is-active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.hamburger-menu.is-active .bar:nth-child(3) {
    transform: rotate(-45deg);
}

/* Dropdown Overlay - Compact Design */
.nav-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 260px;
    margin-top: 1rem;
    margin-right: 0;
    /* Align with container edge, parent has padding */
    background-color: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
    backdrop-filter: blur(20px);
}

@media(max-width: 768px) {
    .nav-dropdown {
        right: 1.5rem;
    }
}

.nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-list {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.nav-link::after {
    display: none;
}

.mobile-cta-item {
    margin-top: 1rem;
    display: none;
    text-align: center;
}

@media(max-width: 768px) {
    .mobile-cta-item {
        display: block;
    }
}

/* 2. Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
    padding-bottom: 4rem;
    overflow: hidden;
}

.hero-visual-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    z-index: 1;
    position: relative;
    padding: 0 1rem;
}

.hero-headline {
    font-size: 3.5rem;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.2s;
}

.hero-subheading {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.4s;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.6s;
}

.hero-trust {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1s;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.trust-item {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Responsive Headings */
@media(max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* 3. Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 1.75rem;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    cursor: default;
    height: 100%;
}

.service-card:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::after {
    opacity: 1;
}

.service-icon {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.card-header h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.card-body .summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.card-body .details {
    padding-left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Marquee Section */
.marquee-section {
    padding: 3rem 0;
    background: var(--bg-dark);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 10;
}

.marquee-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.marquee-content {
    display: inline-block;
    animation: marquee 40s linear infinite;
}

.marquee-content span {
    display: inline-block;
    padding-right: 4rem;
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.5;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* 4. Timeline */
.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
}

@media (min-width: 769px) {
    .timeline::before {
        content: '';
        position: absolute;
        top: 24px;
        left: 0;
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, var(--border-light) 10%, var(--border-light) 90%, transparent 100%);
        z-index: 0;
    }
}

.step {
    position: relative;
    z-index: 1;
    padding-top: 1rem;
}

.step-marker {
    width: 48px;
    height: 48px;
    background-color: var(--bg-dark);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 15px var(--accent-glow);
    transition: transform 0.3s ease;
}

.step:hover .step-marker {
    transform: scale(1.1);
    background-color: var(--accent-primary);
    color: var(--bg-dark);
}

@media (min-width: 769px) {
    .step-marker {
        margin: 0 auto 1.25rem auto;
    }

    .step {
        text-align: center;
    }
}

.step-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 5. Metrics */
.outcomes {
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.01);
}

.metrics-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 2rem;
    text-align: center;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: inline-block;
}

.suffix {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-primary);
}

.metric-label {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 6. Portfolio Carousel */
.portfolio {
    overflow: hidden;
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

@media(max-width: 600px) {
    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .portfolio-nav {
        align-self: flex-end;
    }
}

.portfolio-nav {
    display: flex;
    gap: 1rem;
}

.nav-arrow {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.nav-arrow:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.portfolio-rail-wrapper {
    width: 100%;
}

.portfolio-rail {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.portfolio-rail::-webkit-scrollbar {
    display: none;
}

.portfolio-rail.active-drag {
    cursor: grabbing;
    scroll-snap-type: none;
}

.portfolio-card {
    flex: 0 0 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem;
    scroll-snap-align: start;
    user-select: none;
    transition: all var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
}

@media(max-width: 400px) {
    .portfolio-card {
        flex: 0 0 85vw;
    }
}

.portfolio-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-card:hover::before {
    opacity: 1;
}

.card-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    align-self: flex-start;
    margin-bottom: 1rem;
}

.portfolio-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card-details strong {
    color: var(--text-primary);
}

.card-quote {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 7. Tech Stack */
.tech-stack {
    text-align: center;
}

.tech-title {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.tech-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.tech-chip:hover {
    background: var(--accent-hover-bg);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* 8. Final CTA */
.final-cta {
    text-align: center;
    padding: 6rem 2rem;
    background: radial-gradient(circle at 50% 100%, rgba(30, 41, 59, 0.5) 0%, var(--bg-dark) 70%);
}

.final-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media(max-width: 768px) {
    .final-cta h2 {
        font-size: 2rem;
    }
}

/* 9. Footer */
.footer {
    border-top: 1px solid var(--border-light);
    padding: 3rem 2rem 2rem;
    background-color: #05080f;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-tagline {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 1rem;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
}

.social-links a:hover {
    color: var(--accent-secondary);
    text-decoration-color: var(--accent-secondary);
}

.footer-nav {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Subpage & Form Styles */
.subpage-header {
    margin-top: 100px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.subpage-content {
    max-width: 800px;
    margin: 3rem auto;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    padding: 0.875rem;
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Animations Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- PHASE 3: ADVANCED INTERACTION & SECTIONS --- */

/* 1. Interactive Automation Section */
.automation-interactive {
    background: linear-gradient(to bottom, var(--bg-dark), #0f172a 50%, var(--bg-dark));
}

.interactive-layout {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 2rem;
    align-items: center;
    margin-top: 3rem;
}

@media(max-width: 900px) {
    .interactive-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Step List (Left) */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.step-btn {
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.step-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.step-btn.active {
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.05), transparent);
    font-weight: 700;
}

@media(max-width: 900px) {
    .step-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-light);
    }

    .step-btn {
        border-left: none;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
    }

    .step-btn.active {
        border-left: none;
        border-bottom-color: var(--accent-primary);
        background: none;
    }
}

/* Visual Pipeline (Center) */
.visual-pipeline {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.pipeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-light);
    z-index: 0;
    transform: translateY(-50%);
}

.pipeline-node {
    width: 60px;
    height: 60px;
    background: var(--bg-dark);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.node-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.pipeline-node.active {
    border-color: var(--accent-primary);
    transform: scale(1.2);
    box-shadow: 0 0 20px var(--accent-glow);
}

.pipeline-node.active .node-icon {
    color: var(--accent-primary);
}

@media(max-width: 900px) {
    .visual-pipeline {
        height: 100px;
    }

    .pipeline-node {
        width: 40px;
        height: 40px;
    }

    .node-icon {
        font-size: 1rem;
    }
}

/* Details Panel (Right) */
.detail-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem;
    min-height: 250px;
    position: relative;
}

.detail-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.detail-content.active {
    display: block;
}

.detail-content h3 {
    color: var(--accent-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.detail-content p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.detail-content strong {
    color: var(--text-primary);
}

.detail-content .handling {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-style: italic;
    color: #a3e635;
    /* Lime green for "handled" feeling */
}

/* 2. Failure-First Reliability Section */
.reliability {
    background: #0f1219;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: -1.5rem auto 3rem auto;
}

.failure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.failure-card {
    background: rgba(255, 87, 87, 0.03);
    /* Subtle red tint base */
    border: 1px solid rgba(255, 87, 87, 0.1);
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.failure-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 87, 87, 0.06);
    border-color: rgba(255, 87, 87, 0.3);
}

.failure-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.failure-card h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.failure-solution {
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.failure-outcome {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 3. Portfolio Hover Depth */
.card-hover-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.4;
    transform: translateY(5px);
    transition: all 0.3s ease;
    filter: blur(1px);
}

.portfolio-card:hover .card-hover-details {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

@media(max-width: 768px) {
    .card-hover-details {
        opacity: 1;
        transform: translateY(0);
        filter: none;
    }
}

.hover-stats {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hover-metric {
    text-align: right;
    font-weight: 700;
    font-family: var(--font-heading);
}

.hover-metric .old {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 0.9rem;
}

.hover-metric .new {
    color: var(--accent-primary);
    font-size: 1.1rem;
}

/* 4. "Is Philstone Right For You" (Fit Check) */
.fit-check {
    background: var(--bg-dark);
}

.fit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

@media(max-width: 768px) {
    .fit-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.fit-col {
    padding: 2rem;
    border-radius: 8px;
}

.fit-col h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.not-for h3 {
    color: var(--text-muted);
}

.built-for h3 {
    color: var(--text-primary);
}

.fit-col ul li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.not-for ul li {
    color: var(--text-secondary);
}

.not-for .cross {
    color: #ef4444;
    /* Red */
    font-weight: bold;
}

.built-for {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
}

.built-for ul li {
    color: var(--text-primary);
    font-weight: 500;
}

.built-for .check {
    color: var(--accent-primary);
    font-weight: bold;
}

/* 5. Automation Audit Teaser */
.audit-teaser {
    background: var(--bg-dark);
    padding: 4rem 0;
}

.audit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.audit-header {
    text-align: center;
    margin-bottom: 2rem;
}

.audit-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.audit-header p {
    color: var(--text-secondary);
}

.audit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.audit-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.audit-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

#audit-btn {
    height: 46px;
    /* Match input height roughly */
}

@media(max-width: 768px) {
    .audit-form {
        grid-template-columns: 1fr;
    }
}

.audit-result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.3s ease;
}

.audit-result.hidden {
    display: none;
}

.audit-result h4 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.audit-result p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 5. Automation Audit Teaser */
.audit-teaser {
    background: var(--bg-dark);
    padding: 4rem 0;
}

.audit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.audit-header {
    text-align: center;
    margin-bottom: 2rem;
}

.audit-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.audit-header p {
    color: var(--text-secondary);
}

.audit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.audit-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.audit-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

#audit-btn {
    height: 46px;
    /* Match input height roughly */
}

@media(max-width: 768px) {
    .audit-form {
        grid-template-columns: 1fr;
    }
}

.audit-result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.3s ease;
}

.audit-result.hidden {
    display: none;
}

.audit-result h4 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.audit-result p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}