/* =================================================================
   LAYER-2.QUEST: BOTANICAL BLOCKCHAIN DESIGN
   Humanist serif typography on analogous green-to-teal palette
   Diagonal sections with SVG botanical motifs
================================================================= */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-dark: #0D1F17;
    --primary-green: #1B3A2D;
    --secondary-green: #2D6B4F;
    --accent-teal: #3A8B7A;
    --light-accent: #7BC4B2;
    --warm-cream: #F2EDE4;
    --gold-annotation: #C4A35A;
    --stem-brown: #5C4A3A;

    --font-primary: 'Libre Baskerville', serif;
    --font-secondary: 'Source Serif 4', serif;
    --font-body: 'Source Sans 3', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-dark);
    color: var(--warm-cream);
    line-height: 1.7;
    letter-spacing: 0.015em;
    overflow-x: hidden;
}

/* ===== DIAGONAL SECTION BASE ===== */
.diagonal-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 12vh 8vw;
    clip-path: polygon(0 0, 100% 5vh, 100% 100%, 0 95vh);
    display: flex;
    align-items: center;
    justify-content: center;
}

.diagonal-section:nth-of-type(odd) {
    background-color: var(--primary-dark);
}

.diagonal-section:nth-of-type(even) {
    background-color: var(--primary-green);
}

.section-content {
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 10;
}

/* ===== HERO SECTION ===== */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-green) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: 5rem;
    font-weight: 400;
    color: var(--warm-cream);
    text-align: center;
    transform: rotate(-12deg);
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    line-height: 1.1;
}

.hero-leaf {
    opacity: 0.9;
    filter: drop-shadow(0 0 20px rgba(123, 196, 178, 0.2));
    animation: float-leaf 6s ease-in-out infinite;
}

@keyframes float-leaf {
    0%, 100% {
        transform: translateY(0) rotate(-12deg);
    }
    50% {
        transform: translateY(-20px) rotate(-12deg);
    }
}

/* ===== CONCEPT SECTION ===== */
.concept-section {
    background-color: var(--primary-green);
}

.concept-section .section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--warm-cream);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    grid-column: 1 / -1;
}

.concept-text {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--warm-cream);
    opacity: 0.95;
}

.vein-network {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    opacity: 0.95;
}

.vein-node {
    transition: r 300ms ease-out;
    cursor: pointer;
}

.vein-node:hover {
    r: 6px;
}

/* ===== SPECIMEN GALLERY SECTION ===== */
.specimen-section {
    background-color: var(--primary-dark);
    min-height: 150vh;
    padding: 8vh;
}

.specimen-section .section-title {
    width: 100%;
    margin-bottom: 6rem;
}

.specimen-section .section-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    grid-auto-flow: dense;
}

.specimen-card {
    background-color: rgba(45, 107, 79, 0.3);
    border: 1px solid rgba(123, 196, 178, 0.2);
    padding: 2rem;
    position: relative;
    transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(0);
}

.specimen-card:hover {
    background-color: rgba(45, 107, 79, 0.5);
    border-color: rgba(123, 196, 178, 0.5);
    transform: scale(1.05) translateY(-10px);
}

.specimen-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--gold-annotation);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.specimen-illustration {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 1.5rem;
    opacity: 0.9;
}

.specimen-description {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--warm-cream);
    opacity: 0.9;
}

.specimen-1 {
    grid-column: 1;
}

.specimen-2 {
    grid-column: 2;
    transform: translateY(100px);
}

.specimen-3 {
    grid-column: 3;
    transform: translateY(50px);
}

/* ===== ROOT SYSTEM SECTION ===== */
.root-section {
    background-color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.root-section .section-title {
    width: 100%;
    margin-bottom: 3rem;
}

.root-network {
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
    opacity: 0.95;
}

.root-tip {
    fill: var(--accent-teal);
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.root-tip:hover {
    fill: var(--gold-annotation);
    filter: drop-shadow(0 0 8px rgba(196, 163, 90, 0.6));
    r: 7px;
}

.root-tip-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    fill: var(--gold-annotation);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 150ms ease-out 100ms;
    pointer-events: none;
}

.root-tip:hover + .root-tip-label {
    opacity: 1;
}

/* ===== COLOPHON SECTION ===== */
.colophon-section {
    background-color: var(--warm-cream);
    color: var(--primary-green);
    min-height: 50vh;
    padding: 8vh;
}

.colophon-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--primary-green);
    text-align: center;
    margin-bottom: 2rem;
}

.colophon-text {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--primary-green);
    text-align: center;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.colophon-credits {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--stem-brown);
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0.8;
}

.colophon-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-green);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 200ms ease-out;
    padding-bottom: 0.25rem;
}

.nav-link:hover {
    color: var(--accent-teal);
    border-bottom-color: var(--accent-teal);
}

/* ===== HAIRLINE DIVIDERS ===== */
.hairline-divider {
    position: absolute;
    width: 100%;
    height: 100px;
    opacity: 0.5;
    left: 0;
    z-index: 5;
}

.hairline-1 {
    top: 100vh;
}

.hairline-2 {
    top: 200vh;
}

/* ===== TYPOGRAPHY STYLES ===== */
h1, h2, h3 {
    font-family: var(--font-primary);
    font-weight: 400;
}

h2 {
    font-family: var(--font-secondary);
    font-weight: 600;
}

h3 {
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* ===== SCROLL ANIMATIONS ===== */
@keyframes draw-line {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.leaf-vein {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-line 2s ease-in-out forwards;
}

.leaf-vein:nth-child(3) {
    animation-delay: 0.2s;
}

.leaf-vein:nth-child(4) {
    animation-delay: 0.4s;
}

.leaf-vein:nth-child(5) {
    animation-delay: 0.6s;
}

.leaf-vein:nth-child(6) {
    animation-delay: 0.8s;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .concept-section .section-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .specimen-section .section-content {
        grid-template-columns: 1fr;
    }

    .specimen-1,
    .specimen-2,
    .specimen-3 {
        grid-column: 1;
        transform: translateY(0);
    }

    .colophon-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .diagonal-section {
        clip-path: polygon(0 0, 100% 2vh, 100% 100%, 0 98vh);
        padding: 8vh 4vw;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        transform: rotate(0);
    }

    .section-title {
        font-size: 1.5rem;
        transform: none;
    }

    .concept-text,
    .specimen-description,
    .colophon-text {
        font-size: 0.95rem;
    }

    .colophon-credits {
        font-size: 0.8rem;
    }
}
