/* ================================================================
   yongzoon.net — Diagonal-sections corporate noir
   Palette: #C4652A, #F0E8DF, #D4C4B0, #2A2118, #1C1714, #A8532A, #6B6058
   Type: Syne (display), Inter (body), JetBrains Mono (accent)
   ================================================================ */

:root {
    --burnt-orange: #C4652A;
    --copper: #A8532A;
    --light-ground: #F0E8DF;
    --cream-border: #D4C4B0;
    --mid-ground: #2A2118;
    --dark-ground: #1C1714;
    --ash: #6B6058;

    --font-display: "Syne", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", "Menlo", monospace;

    --angle-low: 92%;
    --angle-high: 8%;
}

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

html, body {
    background: var(--dark-ground);
    color: var(--light-ground);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    position: relative;
}

/* ============================ Page frame ============================ */
.page-frame {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    mix-blend-mode: normal;
}

.frame-mark {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--burnt-orange);
    opacity: 0.7;
}

.frame-mark-tl {
    top: 1.5rem;
    left: 1.75rem;
}

.frame-mark-tr {
    top: 1.5rem;
    right: 1.75rem;
}

.frame-label {
    text-transform: uppercase;
}

/* ============================ Diagonal stack ============================ */
.diagonal-stack {
    display: block;
    position: relative;
}

.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 12vh 8vw;
    display: flex;
    overflow: hidden;
}

.section-inner {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    z-index: 2;
}

/* alternating diagonal clip-paths */
.section-masthead {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    background: var(--dark-ground);
    z-index: 4;
}

.section-brief {
    clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%);
    background: var(--light-ground);
    color: var(--mid-ground);
    margin-top: -8vh;
    z-index: 3;
    padding-top: 18vh;
    padding-bottom: 18vh;
}

.section-data {
    clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
    background: var(--mid-ground);
    margin-top: -8vh;
    z-index: 2;
    padding-top: 18vh;
    padding-bottom: 18vh;
}

.section-mark {
    clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 100%);
    background: var(--dark-ground);
    margin-top: -8vh;
    z-index: 1;
    padding-top: 22vh;
    padding-bottom: 18vh;
}

/* "blade of light" along the cut */
.blade-light {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 140%;
    height: 2px;
    background: var(--burnt-orange);
    transform-origin: left center;
    transform: rotate(-4.5deg) translateY(-4vh);
    opacity: 0.45;
    pointer-events: none;
}

/* ============================ Typography ============================ */
.section-dark {
    color: var(--light-ground);
}

.section-light {
    color: var(--mid-ground);
}

.section-mid {
    color: var(--light-ground);
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.8rem, 3vw, 3rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    position: relative;
    display: inline-block;
}

.section-light .section-heading {
    color: var(--dark-ground);
}

.section-dark .section-heading,
.section-mid .section-heading {
    color: var(--burnt-orange);
}

/* underline-draw animation */
.heading-underline {
    position: relative;
    display: inline-block;
}

.heading-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    height: 2px;
    width: 0;
    background: var(--burnt-orange);
    transition: width 800ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.heading-underline.in-view::after {
    width: 100%;
}

/* ============================ Section 1 — Masthead ============================ */
.section-masthead {
    align-items: center;
}

.masthead-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cream-border);
    margin-bottom: 3.5rem;
    opacity: 0.85;
}

.meta-rule {
    flex: 0 0 80px;
    height: 1px;
    background: var(--burnt-orange);
    opacity: 0.7;
}

.masthead-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 11vw, 9rem);
    letter-spacing: -0.04em;
    line-height: 0.92;
    color: var(--burnt-orange);
    display: inline-block;
    position: relative;
}

.title-dot {
    color: var(--light-ground);
}

.title-line-net {
    color: var(--cream-border);
    font-weight: 500;
    font-style: italic;
}

.masthead-foot {
    margin-top: 4.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
}

.masthead-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: var(--cream-border);
    max-width: 520px;
    line-height: 1.6;
    opacity: 0.85;
}

.masthead-index {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    color: var(--burnt-orange);
}

/* ============================ Section 2 — Brief ============================ */
.brief-header {
    margin-bottom: 4rem;
}

.section-index {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 1.25rem;
}

.brief-grid {
    display: grid;
    grid-template-columns: 40fr 60fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.brief-sidebar {
    border-top: 1px solid var(--cream-border);
    padding-top: 2rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--ash);
}

.sidebar-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--copper);
    font-size: 0.72rem;
    margin-top: 1.25rem;
}

.sidebar-label:first-child {
    margin-top: 0;
}

.sidebar-value {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--mid-ground);
    margin-bottom: 0.35rem;
}

.sidebar-rule {
    display: block;
    height: 1px;
    width: 60%;
    background: var(--cream-border);
    margin: 2rem 0 1.5rem;
}

.sidebar-note {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--ash);
    font-size: 0.95rem;
}

.brief-body {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    color: var(--ash);
    line-height: 1.85;
}

