/* Design System: Newsprint */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400&family=Lora:ital,wght@0,400;0,600;1,400&display=block');

:root {
    /* Colors (Single Palette) */
    --bg-primary: #F9F9F7;
    --text-primary: #111111;
    --muted: #E5E5E0;
    --accent: #CC0000;
    --border: #111111;

    --neutral-100: #F5F5F5;
    --neutral-200: #E5E5E5;
    --neutral-400: #A3A3A3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;

    /* Transitions */
    --transition-fast: 0.2s ease-out;
    --transition-medium: 0.3s ease-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    border-radius: 0px !important; /* Zero radius everywhere */
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    /* Dot Grid Pattern */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23111111' fill-opacity='0.04' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    line-height: 1.625; /* leading-relaxed */
    overflow-x: hidden;
    font-family: 'Lora', Georgia, serif; /* Default to Body */
}

/* Typography Classes */
.font-serif { font-family: 'Playfair Display', 'Times New Roman', serif; }
.font-body { font-family: 'Lora', Georgia, serif; }
.font-sans { font-family: 'Inter', 'Helvetica Neue', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }

/* Base Headings */
h1, h2, h3, h4, h5, h6 { color: var(--text-primary); font-family: 'Playfair Display', 'Times New Roman', serif; font-weight: 700; margin-bottom: 0.5rem; }

.text-9xl { font-size: 8rem; line-height: 0.9; letter-spacing: -0.05em; }
.text-7xl { font-size: 4.5rem; line-height: 1; letter-spacing: -0.02em; }
.text-6xl { font-size: 3.75rem; line-height: 1; letter-spacing: -0.02em; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }

@media (min-width: 1024px) {
    .lg\:text-9xl { font-size: 8rem; }
    .lg\:text-5xl { font-size: 3rem; }
    .lg\:text-3xl { font-size: 1.875rem; }
    .lg\:text-2xl { font-size: 1.5rem; }
}

@media (min-width: 640px) {
    .sm\:text-6xl { font-size: 3.75rem; }
}

/* Utility Typography Classes */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.text-justify { text-align: justify; }
.text-center { text-align: center; }

/* Colors Utility */
.bg-black { background-color: var(--text-primary); }
.bg-white { background-color: var(--bg-primary); }
.bg-neutral-100 { background-color: var(--neutral-100); }
.text-white { color: var(--bg-primary); }
.text-black { color: var(--text-primary); }
.text-red { color: var(--accent); }
.text-neutral-400 { color: var(--neutral-400); }
.text-neutral-500 { color: var(--neutral-500); }

/* Inverted Section */
.inverted-section {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}
.inverted-section h1, .inverted-section h2, .inverted-section h3, .inverted-section p, .inverted-section span {
    color: inherit;
}
.inverted-section .border, .inverted-section .border-r, .inverted-section .border-b, .inverted-section .border-t {
    border-color: var(--bg-primary);
}
.inverted-section .btn-outline {
    border-color: var(--bg-primary);
    color: var(--bg-primary);
}
.inverted-section .btn-outline:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}
/* Textures & Effects */
.newsprint-texture {
    position: relative;
}
.newsprint-texture::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(0deg, transparent 98%, rgba(0,0,0,0.02) 100%),
        linear-gradient(90deg, transparent 98%, rgba(0,0,0,0.02) 100%);
    background-size: 3px 3px;
    pointer-events: none;
    opacity: 0.5;
    z-index: 0;
}
.newsprint-texture > * {
    position: relative;
    z-index: 1;
}

.radial-bg {
    position: relative;
    background-color: transparent;
}
.radial-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(#000 1px, transparent 1px);
    opacity: 0.1;
    background-size: 16px 16px;
    z-index: 0;
}
.radial-bg > * {
    position: relative;
    z-index: 1;
}

