/* ==========================================================================
   martialaw.quest // brutalist anti-design
   Palette: #0a0a0a #151515 #f0f0f0 #e82c2c #d4d4d4 #3a3a3a #ffffff
   Display: Anton  |  Body: Roboto Slab  |  Urgent: Archivo Black
   Substitutions per design: Inter and Roboto are referenced as fallbacks.
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background: #0a0a0a;
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto Slab", "Roboto", "Inter", Georgia, serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #f0f0f0;
    background: #0a0a0a;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* --------------------------------------------------------------------------
   PHOTOCOPY GRAIN OVERLAY
   -------------------------------------------------------------------------- */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.85 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 160px 160px;
    animation: grainShift 6s steps(8) infinite;
}

@keyframes grainShift {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-4px, 3px); }
    40%  { transform: translate(3px, -2px); }
    60%  { transform: translate(-2px, -4px); }
    80%  { transform: translate(4px, 2px); }
    100% { transform: translate(0, 0); }
}

/* --------------------------------------------------------------------------
   TOP STRIP
   -------------------------------------------------------------------------- */
.top-strip {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px clamp(1rem, 4vw, 3rem);
    background: #ffffff;
    color: #0a0a0a;
    border-bottom: 3px solid #e82c2c;
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: clamp(0.65rem, 1.1vw, 0.85rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    overflow: hidden;
    white-space: nowrap;
}

.strip-label {
    flex: 0 0 auto;
}

.strip-divider {
    color: #e82c2c;
    font-weight: 900;
}

.top-strip .strip-label:last-child {
    margin-left: auto;
    color: #e82c2c;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 92vh;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(3rem, 8vh, 6rem) clamp(1rem, 4vw, 3rem);
    padding-left: clamp(1.5rem, 55%, 60%);
    border-bottom: 1px solid #151515;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 8%;
    left: 6%;
    width: 38vw;
    max-width: 480px;
    height: 38vw;
    max-height: 480px;
    background: repeating-linear-gradient(
        90deg,
        #151515 0 2px,
        transparent 2px 14px
    );
    opacity: 0.55;
    pointer-events: none;
}

.hero::after {
    content: "EMERGENCY";
    position: absolute;
    bottom: 4%;
    left: 4%;
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: clamp(3rem, 9vw, 8rem);
    color: #151515;
    letter-spacing: 0.05em;
    line-height: 0.85;
    transform: rotate(-90deg);
    transform-origin: 0 0;
    pointer-events: none;
    z-index: 0;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: clamp(1rem, 3vh, 2rem);
    z-index: 2;
}

.meta-tag {
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #f0f0f0;
    background: #e82c2c;
    padding: 4px 10px;
}

.meta-tag:nth-child(2) {
    background: transparent;
    color: #e82c2c;
    border: 2px solid #e82c2c;
}

.meta-tag:nth-child(3) {
    background: #151515;
    color: #d4d4d4;
}

.hero-title {
    font-family: "Anton", "Inter", "Roboto", sans-serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 7vw, 6rem);
    line-height: 0.92;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    transform: rotate(-2deg);
    margin-bottom: clamp(1rem, 3vh, 2rem);
    z-index: 2;
    position: relative;
}

.hero-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: #e82c2c;
}

