/* namu.club - Holographic Botanical Archive */
/* Terracotta-warm palette with holographic accents */

/* ============================================
   CSS Custom Properties & Holographic Animation
   ============================================ */

@property --holo-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

:root {
    --kiln-clay: #c86b4a;
    --sun-sandstone: #f0d9c4;
    --heartwood: #5c3a28;
    --nacre-spectrum: #e8a87c;
    --opal-vein: #f7ece2;
    --cambium-green: #8a9e7a;
    --spectral-violet: #9b7fb8;
    --ash-ring: #b8a99a;
    --opal-copper: #d4956b;
    --prismatic-cream: #f0c9a8;
    --holo-angle: 0deg;
}

/* ============================================
   Reset & Base
   ============================================ */

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

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

body {
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    color: var(--heartwood);
    background: var(--sun-sandstone);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Holographic Keyframes
   ============================================ */

@keyframes holo-rotate {
    to {
        --holo-angle: 360deg;
    }
}

@keyframes bokeh-drift-1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes bokeh-drift-2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-25px, 15px) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes bokeh-drift-3 {
    0% { transform: translate(0, 0) scale(1.05); }
    50% { transform: translate(20px, 25px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1.05); }
}

@keyframes bokeh-drift-4 {
    0% { transform: translate(0, 0) scale(0.95); }
    50% { transform: translate(-35px, -10px) scale(1.1); }
    100% { transform: translate(0, 0) scale(0.95); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up-fade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   Section Base
   ============================================ */

.section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.section--canopy {
    background: var(--sun-sandstone);
}

.section--heartwood {
    background: var(--opal-vein);
}

.section--ring-record {
    background: var(--sun-sandstone);
}

.section--root-system {
    background: var(--sun-sandstone);
}

.section__content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
}

/* ============================================
   Holographic Seam Dividers
   ============================================ */

.seam {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: conic-gradient(from var(--holo-angle), #c86b4a, #e8a87c, #d4956b, #f0c9a8, #9b7fb8, #8a9e7a, #c86b4a);
    animation: holo-rotate 6s linear infinite;
    z-index: 10;
}

/* ============================================
   Bokeh Fields
   ============================================ */

.bokeh-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* ============================================
   Section I: Canopy
   ============================================ */

.canopy__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 15vh;
}

.canopy__title {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--heartwood);
    letter-spacing: -0.01em;
    line-height: 1.15;
    text-shadow:
        0 0 60px rgba(200, 107, 74, 0.12),
        0 2px 4px rgba(92, 58, 40, 0.08);
    opacity: 0;
    animation: fade-in 1.2s ease-out 0.5s forwards;
}

.canopy__subtitle {
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--ash-ring);
    margin-top: 5vh;
    max-width: 50ch;
    text-align: center;
    line-height: 1.6;
    opacity: 0;
    animation: fade-in 1.2s ease-out 1.3s forwards;
}

/* ============================================
   Dendrograms
   ============================================ */

.dendrogram {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.dendrogram--canopy {
    bottom: 5%;
    right: 10%;
    width: 180px;
    height: 360px;
    opacity: 0;
    animation: fade-in 2s ease-out 2s forwards;
}

.dendrogram--canopy[data-visible] {
    opacity: 0.1;
}

.dendrogram--roots {
    top: 15%;
    left: 8%;
    width: 160px;
    height: 320px;
    opacity: 0.08;
}

/* ============================================
   Section II: Heartwood
   ============================================ */

.heartwood__content {
    display: grid;
    place-items: center;
    height: 100%;
}

.heartwood__prose {
    max-width: 42ch;
    padding: 3rem 4rem;
    border-left: 1px solid rgba(200, 107, 74, 0.15);
    border-right: 1px solid rgba(200, 107, 74, 0.15);
    position: relative;
}

.heartwood__prose::before,
.heartwood__prose::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2rem;
    border-left: 1px solid rgba(200, 107, 74, 0.15);
    border-right: 1px solid rgba(200, 107, 74, 0.15);
}

.heartwood__prose::before {
    bottom: 100%;
}

.heartwood__prose::after {
    top: 100%;
}

