/* ==========================================================================
   desca.works - Cottagecore Digital Hearth
   Translucent Frost Palette | Ma-Negative-Space Layout | Slab-Serif Typography
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
    --frost-white: #F7F4F0;
    --marble-vein: #2C2520;
    --pale-frost: #EBE8E4;
    --mineral-rose: #C4907A;
    --lichen-green: #8A9E8F;
    --frost-edge: #D3CFC9;
    --deep-stone: #1A1512;
    --vein-gold: #B8A47E;

    --font-heading: 'Zilla Slab', serif;
    --font-body: 'Zilla Slab', serif;
    --font-accent: 'Libre Franklin', sans-serif;

    --breathing-module: 120px;
    --content-max-width: 680px;
    --media-max-width: 920px;
    --inset: 48px;

    --elastic-ease: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --smooth-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    color: var(--marble-vein);
    background-color: var(--frost-white);
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(211, 207, 201, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(184, 164, 126, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(211, 207, 201, 0.12) 0%, transparent 40%),
        linear-gradient(135deg, rgba(235, 232, 228, 0.3) 0%, transparent 40%),
        linear-gradient(225deg, rgba(196, 144, 122, 0.05) 0%, transparent 30%);
    background-attachment: fixed;
    background-size: cover;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Marble texture base layer via pseudo-element */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            137deg,
            transparent,
            transparent 200px,
            rgba(211, 207, 201, 0.06) 200px,
            rgba(211, 207, 201, 0.06) 201px
        ),
        repeating-linear-gradient(
            47deg,
            transparent,
            transparent 300px,
            rgba(184, 164, 126, 0.04) 300px,
            rgba(184, 164, 126, 0.04) 301px
        ),
        repeating-linear-gradient(
            95deg,
            transparent,
            transparent 500px,
            rgba(196, 144, 122, 0.03) 500px,
            rgba(196, 144, 122, 0.03) 502px
        );
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
}

/* --- Navigation --- */
.site-nav {
    position: fixed;
    top: var(--inset);
    left: var(--inset);
    z-index: 100;
    display: flex;
    gap: 24px;
}

.nav-link {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--marble-vein);
    cursor: pointer;
    transition: letter-spacing 300ms var(--elastic-ease), color 300ms var(--smooth-ease);
    position: relative;
}

.nav-link:hover {
    letter-spacing: 0.18em;
    color: var(--deep-stone);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--mineral-rose);
}

/* --- Clearing (Full-Viewport Sections) --- */
.clearing {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--breathing-module) var(--inset);
    z-index: 1;
}

.clearing-content {
    max-width: var(--content-max-width);
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms var(--smooth-ease), transform 600ms var(--elastic-ease);
}

.clearing-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Content placement: left-third drift */
.clearing-content--left {
    margin-right: auto;
    margin-left: 0;
}

.clearing-content--center {
    margin-left: auto;
    margin-right: auto;
}

/* --- Typography --- */
h1, h2 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--deep-stone);
}

h1 {
    font-size: 72px;
    line-height: 1.1;
    margin-bottom: 24px;
}

h2 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 24px;
}

p {
    margin-bottom: 18px;
    color: var(--marble-vein);
}

p:last-child {
    margin-bottom: 0;
}

/* Site title styling */
.site-title {
    font-size: 72px;
    font-weight: 600;
    color: var(--deep-stone);
    margin-bottom: 24px;
}

.site-subtitle {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.04em;
    color: var(--marble-vein);
    opacity: 0.8;
}

