/* =========================================================================
   recycle.makeup
   The Atelier of Returned Pigments
   Magazine-spread editorial layout, kintsugi seams, mineral palette.
   ========================================================================= */

:root {
    --paper:        #FAF6F0; /* Ivory Cotton */
    --umber:        #3B2920; /* Raw Umber, primary text */
    --gold:         #C9A96E; /* Kintsugi repair lacquer */
    --rose:         #C47B7B; /* Crushed cochineal */
    --teal:         #5E8C82; /* Malachite dust */
    --clay:         #D4967A; /* Terracotta warm */
    --mauve:        #A88B9D; /* Pressed shadow */
    --ash:          #9E958B; /* Spent pigment, captions */

    --margin-page: clamp(28px, 6.5vw, 96px);
    --gutter:      clamp(28px, 4vw, 72px);

    --ease-overshoot: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out-soft:  cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--paper);
    color: var(--umber);
    font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body { position: relative; }

/* ------------------------------------------------------------------
   Grain texture overlay (paper / pressed-powder material)
   ------------------------------------------------------------------ */
.grain-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
    background-size: 240px 240px;
    mix-blend-mode: multiply;
    opacity: 0.05;
    z-index: 9;
}

/* ------------------------------------------------------------------
   Progress bar (echo of the gold seam)
   ------------------------------------------------------------------ */
.progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    width: 2px;
    height: 0%;
    background-color: var(--gold);
    z-index: 30;
    transition: height 80ms linear;
}

/* ------------------------------------------------------------------
   Kintsugi seam (full document height SVG)
   ------------------------------------------------------------------ */
.kintsugi-seam {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    overflow: visible;
}

.kintsugi-seam path {
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ------------------------------------------------------------------
   Atelier (page wrapper)
   ------------------------------------------------------------------ */
.atelier {
    display: block;
    position: relative;
    z-index: 2;
}

/* ------------------------------------------------------------------
   Spread (a magazine double-page)
   ------------------------------------------------------------------ */
.spread {
    position: relative;
    min-height: 100vh;
    padding: var(--margin-page);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(158, 149, 139, 0.18);
}

.spread:last-child { border-bottom: 0; }

.spread__inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    gap: var(--gutter);
    align-items: center;
}

/* Alternating column ratios per nth-child rhythm */
.spread:nth-child(odd) .spread__inner  { grid-template-columns: 55% 45%; }
.spread:nth-child(even) .spread__inner { grid-template-columns: 40% 60%; }

/* The visual is the larger column on odd spreads,
   text leads on even spreads — but we want the visual to alternate
   sides too. Order swaps create the page-turn effect.            */
.spread:nth-child(odd) .spread__visual { order: 1; }
.spread:nth-child(odd) .spread__text   { order: 2; padding-left: var(--gutter); }
.spread:nth-child(even) .spread__visual{ order: 2; }
.spread:nth-child(even) .spread__text  { order: 1; padding-right: var(--gutter); }

.spread__visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    min-height: 60vh;
    padding: 24px;
}

.spread__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    max-width: 540px;
}

/* ------------------------------------------------------------------
   Typography (display: Playfair, body: Lato, marginalia: Cormorant)
   ------------------------------------------------------------------ */
.spread__number {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ash);
}

.spread__eyebrow {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 15px;
    color: var(--gold);
    letter-spacing: 0.04em;
}

.spread__title {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-weight: 700;
    font-size: clamp(40px, 5.4vw, 78px);
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--umber);
    margin: 0;
}

.spread--cover .spread__title {
    font-size: clamp(54px, 7.6vw, 108px);
    line-height: 0.98;
}

.title__dot {
    color: var(--gold);
}

.spread__lede {
    font-size: 19px;
    line-height: 1.7;
    color: var(--umber);
    margin: 0;
}

.spread__body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--umber);
    margin: 0;
}

.spread__body em {
    font-style: italic;
    color: var(--teal);
}

.spread__byline {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-style: italic;
    font-weight: 300;
    color: var(--ash);
    font-size: 14px;
    letter-spacing: 0.04em;
    margin-top: 12px;
}

.spread__pullquote {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 22px;
    line-height: 1.45;
    color: var(--rose);
    margin: 14px 0 0;
    padding-left: 22px;
    border-left: 1px solid var(--gold);
}

