/* ===== PICO.IA — Iteration 3: Architectural Noir ===== */
/* ===== CSS Reset & Variables ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Architectural Noir Palette */
    --color-bg: #080808;
    --color-surface: #0F0F0F;
    --color-surface-alt: #161616;
    --color-border: #222222;
    --color-text: #F5F3EF;
    --color-text-muted: #7A7875;
    --color-accent: #C9A962;
    --color-accent-hover: #D4B876;
    --color-highlight: #FFFFFF;
    --color-obsidian: #1A1A1A;
    --font-display: 'Bodoni Moda', 'Didot', Georgia, serif;
    --font-body: 'Outfit', 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out-sine: cubic-bezier(0.37, 0, 0.63, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

/* ===== Subtle Grain ===== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
}

/* ===== Utility Classes ===== */
.highlight {
    color: var(--color-accent);
    font-weight: 400;
    font-style: italic;
}

.label {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.label::before {
    content: '';
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 3rem;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    border: 1px solid var(--color-accent);
    border-radius: 0;
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--color-accent);
    transition: height 0.5s var(--ease-out-expo);
    z-index: -1;
}

.btn-primary:hover {
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.btn-primary:hover::before {
    height: 100%;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 3rem;
    background: transparent;
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    border: 1px solid var(--color-border);
    border-radius: 0;
    transition: all 0.5s var(--ease-out-expo);
}

.btn-secondary:hover {
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.btn-nav {
    padding: 0.625rem 1.75rem;
    background: transparent;
    color: var(--color-accent);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid var(--color-accent);
    border-radius: 0;
    transition: all 0.5s var(--ease-out-expo);
}

.btn-nav:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

/* ===== Header & Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 3rem;
    background: rgba(8, 8, 8, 0.9);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--color-border);
    transition: all 0.5s var(--ease-out-expo);
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 42px;
    width: auto;
    filter: grayscale(100%) brightness(1.1) sepia(20%) hue-rotate(5deg);
    transition: all 0.5s ease;
}

.logo:hover img {
    filter: grayscale(100%) brightness(1.2) sepia(30%) hue-rotate(10deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3.5rem;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color 0.4s ease;
    position: relative;
}

.nav-links a:not(.btn-nav):hover {
    color: var(--color-text);
}

/* ===== Language Switcher ===== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.lang-btn {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.3s ease;
    opacity: 0.45;
    filter: grayscale(100%);
}

.lang-btn:hover {
    opacity: 0.75;
}

.lang-btn.active {
    opacity: 1;
    filter: grayscale(0%);
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-text-muted);
}

.theme-toggle:hover {
    border-color: var(--color-accent);
}

.theme-toggle:hover svg {
    stroke: var(--color-accent);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 24px;
    height: 1px;
    background: var(--color-text);
    transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 3rem 5rem;
    position: relative;
}

/* Architectural lines */
.hero::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 70%;
    background: linear-gradient(180deg, transparent, var(--color-border) 20%, var(--color-border) 80%, transparent);
    pointer-events: none;
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-logo img {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: grayscale(100%) brightness(1.15) sepia(25%) hue-rotate(8deg);
    animation: logoReveal 2s var(--ease-out-expo) forwards;
    opacity: 0;
    animation-delay: 0.5s;
}

@keyframes logoReveal {
    0% { opacity: 0; transform: scale(0.95) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.hero-content {
    z-index: 1;
    animation: contentReveal 1.5s var(--ease-out-expo) forwards;
    opacity: 0;
    animation-delay: 0.8s;
}

@keyframes contentReveal {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.badge::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5.5vw, 4.25rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.15;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    max-width: 440px;
    line-height: 1.85;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ===== Solutions Section ===== */
.solutions {
    padding: 12rem 3rem;
    background: var(--color-surface);
    position: relative;
    border-top: 1px solid var(--color-border);
}

.solutions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--color-border) 30%, var(--color-border) 70%, transparent);
}

.section-header {
    max-width: 550px;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.section-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.85;
    font-weight: 300;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--color-border);
}

.solution-card {
    background: var(--color-surface);
    padding: 3rem 2.5rem;
    position: relative;
    transition: all 0.6s var(--ease-out-expo);
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    transform: scaleX(0);
    transition: transform 0.6s var(--ease-out-expo);
}

.solution-card:hover {
    background: var(--color-surface-alt);
}

.solution-card:hover::before {
    transform: scaleX(1);
}

.solution-card.featured {
    background: var(--color-surface-alt);
}

.solution-card.featured::before {
    transform: scaleX(1);
}

.card-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    padding: 0.375rem 0.875rem;
    background: transparent;
    color: var(--color-accent);
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid var(--color-accent);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 0;
    padding: 0.75rem;
    transition: border-color 0.5s ease;
}

.solution-card:hover .card-icon {
    border-color: var(--color-accent);
}

.card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-accent);
}