.brief-lede {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.3;
    color: var(--mid-ground);
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.brief-body p {
    margin-bottom: 1.4rem;
}

.brief-body em {
    font-style: italic;
    color: var(--copper);
}

/* ============================ Section 3 — Data ============================ */
.data-header {
    margin-bottom: 4.5rem;
    max-width: 720px;
}

.data-index {
    color: var(--burnt-orange);
}

.data-subtitle {
    margin-top: 1.5rem;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--cream-border);
    opacity: 0.75;
    max-width: 540px;
    line-height: 1.7;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid rgba(196, 101, 42, 0.35);
}

.data-cell {
    border-bottom: 1px solid rgba(196, 101, 42, 0.35);
    border-right: 1px solid rgba(196, 101, 42, 0.18);
    padding: 2.25rem 1.75rem 2rem;
    position: relative;
    transition: background 400ms ease;
}

.data-cell:nth-child(3n) {
    border-right: none;
}

.data-cell:hover {
    background: rgba(196, 101, 42, 0.06);
}

.data-key {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--burnt-orange);
    display: block;
    margin-bottom: 1rem;
}

.data-value {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--light-ground);
    margin-bottom: 1.5rem;
}

.data-figure {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--cream-border);
    letter-spacing: -0.01em;
    display: inline-block;
    border-top: 1px solid rgba(212, 196, 176, 0.2);
    padding-top: 0.75rem;
    min-width: 60%;
}

/* ============================ Section 4 — Mark ============================ */
.section-mark {
    align-items: center;
    justify-content: center;
}

.section-mark .section-inner {
    text-align: left;
}

.mark-prefix {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--burnt-orange);
    opacity: 0.7;
    margin-bottom: 2.5rem;
}

.mark-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(3.5rem, 12vw, 10rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    color: var(--burnt-orange);
    display: inline-block;
    position: relative;
}

.mark-name::after {
    bottom: -14px;
    background: var(--burnt-orange);
}

.mark-trail {
    margin-top: 3rem;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1rem;
    color: var(--cream-border);
    opacity: 0.55;
    letter-spacing: 0.04em;
    max-width: 520px;
    line-height: 1.7;
}

.mark-footer {
    margin-top: 8rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ash);
}

.footer-rule {
    flex: 1;
    max-width: 320px;
    height: 1px;
    background: var(--burnt-orange);
    opacity: 0.4;
}

.footer-tag {
    color: var(--burnt-orange);
    opacity: 0.75;
}

/* ============================ Motifs ============================ */
.motif {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.motif-masthead {
    right: 4vw;
    bottom: 14vh;
    width: 22vw;
    min-width: 220px;
    height: auto;
    opacity: 0.9;
}

.motif-brief {
    right: 5vw;
    top: 14vh;
    width: 16vw;
    min-width: 180px;
    height: auto;
    opacity: 0.85;
}

.motif-data {
    opacity: 0.85;
}

.motif-data-a {
    left: -3vw;
    top: 14vh;
    width: 16vw;
    min-width: 180px;
}

.motif-data-b {
    right: 4vw;
    bottom: 14vh;
    width: 14vw;
    min-width: 160px;
}

.motif-mark {
    left: 50%;
    bottom: 18vh;
    transform: translateX(-50%);
    width: min(60vw, 540px);
    height: auto;
    opacity: 0.85;
}

/* parallax-like translation hooked from JS via custom property */
.motif {
    transform: translate3d(var(--motif-x, 0), var(--motif-y, 0), 0);
    transition: transform 600ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.motif-mark {
    transform: translate(-50%, var(--motif-y, 0));
}

/* ============================ Scroll indicator ============================ */
.scroll-indicator {
    position: fixed;
    right: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 32vh;
    background: rgba(212, 196, 176, 0.18);
    z-index: 60;
    pointer-events: none;
    overflow: hidden;
}

.indicator-line {
    display: block;
    width: 100%;
    height: 0%;
    background: var(--burnt-orange);
    transition: height 200ms linear;
}

/* ============================ Reveal-on-view ============================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 900ms cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 900ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

.reveal-delay-1 { transition-delay: 120ms; }
.reveal-delay-2 { transition-delay: 240ms; }
.reveal-delay-3 { transition-delay: 360ms; }
.reveal-delay-4 { transition-delay: 480ms; }

/* ============================ Responsive ============================ */
@media (max-width: 880px) {
    .section {
        padding: 14vh 6vw;
    }

    .brief-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .data-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-cell:nth-child(3n) {
        border-right: 1px solid rgba(196, 101, 42, 0.18);
    }

    .data-cell:nth-child(2n) {
        border-right: none;
    }

    .masthead-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    .scroll-indicator {
        display: none;
    }

    .frame-mark {
        font-size: 0.6rem;
    }
}

@media (max-width: 540px) {
    .data-grid {
        grid-template-columns: 1fr;
    }

    .data-cell {
        border-right: none !important;
    }

    .section-masthead,
    .section-brief,
    .section-data,
    .section-mark {
        clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%);
    }

    .section-masthead {
        clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
    }
}
