/* rational.quest -- Botanical Vintage Garden */
/* Palette from DESIGN.md */
/* Garden Dark: #1A2010 -- headings */
/* Garden Moss: #3A4028 -- body text */
/* Vintage Green: #6A7848 -- labels, accents */
/* Dried Rose: #B08878 -- secondary accent */
/* Herbarium Cream: #F8F4EA -- page background */
/* Specimen Card: #FFFBF2 -- card backgrounds */
/* Pressed Edge: #D8CDB0 -- card borders */
/* Skeleton Warm: #E8E0D0 / #F0E8DA -- skeleton gradient */
/* Blob Sage: rgba(138,144,104,0.04) -- organic blobs */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    color: #3A4028;
    background-color: #F8F4EA;
    overflow-x: hidden;
    position: relative;
}

/* ==============================
   Organic Blob Backgrounds
   ============================== */

.organic-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
}

.blob-1 {
    width: 700px;
    height: 700px;
    top: -100px;
    right: -150px;
    animation: blobFloat1 25s ease-in-out infinite;
}

.blob-2 {
    width: 600px;
    height: 600px;
    bottom: 10%;
    left: -200px;
    animation: blobFloat2 30s ease-in-out infinite;
}

.blob-3 {
    width: 500px;
    height: 500px;
    top: 50%;
    right: 10%;
    animation: blobFloat3 20s ease-in-out infinite;
}

.blob-4 {
    width: 550px;
    height: 550px;
    top: 25%;
    left: 5%;
    animation: blobFloat4 28s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, 20px) rotate(5deg); }
    66% { transform: translate(-20px, 40px) rotate(-3deg); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-25px, -30px) rotate(-4deg); }
    66% { transform: translate(35px, -15px) rotate(6deg); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, 25px) rotate(4deg); }
}

@keyframes blobFloat4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    40% { transform: translate(20px, -35px) rotate(-5deg); }
    70% { transform: translate(-15px, 20px) rotate(3deg); }
}

/* ==============================
   Watercolor Botanical Decorations
   ============================== */

.watercolor-botanicals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.botanical {
    position: absolute;
    opacity: 0;
    transition: opacity 2s ease;
}

.botanical.visible {
    opacity: 1;
}

.botanical-1 {
    width: 180px;
    top: 15%;
    left: 3%;
}

.botanical-2 {
    width: 200px;
    top: 55%;
    right: 2%;
}

.botanical-3 {
    width: 150px;
    top: 80%;
    left: 8%;
}

.botanical-4 {
    width: 170px;
    top: 35%;
    right: 6%;
}

/* ==============================
   Typography
   ============================== */

h1, h2, h3 {
    font-family: 'Zilla Slab', serif;
    color: #1A2010;
}

.specimen-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: #6A7848;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
}

/* ==============================
   Hero Section
   ============================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 40px 20px;
}

.hero-inner {
    text-align: center;
    max-width: 960px;
}

.skeleton-title {
    position: relative;
    overflow: hidden;
}

.skeleton-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #E8E0D0 25%, #F0E8DA 50%, #E8E0D0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 2s infinite;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.skeleton-title.revealed::before {
    opacity: 0;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.site-title {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #1A2010;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.skeleton-title.revealed .site-title {
    opacity: 1;
    transform: translateY(0);
}

.site-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #6A7848;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1s ease 0.8s, transform 1s ease 0.8s;
}

.hero.loaded .site-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.hero-tag {
    opacity: 0;
    transition: opacity 1s ease 1.2s;
}

.hero.loaded .hero-tag {
    opacity: 1;
}

.hero-botanical-divider {
    margin-top: 60px;
    width: 100%;
    max-width: 960px;
    opacity: 0;
    transition: opacity 1.2s ease 1.5s;
}

.hero.loaded .hero-botanical-divider {
    opacity: 1;
}

.divider-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ==============================
   Main Content - Herbarium
   ============================== */

.herbarium-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 60px;
    position: relative;
    z-index: 1;
}

/* ==============================
   Specimen Cards
   ============================== */

.specimen-card {
    background: #FFFBF2;
    border: 1px solid #D8CDB0;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.specimen-card-inner {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative;
    z-index: 2;
}

.specimen-card.revealed .specimen-card-inner {
    opacity: 1;
    transform: translateY(0);
}

/* Skeleton loading for cards */
.specimen-card.skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #E8E0D0 25%, #F0E8DA 50%, #E8E0D0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 2s infinite;
    z-index: 3;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.specimen-card.skeleton.revealed::before {
    opacity: 0;
    pointer-events: none;
}

