/* ========================================
   NOSVI — Hyper-Minimalist Design System
   ======================================== */

/* Animation: Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for sections */
@keyframes fadeInUpDelayed {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Body Animation */
body {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Hero Section Animation */
.hero-section h1 {
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-section p {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Footer Animation */
footer {
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

/* ========================================
   Three Pillars Section — Technical Schematic
   ======================================== */

.pillars-section {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.pillars-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 768px) {
    .pillars-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Individual Pillar Cell — Dashboard/Schematic Style */
.pillar-cell {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: transparent;
}

/* Collapse borders between cells on desktop */
@media (min-width: 768px) {
    .pillar-cell:not(:first-child) {
        border-left: none;
    }
}

/* On mobile, stack and collapse vertical borders */
@media (max-width: 767px) {
    .pillar-cell:not(:first-child) {
        border-top: none;
    }
    
    .pillar-cell {
        padding: 32px 24px;
    }
}

/* Hover state for cells */
.pillar-cell:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
    .pillar-cell:hover {
        /* Re-show left border on hover */
        border-left: 1px solid rgba(255, 255, 255, 0.5);
        margin-left: -1px;
        padding-left: 41px;
    }
    
    .pillar-cell:first-child:hover {
        margin-left: 0;
        padding-left: 40px;
    }
}

/* Pillar Header — Bold Monospace */
.pillar-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 28px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.pillar-number {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.pillar-divider {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

.pillar-title {
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Pillar Content — Clean Sans-Serif */
.pillar-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pillar-problem,
.pillar-approach {
    font-family: 'Inter', sans-serif;
}

.content-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.pillar-problem p,
.pillar-approach p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* Metric section — emphasized */
.pillar-metric {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 8px;
}

.metric-value {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #FFFFFF;
    letter-spacing: -0.01em;
}

/* Staggered animation for pillar cells */
.pillar-cell:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.pillar-cell:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.pillar-cell:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

/* ========================================
   Interactive Hover States
   ======================================== */

/* Smooth text selection */
::selection {
    background-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

/* ========================================
   Scrollbar Styling (Minimal)
   ======================================== */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ========================================
   Focus States (Accessibility)
   ======================================== */

a:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
}

/* ========================================
   Mobile Optimizations
   ======================================== */

/* Mobile optimizations for pillar cells are defined inline above */

/* ========================================
   Performance Optimizations
   ======================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    body,
    .hero-section h1,
    .hero-section p,
    .pillars-section,
    .pillar-cell,
    footer {
        animation: none;
    }
    
    .pillar-cell {
        transition: none;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    body {
        background: white;
        color: black;
    }
    
    nav, footer {
        position: static;
    }
}