/* ===========================================================
   SengGack.net — Earth Kiln Series
   Palette:
     Pitch          #100D09
     Charcoal Earth #2A1F18
     Burnt Umber    #3D2B1A
     Burnt Earth    #6B3A1F
     Raw Sienna     #9B4A2A
     Sandstone      #C4A882
     Bone           #D4C4A8
     Slate Stone    #4A4A42
   Fonts: Bebas Neue, Space Grotesk, JetBrains Mono
   =========================================================== */

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Scroll Architecture ───────────────────────────────── */
html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100%;
    background: #100D09;
}

body {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #D4C4A8;
    background: #100D09;
    min-height: 100%;
    overflow-x: hidden;
}

/* ── Sections ──────────────────────────────────────────── */
.section {
    position: relative;
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.section-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 0 8vw;
}

/* ── Grain Overlays ────────────────────────────────────── */
.grain-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.grain-fine {
    filter: url(#grain-fine);
    opacity: 0.18;
}

.grain-medium {
    filter: url(#grain-medium);
    opacity: 0.20;
}

.grain-coarse {
    filter: url(#grain-coarse);
    opacity: 0.22;
}

.grain-ultra {
    filter: url(#grain-ultra);
    opacity: 0.25;
}

/* ── Background Numerals ───────────────────────────────── */
.bg-numeral {
    position: absolute;
    right: -0.08em;
    bottom: -0.12em;
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(200px, 30vw, 400px);
    color: #2A1F18;
    z-index: 0;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.02em;
}

/* ── Coord Tags / Labels ───────────────────────────────── */
.coord-tag {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: #9B4A2A;
    text-transform: uppercase;
}

.coord-data {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #9B4A2A;
    text-transform: uppercase;
}

.ruled-line {
    display: inline-block;
    height: 1px;
    background: rgba(155, 74, 42, 0.6);
    width: 80px;
    vertical-align: middle;
    margin-left: 12px;
}

/* ── Fade-Reveal Animation ─────────────────────────────── */
/* Stagger: 150ms delay per element, 800ms transition, 100ms base delay */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    /* transition-duration: 800ms */
}

[data-reveal].revealed {
    opacity: 1;
    transform: none;
}

/* ── Section 1: Index ──────────────────────────────────── */
.section-index {
    background: #100D09;
    align-items: flex-end;
    padding-bottom: 10vh;
}

.section-index .section-inner {
    position: relative;
    z-index: 2;
}

.index-title {
    display: block;
    line-height: 0.88;
    margin-bottom: 0.04em;
}

.domain-name {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(80px, 14vw, 180px);
    color: #D4C4A8;
    letter-spacing: 0.02em;
    display: inline-block;
}

.domain-tld {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(80px, 14vw, 180px);
    color: #9B4A2A;
    letter-spacing: 0.02em;
    display: inline-block;
}

.index-rule {
    width: 100%;
    height: 2px;
    background: #9B4A2A;
    margin: 0.6rem 0 1.2rem;
}

.index-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.meta-stamp,
.meta-version {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #9B4A2A;
    text-transform: uppercase;
}

.meta-sep {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: #4A4A42;
}

/* ── Section 2: Signal ─────────────────────────────────── */
.section-signal {
    background: #1C1510;
}

.signal-label {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.5rem;
}

.signal-heading {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(48px, 8vw, 96px);
    color: #D4C4A8;
    line-height: 0.9;
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    font-weight: 400;
}

.signal-body {
    font-size: 16px;
    line-height: 1.75;
    color: #A89880;
    max-width: 580px;
    margin-bottom: 1.4rem;
}

.signal-coords {
    display: flex;
    gap: 32px;
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(155, 74, 42, 0.3);
}

/* ── Section 3: Territory ──────────────────────────────── */
.section-territory {
    background: #2A1F18;
    align-items: center;
}

.topo-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
    padding-right: 5vw;
}

.ring {
    position: absolute;
    border: 1px solid rgba(196, 168, 130, 0.18);
    right: 5vw;
    top: 50%;
    transform: translate(30%, -50%);
}

.ring-1 {
    width: 680px;
    height: 480px;
    border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
    border-color: rgba(196, 168, 130, 0.10);
}

.ring-2 {
    width: 520px;
    height: 360px;
    border-radius: 45% 55% 65% 35% / 55% 45% 35% 65%;
    border-color: rgba(196, 168, 130, 0.14);
}

.ring-3 {
    width: 380px;
    height: 260px;
    border-radius: 70% 30% 40% 60% / 35% 65% 55% 45%;
    border-color: rgba(196, 168, 130, 0.18);
}

.ring-4 {
    width: 240px;
    height: 170px;
    border-radius: 55% 45% 60% 40% / 50% 50% 45% 55%;
    border-color: rgba(196, 168, 130, 0.24);
}

.ring-5 {
    width: 120px;
    height: 85px;
    border-radius: 50% 50% 55% 45% / 45% 55% 50% 50%;
    border-color: rgba(196, 168, 130, 0.30);
}

.territory-inner {
    position: relative;
    z-index: 2;
}

.territory-label {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.territory-heading {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(48px, 8vw, 96px);
    color: #D4C4A8;
    line-height: 0.9;
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    font-weight: 400;
}

.territory-body {
    font-size: 15px;
    line-height: 1.75;
    color: #A89880;
    max-width: 480px;
    margin-bottom: 2.5rem;
}

.territory-survey {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 480px;
}

.survey-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(155, 74, 42, 0.2);
}

.survey-key {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: #9B4A2A;
    min-width: 72px;
    text-transform: uppercase;
}

.survey-val {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    color: #C4A882;
    letter-spacing: 0.02em;
}

/* ── Section 4: Method ─────────────────────────────────── */
.section-method {
    background: #1C1510;
}

.method-inner {
    display: flex;
    align-items: flex-start;
    gap: 0;
    max-width: 1200px;
    padding: 0 8vw;
}

.method-left {
    flex: 0 0 55%;
    padding-right: 4vw;
}

.method-rule {
    flex: 0 0 1px;
    align-self: stretch;
    background: rgba(155, 74, 42, 0.5);
    margin: 0 4vw;
}

.method-right {
    flex: 1;
    padding-left: 2vw;
}

.method-label {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.method-heading {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(48px, 8vw, 96px);
    color: #D4C4A8;
    line-height: 0.9;
    letter-spacing: 0.02em;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.method-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.method-item {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(155, 74, 42, 0.15);
}

.method-num {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    color: #9B4A2A;
    letter-spacing: 0.1em;
    min-width: 28px;
}

.method-principle {
    font-family: "Bebas Neue", sans-serif;
    font-size: 28px;
    color: #D4C4A8;
    letter-spacing: 0.04em;
    font-weight: 400;
}

.method-desc {
    font-size: 14px;
    line-height: 1.8;
    color: #A89880;
    margin-bottom: 1.6rem;
}

.method-desc:last-child {
    margin-bottom: 0;
}

/* ── Section 5: Work ───────────────────────────────────── */
.section-work {
    background: #100D09;
    display: block;
    padding: 0;
}

.work-scroll-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.work-strip {
    display: flex;
    align-items: stretch;
    height: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.work-strip:active {
    cursor: grabbing;
}

.work-strip::-webkit-scrollbar {
    display: none;
}

.work-panel {
    flex: 0 0 80vw;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 8vw;
    border-right: 1px solid rgba(155, 74, 42, 0.25);
    white-space: normal;
    position: relative;
}

.work-panel:last-child {
    border-right: none;
}

.work-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(61, 43, 26, 0.15);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.work-panel:hover::before {
    opacity: 1;
}

.work-panel-inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.work-label {
    margin-bottom: 1.5rem;
}

.work-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(48px, 7vw, 72px);
    color: #D4C4A8;
    line-height: 0.9;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.work-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #A89880;
    margin-bottom: 2rem;
    max-width: 380px;
}

.work-meta {
    padding-top: 1rem;
    border-top: 1px solid rgba(155, 74, 42, 0.3);
}

.work-strip-indicator {
    position: absolute;
    bottom: 40px;
    left: 8vw;
    right: 8vw;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 20px;
}

.strip-track {
    flex: 1;
    height: 1px;
    background: rgba(196, 168, 130, 0.2);
    position: relative;
}

.strip-thumb {
    position: absolute;
    left: 0;
    top: -1px;
    height: 3px;
    width: 33.333%;
    background: #D4C4A8;
    transition: left 0.1s linear;
}

.strip-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    color: #4A4A42;
    text-transform: uppercase;
    white-space: nowrap;
}

.section-label-vertical {
    position: absolute;
    left: 2.5vw;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    z-index: 3;
    transform-origin: center center;
}

/* ── Section 6: Contact ────────────────────────────────── */
.section-contact {
    background: #100D09;
    align-items: flex-end;
    padding-bottom: 12vh;
}

.contact-inner {
    position: relative;
    z-index: 2;
}

.contact-label {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-heading {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(48px, 8vw, 96px);
    color: #D4C4A8;
    line-height: 0.9;
    letter-spacing: 0.02em;
    margin-bottom: 3rem;
    font-weight: 400;
}

.contact-data {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 560px;
    margin-bottom: 3rem;
}

.contact-line {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(155, 74, 42, 0.15);
}

.contact-key {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: #9B4A2A;
    min-width: 60px;
    text-transform: uppercase;
}

.contact-val {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    color: #C4A882;
    letter-spacing: 0.02em;
}

.contact-coords-display {
    font-family: "JetBrains Mono", monospace;
    font-size: 13px; /* coordinate/contact metadata at 13px per spec */
    letter-spacing: 0.08em;
    color: rgba(155, 74, 42, 0.7);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(155, 74, 42, 0.2); /* (1px vertical rule motif) */
    max-width: 560px;
}

.contact-timestamp {
    position: absolute;
    bottom: 40px;
    right: 8vw;
    z-index: 3;
}

/* ── Coordinate Grid (visible on hover of sections) ─────── */
.section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(74, 74, 66, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 74, 66, 0.07) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.section:hover::before {
    opacity: 1;
}

/* ── Background numeral color per section ──────────────── */
.section-signal .bg-numeral {
    color: #2A1F18;
}

.section-territory .bg-numeral {
    color: rgba(155, 74, 42, 0.12);
}

.section-method .bg-numeral {
    color: #2A1F18;
}

.section-work .bg-numeral {
    color: #2A1F18;
    z-index: 1;
}

.section-contact .bg-numeral {
    color: rgba(155, 74, 42, 0.10);
}

/* ── Topographic ring animation ────────────────────────── */
@keyframes ring-rotate {
    from { transform: translate(30%, -50%) rotate(0deg); }
    to   { transform: translate(30%, -50%) rotate(360deg); }
}

.ring-1 { animation: ring-rotate 90s linear infinite; }
.ring-2 { animation: ring-rotate 70s linear infinite reverse; }
.ring-3 { animation: ring-rotate 55s linear infinite; }
.ring-4 { animation: ring-rotate 40s linear infinite reverse; }
.ring-5 { animation: ring-rotate 28s linear infinite; }

/* ── Responsive adjustments ────────────────────────────── */
@media (max-width: 768px) {
    .method-inner {
        flex-direction: column;
    }

    .method-rule {
        width: 100%;
        height: 1px;
        align-self: auto;
        margin: 2rem 0;
    }

    .method-left {
        flex: none;
        padding-right: 0;
    }

    .ring-1 { width: 380px; height: 280px; }
    .ring-2 { width: 280px; height: 200px; }
    .ring-3 { width: 200px; height: 140px; }
    .ring-4 { width: 130px; height: 90px; }
    .ring-5 { width: 70px; height: 50px; }

    .bg-numeral {
        font-size: clamp(140px, 40vw, 220px);
    }

    .work-panel {
        flex: 0 0 92vw;
    }
}
