/* ============================================
   continu.st — styles.css
   Colors: #f5efe6, #2a0811, #4a0e1b, #8c2f4a, #d9cfc2, #b8927a, #3d2b2b, #d4a87c
   Fonts: Josefin Sans 300, Cormorant Garamond 400i/500, Space Grotesk 500
   ============================================ */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    background: #2a0811;
    color: #f5efe6;
    overflow-x: hidden;
}

/* ---- Scroll Progress ---- */
.scroll-progress {
    position: fixed;
    right: 1.5rem;
    top: 0;
    width: 2px;
    height: 100vh;
    background: rgba(140, 47, 74, 0.15);
    z-index: 100;
}

.scroll-progress__fill {
    width: 100%;
    background: #8c2f4a;
    height: 0%;
    transition: height 0.1s linear;
}

/* ---- Sections ---- */
.section {
    position: relative;
    min-height: 100vh;
    padding: clamp(4rem, 8vw, 8rem) clamp(2rem, 5vw, 6rem);
    clip-path: polygon(0 0, 100% 4vw, 100% calc(100% + 4vw), 0 100%);
    margin-top: -4vw;
}

.section--first {
    margin-top: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% + 4vw), 0 100%);
}

.section--last {
    clip-path: polygon(0 0, 100% 4vw, 100% 100%, 0 100%);
}

.section--dark {
    background: #4a0e1b;
    color: #f5efe6;
}

.section--light {
    background: #f5efe6;
    color: #3d2b2b;
}

.section-inner {
    max-width: 1200px;
    margin: 0;
    padding-left: 2vw;
}

.section-inner--centered {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 80vh;
    padding-left: 15vw;
}

/* ---- Grid ---- */
.section-grid {
    display: grid;
    grid-template-columns: 38% 62%;
    gap: 3vw;
    align-items: start;
    min-height: 60vh;
}

@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .section-label {
        writing-mode: horizontal-tb !important;
        transform: none !important;
        border-left: 2px solid #8c2f4a;
        padding-left: 1rem;
    }
    .label-line {
        display: none !important;
    }
}

/* ---- Section Labels ---- */
.section-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    align-self: start;
    padding-top: 4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.label-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #b8927a;
}

.section-label--dark .label-text {
    color: #8c2f4a;
}

.label-line {
    display: block;
    width: 1px;
    height: 40px;
    background: currentColor;
    opacity: 0.5;
}

/* ---- Typography ---- */
.hero-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(2.2rem, 6vw, 5.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f5efe6;
    line-height: 1.1;
    margin-bottom: 3rem;
}

.hero-title__line {
    display: block;
}

.section-heading {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f5efe6;
    margin-bottom: 2rem;
}

.section-heading--dark {
    color: #4a0e1b;
}

.body-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.85;
    color: #3d2b2b;
    max-width: 540px;
}

.body-text--light {
    color: #d9cfc2;
}

.body-italic {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    line-height: 1.85;
    color: #3d2b2b;
    max-width: 540px;
    margin-bottom: 1.5rem;
}

.rule {
    border: none;
    height: 1px;
    background: rgba(140, 47, 74, 0.3);
    width: 62%;
    margin: 2rem 0;
}

/* ---- 3D Wave Grid ---- */
.wave-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
    perspective: 800px;
    transform: rotateX(55deg) rotateZ(-30deg);
    width: clamp(240px, 50vw, 500px);
    margin-top: 2rem;
    transform-style: preserve-3d;
}

.wave-cell {
    aspect-ratio: 1;
    background: var(--cell-color, #4a0e1b);
    transform: translateZ(var(--cell-height, 0px));
    will-change: transform;
    transition: background 0.3s ease;
}

/* ---- Timeline ---- */
.timeline-container {
    margin: 3rem 0;
    max-width: 600px;
}

.timeline-svg {
    width: 100%;
    height: auto;
}

.timeline-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    text-anchor: middle;
    letter-spacing: 0.1em;
}

/* ---- Wave Types ---- */
.wave-types {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.wave-type {
    flex: 1;
    min-width: 180px;
}

.wave-type__label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #8c2f4a;
    display: block;
    margin-bottom: 0.5rem;
}

.wave-type__svg {
    width: 100%;
    height: 60px;
}

/* ---- Closing ---- */
.closing-content {
    text-align: left;
}

.closing-kanji {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.12em;
    color: #f5efe6;
    margin-bottom: 0.5rem;
}

.closing-romaji {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #b8927a;
    display: block;
    margin-bottom: 2rem;
}

.closing-line {
    width: 1px;
    height: 30vh;
    background: #b8927a;
}

/* ---- Wave Dividers ---- */
.wave-divider {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 2;
    opacity: 0.15;
}

/* ---- Hover-Lift Interaction ---- */
.hoverable {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease,
                border-left-color 0.4s ease;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    cursor: default;
}

.hoverable:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(42, 8, 17, 0.2);
    border-left-color: #d4a87c;
}

/* ---- Hanko Dots ---- */
.hanko-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 101;
}

.hanko-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #b8927a;
    display: block;
}

/* ---- Background Wave Motifs ---- */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.05;
    z-index: 0;
}

.section > * {
    position: relative;
    z-index: 1;
}

/* ---- Philosophy Section ---- */
.philosophy-text {
    max-width: 540px;
}

.philosophy-text em {
    font-style: italic;
}