.heartwood__prose p {
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--heartwood);
}

.heartwood__content.reveal {
    opacity: 0;
    transform: translateY(30px);
}

.heartwood__content.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Growth Rings */

.growth-rings {
    position: absolute;
    width: 200px;
    height: 200px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.08;
}

.growth-rings--top-left {
    top: 10%;
    left: 8%;
}

.growth-rings--bottom-right {
    bottom: 12%;
    right: 6%;
}

/* ============================================
   Section III: Ring Record
   ============================================ */

.ring-record__content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.specimen-cards {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    padding: 0 2rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.specimen-card {
    position: relative;
    min-width: 180px;
    max-width: 240px;
    flex: 1;
    border-radius: 16px;
    overflow: visible;
}

.specimen-card__holo-border {
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: conic-gradient(from var(--holo-angle), #c86b4a, #e8a87c, #d4956b, #f0c9a8, #9b7fb8, #8a9e7a, #c86b4a);
    animation: holo-rotate 6s linear infinite;
    z-index: 0;
}

.specimen-card__inner {
    position: relative;
    z-index: 1;
    background: var(--opal-vein);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.specimen-card__label {
    font-family: "Varela Round", sans-serif;
    font-weight: 400;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--kiln-clay);
}

.specimen-card__motif {
    width: 60px;
    height: 60px;
    opacity: 0.6;
}

.specimen-card__text {
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    line-height: 1.6;
    color: var(--heartwood);
}

.specimen-card:hover .specimen-card__holo-border {
    animation-duration: 3s;
}

.specimen-card:hover .specimen-card__inner {
    box-shadow: 0 8px 32px rgba(200, 107, 74, 0.12);
    transition: box-shadow 0.3s ease;
}

.ring-record__content.reveal .specimen-card {
    opacity: 0;
}

.ring-record__content.reveal.is-visible .specimen-card {
    animation: card-enter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.ring-record__content.reveal.is-visible .specimen-card:nth-child(1) {
    animation-delay: 0s;
}

.ring-record__content.reveal.is-visible .specimen-card:nth-child(2) {
    animation-delay: 0.15s;
}

.ring-record__content.reveal.is-visible .specimen-card:nth-child(3) {
    animation-delay: 0.3s;
}

.ring-record__content.reveal.is-visible .specimen-card:nth-child(4) {
    animation-delay: 0.45s;
}

/* ============================================
   Section IV: Root System
   ============================================ */

.root-system__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-top: 20vh;
}

.root-system__title {
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--heartwood);
    letter-spacing: -0.01em;
    line-height: 1.15;
    text-shadow:
        0 0 40px rgba(200, 107, 74, 0.15);
    margin-bottom: 3rem;
}

.root-system__line {
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.8vw, 1.15rem);
    line-height: 2;
    text-align: center;
    color: var(--heartwood);
}

.root-system__line--1 {
    opacity: 1;
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
}

.root-system__line--2 {
    opacity: 0.65;
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
}

.root-system__line--3 {
    opacity: 0.35;
    font-size: clamp(0.85rem, 1.4vw, 1rem);
}

.root-system__line--4 {
    opacity: 0.15;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
}

.root-system__content.reveal {
    opacity: 0;
    transform: translateY(30px);
}

.root-system__content.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .specimen-cards {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        overflow-y: auto;
        max-height: 85vh;
        padding: 2rem;
    }

    .specimen-card {
        min-width: 240px;
        max-width: 300px;
        width: 100%;
    }

    .heartwood__prose {
        padding: 2rem;
        max-width: 90vw;
    }

    .dendrogram--canopy {
        width: 120px;
        height: 240px;
        right: 5%;
    }

    .dendrogram--roots {
        width: 100px;
        height: 200px;
        left: 5%;
    }

    .growth-rings {
        width: 140px;
        height: 140px;
    }

    .root-system__content {
        padding-top: 15vh;
    }
}

@media (max-width: 480px) {
    .canopy__content {
        padding-top: 12vh;
    }

    .specimen-cards {
        padding: 1.5rem;
    }

    .specimen-card {
        min-width: 200px;
    }
}