/* licence.broker - Botanical Apothecary Ledger */
:root {
    --bg-linen: #ede4d5;
    --surface-parchment: #d9ccb8;
    --text-ink: #3b3530;
    --accent-sage: #7a8c6e;
    --accent-ochre: #b89a5e;
    --accent-teal: #5e8a82;
    --shadow-dark: #2a2622;
    --bubble-glass: #c8ddd8;
    --font-condensed: "Barlow Condensed", sans-serif;
    --font-serif: "Libre Baskerville", serif;
    --font-mono: "IBM Plex Mono", monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-linen);
    color: var(--text-ink);
    font-family: var(--font-serif);
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

.header-band {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    background: rgba(237, 228, 213, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}

.header-domain {
    font-family: var(--font-condensed);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-ink);
}

.header-enquire {
    font-family: var(--font-condensed);
    font-weight: 300;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-sage);
    text-decoration: none;
    transition: color 0.4s ease;
}

.header-enquire:hover {
    color: var(--accent-ochre);
}

/* Opening Folio */
.opening-folio {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 56px;
    position: relative;
    overflow: hidden;
}

.opening-text {
    width: 40%;
    padding-left: clamp(1.5rem, 4vw, 3rem);
    z-index: 2;
}

.opening-title {
    font-family: var(--font-condensed);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.title-line {
    display: block;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.92;
    color: var(--text-ink);
}

.opening-statement {
    margin-top: clamp(1.5rem, 3vh, 2.5rem);
    font-family: var(--font-serif);
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.72;
    color: var(--text-ink);
    max-width: 30ch;
}

.opening-leaf {
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-leaf {
    width: 100%;
    max-width: 400px;
    height: auto;
    will-change: clip-path;
}

.hero-leaf .leaf-body {
    transition: clip-path 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-leaf.morph-1 .leaf-body { clip-path: url(#leafClip1); }
.hero-leaf.morph-2 .leaf-body { clip-path: url(#leafClip2); }
.hero-leaf.morph-3 .leaf-body { clip-path: url(#leafClip3); }
.hero-leaf.morph-4 .leaf-body { clip-path: url(#leafClip4); }

/* Vein Dividers */
.vein-divider {
    width: 100%;
    height: 40px;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.vein-divider svg {
    width: 100%;
    height: 100%;
}

/* Water Bubble Interstitials */
.bubble-interstitial {
    position: relative;
    width: 100%;
    height: 20vh;
    overflow: hidden;
    background-color: rgba(200, 221, 216, 0.08);
}

.bubble {
    position: absolute;
    width: var(--size);
    height: var(--size);
    left: var(--x);
    top: var(--y);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(200, 221, 216, 0.6), rgba(200, 221, 216, 0.15));
    box-shadow: inset 0 -4px 12px rgba(42, 38, 34, 0.08);
    animation: drift var(--dur) var(--delay) ease-in-out infinite;
    transform: translate(-50%, -50%);
}

@keyframes drift {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translate(-50%, -50%) translateY(-10px) scale(1.02);
        opacity: 0.65;
    }
    50% {
        transform: translate(-50%, -50%) translateY(8px) scale(0.97);
        opacity: 0.4;
    }
    75% {
        transform: translate(-50%, -50%) translateY(-15px) scale(1.04);
        opacity: 0.7;
    }
}

/* Folio Spreads */
.folio-spread {
    display: grid;
    grid-template-columns: minmax(200px, 35%) 1fr;
    min-height: 80vh;
    padding-block: clamp(4rem, 8vh, 8rem);
    padding-inline: clamp(1.5rem, 4vw, 3rem);
    position: relative;
}

.folio-margin {
    padding-right: clamp(1.5rem, 3vw, 3rem);
    background-color: var(--surface-parchment);
    padding-left: clamp(1.5rem, 4vw, 3rem);
    padding-top: clamp(2rem, 4vh, 4rem);
    padding-bottom: clamp(2rem, 4vh, 4rem);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-counter {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: clamp(0.7rem, 0.85vw, 0.82rem);
    color: var(--accent-sage);
    letter-spacing: 0.05em;
}

.section-label {
    font-family: var(--font-condensed);
    font-weight: 300;
    font-size: clamp(0.72rem, 0.9vw, 0.88rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-sage);
}

.margin-leaf {
    margin-top: 2rem;
}

.margin-leaf svg {
    width: 50px;
    height: 75px;
}

.folio-body {
    padding-left: clamp(2rem, 4vw, 4rem);
    padding-top: clamp(2rem, 4vh, 4rem);
    padding-bottom: clamp(2rem, 4vh, 4rem);
    max-width: 55ch;
}

.body-text {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: var(--text-ink);
    margin-bottom: 1.5em;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* Stamp Seals */
.stamp-seal {
    position: absolute;
    bottom: clamp(1.5rem, 3vh, 3rem);
    right: clamp(1.5rem, 3vw, 3rem);
    width: 80px;
    height: 80px;
}

.stamp-seal svg {
    width: 100%;
    height: 100%;
}

/* Closing Folio */
.closing-folio {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.closing-leaf {
    width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-leaf-closing {
    max-width: 280px;
    opacity: 0.6;
}

.closing-contact {
    width: 60%;
    padding-right: clamp(1.5rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-email {
    font-family: var(--font-condensed);
    font-weight: 600;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-ink);
}

.contact-location {
    font-family: var(--font-condensed);
    font-weight: 300;
    font-size: clamp(0.72rem, 0.9vw, 0.88rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-sage);
}

/* Responsive - Below 768px */
@media (max-width: 768px) {
    .opening-folio {
        flex-direction: column-reverse;
        padding-top: 72px;
        min-height: 100vh;
        justify-content: center;
    }

    .opening-text {
        width: 100%;
        padding: 0 clamp(1.5rem, 4vw, 3rem);
        text-align: left;
    }

    .opening-leaf {
        width: 80%;
        max-width: 300px;
        margin: 0 auto;
    }

    .folio-spread {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .folio-margin {
        padding-bottom: 1rem;
    }

    .folio-body {
        padding-left: clamp(1.5rem, 4vw, 3rem);
        max-width: none;
    }

    .bubble-interstitial {
        height: 12vh;
    }

    .bubble:nth-child(n+9) {
        display: none;
    }

    .closing-folio {
        flex-direction: column;
        justify-content: center;
        text-align: left;
    }

    .closing-leaf {
        width: 60%;
        max-width: 200px;
        margin: 0 auto 2rem;
    }

    .closing-contact {
        width: 100%;
        padding-left: clamp(1.5rem, 4vw, 3rem);
        padding-right: clamp(1.5rem, 4vw, 3rem);
    }

    .stamp-seal {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 2rem;
        margin-left: auto;
    }

    .margin-leaf {
        display: none;
    }
}

::selection {
    background-color: var(--accent-sage);
    color: var(--bg-linen);
}
