/* ===== Root & Ma Spacing Variables ===== */
:root {
    /* Color Palette */
    --color-background: #FAF4ED;
    --color-background-accent: #F2E8DB;
    --color-surface: #EDE2D4;
    --color-accent-terracotta: #C17A50;
    --color-accent-clay: #D4956A;
    --color-accent-stone: #8A7B6B;
    --color-text-primary: #3A352E;
    --color-text-secondary: #7A7268;
    --color-marble-vein: #C4B5A2;
    --color-light-warm: #F5E6D0;

    /* Typography */
    --font-display: 'Nunito', sans-serif;
    --font-body: 'Noto Serif', serif;

    /* Ma Spacing - Japanese Negative Space */
    --ma-small: clamp(80px, 12vh, 150px);
    --ma-medium: clamp(150px, 18vh, 250px);
    --ma-large: clamp(200px, 25vh, 350px);

    /* Breathing Space for Sections */
    --breathing-small: clamp(100px, 15vh, 180px);
    --breathing-medium: clamp(150px, 20vh, 250px);
    --breathing-large: clamp(200px, 28vh, 300px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    background-color: var(--color-background);
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.9;
    overflow-x: hidden;
    position: relative;
}

/* ===== Scroll Progress Indicator ===== */
.scroll-indicator {
    position: fixed;
    top: clamp(12px, 2vw, 20px);
    right: clamp(12px, 2vw, 20px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color-accent-terracotta) calc(var(--scroll-progress, 0) * 360deg),
        transparent 0
    );
    z-index: 999;
}

/* ===== Container ===== */
.container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Section Base Styles ===== */
section {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    background-color: var(--color-light-warm);
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    padding: clamp(60px, 12vw, 200px);
    padding-left: clamp(40px, 8vw, 80px);
    padding-bottom: clamp(80px, 15vh, 200px);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-text-primary);
    margin: 0;
}

.hero-line {
    width: 80px;
    height: 2px;
    background-color: var(--color-accent-terracotta);
    flex-shrink: 0;
}

/* ===== Breathing Space Sections ===== */
.breathing-space {
    min-height: var(--breathing-medium);
    background-color: var(--color-background);
}

.breathing-1 {
    min-height: var(--breathing-large);
    background-color: var(--color-background);
}

.breathing-2 {
    min-height: var(--breathing-medium);
    background-color: var(--color-background-accent);
}

.breathing-3 {
    min-height: var(--breathing-medium);
    background-color: var(--color-background);
}

.breathing-4 {
    min-height: var(--breathing-large);
    background-color: var(--color-surface);
}

.breathing-5 {
    min-height: var(--breathing-medium);
    background-color: var(--color-background);
}

.breathing-6 {
    min-height: var(--breathing-large);
    background-color: var(--color-background-accent);
}

.breathing-7 {
    min-height: var(--breathing-medium);
    background-color: var(--color-surface);
}

.breathing-8 {
    min-height: var(--breathing-large);
    background-color: var(--color-background);
}

.breathing-9 {
    min-height: var(--breathing-medium);
    background-color: var(--color-background-accent);
}

.breathing-10 {
    min-height: var(--breathing-large);
    background-color: var(--color-background);
}

/* ===== Text Block Sections ===== */
.text-block {
    min-height: auto;
    padding: clamp(40px, 8vh, 120px) clamp(20px, 5vw, 60px);
    background-color: var(--color-background);
}

.text-block-1 {
    background-color: var(--color-background-accent);
    padding-top: clamp(60px, 10vh, 150px);
    padding-bottom: clamp(60px, 10vh, 150px);
}

.text-block-2 {
    background-color: var(--color-surface);
    padding-top: clamp(60px, 10vh, 150px);
    padding-bottom: clamp(60px, 10vh, 150px);
}

.text-block-3 {
    background-color: var(--color-background);
    padding-top: clamp(60px, 10vh, 150px);
    padding-bottom: clamp(60px, 10vh, 150px);
}

.text-block-4 {
    background-color: var(--color-background-accent);
    padding-top: clamp(60px, 10vh, 150px);
    padding-bottom: clamp(60px, 10vh, 150px);
}

.text-block-5 {
    background-color: var(--color-background);
    padding-top: clamp(60px, 10vh, 150px);
    padding-bottom: clamp(60px, 10vh, 150px);
}

/* ===== Typography ===== */
h2 {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-text-primary);
    text-align: center;
    margin: 0 0 1.5rem 0;
}