.hard-shadow-hover {
    transition: var(--transition-fast);
}
.hard-shadow-hover:hover {
    box-shadow: 4px 4px 0px 0px #111111;
    transform: translate(-2px, -2px);
    background-color: var(--neutral-100);
}
.inverted-section .hard-shadow-hover:hover {
    box-shadow: 4px 4px 0px 0px var(--bg-primary);
    background-color: #222222;
}

.grayscale { filter: grayscale(100%); transition: filter var(--transition-medium); }
.grayscale:hover { filter: sepia(50%) grayscale(50%); }

/* Structural Grid & Borders */
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-b-2 { border-bottom: 2px solid var(--border); }
.border-b-4 { border-bottom: 4px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-r { border-right: 1px solid var(--border); }
.border-l { border-left: 1px solid var(--border); }
.border-transparent { border-color: transparent; }

@media (max-width: 767px) {
    .border-r { border-right: none; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    text-decoration: none;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border: 1px solid transparent;
}
.btn-primary:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--accent);
    text-decoration-line: underline;
}
.btn-link:hover {
    background: transparent;
    color: var(--accent);
}

/* Inputs */
input, textarea {
    border: none;
    border-bottom: 2px solid var(--border);
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    width: 100%;
}
input:focus-visible, textarea:focus-visible {
    background-color: #F0F0F0;
    outline: none;
    border-color: var(--text-primary);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
}

.grid { display: grid; }
.grid-cols-1, .grid-cols-2, .grid-cols-3, .grid-cols-12 { grid-template-columns: 1fr; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:col-span-8 { grid-column: span 8 / span 8; }
    .lg\:col-span-7 { grid-column: span 7 / span 7; }
    .lg\:col-span-6 { grid-column: span 6 / span 6; }
    .lg\:col-span-5 { grid-column: span 5 / span 5; }
    .lg\:col-span-4 { grid-column: span 4 / span 4; }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:grid-border-r { border-right: 1px solid var(--border); }
}

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-stretch { align-items: stretch; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-16 { padding-top: 4rem; }
.pt-32 { padding-top: 8rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-16 { padding-bottom: 4rem; }
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.h-full { height: 100%; }
.w-full { width: 100%; }
.float-left { float: left; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-primary);
    z-index: 40;
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Stretch children to fill height */
    border-bottom: 2px solid var(--border);
}
.nav-logo h1 { margin-bottom: 0.25rem;}
.nav-logo a { text-decoration: none; display: flex; flex-direction: column; padding: 1rem; }
.nav-logo .edition { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--neutral-600); }

.nav-links { display: flex; align-items: stretch; }
.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    border-left: 1px solid var(--border);
    transition: var(--transition-fast);
}
.nav-links a:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.hamburger {
    display: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-primary);
    border-left: 1px solid var(--border);
}

/* Specific elements */
.drop-cap {
    float: left;
    font-size: 4.5rem;
    line-height: 0.85;
    padding-top: 0.1rem;
    padding-right: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.tech-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border);
}
.inverted-section .tech-tag { border-color: var(--bg-primary); }

.icon-box {
    border: 1px solid var(--border);
    height: 48px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.icon-box:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}
.inverted-section .icon-box {
    border-color: var(--bg-primary);
}
.inverted-section .icon-box:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Marquee / Ticker */
.ticker-wrap {
    width: 100%;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    background-color: var(--text-primary);
    color: var(--bg-primary);
    overflow: hidden;
    white-space: nowrap;
    padding: 0.75rem 0;
}

.ticker {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 30s linear infinite;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ticker-item {
    display: inline-block;
    padding: 0 3rem;
}
.ticker-item-separator {
    color: var(--accent);
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Animation Utilities for scroll */
.animate-snap {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}
.animate-snap.visible { opacity: 1; }

/* Mobile Responsiveness for Nav */
@media (max-width: 767px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.active { display: flex; }
    .nav-links a {
        border-left: none;
        border-bottom: 1px solid var(--border);
        text-align: center;
    }
    .hamburger { display: block; }
}