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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1A0F0A;
    color: #E8D5C4;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    line-height: 1.85;
    overflow-x: hidden;
}

/* === Typography === */
.wordmark {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #F5EDE3;
    position: relative;
    z-index: 2;
    cursor: default;
    text-align: center;
    line-height: 1.1;
}

.wordmark span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.section-heading {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #8B6914;
    margin-bottom: 2rem;
}

.caption-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.65rem, 1vw, 0.85rem);
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: #7A8B6F;
    display: block;
    margin-bottom: 0.5rem;
}

.caption-title {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #F5EDE3;
    margin-bottom: 0.75rem;
}

.caption-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.8;
    color: #E8D5C4;
}

/* === Section Base === */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* === The Crucible (Hero) === */
.section--hero {
    background-color: #1A0F0A;
    display: grid;
    place-items: center;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-backdrop .duotone-block--hero {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* === Duotone Photo Blocks === */
.duotone-block {
    position: relative;
    background: linear-gradient(135deg, #2C1810, #8B6914);
    overflow: hidden;
    filter: sepia(0.3) contrast(1.1) brightness(0.9);
    border-radius: 4px;
}

.duotone-block--warm {
    background: linear-gradient(135deg, #A0522D, #8B6914);
}

.duotone-block--light {
    background: linear-gradient(135deg, #8B6914, #E8D5C4);
}

.duotone-grain {
    position: absolute;
    inset: 0;
    filter: url(#grain);
    opacity: 0.4;
    background: linear-gradient(135deg, #2C1810 0%, #8B6914 100%);
}

.duotone-subject {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,105,20,0.4), transparent);
}

.duotone-block::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 80px rgba(26, 15, 10, 0.7);
    pointer-events: none;
}

/* Reveal animation for gallery blocks */
[data-reveal] {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.8s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: scale(1);
}

/* === Curve Dividers === */
.curve-divider {
    position: relative;
    height: 80px;
    background: transparent;
    z-index: 2;
}

.curve-divider svg {
    display: block;
    width: 100%;
    height: 100%;
}

.curve-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s ease-in-out;
}

.curve-path.revealed {
    stroke-dashoffset: 0;
}

/* === The Furnace === */
.section--furnace {
    background-color: #2C1810;
    flex-direction: column;
    padding: 6rem 10vw;
}

.kintsugi-cracks {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(37deg, transparent 48%, #8B6914 48.5%, #8B6914 49%, transparent 49.5%),
        linear-gradient(142deg, transparent 62%, #8B6914 62.3%, #8B6914 62.6%, transparent 63%),
        linear-gradient(88deg, transparent 35%, #8B6914 35.2%, #8B6914 35.5%, transparent 36%);
    opacity: 0.12;
    pointer-events: none;
}

.furnace-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.furnace-text .line {
    display: block;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    line-height: 1.8;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--i) * 60ms);
}

.furnace-text .line.visible {
    opacity: 1;
    transform: translateX(0);
}

/* === The Gallery === */
.section--gallery {
    background-color: #1A0F0A;
    flex-direction: column;
    padding: 6rem 5vw;
    gap: 6rem;
    min-height: auto;
}

.spiral-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vh;
    height: 80vh;
    opacity: 0.15;
    pointer-events: none;
    animation: spiralRotate 120s linear infinite;
}

.spiral-watermark svg {
    width: 100%;
    height: 100%;
}

@keyframes spiralRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.gallery-panel {
    display: flex;
    align-items: center;
    gap: 4vw;
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

.gallery-panel--left {
    flex-direction: row;
}

.gallery-panel--right {
    flex-direction: row-reverse;
}

.gallery-panel--right .gallery-caption {
    text-align: right;
}

.gallery-panel--center {
    justify-content: center;
}

.gallery-panel .duotone-block--gallery {
    width: 60%;
    aspect-ratio: 4/3;
    flex-shrink: 0;
}

.gallery-panel--center .duotone-block--gallery {
    width: 70%;
}

.gallery-caption {
    flex: 1;
}

.gallery-caption--overlay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    z-index: 2;
}

/* === The Signature === */
.section--signature {
    background-color: #F5EDE3;
    flex-direction: column;
    gap: 2rem;
}

.signature-wordmark {
    width: 80%;
    max-width: 1000px;
}

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

.signature-text {
    font-family: 'Poiret One', sans-serif;
    font-size: 90px;
    letter-spacing: 0.15em;
    fill: none;
    stroke: #2C1810;
    stroke-width: 1;
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    transition: stroke-dashoffset 3s ease-in-out;
}

.signature-text.revealed {
    stroke-dashoffset: 0;
}

.signature-tagline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: #2C1810;
    letter-spacing: 0.05em;
}

/* === Responsive === */
@media (max-width: 768px) {
    .curve-divider {
        height: 40px;
    }

    .section--furnace {
        padding: 4rem 6vw;
    }

    .gallery-panel,
    .gallery-panel--left,
    .gallery-panel--right {
        flex-direction: column;
    }

    .gallery-panel--right .gallery-caption {
        text-align: left;
    }

    .gallery-panel .duotone-block--gallery,
    .gallery-panel--center .duotone-block--gallery {
        width: 100%;
    }

    .gallery-caption--overlay {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }

    .section--gallery {
        padding: 4rem 4vw;
        gap: 4rem;
    }

    .signature-text {
        font-size: 50px;
    }
}