p {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-align: center;
    max-width: 560px;
    line-height: 1.9;
    margin: 0;
}

em {
    font-style: italic;
    color: var(--color-accent-terracotta);
    font-weight: 400;
}

/* ===== Visual Element Sections ===== */
.visual-element {
    min-height: auto;
    padding: clamp(40px, 8vh, 120px) clamp(20px, 5vw, 60px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-marble-1 {
    background-color: var(--color-background);
}

.visual-photo-1 {
    background-color: var(--color-background-accent);
}

.visual-line-1 {
    background-color: var(--color-surface);
}

.visual-marble-2 {
    background-color: var(--color-background);
}

/* ===== Marble Specimen ===== */
.marble-specimen {
    width: 240px;
    height: 240px;
    border-radius: 8px;
    background:
        repeating-linear-gradient(
            60deg,
            transparent 0px,
            rgba(196, 181, 162, 0.06) 1px,
            transparent 2px,
            transparent 20px
        ),
        radial-gradient(
            ellipse at 40% 50%,
            rgba(196, 181, 162, 0.08),
            transparent 40%
        );
    background-color: var(--color-marble-vein);
    box-shadow: inset 0 0 40px rgba(196, 181, 162, 0.1);
    position: relative;
}

/* ===== Photo Container with Lens Flare ===== */
.photo-container {
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1.6 / 1;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: block;
}

/* Lens Flare Light Pool - Drifting Animation */
.lens-flare::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at 30% 40%,
        rgba(250, 240, 220, 0.25),
        transparent 50%
    );
    pointer-events: none;
    z-index: 10;
    animation: light-drift 15s ease-in-out infinite;
}

.lens-flare::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(
        from 30deg at 35% 45%,
        transparent 0deg,
        rgba(255, 230, 190, 0.08) 15deg,
        transparent 30deg
    );
    pointer-events: none;
    z-index: 5;
}

@keyframes light-drift {
    0%, 100% {
        background-position: 30% 40%;
    }
    50% {
        background-position: 50% 35%;
    }
}

/* ===== Decorative Line ===== */
.decorative-line {
    width: clamp(120px, 20%, 200px);
    height: 1px;
    background-color: var(--color-accent-terracotta);
    opacity: 0.6;
}

/* ===== Reveal Animations ===== */
/* Text blocks reveal left-to-right */
.reveal-text {
    clip-path: inset(0 100% 0 0);
}

.reveal-text.revealed {
    clip-path: inset(0);
    animation: reveal-ltr 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes reveal-ltr {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0);
    }
}

/* Visual elements reveal right-to-left */
.reveal-visual {
    clip-path: inset(0 0 0 100%);
}

.reveal-visual.revealed {
    clip-path: inset(0);
    animation: reveal-rtl 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes reveal-rtl {
    from {
        clip-path: inset(0 0 0 100%);
    }
    to {
        clip-path: inset(0);
    }
}

/* Horizontal lines reveal center-outward */
.reveal-line {
    clip-path: inset(0 50%);
}

.reveal-line.revealed {
    clip-path: inset(0);
    animation: reveal-center 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes reveal-center {
    from {
        clip-path: inset(0 50%);
    }
    to {
        clip-path: inset(0);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero {
        padding-left: clamp(30px, 6vw, 60px);
        padding-bottom: clamp(60px, 12vh, 140px);
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-line {
        width: 60px;
    }

    .marble-specimen {
        width: 180px;
        height: 180px;
    }

    h2 {
        font-size: clamp(1rem, 1.8vw, 1.4rem);
    }

    p {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .text-block,
    .visual-element,
    .breathing-space {
        padding-left: clamp(15px, 4vw, 40px);
        padding-right: clamp(15px, 4vw, 40px);
    }
}

@media (max-width: 480px) {
    .hero {
        padding-left: clamp(20px, 4vw, 40px);
        padding-bottom: clamp(50px, 10vh, 100px);
    }

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

    .hero-line {
        width: 50px;
        height: 1.5px;
    }

    .marble-specimen {
        width: 140px;
        height: 140px;
    }

    h2 {
        font-size: clamp(0.95rem, 1.5vw, 1.2rem);
        margin-bottom: 1rem;
    }

    p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .text-block,
    .visual-element,
    .breathing-space {
        padding-left: 12px;
        padding-right: 12px;
        padding-top: clamp(30px, 6vh, 80px);
        padding-bottom: clamp(30px, 6vh, 80px);
    }

    .breathing-space {
        min-height: clamp(60px, 10vh, 140px);
    }
}
