:root {
    --paper-ground: #f5ead6;
    --paper-shadow: #dbc9a8;
    --ink: #3d2b1f;
    --aurora-mag: #e930ff;
    --aurora-cyan: #00f5d4;
    --aurora-green: #72efab;
    --aurora-violet: #7b2ff7;
    --carbon: #1a1a1a;
    --paper-crinkle: #c4a67a;
    --paper-light: #e8d5b7;
    --paper-mid: #ede0c8;
    --aurora-gradient: linear-gradient(135deg, #e930ff 0%, #7b2ff7 30%, #00f5d4 65%, #72efab 100%);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Libre Baskerville", serif;
    font-weight: 400;
    line-height: 1.72;
    color: var(--ink);
    background-color: var(--paper-ground);
    overflow-x: hidden;
    position: relative;
}

/* ====== PAPER BACKGROUND ====== */
.paper-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--paper-ground);
    background-image:
        radial-gradient(ellipse at 15% 20%, #ede0c8 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, #e8d5b7 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, #c4a67a 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* Edge darkening - aged paper effect */
.paper-bg::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(61,43,31,0.08) 100%);
    pointer-events: none;
}

/* ====== BENDAY DOTS ====== */
.benday-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--aurora-mag) 1.5px, transparent 1.5px);
    background-size: 8px 8px;
    opacity: 0.04;
    z-index: 1;
    pointer-events: none;
}

/* ====== FOX SPOTS ====== */
.fox-spots {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.fox-spot {
    position: absolute;
    background: #c4a67a;
    opacity: 0.15;
    border-radius: 50%;
}

/* ====== BOTANICAL DIVIDERS ====== */
.botanical-divider {
    position: relative;
    z-index: 2;
    width: 60%;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 0;
}

.botanical-divider svg {
    width: 100%;
    height: 40px;
}

/* ====== HERO SECTION ====== */
.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    align-items: center;
}

.hero-logotype {
    grid-column: 1 / 7;
    grid-row: 1;
}

.logotype {
    font-family: "Poiret One", cursive;
    font-size: clamp(3rem, 7vw, 6rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink);
    line-height: 1.1;
}

.hero-specimen {
    grid-column: 7 / 13;
    grid-row: 1 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dahlia-svg {
    width: 100%;
    max-width: 320px;
    animation: dahlia-rotate 60s linear infinite;
}

.dahlia-svg .dahlia-group > text {
    animation: none;
}

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

.hero-tagline {
    grid-column: 1 / 7;
    grid-row: 2;
}

.tagline {
    font-family: "Libre Baskerville", serif;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--ink);
    max-width: 38em;
    opacity: 0;
    animation: fadeInTagline 2s ease-out 0.5s forwards;
}

@keyframes fadeInTagline {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== DIAGONAL DESCENT SECTION ====== */
.diagonal-descent {
    position: relative;
    z-index: 2;
    min-height: 250vh;
    padding: 4rem 2rem;
}

.section-label {
    font-family: "Josefin Sans", sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ink);
    text-align: center;
    margin-bottom: 6rem;
    text-shadow: 1px 1px 0 var(--aurora-mag);
}

.specimen-card {
    position: relative;
    margin-left: var(--card-left);
    margin-bottom: 12vh;
    width: 240px;
    height: 320px;
    opacity: 0;
    transform: translateY(60px) scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.specimen-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.specimen-card-inner {
    width: 100%;
    height: 100%;
    background: var(--paper-shadow);
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.specimen-card-inner:hover {
    box-shadow: 0 0 20px rgba(114,239,171,0.3);
    border-color: var(--aurora-green);
}

.specimen-svg {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
}

.specimen-name {
    font-family: "Josefin Sans", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink);
    text-shadow: 1px 1px 0 var(--aurora-mag);
}

.specimen-latin {
    font-family: "Libre Baskerville", serif;
    font-style: italic;
    font-size: 0.8rem;
    color: var(--ink);
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* ====== ENGINE ROOM SECTION ====== */
.engine-room {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.engine-benday-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--aurora-mag) 1.5px, transparent 1.5px);
    background-size: 8px 8px;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.engine-room.in-view .engine-benday-overlay {
    opacity: 0.08;
    background-image: radial-gradient(circle, var(--aurora-mag) 1.5px, transparent 1.5px),
        var(--aurora-gradient);
    background-size: 8px 8px, 100% 100%;
    background-blend-mode: overlay;
    opacity: 0.2;
}

.engine-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
}

.engine-heading {
    font-family: "Poiret One", cursive;
    font-size: clamp(3rem, 8vw, 7rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink);
    margin-bottom: 2rem;
    display: inline-block;
}

.engine-letter {
    display: inline-block;
    animation: letterPulse 3s ease-in-out infinite;
    animation-play-state: paused;
}

.engine-room.in-view .engine-letter {
    animation-play-state: running;
}

.engine-letter:nth-child(1) { animation-delay: 0s; }
.engine-letter:nth-child(2) { animation-delay: 0.15s; }
.engine-letter:nth-child(3) { animation-delay: 0.3s; }
.engine-letter:nth-child(5) { animation-delay: 0.5s; }
.engine-letter:nth-child(6) { animation-delay: 0.65s; }
.engine-letter:nth-child(7) { animation-delay: 0.8s; }
.engine-letter:nth-child(8) { animation-delay: 0.95s; }
.engine-letter:nth-child(9) { animation-delay: 1.1s; }
.engine-letter:nth-child(10) { animation-delay: 1.25s; }

@keyframes letterPulse {
    0%, 100% { color: var(--ink); text-shadow: none; }
    50% { color: var(--aurora-mag); text-shadow: 0 0 20px rgba(233,48,255,0.4); }
}

.engine-space {
    display: inline-block;
    width: 0.5em;
}

.engine-description {
    font-family: "Libre Baskerville", serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    line-height: 1.72;
    max-width: 38em;
    margin: 0 auto;
    color: var(--ink);
}

.engine-description em {
    font-style: normal;
    color: var(--aurora-mag);
    font-weight: 400;
}

/* ====== CLOSING GARDEN SECTION ====== */
.closing-garden {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.vine-container {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 600px;
    height: 100%;
    pointer-events: none;
    opacity: 0.5;
}

.wisteria-vine {
    width: 100%;
    height: 100%;
}

.vine-main,
.vine-branch-1,
.vine-branch-2,
.vine-branch-3,
.vine-branch-4 {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 0.05s linear;
}

.closing-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.closing-statement {
    font-family: "Poiret One", cursive;
    font-size: clamp(1.5rem, 4vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink);
    line-height: 1.6;
    margin-bottom: 3rem;
}

.closing-motif {
    display: flex;
    justify-content: center;
}

.closing-flower {
    width: 80px;
    height: 80px;
    animation: dahlia-rotate 60s linear infinite;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-logotype {
        grid-column: 1;
        grid-row: 1;
        text-align: center;
    }

    .hero-specimen {
        grid-column: 1;
        grid-row: 2;
    }

    .hero-tagline {
        grid-column: 1;
        grid-row: 3;
        text-align: center;
    }

    .specimen-card {
        margin-left: 50% !important;
        transform: translateX(-50%) translateY(60px) scale(0.9);
    }

    .specimen-card.visible {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .vine-container {
        width: 100%;
    }
}
