/* ═══════════════════════════════════════════════════════════
   SWISS NIHILISM — CodeTonight Guild Page
   Full adherence to ENTER Konsult design language V2.
   7 Laws applied. No exceptions.
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ────────────────────────────────────────────────── */

:root {
    /* Law 6: Paper grey, no gradients, no shadows */
    --paper-grey: #EAEAEA;
    --black: #000000;
    --white: #ffffff;

    /* Law 3: One accent — orange-600 */
    --orange: #ea580c;
    --a11y-orange: #9a3412;

    /* Greys */
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --a11y-gray: #525252;
    --a11y-muted: #4b5563;

    /* Law 1: System fonts */
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Law 2: Monospace for meta */
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
                 "Liberation Mono", Menlo, monospace;

    /* Terminal (pattern 5.4 — only element with shadow) */
    --terminal-bg: #1a1a1a;
    --terminal-text: #e0e0e0;
    --terminal-dim: #888888;
    --terminal-prompt: #3fb950;
}

/* ── RESET ─────────────────────────────────────────────────── */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Law 7: Sharp corners — no border-radius */
    border-radius: 0;
}

html {
    scroll-behavior: smooth;
}

/* Reduced motion (accessibility: HOLD) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

body {
    background: var(--paper-grey);
    color: var(--black);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--black);
    text-decoration: none;
    transition: color 300ms;
}

a:hover {
    color: var(--orange);
}

/* Focus (accessibility: HOLD — orange outline) */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* Skip link (accessibility: HOLD) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    z-index: 100;
}

.skip-link:focus {
    top: 1rem;
}

/* ── HEADER ────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper-grey);
    border-bottom: 1px solid var(--gray-300);
}

.header-nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Law 2: Nav in monospace */
.nav-brand {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-500);
    transition: color 300ms, letter-spacing 300ms;
}

.nav-links a:hover {
    color: var(--black);
    letter-spacing: 0.2em;
}

/* ── HERO (Pattern 1: Asymmetric 3+9) ─────────────────────── */

.hero {
    padding: 6rem 1.5rem 4rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* Law 4: Asymmetric grid — 3+9 */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 3fr 9fr;
        gap: 3rem;
    }
}

/* Sidebar: monospace metadata */
.hero-sidebar {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .hero-sidebar {
        display: flex;
    }
}

/* Law 2 + Law 5: Monospace, tracking-widest */
.meta-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gray-500);
}

.meta-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--a11y-gray);
}

.status-live {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--orange);
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Hero heading */
.hero-preface {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--gray-500);
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

/* Law 5: Ultra-tight tracking on headings */
.hero-heading {
    font-size: 3rem;
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .hero-heading { font-size: 4rem; }
}

@media (min-width: 1024px) {
    .hero-heading {
        font-size: 6rem;
        line-height: 0.85;
    }
}

.hero-muted {
    color: var(--a11y-muted);
}

.hero-body {
    border-left: 2px solid var(--black);
    padding-left: 2rem;
    margin-bottom: 2rem;
    max-width: 36rem;
}

.hero-body p {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* CTAs */
.hero-ctas {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--black);
    cursor: pointer;
    transition: background 300ms, color 300ms;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.btn-primary:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
}

.btn-secondary {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--black);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--black);
    cursor: pointer;
    transition: background 300ms, color 300ms;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.btn-secondary:hover {
    background: var(--black);
    color: var(--white);
}

/* Trust strip (Pattern 5.5) */
.trust-strip {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gray-500);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pipe {
    color: var(--gray-300);
}

@media (max-width: 640px) {
    .trust-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .pipe { display: none; }
}

/* ── SECTIONS ──────────────────────────────────────────────── */

.section {
    padding: 3rem 1.5rem 4rem;
    max-width: 1280px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.6s ease-in, transform 0.6s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-border {
    border-bottom: 1px solid var(--gray-300);
}

@media (min-width: 768px) {
    .section {
        padding: 4rem 1.5rem 5rem;
    }
}

/* Law 5: Section headings — tight tracking */
.section-heading {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .section-heading { font-size: 3.5rem; }
}

@media (min-width: 1024px) {
    .section-heading { font-size: 4.5rem; }
}

.heading-muted {
    color: var(--a11y-muted);
}

.section-body {
    border-left: 2px solid var(--black);
    padding-left: 2rem;
    margin-bottom: 2.5rem;
    max-width: 36rem;
}

.section-body p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* Law 4: Asymmetric 8+4 grid */
.section-grid-8-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .section-grid-8-4 {
        grid-template-columns: 8fr 4fr;
        gap: 3rem;
    }
}