.spread__colophon {
    margin-top: 28px;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 13px;
    color: var(--ash);
    letter-spacing: 0.05em;
}

.colophon__mark {
    font-style: normal;
    color: var(--gold);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-left: 8px;
}

.visual__caption {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 13px;
    color: var(--ash);
    text-align: center;
    letter-spacing: 0.05em;
    max-width: 320px;
}

/* ------------------------------------------------------------------
   COSMETIC FORMS (CSS-only abstractions)
   ------------------------------------------------------------------ */
.cosmetic-form {
    position: relative;
    transition: transform 500ms var(--ease-overshoot),
                box-shadow 500ms var(--ease-out-soft),
                filter 600ms var(--ease-out-soft);
    will-change: transform;
}

.cosmetic-form:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 60px rgba(59, 41, 32, 0.15);
}

/* Form 1: Pressed-powder compact (radial gradient) */
.cosmetic-form--compact {
    width: clamp(260px, 32vw, 440px);
    height: clamp(260px, 32vw, 440px);
    border-radius: 50%;
    background: radial-gradient(circle at 38% 35%, var(--clay) 0%, var(--rose) 55%, var(--mauve) 100%);
    box-shadow:
        0 0 0 1px rgba(59, 41, 32, 0.08),
        inset 0 0 60px rgba(59, 41, 32, 0.06);
}

.cosmetic-form--compact .compact__pan {
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    background: radial-gradient(circle at 42% 36%, rgba(250, 246, 240, 0.18) 0%, transparent 35%),
                radial-gradient(circle at 50% 50%, var(--rose) 0%, var(--clay) 70%, var(--mauve) 100%);
    box-shadow: inset 0 8px 24px rgba(59, 41, 32, 0.12);
}

.cosmetic-form--compact .compact__hinge {
    position: absolute;
    top: 50%;
    left: -2%;
    width: 10%;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
    transform: translateY(-50%);
    opacity: 0.7;
}

/* Form 2: Lipstick cross-section */
.cosmetic-form--lipstick {
    width: clamp(140px, 18vw, 240px);
    height: clamp(360px, 44vw, 540px);
}

.lipstick__bullet {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 56%;
    background: linear-gradient(168deg, var(--rose) 0%, var(--clay) 60%, var(--rose) 100%);
    border-top-left-radius: 50% 32%;
    border-top-right-radius: 50% 32%;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    /* slanted top — angled cut of a worn lipstick */
    clip-path: polygon(0 36%, 100% 8%, 100% 100%, 0 100%);
    box-shadow: inset -10px 0 28px rgba(59, 41, 32, 0.16),
                inset 10px 0 28px rgba(250, 246, 240, 0.18);
}

.lipstick__base {
    position: absolute;
    top: 56%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 44%;
    background: linear-gradient(180deg, #2a1d16 0%, var(--umber) 100%);
    border-radius: 4px;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.35),
                0 8px 24px rgba(59, 41, 32, 0.18);
}

.lipstick__base::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(201, 169, 110, 0.0) 0,
        rgba(201, 169, 110, 0.0) 18%,
        rgba(201, 169, 110, 0.18) 18%,
        rgba(201, 169, 110, 0.18) 19%
    );
    border-radius: 4px;
    pointer-events: none;
}

/* Form 3: Pigment library (rows of jars) */
.pigment-library {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    width: clamp(280px, 36vw, 480px);
}

.pigment-jar {
    position: relative;
    aspect-ratio: 1 / 1.15;
    border-radius: 4px 4px 50% 50% / 4px 4px 12% 12%;
    box-shadow: inset 0 -10px 22px rgba(59, 41, 32, 0.18),
                inset 0 6px 16px rgba(250, 246, 240, 0.22),
                0 8px 22px rgba(59, 41, 32, 0.10);
    overflow: hidden;
    transition: transform 500ms var(--ease-overshoot),
                box-shadow 500ms var(--ease-out-soft);
}

.pigment-jar::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 14%;
    background: linear-gradient(180deg, rgba(250, 246, 240, 0.6) 0%, rgba(250, 246, 240, 0.0) 100%);
    border-radius: 4px 4px 0 0;
}

