/* ============================================================
   cafesweets.xyz
   A small Scandinavian patisserie page.
   Hero-dominant, butter-and-linen warm, low-chroma.
   Palette tokens (from DESIGN.md):
     #f9f3e6 Linen White   - page background
     #f6ecd8 Honey Cream   - light-well band
     #efe0c0 Butter Wash   - radial highlight
     #7a6448 Cardamom      - tagline (italic)
     #3d2f1f Walnut Ink    - giant wordmark
     #4a3d2c Rye           - body copy
     #6a5a3a Oat Stamp     - maker's mark, fin
     #d4c4a8 Birch Edge    - hairlines, leaf outlines
     #7d8a5c Mossleaf      - leaf veins, chevron
     #8a5a5e Plum Wisp     - hidden warmth in radial (12% opacity)
   ============================================================ */

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Karla', system-ui, sans-serif;
    font-weight: 400;
    color: #4a3d2c;
    background-color: #f9f3e6;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
}

/* Background noise overlay (turbulence via SVG data URI) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: multiply;
    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.9' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0.24  0 0 0 0 0.18  0 0 0 0 0.12  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background-color: #f9f3e6;
    z-index: 2;
}

/* -------- Light Well (right third) -------- */
.light-well {
    position: absolute;
    top: 0;
    right: 0;
    width: 33.333%;
    height: 100vh;
    background:
        radial-gradient(
            ellipse 70% 60% at 70% 38%,
            #efe0c0 0%,
            #f6ecd8 38%,
            rgba(249, 243, 230, 0) 78%
        ),
        radial-gradient(
            ellipse 40% 30% at 65% 35%,
            rgba(138, 90, 94, 0.12) 0%,
            rgba(138, 90, 94, 0) 70%
        ),
        linear-gradient(
            90deg,
            rgba(246, 236, 216, 0) 0%,
            #f6ecd8 18%,
            #f6ecd8 100%
        );
    pointer-events: none;
}

/* Re-enable pointer events on leaves so cursor proximity reads still */
.light-well .leaf,
.light-well .leaf-drift,
.light-well .stamp {
    pointer-events: none;
}

/* -------- Three still-life leaves (oak, birch, elm) -------- */
.leaf {
    position: absolute;
    will-change: transform;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: 50% 50%;
}

.leaf-oak {
    top: 18vh;
    right: 6vw;
    transform: rotate(-8deg);
}

.leaf-birch {
    top: 36vh;
    right: 14vw;
    transform: rotate(6deg);
}

.leaf-elm {
    top: 54vh;
    right: 4vw;
    transform: rotate(14deg);
}

/* -------- Drifting leaf (ambient ribbon motion) -------- */
.leaf-drift {
    position: absolute;
    top: -10vh;
    right: 22vw;
    opacity: 0.55;
    animation: drift 22s linear infinite;
    will-change: transform;
}

@keyframes drift {
    0%   { transform: translate(0, -10vh) rotate(0deg); }
    50%  { transform: translate(18px, 50vh) rotate(180deg); }
    100% { transform: translate(-18px, 110vh) rotate(360deg); }
}

/* -------- Maker's-mark stamp -------- */
.stamp {
    position: absolute;
    bottom: 6vh;
    right: 4vw;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 400;
    font-size: 11px;
    color: #6a5a3a;
    letter-spacing: 0.22em;
    font-variant: all-small-caps;
    text-align: right;
    line-height: 1.6;
    max-width: 22vw;
}

/* ============================================================
   Wordmark anchor (bottom-left of hero)
   ============================================================ */
.wordmark-anchor {
    position: absolute;
    left: 6vw;
    bottom: 38vh;
    max-width: 64vw;
    z-index: 3;
}

.wordmark {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 500;
    font-size: clamp(4rem, 11vw, 9.5rem);
    letter-spacing: -0.04em;
    color: #3d2f1f;
    line-height: 0.9;
    cursor: default;
    transition:
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        letter-spacing 0.8s ease;
    transform-origin: 0% 100%;
    display: inline-block;
    user-select: none;
}

