/* 
   Onion Peeler: Brutalist Design System 
   Based on "Swiss Industrialist" & "The Architectural Monolith"
*/

:root {
    --bg-concrete: #F0EFED;
    --primary-oxblood: #4A0E15;
    --action-vermilion: #C23B22;
    --success-spruce: #264D3F;
    --text-charcoal: #1B1C1B;
    
    --surface: #F0EFED;
    --surface-content: #ffffff;
    --surface-dark: #1B1C1B;
    
    /* Fonts */
    --font-heading: 'Public Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
}

body {
    background-color: var(--bg-concrete);
    color: var(--text-charcoal);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.first-load .hero-content {
    animation: slide-in 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.first-load .hero-visual {
    animation: fade-in 900ms ease-out 120ms both;
}

.first-load .footer {
    animation: slide-up 700ms ease-out 240ms both;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.8;
    }
}

@media (prefers-reduced-motion: reduce) {
    .first-load .hero-content,
    .first-load .hero-visual,
    .first-load .footer {
        animation: none;
    }
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.code-block, .code-header, .meta-item, .status-badge, .ticker-content {
    font-family: var(--font-mono);
}

/* Utilities */
.btn {
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    transition: background-color 0s ease; /* 0ms Brutalist transitions specified */
}

.btn-primary {
    background-color: var(--text-charcoal);
    color: var(--surface-content);
}

.btn-primary:hover {
    background-color: var(--primary-oxblood);
}

.btn-secondary {
    background-color: var(--action-vermilion);
    color: var(--surface-content);
}

.btn-secondary:hover {
    background-color: var(--primary-oxblood);
}

/* Grid & Pattern */
.pattern-bg {
    background-image: linear-gradient(to right, #e3e2e0 1px, transparent 1px),
                      linear-gradient(to bottom, #e3e2e0 1px, transparent 1px);
    background-size: 40px 40px;
}



/* Hero Section */
.content-wrapper {
    flex-grow: 1;
}

.hero {
    position: relative;
    padding: 6rem 3.5rem;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    width: 100%;
}

.status-badge {
    display: inline-block;
    background-color: var(--primary-oxblood);
    color: var(--surface);
    padding: 0.25rem 0.75rem;
    font-size: 0.65rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title {
    font-size: clamp(6rem, 15vw, 12rem);
    line-height: 0.85;
    color: var(--primary-oxblood);
    margin-bottom: 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: end;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-charcoal);
    max-width: 600px;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--action-vermilion);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.meta-dot {
    width: 8px;
    height: 8px;
    background-color: var(--action-vermilion);
    display: inline-block;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.code-block {
    background-color: var(--surface-content);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-left: 8px solid var(--action-vermilion);
    font-size: 0.8rem;
    color: var(--text-charcoal);
    display: block;
    line-height: 1.5;
}

.code-header {
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.code-key {
    color: var(--action-vermilion);
}

.hero-visual {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    z-index: 1;
    pointer-events: none;
}

.hero-img {
    width: 600px;
    max-width: 100%;
    height: auto;
    transform: scale(1.2);
    mix-blend-mode: darken;
    opacity: 0.8;
}

.hero-spinning-icon {
    animation: slowSpin 60s linear infinite;
}

@keyframes slowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



/* Footer Redesign */
.footer {
    display: flex;
    flex-direction: column;
    padding: 4rem 3.5rem;
    background-color: var(--primary-oxblood);
    color: var(--surface);
    border-top: 4px solid var(--text-charcoal);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(240, 239, 237, 0.2);
    margin-bottom: 2rem;
    gap: 2rem;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-brand {
    font-family: var(--font-heading);
}

.footer-logo {
    width: 48px;
    height: 48px;
}

.footer-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
}

.footer-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    opacity: 0.7;
    text-transform: uppercase;
}

.footer-links-grid {
    display: flex;
    gap: 5rem;
    flex-wrap: wrap;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: var(--font-mono);
}

.footer-heading {
    font-size: 0.75rem;
    color: var(--action-vermilion);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--surface);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.8;
    transition: opacity 0s;
}

.footer-column a:hover {
    color: var(--action-vermilion);
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    opacity: 0.5;
    width: 100%;
}

.footer-brand {
    min-width: 0;
}

.footer-logo-container {
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-visual {
        position: absolute;
        right: -30%;
        top: 20%;
        transform: translateY(0);
        z-index: 0;
        opacity: 0.3; /* Push background behind content */
    }
    
    .hero-img {
        width: 150vw;
        max-width: none;
        transform: none;
    }

    .hero-content {
        position: relative;
        z-index: 10;
        background-color: rgba(240, 239, 237, 0.7);
        padding: 1rem;
        border: 2px solid var(--primary-oxblood);
    }
    
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links-grid {
        width: 100%;
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-title {
        font-size: clamp(1.35rem, 6vw, 1.9rem);
    }
}

@media (max-width: 560px) {
    .footer {
        padding: 2.5rem 1.25rem;
    }

    .footer-logo {
        width: 38px;
        height: 38px;
    }

    .footer-logo-container {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .footer-column a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}