/* ── BLACK PANEL (Pattern 5.2: Numbered Panel) ─────────────── */

.black-panel {
    background: var(--black);
    color: var(--white);
    padding: 2rem;
}

.panel-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gray-500);
    display: block;
    margin-bottom: 1.5rem;
}

.panel-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Law 3: Orange numbers */
.panel-num {
    font-family: var(--font-mono);
    color: var(--orange);
    font-weight: bold;
    flex-shrink: 0;
}

/* ── TEAM TABLE ────────────────────────────────────────────── */

.team-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

/* Law 2: Table headers in monospace */
.team-table th {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gray-500);
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--gray-300);
    font-weight: normal;
}

.team-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
    vertical-align: top;
    border-bottom: 1px solid var(--gray-300);
}

.team-table a {
    color: var(--black);
    border-bottom: 1px solid var(--gray-300);
    transition: border-color 300ms;
}

.team-table a:hover {
    color: var(--orange);
    border-color: var(--orange);
}

.sig {
    font-family: var(--font-mono);
    color: var(--orange);
    font-weight: bold;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

.row-cryptic td {
    color: var(--a11y-muted);
    font-style: italic;
}

.row-cryptic .sig {
    font-style: normal;
}

/* ── STATS ─────────────────────────────────────────────────── */

.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    /* Law 4: 4-col but not symmetric — uneven content creates tension */
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

.stat-num {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--black);
}

/* Law 2 + Law 5: Monospace labels, widest tracking */
.stat-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gray-500);
}

/* ── TERMINAL WINDOW (Pattern 5.4) ─────────────────────────── */
/* ONLY element permitted box-shadow (serves the terminal metaphor) */

.terminal {
    background: var(--terminal-bg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.terminal-chrome {
    background: #141414;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #333;
}

.dot {
    width: 10px;
    height: 10px;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--terminal-dim);
    margin-left: 0.5rem;
}

.terminal-body {
    padding: 1.25rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--terminal-text);
}

.t-prompt {
    color: var(--terminal-prompt);
    font-weight: bold;
}

.t-cmd {
    color: var(--white);
}

.t-output {
    color: var(--terminal-text);
}

.t-orange {
    color: var(--orange);
    font-weight: bold;
}

.t-dim {
    color: var(--terminal-dim);
}

.t-cursor {
    color: var(--terminal-prompt);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ── LINKS GRID ────────────────────────────────────────────── */

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

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

@media (min-width: 1024px) {
    /* Law 4: 5 links in asymmetric wrap */
    .links-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.link-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 1px solid var(--gray-300);
    transition: border-color 300ms, transform 300ms;
    min-height: 48px;
}

.link-card:hover {
    border-color: var(--black);
    transform: translateX(4px);
}

.link-card:hover .link-arrow {
    color: var(--orange);
}

.link-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.link-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--black);
    flex-grow: 1;
}

.link-arrow {
    font-size: 1.25rem;
    color: var(--gray-300);
    margin-top: 0.75rem;
    transition: color 300ms;
}

/* ── FOOTER ────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--gray-300);
    padding: 2rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gray-500);
    letter-spacing: 0.1em;
}

.footer-inner a {
    color: var(--gray-500);
}

.footer-inner a:hover {
    color: var(--orange);
}

.footer-quote {
    margin-top: 1.5rem;
    font-style: italic;
    color: var(--a11y-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* ── ANIMATIONS ────────────────────────────────────────────── */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

.hero {
    animation: slideUp 0.6s ease-out;
}

/* ── PRINT ─────────────────────────────────────────────────── */

@media print {
    .site-header,
    .hero-ctas,
    .skip-link { display: none; }
    body { background: white; }
    .section { opacity: 1; transform: none; }
}
