/* ============================================
   recycle.reviews — Holographic Zen Review Site
   Palette: Analogous (Green-Teal-Blue arc)
   Fonts: Bebas Neue, Cormorant Garamond, IBM Plex Mono
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg-linen: #F7F0E8;
    --text-charcoal: #4A4A42;
    --heading-moss: #3D4A3A;
    --accent-sage: #8B9E7C;
    --accent-teal: #6B9B8A;
    --accent-deep: #4A7C7C;
    --prism-pink: #D4A5A5;
    --prism-lavender: #B8A5C8;
    --prism-gold: #C8B87A;
    --scroll-y: 0;
    --scroll-pct: 0;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    color: var(--text-charcoal);
    background-color: var(--bg-linen);
    line-height: 1.85;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* --- Paper Texture Overlay (body::before) --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    mix-blend-mode: multiply;
    filter: url(#paper-texture);
    background: var(--bg-linen);
}

/* --- SVG Filters (hidden) --- */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Holographic Shimmer --- */
.holographic-shimmer {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.02;
    background-image: conic-gradient(
        from 0deg,
        var(--prism-pink),
        var(--prism-lavender),
        var(--prism-gold),
        var(--prism-pink)
    );
    animation: shimmer 120s linear infinite;
}

@keyframes shimmer {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Enso Background Circles (Fixed) --- */
.enso {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    opacity: 0.12;
}

.enso-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.enso--small {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 8%;
}

.enso--medium {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
}

.enso--large {
    width: 340px;
    height: 340px;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.enso.is-drawn .enso-path {
    animation: drawEnso 2000ms ease-in-out forwards;
}

@keyframes drawEnso {
    to { stroke-dashoffset: 0; }
}

/* --- HUD Overlay Layer --- */
.hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

/* Corner Brackets */
.hud-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0;
}

.hud-corner svg {
    width: 100%;
    height: 100%;
    opacity: 0.2;
}

.hud-bracket-path {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
}

.hud-corner.is-drawn {
    opacity: 1;
}

.hud-corner.is-drawn .hud-bracket-path {
    animation: drawBracket 600ms ease-out forwards;
}

@keyframes drawBracket {
    to { stroke-dashoffset: 0; }
}

.hud-corner--tl { top: 12px; left: 12px; }
.hud-corner--tr { top: 12px; right: 12px; }
.hud-corner--bl { bottom: 12px; left: 12px; }
.hud-corner--br { bottom: 12px; right: 12px; }

/* Scroll Progress Bar */
.hud-scroll-bar {
    position: absolute;
    top: 12px;
    left: 60px;
    right: 60px;
    height: 1px;
    background: rgba(139, 158, 124, 0.1);
    opacity: 0;
    transition: opacity 400ms ease;
}

.hud-scroll-bar.is-visible {
    opacity: 1;
}

.hud-scroll-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-sage);
    opacity: 0.25;
    transition: width 100ms ease-out;
}

/* Cycle Label */
.hud-cycle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 10px;
    letter-spacing: 0.4em;
    color: var(--accent-sage);
    opacity: 0;
    transition: opacity 400ms ease;
    white-space: nowrap;
}

.hud-cycle.is-visible {
    opacity: 0.15;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 600ms ease, transform 600ms ease;
}

.hero-enso {
    position: absolute;
    width: 300px;
    height: 300px;
    z-index: 0;
}

.hero-enso-svg {
    width: 100%;
    height: 100%;
    opacity: 0.12;
}

.hero-enso-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.hero-enso.is-drawing .hero-enso-path {
    animation: drawEnso 2000ms ease-in-out forwards;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3.5rem, 9vw, 8rem);
    color: var(--heading-moss);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    line-height: 1.0;
    opacity: 0;
    transition: opacity 1200ms ease;
    z-index: 1;
    position: relative;
}

.hero-title.is-visible {
    opacity: 1;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-charcoal);
    opacity: 0;
    transition: opacity 800ms ease;
    margin-top: 0.5rem;
    z-index: 1;
    position: relative;
    letter-spacing: 0.08em;
}

.hero-subtitle.is-visible {
    opacity: 1;
}

/* --- Watercolor Prism Washes (behind content) --- */
.watercolor-divider {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    z-index: 2;
}

.watercolor-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.watercolor-blob--a {
    width: 60%;
    height: 300px;
    left: 10%;
    top: -50px;
    background: radial-gradient(ellipse, var(--prism-pink) 0%, transparent 70%);
    opacity: 0.06;
}

.watercolor-blob--b {
    width: 50%;
    height: 280px;
    right: 5%;
    top: -10px;
    background: radial-gradient(ellipse, var(--prism-gold) 0%, transparent 70%);
    opacity: 0.05;
}

.watercolor-blob--c {
    width: 55%;
    height: 320px;
    left: 20%;
    top: -40px;
    background: radial-gradient(ellipse, var(--prism-lavender) 0%, transparent 70%);
    opacity: 0.06;
}

.watercolor-blob--d {
    width: 45%;
    height: 260px;
    right: 15%;
    top: 0;
    background: radial-gradient(ellipse, var(--prism-pink) 0%, transparent 70%);
    opacity: 0.05;
}

.watercolor-blob--e {
    width: 50%;
    height: 290px;
    left: 5%;
    top: -30px;
    background: radial-gradient(ellipse, var(--prism-gold) 0%, transparent 70%);
    opacity: 0.06;
}

.watercolor-blob--f {
    width: 60%;
    height: 310px;
    right: 10%;
    top: -20px;
    background: radial-gradient(ellipse, var(--prism-lavender) 0%, transparent 70%);
    opacity: 0.05;
}