.pigment-jar:hover {
    transform: scale(1.06);
    box-shadow: inset 0 -10px 22px rgba(59, 41, 32, 0.18),
                inset 0 6px 16px rgba(250, 246, 240, 0.22),
                0 18px 40px rgba(59, 41, 32, 0.18);
}

.pigment-jar--rose  { background: radial-gradient(circle at 50% 60%, var(--clay) 0%, var(--rose) 60%, #8e5252 100%); }
.pigment-jar--teal  { background: radial-gradient(circle at 50% 60%, #7da89e 0%, var(--teal) 60%, #3d6961 100%); }
.pigment-jar--umber { background: radial-gradient(circle at 50% 60%, #6b4d3e 0%, var(--umber) 60%, #1f140e 100%); }
.pigment-jar--gold  { background: radial-gradient(circle at 50% 60%, #e0c690 0%, var(--gold) 60%, #8a7444 100%); }
.pigment-jar--mauve { background: radial-gradient(circle at 50% 60%, #c0a9b6 0%, var(--mauve) 60%, #7b6479 100%); }
.pigment-jar--clay  { background: radial-gradient(circle at 50% 60%, #e3b39d 0%, var(--clay) 60%, #a26a51 100%); }

.pigment-jar__label {
    position: absolute;
    bottom: 8px;
    left: 0; right: 0;
    text-align: center;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--paper);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ------------------------------------------------------------------
   Ingredient list (table-like)
   ------------------------------------------------------------------ */
.ingredient-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.ingredient-list li {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dotted rgba(158, 149, 139, 0.4);
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: 15px;
    font-style: italic;
    font-weight: 300;
    color: var(--umber);
}

.ingredient__swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(59, 41, 32, 0.12),
                inset 0 -2px 4px rgba(59, 41, 32, 0.18);
}

.ingredient__swatch--rose  { background: var(--rose); }
.ingredient__swatch--teal  { background: var(--teal); }
.ingredient__swatch--clay  { background: var(--clay); }
.ingredient__swatch--mauve { background: var(--mauve); }
.ingredient__swatch--gold  { background: var(--gold); }
.ingredient__swatch--earth { background: var(--umber); }

.ingredient__name {
    color: var(--umber);
}

.ingredient__hex {
    font-family: "Lato", sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--ash);
}

/* ------------------------------------------------------------------
   Repaired pan SVG
   ------------------------------------------------------------------ */
.cosmetic-form--repaired {
    width: clamp(280px, 34vw, 460px);
    height: clamp(280px, 34vw, 460px);
}

.repaired__svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 14px 30px rgba(59, 41, 32, 0.16));
}

/* ------------------------------------------------------------------
   Process stack
   ------------------------------------------------------------------ */
.process-stack {
    width: clamp(280px, 34vw, 480px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 32px 28px;
    background-color: rgba(196, 123, 123, 0.06);
    border: 1px solid rgba(201, 169, 110, 0.35);
    border-radius: 2px;
    box-shadow: 0 14px 36px rgba(59, 41, 32, 0.08);
}

.process-step {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 4px;
    align-items: baseline;
    padding: 10px 0;
}

.process-step__num {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 24px;
    color: var(--gold);
    grid-row: 1 / span 2;
    align-self: center;
    text-align: right;
    letter-spacing: 0.05em;
}

.process-step__name {
    font-family: "Playfair Display", serif;
    font-weight: 400;
    font-size: 20px;
    color: var(--umber);
    letter-spacing: -0.01em;
}

.process-step__rule {
    grid-column: 2;
    height: 1px;
    background: linear-gradient(90deg, var(--gold) 0%, rgba(201, 169, 110, 0) 70%);
    width: 100%;
}

/* ------------------------------------------------------------------
   Vessel form (returned)
   ------------------------------------------------------------------ */
.cosmetic-form--vessel {
    width: clamp(260px, 32vw, 420px);
    height: clamp(320px, 40vw, 520px);
}

.vessel__shadow {
    position: absolute;
    bottom: 6%;
    left: 10%;
    right: 10%;
    height: 14px;
    background: radial-gradient(ellipse at center, rgba(59, 41, 32, 0.22) 0%, rgba(59, 41, 32, 0) 70%);
    filter: blur(2px);
}

.vessel__glass {
    position: absolute;
    bottom: 8%;
    left: 18%;
    right: 18%;
    top: 16%;
    background: linear-gradient(180deg, rgba(94, 140, 130, 0.18) 0%, rgba(94, 140, 130, 0.42) 60%, rgba(94, 140, 130, 0.28) 100%),
                linear-gradient(180deg, rgba(250, 246, 240, 0.45) 0%, rgba(250, 246, 240, 0.0) 30%);
    border-radius: 8px 8px 18px 18px;
    box-shadow: inset 8px 0 18px rgba(250, 246, 240, 0.45),
                inset -8px 0 18px rgba(59, 41, 32, 0.12),
                0 12px 28px rgba(59, 41, 32, 0.10);
}

.vessel__glass::after {
    content: "";
    position: absolute;
    left: 14%;
    top: 8%;
    width: 12%;
    height: 60%;
    background: linear-gradient(180deg, rgba(250, 246, 240, 0.7), rgba(250, 246, 240, 0));
    border-radius: 50%;
    filter: blur(2px);
}

.vessel__lid {
    position: absolute;
    top: 8%;
    left: 26%;
    right: 26%;
    height: 12%;
    background: linear-gradient(180deg, var(--umber) 0%, #1f140e 100%);
    border-radius: 4px 4px 2px 2px;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.3),
                0 4px 10px rgba(59, 41, 32, 0.18);
}

.vessel__lid::after {
    content: "";
    position: absolute;
    left: 16%;
    right: 16%;
    bottom: -3px;
    height: 1.5px;
    background: var(--gold);
    opacity: 0.7;
}

/* ------------------------------------------------------------------
   Return card
   ------------------------------------------------------------------ */
.return-card {
    margin-top: 16px;
    padding: 28px;
    background: rgba(212, 150, 122, 0.08);
    border: 1px solid rgba(201, 169, 110, 0.4);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.return-card__row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px dotted rgba(158, 149, 139, 0.35);
}

.return-card__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.return-card__label {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ash);
}

.return-card__value {
    font-family: "Playfair Display", serif;
    font-weight: 400;
    font-size: 17px;
    color: var(--umber);
    letter-spacing: -0.005em;
}

/* ------------------------------------------------------------------
   Reveal-on-scroll baseline
   ------------------------------------------------------------------ */
.spread {
    transition: opacity 800ms var(--ease-out-soft);
}

.spread__visual,
.spread__text > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 800ms var(--ease-out-soft), transform 800ms var(--ease-out-soft);
}

.spread.is-visible .spread__visual,
.spread.is-visible .spread__text > * {
    opacity: 1;
    transform: translateY(0);
}

.spread.is-visible .spread__text > *:nth-child(1) { transition-delay: 60ms; }
.spread.is-visible .spread__text > *:nth-child(2) { transition-delay: 140ms; }
.spread.is-visible .spread__text > *:nth-child(3) { transition-delay: 220ms; }
.spread.is-visible .spread__text > *:nth-child(4) { transition-delay: 300ms; }
.spread.is-visible .spread__text > *:nth-child(5) { transition-delay: 380ms; }
.spread.is-visible .spread__text > *:nth-child(6) { transition-delay: 460ms; }
.spread.is-visible .spread__visual              { transition-delay: 200ms; }

/* ------------------------------------------------------------------
   Mobile (single-column stack)
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
    body { font-size: 16px; }

    .spread {
        min-height: auto;
        padding: 64px 24px;
    }

    .spread:nth-child(odd) .spread__inner,
    .spread:nth-child(even) .spread__inner {
        grid-template-columns: 1fr;
    }

    .spread:nth-child(odd) .spread__visual,
    .spread:nth-child(even) .spread__visual { order: 1; padding: 8px 0 0; }

    .spread:nth-child(odd) .spread__text,
    .spread:nth-child(even) .spread__text   { order: 2; padding: 0; }

    .spread__visual { min-height: 50vw; }

    .spread--cover .spread__title { font-size: 56px; }
    .spread__title { font-size: 38px; }

    .pigment-library {
        width: 100%;
        max-width: 360px;
    }

    .return-card__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