/* Botanical skeleton outline shapes within cards */
.skeleton-shape {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    opacity: 0.12;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.specimen-card.revealed .skeleton-shape {
    opacity: 0;
}

.skeleton-shape-leaf {
    background: radial-gradient(ellipse 35% 55% at 50% 45%, rgba(138,144,104,0.15) 0%, transparent 70%);
}

.skeleton-shape-fern {
    background:
        radial-gradient(ellipse 20% 40% at 40% 50%, rgba(138,144,104,0.12) 0%, transparent 70%),
        radial-gradient(ellipse 20% 40% at 60% 45%, rgba(138,144,104,0.1) 0%, transparent 70%);
}

.skeleton-shape-bloom {
    background: radial-gradient(circle 30% at 50% 50%, rgba(176,136,120,0.12) 0%, transparent 70%);
}

.skeleton-shape-sprig {
    background:
        radial-gradient(ellipse 15% 50% at 50% 50%, rgba(138,144,104,0.1) 0%, transparent 70%),
        radial-gradient(circle 12% at 50% 20%, rgba(176,136,120,0.1) 0%, transparent 70%);
}

.specimen-card .specimen-tag {
    margin-bottom: 12px;
}

.specimen-heading {
    font-family: 'Zilla Slab', serif;
    font-weight: 500;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: #1A2010;
    margin-bottom: 16px;
    line-height: 1.3;
}

.specimen-body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    color: #3A4028;
    line-height: 1.85;
    margin-bottom: 14px;
}

.specimen-body:last-of-type {
    margin-bottom: 0;
}

.specimen-illustration {
    margin-top: 20px;
    text-align: center;
}

.specimen-illustration svg {
    width: 100%;
    max-width: 280px;
    height: auto;
}

/* ==============================
   Hero Specimen Row
   ============================== */

.specimen-row-hero {
    margin-bottom: 20px;
}

.specimen-row-hero .specimen-card {
    padding: 40px;
}

/* ==============================
   Split Row (F-pattern second row)
   ============================== */

.specimen-row-split {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.card-left,
.card-right {
    min-height: 0;
}

/* Specimen Details Table */
.specimen-details {
    margin-top: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #F0E8DA;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.72rem;
    color: #6A7848;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-value {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #3A4028;
}

.detail-illustration {
    margin-top: 20px;
    text-align: center;
}

.detail-illustration svg {
    width: 120px;
    height: auto;
}

/* ==============================
   Section Dividers
   ============================== */

.section-divider {
    margin: 40px 0;
    opacity: 0;
    transform: scaleX(0.6);
    transition: opacity 1s ease, transform 1s ease;
}

.section-divider.visible {
    opacity: 1;
    transform: scaleX(1);
}

/* ==============================
   Vertical Cascade (F-pattern left column)
   ============================== */

.specimen-cascade {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 20px;
}

.cascade-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cascade-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
}

.cascade-illustration {
    position: sticky;
    top: 40px;
}

.cascade-illustration svg {
    width: 100%;
    max-width: 250px;
    height: auto;
}

.cascade-note {
    background: #FFFBF2;
    border: 1px solid #D8CDB0;
    padding: 24px;
    text-align: center;
}

.note-text {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 0.88rem;
    color: #6A7848;
    line-height: 1.7;
    margin-top: 10px;
    font-style: italic;
}

/* ==============================
   Final Specimen
   ============================== */

.specimen-row-final {
    margin-top: 20px;
}

.final-ornament {
    margin-top: 24px;
    text-align: center;
}

.final-ornament svg {
    width: 80px;
    height: auto;
}

/* ==============================
   Footer
   ============================== */

.herbarium-footer {
    position: relative;
    z-index: 1;
    padding: 60px 20px 40px;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.footer-line {
    width: 60px;
    height: 1px;
    background: #D8CDB0;
    margin: 0 auto 20px;
}

.footer-note {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 0.82rem;
    color: #8A9068;
    margin-top: 8px;
}

/* ==============================
   Card Hover States
   ============================== */

.specimen-card:hover {
    border-color: #B08878;
    box-shadow: 0 4px 24px rgba(176,136,120,0.08);
}

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

@media (max-width: 768px) {
    .specimen-row-split {
        grid-template-columns: 1fr;
    }

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

    .cascade-right {
        padding-top: 0;
    }

    .cascade-illustration {
        position: static;
    }

    .blob-1 {
        width: 400px;
        height: 400px;
    }

    .blob-2 {
        width: 350px;
        height: 350px;
    }

    .blob-3 {
        width: 300px;
        height: 300px;
    }

    .blob-4 {
        width: 320px;
        height: 320px;
    }

    .botanical-1 {
        width: 120px;
    }

    .botanical-2 {
        width: 140px;
    }

    .botanical-3 {
        width: 100px;
    }

    .botanical-4 {
        width: 110px;
    }

    .specimen-card {
        padding: 24px;
    }

    .specimen-row-hero .specimen-card {
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .site-title {
        letter-spacing: 0.08em;
    }

    .hero-botanical-divider {
        margin-top: 40px;
    }

    .detail-row {
        flex-direction: column;
        gap: 2px;
    }
}