.wordmark:hover {
    transform: scale(1.025);
    letter-spacing: -0.03em;
}

/* Hairline below the wordmark, anchored same left */
.hairline {
    width: clamp(120px, 18vw, 240px);
    height: 1px;
    background-color: #d4c4a8;
    margin-top: 1.4rem;
}

/* Italic Cormorant tagline -- single dissonant note */
.tagline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.4vw, 1.35rem);
    color: #7a6448;
    margin-top: 1.4rem;
    letter-spacing: 0.005em;
}

/* ============================================================
   Breathing chevron (downward, scroll hint)
   ============================================================ */
.chevron {
    position: absolute;
    bottom: 4vh;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
    animation: breathe 3.6s ease-in-out infinite;
}

.chevron svg {
    display: block;
}

@keyframes breathe {
    0%, 100% { opacity: 0.45; transform: translate(-50%, 0); }
    50%      { opacity: 0.85; transform: translate(-50%, 4px); }
}

/* ============================================================
   EPILOGUE (60vh, narrow column, three short paragraphs)
   ============================================================ */
.epilogue {
    position: relative;
    width: 100%;
    background-color: #f9f3e6;
    padding: 12vh 5vw 0;
    z-index: 2;
}

.epilogue-inner {
    max-width: 520px;
    margin: 0 auto;
    text-align: left;
}

.epilogue-inner p {
    font-family: 'Karla', system-ui, sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.85;
    color: #4a3d2c;
    margin: 0;
}

.leaf-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.4rem 0;
    opacity: 0.85;
}

.leaf-divider svg {
    display: block;
}

/* Footer fin */
.footer-rule {
    width: 100%;
    height: 1px;
    background-color: #d4c4a8;
    margin: 8vh auto 0;
    max-width: 100%;
}

.fin {
    text-align: center;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 400;
    font-size: 11px;
    color: #6a5a3a;
    letter-spacing: 0.04em;
    padding: 1.5rem 0 3rem;
    text-transform: lowercase;
}

/* ============================================================
   Responsive adjustments
   ============================================================ */
@media (max-width: 900px) {
    .light-well {
        width: 42%;
    }
    .leaf-oak   { right: 4vw;  top: 14vh; }
    .leaf-birch { right: 18vw; top: 30vh; }
    .leaf-elm   { right: 6vw;  top: 46vh; }
    .stamp { font-size: 10px; max-width: 32vw; }
    .wordmark-anchor {
        left: 5vw;
        bottom: 36vh;
    }
}

@media (max-width: 640px) {
    .hero {
        min-height: 560px;
    }
    .light-well {
        width: 100%;
        height: 100vh;
        background:
            radial-gradient(
                ellipse 70% 50% at 78% 24%,
                #efe0c0 0%,
                #f6ecd8 32%,
                rgba(249, 243, 230, 0) 70%
            ),
            radial-gradient(
                ellipse 40% 30% at 78% 22%,
                rgba(138, 90, 94, 0.10) 0%,
                rgba(138, 90, 94, 0) 70%
            );
    }
    .leaf-oak   { right: 6vw;  top: 8vh;  }
    .leaf-birch { right: 28vw; top: 18vh; }
    .leaf-elm   { right: 8vw;  top: 30vh; }
    .leaf-drift { right: 50vw; }
    .stamp {
        bottom: 38vh;
        right: 5vw;
        max-width: 60vw;
    }
    .wordmark-anchor {
        left: 5vw;
        bottom: 14vh;
        max-width: 90vw;
    }
    .wordmark {
        font-size: clamp(3rem, 17vw, 6rem);
    }
    .tagline {
        font-size: 1.05rem;
    }
    .chevron {
        bottom: 3vh;
    }
    .epilogue {
        padding: 10vh 8vw 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .leaf-drift {
        animation: none;
        opacity: 0;
    }
    .chevron {
        animation: none;
    }
    .leaf,
    .wordmark {
        transition: none;
    }
}