/* --- Frost Panel --- */
.frost-panel {
    position: relative;
    background: rgba(235, 232, 228, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(211, 207, 201, 0.4);
    border-radius: 8px;
    padding: 48px;
}

.frost-panel:hover .frost-crystal {
    opacity: 0.5;
}

/* --- Frost Crystal Corner Decorations --- */
.frost-crystal {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0.3;
    transition: opacity 400ms var(--elastic-ease);
    pointer-events: none;
}

.frost-crystal--tl {
    top: 8px;
    left: 8px;
}

.frost-crystal--tr {
    top: 8px;
    right: 8px;
}

.frost-crystal--bl {
    bottom: 8px;
    left: 8px;
}

.frost-crystal--br {
    bottom: 8px;
    right: 8px;
}

/* --- Pull Quote --- */
.pull-quote {
    padding-left: 40px;
    border-left: 2px solid var(--mineral-rose);
}

.pull-quote p {
    font-family: var(--font-heading);
    font-weight: 700;
    font-style: italic;
    font-size: 36px;
    line-height: 1.4;
    color: var(--deep-stone);
}

/* --- Breathing Pauses --- */
.breathing-pause {
    height: 50vh;
    position: relative;
    z-index: 1;
}

.breathing-pause--short {
    height: 40vh;
}

/* --- Marble Accent Panels --- */
.clearing-marble {
    min-height: auto;
    padding: var(--breathing-module) var(--inset);
    display: flex;
    align-items: center;
    justify-content: center;
}

.marble-panel {
    max-width: var(--media-max-width);
    width: 100%;
    height: 400px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms var(--smooth-ease), transform 600ms var(--elastic-ease);
}

.marble-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.marble-panel--calacatta {
    background: linear-gradient(
        135deg,
        rgba(247, 244, 240, 0.9) 0%,
        rgba(235, 232, 228, 0.7) 30%,
        rgba(211, 207, 201, 0.5) 60%,
        rgba(247, 244, 240, 0.8) 100%
    );
    box-shadow: inset 0 0 60px rgba(211, 207, 201, 0.3);
}

.marble-panel--breccia {
    background: linear-gradient(
        145deg,
        rgba(247, 244, 240, 0.85) 0%,
        rgba(196, 144, 122, 0.15) 25%,
        rgba(235, 232, 228, 0.6) 50%,
        rgba(196, 144, 122, 0.1) 75%,
        rgba(247, 244, 240, 0.9) 100%
    );
    box-shadow: inset 0 0 60px rgba(196, 144, 122, 0.15);
}

.marble-panel--nero {
    background: linear-gradient(
        130deg,
        #1A1512 0%,
        #2C2520 30%,
        #1A1512 60%,
        #2C2520 100%
    );
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.3);
}

.marble-veins {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Marble Vein Divider --- */
.marble-vein-divider {
    width: 100%;
    height: 4px;
    position: relative;
    z-index: 1;
}

.marble-vein-divider svg {
    width: 100%;
    height: 4px;
    display: block;
}

/* --- Botanical SVGs --- */
.botanical {
    position: absolute;
    width: 120px;
    height: auto;
    z-index: 2;
    pointer-events: none;
}

.botanical--bare {
    right: calc(var(--inset) + 60px);
    bottom: 15%;
    transform: rotate(5deg);
    opacity: 0.7;
}

.botanical--buds {
    right: calc(var(--inset) + 40px);
    top: 20%;
    transform: rotate(-3deg);
    opacity: 0.7;
}

.botanical--flowers {
    right: calc(var(--inset) + 50px);
    top: 15%;
    width: 140px;
    transform: rotate(4deg);
    opacity: 0.7;
}

.botanical--foliage {
    right: calc(var(--inset) + 30px);
    top: 10%;
    width: 160px;
    transform: rotate(-5deg);
    opacity: 0.7;
}

.botanical-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s var(--elastic-ease);
}

.botanical.drawn .botanical-path {
    stroke-dashoffset: 0;
}

/* --- Closing Section --- */
.closing-title {
    font-size: 56px;
    margin-bottom: 24px;
    text-align: center;
}

.closing-text {
    text-align: center;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 36px;
}

.contact-line {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-align: center;
    color: var(--mineral-rose);
    transition: color 300ms var(--smooth-ease);
    cursor: pointer;
}

.contact-line:hover {
    color: var(--deep-stone);
}

/* --- Dark marble clearing --- */
.clearing-marble--dark {
    min-height: auto;
    padding: 60px var(--inset);
}

/* --- Footer --- */
.site-footer {
    padding: 60px var(--inset) 80px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-text {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--frost-edge);
}

/* ==========================================================================
   Interactive States
   ========================================================================== */

.frost-panel {
    transition: transform 300ms var(--elastic-ease), box-shadow 300ms var(--smooth-ease);
}

.frost-panel:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 32px rgba(26, 21, 18, 0.06);
}

.nav-link {
    transition: letter-spacing 300ms var(--elastic-ease), color 300ms var(--smooth-ease);
}

/* ==========================================================================
   Responsive - Mobile (below 768px)
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --breathing-module: 60px;
        --inset: 24px;
    }

    h1, .site-title {
        font-size: 42px;
    }

    h2 {
        font-size: 32px;
    }

    .pull-quote p {
        font-size: 24px;
    }

    .closing-title {
        font-size: 36px;
    }

    body {
        font-size: 16px;
    }

    .clearing {
        padding: var(--breathing-module) var(--inset);
    }

    .frost-panel {
        padding: 32px 24px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(235, 232, 228, 0.9);
    }

    .breathing-pause {
        height: 80px;
    }

    .breathing-pause--short {
        height: 60px;
    }

    .botanical {
        display: none;
    }

    .site-nav {
        top: 24px;
        left: 24px;
        gap: 16px;
    }

    .marble-panel {
        height: 240px;
    }

    .clearing-content--left {
        margin-left: 0;
        margin-right: 0;
    }
}

/* ==========================================================================
   Tablet adjustments (769px - 1024px)
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    h1, .site-title {
        font-size: 56px;
    }

    .botanical {
        opacity: 0.5;
    }

    .clearing-content--left {
        margin-left: 5%;
    }
}