.hero-tagline {
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: clamp(0.75rem, 1.3vw, 1rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #d4d4d4;
    max-width: 560px;
    line-height: 1.6;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   BARS
   -------------------------------------------------------------------------- */
.bar {
    width: 100%;
    height: 8px;
    background: #e82c2c;
    display: block;
}

.bar-double {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;
    background: #0a0a0a;
}

.bar-double .bar {
    height: 6px;
}

/* --------------------------------------------------------------------------
   SECTIONS
   -------------------------------------------------------------------------- */
.section {
    position: relative;
    width: 100%;
    padding: clamp(2rem, 5vh, 4rem) clamp(1rem, 4vw, 3rem);
    overflow: visible;
}

.section-dark {
    background: #0a0a0a;
}

.section-near-dark {
    background: #151515;
}

.broken-left {
    margin-left: -20px;
    padding-left: calc(clamp(1rem, 4vw, 3rem) + 20px);
}

.broken-right {
    margin-right: -20px;
    padding-right: calc(clamp(1rem, 4vw, 3rem) + 20px);
}

.overlap-up {
    margin-top: -30px;
    z-index: 3;
}

/* TAPE MARK CORNERS */
.tape-corners {
    position: relative;
}

.tape-corners::before,
.tape-corners::after {
    content: "";
    position: absolute;
    width: 32px;
    height: 10px;
    background: #3a3a3a;
    transform: rotate(45deg);
    transform-origin: center;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.tape-corners::before {
    top: 6px;
    left: 6px;
    transform: rotate(-30deg);
}

.tape-corners::after {
    bottom: 6px;
    right: 6px;
    transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   TYPOGRAPHIC ELEMENTS
   -------------------------------------------------------------------------- */
.kicker {
    display: inline-block;
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: clamp(0.7rem, 1.2vw, 0.95rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #e82c2c;
    margin-bottom: 14px;
    padding: 3px 0;
    border-top: 2px solid #e82c2c;
    border-bottom: 2px solid #e82c2c;
    padding-left: 4px;
    padding-right: 12px;
}

.section-title {
    font-family: "Anton", "Inter", "Roboto", sans-serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 5.5vw, 4rem);
    line-height: 0.95;
    color: #f0f0f0;
    text-transform: uppercase;
    letter-spacing: 0;
    max-width: 900px;
    margin-bottom: clamp(1.2rem, 3vh, 2rem);
    margin-left: clamp(0rem, 2vw, 1.5rem);
}

.body-text {
    font-family: "Roboto Slab", "Roboto", "Inter", Georgia, serif;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.7;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: clamp(1rem, 5vw, 4rem);
    margin-bottom: 1.2rem;
}

.body-text.small {
    font-size: 0.88rem;
    color: #d4d4d4;
    margin-top: 1.5rem;
}

/* RUBBER STAMP */
.stamp {
    display: inline-block;
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #e82c2c;
    border: 2px solid #e82c2c;
    padding: 4px 12px;
    transform: rotate(-3deg);
    margin: 0 4px;
    line-height: 1.2;
}

/* --------------------------------------------------------------------------
   TIMELINE
   -------------------------------------------------------------------------- */
.timeline-list {
    list-style: none;
    margin-left: clamp(1rem, 5vw, 4rem);
    max-width: 820px;
    border-left: 3px solid #e82c2c;
    padding-left: 1.5rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1.2rem;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px dashed #3a3a3a;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

.time-stamp {
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    letter-spacing: 0.05em;
    color: #e82c2c;
    background: #0a0a0a;
    padding: 2px 6px;
    border: 2px solid #e82c2c;
    text-align: center;
    line-height: 1.2;
}

.time-event {
    font-family: "Roboto Slab", "Roboto", "Inter", Georgia, serif;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.55;
    color: #f0f0f0;
}

/* --------------------------------------------------------------------------
   TESTIMONY
   -------------------------------------------------------------------------- */
.testimony-block {
    max-width: 820px;
    margin: 0 0 1.6rem clamp(1rem, 5vw, 4rem);
    padding: 1.2rem 1.4rem;
    background: #0a0a0a;
    border-left: 6px solid #e82c2c;
    border-top: 1px solid #3a3a3a;
    border-bottom: 1px solid #3a3a3a;
    position: relative;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.testimony-block:nth-child(odd) {
    transform: rotate(-0.5deg);
}

.testimony-block:nth-child(even) {
    transform: rotate(0.4deg);
    margin-left: clamp(1.5rem, 6vw, 5rem);
}

.testimony-block:hover {
    transform: rotate(0deg) translateX(4px);
    border-color: #ffffff;
}

.testimony-text {
    font-family: "Roboto Slab", "Roboto", "Inter", Georgia, serif;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.6;
    color: #f0f0f0;
    margin-bottom: 0.6rem;
    font-style: italic;
}

.testimony-cite {
    display: block;
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.2em;
    color: #d4d4d4;
    font-style: normal;
}

/* --------------------------------------------------------------------------
   LEDGER
   -------------------------------------------------------------------------- */
.ledger-grid {
    margin-left: clamp(1rem, 5vw, 4rem);
    max-width: 900px;
    border-top: 4px solid #e82c2c;
    border-bottom: 4px solid #e82c2c;
}

.ledger-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.2rem;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid #3a3a3a;
}

.ledger-row:last-child {
    border-bottom: none;
}

.ledger-label {
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: clamp(0.75rem, 1.2vw, 0.95rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #d4d4d4;
}

.ledger-value {
    font-family: "Anton", "Inter", "Roboto", sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transform: rotate(-1deg);
}

/* --------------------------------------------------------------------------
   MANIFEST LIST
   -------------------------------------------------------------------------- */
.manifest-list {
    list-style: none;
    margin-left: clamp(1rem, 5vw, 4rem);
    max-width: 900px;
}

.manifest-item {
    position: relative;
    padding: 18px 0 18px 90px;
    border-bottom: 2px solid #3a3a3a;
    font-family: "Roboto Slab", "Roboto", "Inter", Georgia, serif;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    line-height: 1.45;
    color: #f0f0f0;
    transition: background 0.3s ease, padding-left 0.3s ease;
}

.manifest-item:last-child {
    border-bottom: none;
}

.manifest-item::before {
    content: attr(data-num);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-4deg);
    font-family: "Anton", "Inter", "Roboto", sans-serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    color: #e82c2c;
    line-height: 1;
}

.manifest-item:hover {
    padding-left: 100px;
    background: rgba(232, 44, 44, 0.05);
}

/* --------------------------------------------------------------------------
   DISPATCHES
   -------------------------------------------------------------------------- */
.dispatch-stack {
    margin-left: clamp(1rem, 5vw, 4rem);
    max-width: 1000px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.dispatch {
    position: relative;
    background: #0a0a0a;
    border: 2px solid #3a3a3a;
    padding: 1.4rem 1.4rem 1.4rem 1.4rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.dispatch:nth-child(odd) {
    transform: rotate(-0.6deg);
}

.dispatch:nth-child(even) {
    transform: rotate(0.5deg);
    margin-top: 12px;
}

.dispatch:hover {
    transform: rotate(0deg);
    border-color: #e82c2c;
}

.dispatch-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #3a3a3a;
}

.dispatch-num {
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: #e82c2c;
}

.dispatch-date {
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: #d4d4d4;
}

.dispatch-title {
    font-family: "Anton", "Inter", "Roboto", sans-serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    line-height: 1;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
    letter-spacing: 0.01em;
}

.dispatch-body {
    font-family: "Roboto Slab", "Roboto", "Inter", Georgia, serif;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #d4d4d4;
}

/* --------------------------------------------------------------------------
   CONTRIBUTE FORM
   -------------------------------------------------------------------------- */
.contribute-form {
    margin-left: clamp(1rem, 5vw, 4rem);
    max-width: 760px;
    margin-top: 1.5rem;
    padding: 1.4rem;
    background: #151515;
    border: 2px solid #3a3a3a;
    border-left: 6px solid #e82c2c;
}

.form-row {
    display: block;
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #e82c2c;
    margin-bottom: 6px;
}

.form-input,
.form-textarea {
    width: 100%;
    background: #0a0a0a;
    border: 2px solid #3a3a3a;
    color: #f0f0f0;
    font-family: "Roboto Slab", "Roboto", "Inter", Georgia, serif;
    font-size: 1rem;
    padding: 10px 12px;
    line-height: 1.55;
    transition: border-color 0.2s ease;
    resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #3a3a3a;
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
}

.form-input:hover,
.form-textarea:hover {
    border-color: #d4d4d4;
}

.form-submit {
    margin-top: 0.6rem;
    padding: 14px 28px;
    background: #e82c2c;
    color: #ffffff;
    font-family: "Anton", "Inter", "Roboto", sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 3px solid #ffffff;
    cursor: pointer;
    transform: rotate(-1deg);
    transition: transform 0.2s ease, background 0.2s ease;
}

.form-submit:hover {
    transform: rotate(1deg) scale(1.02);
    background: #ffffff;
    color: #e82c2c;
}

.form-submit:active {
    transform: rotate(0deg) scale(0.98);
}

.form-note {
    margin-top: 1rem;
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #d4d4d4;
    min-height: 1em;
}

.form-note.is-stamped {
    color: #e82c2c;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer-block {
    background: #151515;
    padding: clamp(2rem, 5vh, 4rem) clamp(1rem, 4vw, 3rem);
    border-top: 8px solid #e82c2c;
    position: relative;
}

.footer-text {
    font-family: "Roboto Slab", "Roboto", "Inter", Georgia, serif;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.7;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: clamp(1rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.footer-text.small {
    font-size: 0.85rem;
    color: #d4d4d4;
}

.footer-meta {
    margin-top: 2rem;
    margin-left: clamp(1rem, 5vw, 4rem);
    font-family: "Archivo Black", "Inter", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: #3a3a3a;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   IN-VIEW REVEAL
   -------------------------------------------------------------------------- */
.section,
.dispatch,
.testimony-block,
.manifest-item,
.ledger-row {
    --reveal-delay: 0ms;
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--reveal-delay);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   MOBILE TWEAKS
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
    .hero {
        padding-left: clamp(1rem, 4vw, 2rem);
        min-height: 80vh;
    }

    .hero::after {
        font-size: clamp(2rem, 14vw, 6rem);
    }

    .timeline-item {
        grid-template-columns: 80px 1fr;
        gap: 0.9rem;
    }

    .ledger-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .ledger-value {
        text-align: left;
    }

    .manifest-item {
        padding-left: 60px;
    }

    .manifest-item::before {
        font-size: 1.8rem;
    }

    .top-strip {
        gap: 6px;
        padding: 8px 12px;
        font-size: 0.6rem;
    }

    .top-strip .strip-label:nth-child(3) {
        display: none;
    }

    .top-strip .strip-divider:nth-of-type(2) {
        display: none;
    }
}
