/* ============================================
   Rosemmungus.com — Quirky Fungi/Botany Theme
   Vintage parchment, dark moss greens, fungi humor
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&display=swap');

:root {
    --bg-parchment: #f4ecd8;
    --color-moss: #2b3a24;
    --color-fungi-red: #8b251c;
    --color-spore-brown: #5d4a36;
    --color-paper-edge: #d8cdb4;

    --text-main: #2b3a24;
    --text-muted: #5d4a36;

    --font-heading: 'Playfair Display', serif;
    --font-mono: 'Courier Prime', monospace;

    --shadow-vintage: 3px 5px 15px rgba(43, 58, 36, 0.15);
    --border-radius-soft: 4px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-heading);
    color: var(--text-main);
    background-color: var(--bg-parchment);
    /* Subtle paper texture simulation */
    background-image: radial-gradient(var(--color-paper-edge) 1px, transparent 1px);
    background-size: 12px 12px;
    background-position: 0 0, 6px 6px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-moss);
}

a {
    color: var(--color-fungi-red);
    text-decoration: none;
    border-bottom: 1px dotted var(--color-fungi-red);
    transition: 0.2s;
}

a:hover {
    opacity: 0.8;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Top Nav (Taxonomy style) --- */
.main-nav {
    border-bottom: 3px double var(--color-moss);
    padding: 15px 0;
    background: rgba(244, 236, 216, 0.9);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 900;
    font-style: italic;
    color: var(--color-fungi-red);
    text-decoration: none;
    border: none;
    letter-spacing: -1px;
}

.logo span {
    color: var(--color-moss);
    font-weight: 400;
    font-size: 1.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--color-spore-brown);
    border: none;
    font-size: 1.1rem;
    font-style: italic;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-fungi-red);
    text-decoration: underline;
}

/* --- Hero (Botany Guide) --- */
.hero {
    text-align: center;
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--color-paper-edge);
    margin-bottom: 40px;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-spore-brown);
    margin-bottom: 10px;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.3rem;
    max-width: 650px;
    margin: 0 auto;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Tools Grid (Specimen Cards) --- */
.tool-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-bottom: 80px;
}

.specimen-card {
    background: #fffdf5;
    padding: 40px;
    border: 1px solid var(--color-paper-edge);
    box-shadow: var(--shadow-vintage);
    position: relative;
}

/* Vintage Tag */
.specimen-card::before {
    content: 'FIG. 0' counter(section);
    counter-increment: section;
    position: absolute;
    top: -15px;
    left: 30px;
    background: var(--color-moss);
    color: var(--bg-parchment);
    padding: 5px 15px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border: 1px solid var(--bg-parchment);
}

body {
    counter-reset: section;
}

/* Initialize counter */


.panel-header {
    margin-bottom: 25px;
    border-bottom: 2px solid var(--color-paper-edge);
    padding-bottom: 15px;
}

.panel-header h2 {
    font-size: 2.2rem;
}

.panel-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-style: italic;
    margin-top: 5px;
}

/* Forms (Typewriter style) */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-end;
}

@media(max-width: 650px) {
    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
}

.input-grp {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-grp label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-moss);
    margin-bottom: 8px;
    font-weight: 700;
}

.botany-input {
    background: transparent;
    border: none;
    border-bottom: 2px dashed var(--color-spore-brown);
    border-radius: 0;
    color: var(--color-moss);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    padding: 8px 5px;
    transition: all 0.2s;
}

.botany-input:focus {
    outline: none;
    border-bottom-style: solid;
    border-bottom-color: var(--color-fungi-red);
    background: rgba(139, 37, 28, 0.05);
}

.botany-btn {
    background: var(--color-fungi-red);
    color: #fffdf5;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 25px;
    border: 2px solid var(--color-fungi-red);
    cursor: pointer;
    transition: 0.2s;
}

.botany-btn:hover {
    background: transparent;
    color: var(--color-fungi-red);
}

/* Readouts / Results (Typewriter paper) */
.log-box {
    margin-top: 30px;
    padding: 25px 30px;
    background: #fbf8f1;
    border-top: 3px double var(--color-moss);
    border-bottom: 3px double var(--color-moss);
    display: none;
    font-family: var(--font-mono);
}

.log-box.active {
    display: block;
    animation: typewriterBlock 0.5s ease;
}

@keyframes typewriterBlock {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.log-hdr {
    font-size: 0.85rem;
    color: var(--color-spore-brown);
    text-transform: uppercase;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.result-primary {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-fungi-red);
    line-height: 1.1;
    margin-bottom: 10px;
}

.result-note {
    font-size: 1rem;
    color: var(--color-moss);
    line-height: 1.5;
    white-space: pre-line;
}

.medical-diagnosis {
    background: rgba(139, 37, 28, 0.1);
    padding: 15px;
    border-left: 4px solid var(--color-fungi-red);
    margin-top: 15px;
    font-style: italic;
    font-family: var(--font-heading);
}

/* --- Ads (Vintage catalog style) --- */
.ad-slot {
    border: 1px solid var(--color-paper-edge);
    padding: 20px;
    text-align: center;
    margin: 30px 0;
    position: relative;
    background: #fffdf5;
}

.ad-slot::before {
    content: '-- ADVERTISEMENT --';
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #999;
    display: block;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.ad-img img {
    max-width: 100%;
    border: 1px solid #ccc;
    filter: sepia(0.3) contrast(1.1);
    transition: 0.3s;
}

.ad-img img:hover {
    filter: none;
}

.ad-txt {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-moss);
    margin-top: 10px;
    font-style: italic;
}

.ad-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
}

/* Subpages */
.manuscript {
    background: #fffdf5;
    padding: 50px;
    border: 1px solid var(--color-paper-edge);
    box-shadow: var(--shadow-vintage);
    margin-bottom: 60px;
    column-count: 1;
}

@media(min-width: 768px) {
    .manuscript {
        column-count: 2;
        column-gap: 40px;
        column-rule: 1px solid var(--color-paper-edge);
    }
}

.manuscript h2 {
    font-size: 1.8rem;
    margin-top: 0;
    break-after: avoid;
}

.manuscript p,
.manuscript ul {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* --- Footer --- */
.botany-footer {
    border-top: 1px solid var(--color-paper-edge);
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--color-spore-brown);
    border: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-fungi-red);
}

.copyright {
    font-family: var(--font-mono);
    color: #888;
    font-size: 0.85rem;
}