/* xbom.wiki — digital herbarium / Y2K-futurism */

:root {
    --leaf-green: #4a7c59;
    --moss-deep: #2d5a3a;
    --sage-light: #a8c4a0;
    --teal-bright: #3a9e8f;
    --cream-base: #faf6ee;
    --chrome-silver: #c8c8c8;
    --ink-dark: #1a2a1a;
    --mid-green: #5a7a5a;

    --font-serif: "Libre Baskerville", Georgia, serif;
    --font-sans: "Nunito Sans", "Inter", system-ui, sans-serif;
    --font-mono: "Share Tech Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: #faf6ee;
    color: #1a2a1a;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(168, 196, 160, 0.18), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(58, 158, 143, 0.10), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

/* --- Headings --- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: #2d5a3a;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.05);
    margin: 0 0 0.6em;
}
h1 { font-size: 3.2rem; font-weight: 700; line-height: 1.1; }
h2 { font-size: 2.4rem; font-weight: 700; line-height: 1.15; }
h3 { font-size: 1.7rem; font-weight: 400; font-style: italic; }
h4 { font-size: 1.4rem; font-weight: 400; font-style: italic; }
p { margin: 0 0 1em; }
em { color: #2d5a3a; font-style: italic; }

/* --- Opening overlay --- */
.opening {
    position: fixed;
    inset: 0;
    background: #faf6ee;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 900ms ease, transform 900ms ease;
}
.opening.hidden { opacity: 0; pointer-events: none; transform: scale(0.98); }

.opening-inner {
    text-align: center;
}

.opening-illustration {
    width: 380px;
    height: auto;
    max-height: 70vh;
}
.opening-illustration .flower path,
.opening-illustration .flower circle,
.opening-illustration .stem,
.opening-illustration .leaf,
.opening-illustration .roots path,
.opening-illustration .roots rect,
.opening-illustration .roots circle {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: draw 2.6s ease-out forwards;
}
.opening-illustration .stem { animation-delay: 200ms; }
.opening-illustration .leaf-l { animation-delay: 600ms; }
.opening-illustration .leaf-r { animation-delay: 800ms; }
.opening-illustration .roots path { animation-delay: 1200ms; }

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

.opening-illustration .labels .label {
    opacity: 0;
    animation: labelFade 600ms ease-out forwards;
    animation-delay: 2.4s;
}
.opening-illustration .labels .label:nth-child(2) { animation-delay: 2.6s; }
.opening-illustration .labels .label:nth-child(3) { animation-delay: 2.8s; }
.opening-illustration .labels .label:nth-child(4) { animation-delay: 3.0s; }
.opening-illustration .labels .label:nth-child(5) { animation-delay: 3.2s; }

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

.opening-caption {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5a7a5a;
    font-size: 0.85rem;
    margin-top: 18px;
    opacity: 0;
    animation: labelFade 600ms ease-out forwards;
    animation-delay: 3.4s;
}

/* --- Chrome navigation --- */
.chrome-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 100;
    background: linear-gradient(180deg, #d0d0d0 0%, #f8f8f8 50%, #c8c8c8 100%);
    border-bottom: 1px solid #888;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.6) inset, 0 -1px 0 rgba(0, 0, 0, 0.15) inset, 0 3px 6px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 600ms ease, transform 600ms ease;
}
.chrome-nav.visible {
    opacity: 1;
    transform: translateY(0);
}

.nav-inner {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #2d5a3a;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.1rem;
}
.logo-mark { width: 36px; height: 36px; }
.logo-text { letter-spacing: 0.02em; }

.nav-links {
    display: flex;
    gap: 6px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.chrome-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a2a1a;
    background: linear-gradient(180deg, #f4f4f4 0%, #d8d8d8 100%);
    border: 1px solid #888;
    border-top-color: #fff;
    border-left-color: #eee;
    padding: 7px 14px;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 -1px 0 rgba(0, 0, 0, 0.1) inset;
    transition: all 180ms ease;
}
.chrome-btn:hover {
    background: linear-gradient(180deg, #ffffff 0%, #e4e4e4 100%);
    color: #2d5a3a;
    transform: translateY(-1px);
}
.chrome-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset;
}

.big-btn {
    font-size: 0.9rem;
    padding: 12px 22px;
    margin-top: 18px;
}

.nav-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5a7a5a;
    text-align: right;
}

/* --- Content scaffolding --- */
.content {
    position: relative;
    z-index: 1;
    padding-top: 64px;
    padding-right: 240px;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 80vh;
    padding: 120px 8vw 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.orbital-container {
    position: relative;
    display: inline-block;
    padding: 20px 40px;
}
.hero-title {
    margin: 0;
    font-size: 4.4rem;
    color: #2d5a3a;
    position: relative;
    z-index: 2;
}

.orbital-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3a9e8f;
    box-shadow: 0 0 0 2px rgba(58, 158, 143, 0.25);
    top: 50%;
    left: 50%;
    animation: orbit 8s linear infinite;
}
.orbital-dot.dot-2 { animation-delay: -2.6s; background: #4a7c59; }
.orbital-dot.dot-3 { animation-delay: -5.2s; background: #a8c4a0; }

@keyframes orbit {
    from { transform: translate(-50%, -50%) rotate(0deg) translateX(180px) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg) translateX(180px) rotate(-360deg); }
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 720px;
    margin-top: 20px;
    color: #1a2a1a;
}

.hero-meta {
    display: flex;
    gap: 24px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.tax-code {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: #5a7a5a;
}
.tax-code strong {
    color: #2d5a3a;
    margin-left: 6px;
}

/* Chrome orbs */
.chrome-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 30% 30%, #ffffff, #d4d4d4 40%, #8a8a8a 80%, #5a5a5a);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.orb-a { width: 68px; height: 68px; top: 140px; right: 8vw; animation: floaty 7s ease-in-out infinite; }
.orb-b { width: 44px; height: 44px; bottom: 80px; left: 6vw; animation: floaty 9s ease-in-out infinite reverse; }

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* --- Z-rows --- */
.zrow {
    min-height: 80vh;
    padding: 80px 6vw;
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 40px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}
.zrow-even { grid-template-columns: 40% 60%; }

.zrow-content {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 600ms ease, transform 600ms ease;
}
.zrow-even .zrow-content { transform: translateX(40px); }
.zrow.in-view .zrow-content { opacity: 1; transform: translateX(0); }

.zrow-accent {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
    transition-delay: 300ms;
    text-align: center;
}
.zrow.in-view .zrow-accent { opacity: 1; transform: translateY(0); }

.tax-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5a7a5a;
    padding: 4px 10px;
    background: rgba(168, 196, 160, 0.25);
    border: 1px solid #a8c4a0;
    border-radius: 2px;
    margin-bottom: 18px;
}

.lede {
    font-size: 1.15rem;
    color: #1a2a1a;
    max-width: 640px;
}

.accent-illustration {
    width: 100%;
    max-width: 340px;
    height: auto;
}

.accent-caption {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5a7a5a;
    margin-top: 10px;
}

/* --- Embossed panels --- */
.panel.embossed {
    background: rgba(250, 246, 238, 0.85);
    border: 1px solid #a8c4a0;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-bottom-color: #2d5a3a;
    border-right-color: #2d5a3a;
    padding: 24px 28px;
    margin-top: 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 640px;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 14px;
}
.counter-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.counter.big {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    color: #3a9e8f;
    background: #faf6ee;
    padding: 4px 10px;
    border: 1px solid #a8c4a0;
    border-radius: 2px;
    letter-spacing: 0.05em;
}
.counter-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5a7a5a;
}

/* --- Taxonomy list --- */
.tax-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    max-width: 560px;
}
.tax-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px dashed #a8c4a0;
    font-family: var(--font-serif);
    font-style: italic;
}
.tax-name { color: #2d5a3a; font-size: 1.1rem; }
.tax-count {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-style: normal;
    color: #5a7a5a;
    letter-spacing: 0.06em;
}
.tax-count .counter { color: #3a9e8f; font-weight: 400; }

/* --- Field notes --- */
.field-notes {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
    max-width: 620px;
}
.note {
    padding: 16px 20px;
    background: rgba(168, 196, 160, 0.12);
    border-left: 3px solid #4a7c59;
}
.note-date {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5a7a5a;
    margin-bottom: 6px;
}
.note p { margin: 0; }

/* --- Steps --- */
.panel-contribute { max-width: 620px; }
.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.steps li {
    display: flex;
    gap: 14px;
    align-items: baseline;
}
.step-num {
    font-family: var(--font-mono);
    color: #3a9e8f;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    min-width: 28px;
}

/* --- Herbarium footer section --- */
.herbarium {
    padding: 80px 6vw 40px;
    max-width: 1400px;
    margin: 0 auto;
}
.herbarium-header {
    text-align: center;
    margin-bottom: 40px;
}
.herbarium-book {
    display: grid;
    grid-template-columns: 1fr 2px 1fr;
    gap: 30px;
    background: linear-gradient(180deg, #fbf7ef, #f2eadb);
    border: 1px solid #a8c4a0;
    border-radius: 4px;
    padding: 50px 40px;
    box-shadow: 0 8px 30px rgba(45, 90, 58, 0.08);
}
.book-gutter {
    background: repeating-linear-gradient(
        to bottom,
        #2d5a3a,
        #2d5a3a 6px,
        transparent 6px,
        transparent 12px
    );
    opacity: 0.3;
}
.book-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 24px;
    align-content: start;
}

.specimen-card {
    background: #faf6ee;
    border: 1px solid #a8c4a0;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 300ms ease-out, box-shadow 300ms ease-out;
    position: relative;
}
.specimen-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(45, 90, 58, 0.18);
}
.specimen-card:hover .specimen-thumb {
    transform: rotate(3deg);
}
.specimen-thumb {
    width: 90px;
    height: 90px;
    transition: transform 300ms ease-out;
}
.specimen-id {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5a7a5a;
    margin-top: 8px;
}
.specimen-name {
    display: block;
    font-family: var(--font-serif);
    font-style: italic;
    color: #2d5a3a;
    font-size: 0.95rem;
    margin-top: 2px;
}

/* Tooltip */
.tooltip {
    position: fixed;
    pointer-events: none;
    background: #1a2a1a;
    color: #faf6ee;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 12px;
    border: 1px solid #4a7c59;
    z-index: 500;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 200ms, transform 200ms;
    max-width: 300px;
}
.tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer --- */
.site-footer {
    padding: 30px 6vw 50px;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #a8c4a0;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-chrome {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5a7a5a;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.footer-brand {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: #2d5a3a;
    text-transform: none;
    letter-spacing: 0;
}
.footer-sep { color: #a8c4a0; }

.footer-counter {
    display: flex;
    gap: 12px;
    align-items: center;
}
.footer-num {
    font-size: 1.6rem;
}

/* --- Specimen tray sidebar --- */
.specimen-tray {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    width: 240px;
    background: rgba(250, 246, 238, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-left: 1px solid #a8c4a0;
    z-index: 90;
    transition: transform 400ms ease;
    display: flex;
}
.specimen-tray.collapsed {
    transform: translateX(220px);
}

.tray-handle {
    width: 20px;
    background: linear-gradient(180deg, #d0d0d0, #f0f0f0, #c8c8c8);
    border-right: 1px solid #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #2d5a3a;
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    user-select: none;
}
.specimen-tray.collapsed .tray-handle span { transform: rotate(180deg); }

.tray-inner {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
}
.tray-inner h4 {
    font-family: var(--font-serif);
    color: #2d5a3a;
    font-size: 1.15rem;
    margin: 0 0 6px;
}
.tray-note {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5a7a5a;
    margin: 0 0 16px;
}
.tray-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tray-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #a8c4a0;
    font-family: var(--font-serif);
    font-style: italic;
    color: #2d5a3a;
    font-size: 0.88rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: default;
    transition: color 200ms;
}
.tray-list li:hover { color: #3a9e8f; }
.tray-id {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5a7a5a;
}

/* --- Responsive --- */
@media (max-width: 1000px) {
    .content { padding-right: 0; }
    .specimen-tray { transform: translateX(220px); }
    .specimen-tray.open { transform: translateX(0); }
}

@media (max-width: 760px) {
    .zrow,
    .zrow-even {
        grid-template-columns: 1fr;
        padding: 60px 6vw;
    }
    .hero-title { font-size: 2.8rem; }
    h1 { font-size: 2.4rem; }
    h2 { font-size: 1.9rem; }
    .nav-links { display: none; }
    .herbarium-book {
        grid-template-columns: 1fr;
    }
    .book-gutter { display: none; }
    .orbital-dot { display: none; }
}