/* --- Prism wash ambient blobs (slow-shifting background) --- */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 600px 600px at 20% 30%, rgba(212,165,165,0.05) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 70% 60%, rgba(184,165,200,0.05) 0%, transparent 70%),
        radial-gradient(ellipse 550px 550px at 50% 80%, rgba(200,184,122,0.05) 0%, transparent 70%);
    animation: prismDrift 20s ease-in-out infinite alternate;
}

@keyframes prismDrift {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%;
    }
    100% {
        background-position: 10% 5%, 90% 95%, 55% 45%;
    }
}

/* --- Review Sections --- */
.review-section {
    position: relative;
    z-index: 10;
    margin-bottom: clamp(4rem, 10vh, 8rem);
}

/* --- Review Panel --- */
.review-panel {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(2rem, 4vw, 3.5rem);
    padding-left: clamp(2.5rem, 5vw, 4rem);
    background: rgba(247, 240, 232, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-left: 2px solid var(--accent-sage);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 800ms ease-out, transform 800ms ease-out, border-color 300ms ease;
}

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

/* Watercolor stain behind panel */
.review-panel::before {
    content: '';
    position: absolute;
    width: var(--stain-size, 380px);
    height: var(--stain-size, 380px);
    left: var(--stain-x, 50%);
    top: var(--stain-y, 50%);
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--stain-color, rgba(212,165,165,0.04)) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
    transition: opacity 300ms ease;
}

.review-panel:hover::before {
    opacity: 2;
}

/* Panel hover: border color shift */
.review-panel:hover {
    border-color: var(--accent-teal);
}

/* Crosshair marks */
.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 14px;
    color: var(--accent-sage);
    opacity: 0;
    transition: opacity 400ms ease;
    pointer-events: none;
    z-index: 5;
}

.crosshair.is-scrolling {
    opacity: 0.15;
}

/* Ink Splatter */
.ink-splatter {
    position: relative;
    height: 16px;
    margin-bottom: 8px;
}

.ink-dot {
    position: absolute;
    width: var(--dot-size, 4px);
    height: var(--dot-size, 4px);
    background: var(--text-charcoal);
    border-radius: 50%;
    opacity: 0.08;
    box-shadow: 1px 0 2px rgba(74, 74, 66, 0.05);
    top: calc(50% + var(--dot-y, 0px));
    left: var(--dot-x, 0px);
}

/* Review Category */
.review-category {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-sage);
    opacity: 0.7;
    margin-bottom: 0.75rem;
    transition: letter-spacing 200ms ease;
}

.review-category:hover {
    letter-spacing: 0.25em;
}

/* Review Title */
.review-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--heading-moss);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    line-height: 1.0;
    margin-bottom: 1.25rem;
}

/* Review Body */
.review-body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: var(--text-charcoal);
    margin-bottom: 2rem;
}

/* --- Enso Score --- */
.enso-score {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.enso-score svg {
    width: 56px;
    height: 56px;
    transition: transform 600ms ease-in-out;
}

.enso-score:hover svg {
    animation: ensoBreath 600ms ease-in-out infinite alternate;
}

@keyframes ensoBreath {
    from { transform: scale(1.0); }
    to { transform: scale(1.02); }
}

.enso-score-fill {
    transition: stroke-dashoffset 1200ms ease-in-out;
}

.enso-score.is-drawn .enso-score-fill {
    stroke-dashoffset: var(--score-offset, 0) !important;
}

/* --- Link Styles --- */
a {
    color: var(--accent-teal);
    text-decoration: none;
    position: relative;
    transition: color 300ms ease;
}

a:hover {
    color: var(--accent-deep);
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent-deep);
    transition: width 300ms ease-out;
}

a:hover::after {
    width: 100%;
}

/* --- Radial Navigation --- */
.radial-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
}

.radial-nav-trigger {
    width: 16px;
    height: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radial-nav-trigger svg {
    width: 16px;
    height: 16px;
}

.radial-nav-menu {
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 300ms ease;
}

.radial-nav.is-open .radial-nav-menu {
    pointer-events: auto;
    opacity: 1;
}

.radial-link {
    position: absolute;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(247, 240, 232, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(139, 158, 124, 0.3);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 300ms ease, background 200ms ease;
    font-size: 12px;
    color: var(--accent-sage);
}

.radial-nav.is-open .radial-link {
    transform: translate(
        calc(-50% + cos(var(--angle)) * 60px),
        calc(-50% + sin(var(--angle)) * -60px)
    ) scale(1);
}

.radial-link:hover {
    background: rgba(107, 155, 138, 0.15);
}

.radial-link::after {
    display: none;
}

.radial-glyph {
    font-size: 11px;
    line-height: 1;
}

/* --- Mobile Navigation --- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
}

.mobile-nav-trigger {
    width: 16px;
    height: 16px;
    cursor: pointer;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mobile-nav-trigger svg {
    width: 16px;
    height: 16px;
}

.mobile-nav-menu {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(247, 240, 232, 0.95);
    border: 1px solid rgba(139, 158, 124, 0.2);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease, transform 300ms ease;
    white-space: nowrap;
}

.mobile-nav.is-open .mobile-nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.mobile-nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-sage);
    text-decoration: none;
    transition: color 200ms ease;
}

.mobile-nav-link:hover {
    color: var(--accent-deep);
}

.mobile-nav-link::after {
    display: none;
}

/* --- Responsive: < 768px --- */
@media (max-width: 767px) {
    .hud-overlay {
        display: none;
    }

    .enso--small {
        display: none;
    }

    .review-panel {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--bg-linen);
        margin: 0 1rem;
    }

    .radial-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .hero-title {
        letter-spacing: 0.15em;
    }
}

/* --- Responsive: > 768px (hide mobile nav) --- */
@media (min-width: 768px) {
    .mobile-nav {
        display: none !important;
    }
}