.solution-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.solution-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-weight: 300;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.features li {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    padding-left: 1.25rem;
    position: relative;
    font-weight: 300;
}

.features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 1px;
    background: var(--color-accent);
}

/* ===== Philosophy Section ===== */
.philosophy {
    padding: 12rem 3rem;
    background: var(--color-bg);
    position: relative;
    overflow: hidden;
}

.philosophy::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border) 30%, var(--color-border) 70%, transparent);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.philosophy-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Refined SVG Pyramid */
.pyramid-svg-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pyramid-svg {
    width: 100%;
    max-width: 320px;
    height: auto;
}

.pyramid-apex {
    animation: apexGlow 4s ease-in-out infinite;
}

@keyframes apexGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(201, 169, 98, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(201, 169, 98, 0.5));
    }
}

.pyramid-text {
    font-family: var(--font-display);
    fill: var(--color-bg);
}

.apex-text {
    font-size: 18px;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.2em;
}

.middle-text {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.15em;
    fill: var(--color-text-muted);
    text-transform: lowercase;
}

.pyramid-glow {
    animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.02); }
}

.block-rect {
    transition: all 0.4s var(--ease-out-expo);
}

.block-rect:hover {
    fill: url(#blockGradientHover);
    stroke: var(--color-accent);
    cursor: pointer;
}

.block-rect:nth-child(odd) {
    animation: blockFadeOdd 5s ease-in-out infinite;
}

.block-rect:nth-child(even) {
    animation: blockFadeEven 5s ease-in-out infinite;
}

.block-rect:nth-child(1), .block-rect:nth-child(7) { animation-delay: 0s; }
.block-rect:nth-child(2), .block-rect:nth-child(8) { animation-delay: 0.4s; }
.block-rect:nth-child(3), .block-rect:nth-child(9) { animation-delay: 0.8s; }
.block-rect:nth-child(4), .block-rect:nth-child(10) { animation-delay: 1.2s; }
.block-rect:nth-child(5), .block-rect:nth-child(11) { animation-delay: 1.6s; }
.block-rect:nth-child(6) { animation-delay: 2s; }

@keyframes blockFadeOdd {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes blockFadeEven {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.6; }
}

.philosophy-content .label {
    margin-bottom: 1rem;
}

.philosophy-content h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.philosophy-text {
    color: var(--color-text-muted);
    margin-bottom: 1.75rem;
    line-height: 2;
    font-size: 0.95rem;
    font-weight: 300;
}

.philosophy-text strong {
    color: var(--color-text);
    font-weight: 400;
}

.philosophy-stats {
    margin-top: 3.5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.p-stat {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.p-num {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--color-accent);
    line-height: 1;
}

.p-desc {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    max-width: 300px;
    line-height: 1.7;
    font-weight: 300;
}

/* ===== Methodology Section ===== */
.methodology {
    padding: 12rem 3rem;
    background: var(--color-surface);
    position: relative;
    border-top: 1px solid var(--color-border);
}

.method-content {
    max-width: 1000px;
    margin: 0 auto;
}

.method-content h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.method-text {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 5rem;
    max-width: 600px;
    line-height: 1.9;
    font-weight: 300;
}

.method-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--color-border);
}

.pillar {
    background: var(--color-surface-alt);
    padding: 3rem 2rem;
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
}

.pillar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out-expo);
}

.pillar:hover {
    background: var(--color-bg);
}

.pillar:hover::before {
    transform: scaleX(1);
}

.pillar h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.pillar p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    font-weight: 300;
}

/* ===== Contact Section ===== */
.contact {
    padding: 12rem 3rem;
    background: var(--color-bg);
    position: relative;
}

.contact-content {
    max-width: 550px;
    margin: 0 auto;
}

.contact-content h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.contact-content > p {
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    line-height: 1.9;
    font-size: 0.95rem;
    font-weight: 300;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 300;
}

.detail svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-accent);
    flex-shrink: 0;
}

/* ===== Footer ===== */
.footer {
    padding: 4rem 3rem 2rem;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-brand img {
    height: 42px;
    filter: grayscale(100%) brightness(1.1) sepia(20%) hue-rotate(5deg);
}

.footer-brand p {
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 300;
    max-width: 280px;
    line-height: 1.7;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    text-align: left;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 300;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .solutions-grid,
    .method-pillars {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: left;
        padding-top: 7rem;
        gap: 4rem;
    }

    .hero::before {
        display: none;
    }

    .hero-logo {
        order: 1;
    }

    .hero-logo img {
        max-width: 300px;
    }

    .hero-content {
        order: 2;
    }

    .subtitle {
        margin-left: 0;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .philosophy-visual {
        order: 1;
    }

    .philosophy-content {
        order: 2;
    }
}

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

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero,
    .solutions,
    .philosophy,
    .methodology,
    .contact {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }
}
