/* xity.one — monochrome stark landing */
/* Palette */
:root {
    --canvas-white: #FAFAFA;
    --ink-black: #0A0A0A;
    --signal-red: #E63946;
    --medium-gray: #6B6B6B;
    --light-gray: #A0A0A0;
    --faint-line-light: #E0E0E0;
    --faint-line-dark: #1A1A1A;
}

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

html, body {
    width: 100%;
    height: 100%;
    background: var(--ink-black);
    overflow-x: hidden;
}

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Scroll container ---- */
.scroll-container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}
.scroll-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ---- Sections ---- */
.section {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    column-gap: 80px;
    row-gap: 40px;
    padding: 80px 120px;
}

.section-light {
    background: var(--canvas-white);
    color: var(--ink-black);
}

.section-dark {
    background: var(--ink-black);
    color: var(--canvas-white);
}

/* Diagonal cuts — alternating angle direction creates a sharp graphic rhythm */
#section-01 {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 0 100%);
    z-index: 5;
}
#section-02 {
    clip-path: polygon(0 60px, 100% 0, 100% calc(100% - 60px), 0 100%);
    margin-top: -60px;
    z-index: 4;
    padding-top: 140px;
}
#section-03 {
    clip-path: polygon(0 60px, 100% 0, 100% calc(100% - 60px), 0 100%);
    margin-top: -60px;
    z-index: 3;
    padding-top: 140px;
}
#section-04 {
    clip-path: polygon(0 60px, 100% 0, 100% calc(100% - 60px), 0 100%);
    margin-top: -60px;
    z-index: 2;
    padding-top: 140px;
}
#section-05 {
    clip-path: polygon(0 60px, 100% 0, 100% 100%, 0 100%);
    margin-top: -60px;
    z-index: 1;
    padding-top: 140px;
}

/* ---- Watermark Numerals ---- */
.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Abril Fatface', serif;
    font-weight: 400;
    font-size: clamp(200px, 30vw, 500px);
    line-height: 1;
    opacity: 0.04;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    color: currentColor;
    letter-spacing: -0.02em;
}

/* ---- Display Type ---- */
.display {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(80px, 14vw, 200px);
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: currentColor;
    z-index: 2;
    position: relative;
}

/* ---- Body ---- */
.body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 1.25vw, 20px);
    line-height: 1.8;
    max-width: 380px;
    z-index: 2;
    position: relative;
}

.section-light .body { color: var(--medium-gray); }
.section-dark  .body { color: var(--light-gray); }

/* ---- Caption / Label ---- */
.caption {
    font-family: 'Karla', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--signal-red);
    z-index: 2;
    position: relative;
    display: inline-block;
}

.caption.red-mark {
    margin-top: 32px;
    letter-spacing: 0.2em;
}

/* ---- Content placement (max three elements per viewport) ---- */
.content {
    z-index: 2;
    position: relative;
    align-self: start;
}

.content-tl { grid-column: 1 / span 4;  grid-row: 1 / span 2; align-self: start; }
.content-tr { grid-column: 8 / span 5;  grid-row: 1 / span 2; align-self: start; justify-self: end; text-align: right; }

.content-c  { grid-column: 2 / span 9;  grid-row: 4 / span 6; align-self: center; }
.content-cl { grid-column: 1 / span 8;  grid-row: 4 / span 6; align-self: center; }
.content-cr { grid-column: 4 / span 9;  grid-row: 4 / span 6; align-self: center; justify-self: end; text-align: right; }

.content-bl { grid-column: 1 / span 5;  grid-row: 11 / span 2; align-self: end; }
.content-br { grid-column: 7 / span 5;  grid-row: 11 / span 2; align-self: end; justify-self: end; text-align: right; }

/* ---- Motif Family 2: The Singular Line ---- */
.motif-line {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.section-light .motif-line { color: var(--faint-line-light); }
.section-dark  .motif-line { color: var(--faint-line-dark); }

/* horizontal rule */
.line-horizontal {
    top: 38.2%;
    left: 61.8%;
    width: 280px;
    height: 1px;
    background: currentColor;
}

/* diagonal slash */
.line-diagonal {
    top: 38.2%;
    left: 61.8%;
    width: 320px;
    height: 1px;
    background: currentColor;
    transform: rotate(-32deg);
    transform-origin: left center;
}

/* circle outline svg */
.line-circle {
    top: 38.2%;
    left: 8%;
    width: 320px;
    height: 320px;
}
.line-circle svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* right angle svg */
.line-rightangle {
    top: 38.2%;
    left: 61.8%;
    width: 280px;
    height: 280px;
}
.line-rightangle svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* dot */
.line-dot {
    top: 38.2%;
    left: 61.8%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--signal-red);
}

/* ---- Motif Family 1: Grid Fragment ---- */
.grid-fragment {
    position: absolute;
    z-index: 1;
    display: grid;
    gap: 4px;
    pointer-events: none;
}

.grid-fragment span {
    width: 40px;
    height: 40px;
    border: 1px solid currentColor;
}

.section-light .grid-fragment span { color: var(--faint-line-light); }
.section-dark  .grid-fragment span { color: var(--faint-line-dark); }

.grid-fragment span.fill {
    background: var(--signal-red);
    border-color: var(--signal-red);
}

.fragment-3x3 {
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 40px);
    bottom: 8%;
    right: 38.2%;
}

.fragment-4x4 {
    grid-template-columns: repeat(4, 40px);
    grid-template-rows: repeat(4, 40px);
    bottom: 8%;
    right: 8%;
}

/* ---- Dot Navigation ---- */
.dot-nav {
    position: fixed;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 22px;
    z-index: 100;
    mix-blend-mode: difference;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    border: 1px solid var(--canvas-white);
    background: transparent;
    cursor: pointer;
    transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
    display: block;
    text-decoration: none;
}

.dot:hover {
    transform: scale(1.5);
}

.dot.active {
    background: var(--signal-red);
    border-color: var(--signal-red);
    transform: scale(1.4);
}

/* ---- Section reveal animation ---- */
.section .content,
.section .motif-line,
.section .grid-fragment {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.section.in-view .content,
.section.in-view .motif-line,
.section.in-view .grid-fragment {
    opacity: 1;
    transform: translateY(0);
}

.section .content:nth-child(4) { transition-delay: 80ms; }
.section .content:nth-child(5) { transition-delay: 160ms; }
.section .content:nth-child(6) { transition-delay: 240ms; }
.section .content:nth-child(7) { transition-delay: 320ms; }

/* watermark stays visible from start to act as orientation */
.watermark {
    opacity: 0.04;
    transition: opacity 800ms ease;
}

.section.in-view .watermark {
    opacity: 0.04;
}

/* ---- Smaller screens ---- */
@media (max-width: 900px) {
    .section {
        padding: 60px 32px;
        column-gap: 24px;
        row-gap: 24px;
    }
    .content-tl, .content-tr { grid-column: 1 / span 12; grid-row: 1 / span 2; }
    .content-tr { justify-self: start; text-align: left; }
    .content-c, .content-cl, .content-cr { grid-column: 1 / span 12; grid-row: 4 / span 6; justify-self: start; text-align: left; }
    .content-bl, .content-br { grid-column: 1 / span 12; grid-row: 11 / span 2; justify-self: start; text-align: left; }
    .body { max-width: 100%; }
    .grid-fragment { display: none; }
    .line-horizontal, .line-diagonal { width: 180px; }
    .line-circle, .line-rightangle { width: 180px; height: 180px; }
    .dot-nav { right: 18px; gap: 16px; }
}
