/* ============================================================
   martialaw.quest - Styles
   Muji-inspired minimal aesthetic with fractured geometry

   Color Palette:
   #0A0A08 - Darkest (background)
   #1C1B19 - Dark
   #22211E - Neutral (reserve)
   #2A2925 - Medium dark
   #8B7D6A - Medium
   #A3917B - Medium light
   #C4B49A - Light
   #D4A56A - Accent (gold)
   #E2D8C9 - Lightest
   ============================================================ */

/* Reset and Global Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --color-darkest: #0A0A08;
    --color-dark: #1C1B19;
    --color-neutral: #22211E;
    --color-medium-dark: #2A2925;
    --color-medium: #8B7D6A;
    --color-medium-light: #A3917B;
    --color-light: #C4B49A;
    --color-accent: #D4A56A;
    --color-lightest: #E2D8C9;
}

body {
    font-family: 'Source Serif 4', serif;
    background-color: #0A0A08;
    color: #C4B49A;
    line-height: 1.75;
    font-weight: 400;
    font-size: 1.05rem;
    overflow-x: hidden;
}

/* Main Container */
main {
    width: 100%;
    min-height: 500vh;
}

/* ============================================================
   Zone Styling - Base
   ============================================================ */

.zone {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.zone-content {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    text-align: center;
}

/* Zone 1: The Announcement - Nearly Empty */
.zone-1 {
    background-color: #0A0A08;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.domain-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2.5rem;
    font-weight: 400;
    color: #D4A56A;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInDomain 1.5s ease-out forwards;
    animation-delay: 0.3s;
}

.zone-1-subtext {
    margin-top: 3rem;
    opacity: 0;
    animation: fadeInSubtext 1.5s ease-out forwards;
    animation-delay: 1s;
}

.zone-1-subtext p {
    font-size: 0.95rem;
    color: #A3917B;
    font-style: italic;
}

/* Zone 2: The Historical Context */
.zone-2 {
    background-color: #1C1B19;
    padding: 4rem 2rem;
}

.zone-2 .zone-content {
    text-align: left;
}

.section-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.5rem;
    font-weight: 400;
    color: #D4A56A;
    margin-bottom: 2rem;
    letter-spacing: 0.08em;
    opacity: 0;
    animation: slideInLeft 1s ease-out forwards;
}

.context-article {
    max-width: 750px;
    margin: 0 auto;
}

.context-text {
    color: #E2D8C9;
    font-size: 1.1rem;
    line-height: 1.9;
    opacity: 0;
    animation: fadeInContent 1s ease-out forwards;
    animation-delay: 0.2s;
}

/* Zone 3: The Fractured Geometry */
.zone-3 {
    background: linear-gradient(180deg, #1C1B19 0%, #0A0A08 100%);
    padding: 4rem 2rem;
    flex-direction: column;
}

.geometry-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeInGeometry 1.2s ease-out forwards;
}

.fracture-rectangle {
    position: absolute;
    background-color: transparent;
    border: 2px solid #A3917B;
    opacity: 0.7;
    animation: float 6s ease-in-out infinite;
}

.rect-1 {
    width: 220px;
    height: 356px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.rect-2 {
    width: 280px;
    height: 233px;
    top: 30%;
    left: 40%;
    animation-delay: 1s;
}

.rect-3 {
    width: 150px;
    height: 315px;
    top: 20%;
    right: 8%;
    animation-delay: 2s;
}

.diagonal-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.5;
}

.diagonal-line {
    stroke: #8B7D6A;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    opacity: 0.4;
    animation: dashAnimation 3s ease-in-out infinite;
}

.diagonal-line:nth-child(1) {
    animation-delay: 0s;
}

.diagonal-line:nth-child(2) {
    animation-delay: 0.6s;
}

.diagonal-line:nth-child(3) {
    animation-delay: 1.2s;
}

.geometry-label {
    text-align: center;
    opacity: 0;
    animation: fadeInLabel 1s ease-out forwards;
    animation-delay: 0.4s;
}

.label-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    color: #A3917B;
    letter-spacing: 0.05em;
    font-style: italic;
}

/* Zone 4: The Broadcast */
.zone-4 {
    background-color: #2A2925;
    padding: 4rem 2rem;
    border-top: 1px solid #A3917B;
    border-bottom: 1px solid #A3917B;
}

.zone-4 .zone-content {
    text-align: left;
}

.zone-4 .section-title {
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: slideInLeft 1s ease-out forwards;
}

.broadcast-text {
    max-width: 750px;
    margin: 0 auto;
}

.broadcast-text p {
    color: #E2D8C9;
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInContent 1s ease-out forwards;
}

.broadcast-text p:first-of-type {
    animation-delay: 0.1s;
}

.broadcast-text p:last-of-type {
    animation-delay: 0.2s;
}

/* Zone 5: The Reckoning */
.zone-5 {
    background-color: #0A0A08;
    padding: 4rem 2rem;
}

.zone-5 .zone-content {
    text-align: left;
}

.zone-5 .section-title {
    color: #D4A56A;
    margin-bottom: 2rem;
    opacity: 0;
    animation: slideInLeft 1s ease-out forwards;
}

.reckoning-article {
    max-width: 750px;
    margin: 0 auto;
}

.reckoning-text {
    color: #C4B49A;
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInContent 1s ease-out forwards;
}

.reckoning-text:first-of-type {
    animation-delay: 0.1s;
}

.reckoning-text:last-of-type {
    animation-delay: 0.2s;
}

/* ============================================================
   Animations
   ============================================================ */

@keyframes fadeInDomain {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInSubtext {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes fadeInLabel {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(1deg);
    }
}

@keyframes dashAnimation {
    0% {
        stroke-dasharray: 0 500;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 100 400;
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dasharray: 0 500;
        stroke-dashoffset: -500;
    }
}

/* ============================================================
   Scroll-Triggered Animations
   ============================================================ */

/* These will be handled by JavaScript for intersection observer */
.zone {
    opacity: 1;
}

/* ============================================================
   Responsive Design
   ============================================================ */

@media (max-width: 768px) {
    .domain-name {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .context-text,
    .broadcast-text p,
    .reckoning-text {
        font-size: 1rem;
        line-height: 1.7;
    }

    .zone-content {
        padding: 1.5rem;
    }

    .fracture-rectangle {
        border-width: 1px;
    }

    .rect-1 {
        width: 150px;
        height: 240px;
    }

    .rect-2 {
        width: 180px;
        height: 150px;
    }

    .rect-3 {
        width: 100px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .domain-name {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .zone-1-subtext p {
        font-size: 0.9rem;
    }

    body {
        font-size: 0.95rem;
    }

    .geometry-container {
        height: 300px;
    }

    .rect-1 {
        width: 120px;
        height: 190px;
    }

    .rect-2 {
        width: 140px;
        height: 120px;
    }

    .rect-3 {
        width: 80px;
        height: 160px;
    }
}

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

@media print {
    body {
        background-color: white;
        color: black;
    }

    .zone {
        page-break-after: always;
    }
}
