/* ========================================
   storiographer.net — styles.css
   Colors: #7aab8e #0d3b3b #1a1a1f #e85d75 #4ecdc4 #8b7355 #1a6b5a #f0ebe3
   Fonts: Playfair Display, DM Sans, IBM Plex Mono
   ======================================== */

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

html {
    scroll-behavior: smooth;
    background-color: #1a1a1f;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: #f0ebe3;
    background-color: #1a1a1f;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---- HERO ---- */

#hero {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 60%, #0d3b3b 0%, #1a1a1f 70%);
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

#hero-leaf {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.6;
}

.wordmark {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 10vw, 8rem);
    letter-spacing: 0.04em;
    color: #f0ebe3;
    position: relative;
    z-index: 1;
    text-align: center;
}

.tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 1.5vw, 0.95rem);
    color: #7aab8e;
    letter-spacing: 0.08em;
    margin-top: 1rem;
    text-transform: lowercase;
    position: relative;
    z-index: 1;
}

#seismograph-line {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
    max-width: 90vw;
}

/* ---- BENTO GRID ---- */

#bento {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 4px;
}

.bento-cell {
    background-color: #0d3b3b;
    border: 1px solid rgba(78, 205, 196, 0.1);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.3s ease;
}

.bento-cell.revealed {
    opacity: 1;
    transform: translateY(0);
}

.bento-cell:hover {
    background-color: #1a6b5a;
}

/* Cell grid placements */
.cell-1 { grid-column: 1; grid-row: 1 / 3; }
.cell-2 { grid-column: 2 / 4; grid-row: 1; }
.cell-3 { grid-column: 4; grid-row: 1 / 3; }
.cell-4 { grid-column: 2 / 4; grid-row: 2; }
.cell-5 { grid-column: 1; grid-row: 3 / 5; }
.cell-6 { grid-column: 2 / 3; grid-row: 3; }
.cell-7 { grid-column: 3 / 5; grid-row: 3; }
.cell-8 { grid-column: 2 / 5; grid-row: 4; }

.cell-label {
    margin-bottom: 1rem;
}

.mono-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: #8b7355;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cell-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.04em;
    color: #f0ebe3;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.cell-body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #f0ebe3;
    opacity: 0.85;
    line-height: 1.7;
}

.cell-decoration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 140px;
    opacity: 0.5;
}

/* ---- DIAL CLUSTER ---- */

.dial-cluster {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    align-items: center;
}

.dial {
    width: 70px;
    height: 70px;
}

.dial svg {
    width: 100%;
    height: 100%;
}

.dial-needle {
    transform-origin: 40px 40px;
    transition: transform 0.5s ease;
}

/* ---- READOUT ---- */

.readout-display {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.readout-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(78, 205, 196, 0.1);
}

.readout-key {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #7aab8e;
}

.readout-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #4ecdc4;
    font-variant-numeric: tabular-nums;
}

/* ---- VINE CANVAS ---- */

.vine-canvas {
    width: 100%;
    height: 200px;
    display: block;
    margin-top: 0.5rem;
}

/* ---- WAVEFORM ---- */

.waveform-canvas {
    width: 100%;
    height: 150px;
    display: block;
    margin-top: 0.5rem;
}

/* ---- QUOTE ---- */

.cell-quote {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-style: italic;
    color: #f0ebe3;
    line-height: 1.5;
    padding: 1rem 0;
    border-left: 3px solid #e85d75;
    padding-left: 1.2rem;
}

/* ---- SPECIMEN ---- */

.specimen-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.specimen-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px dashed rgba(139, 115, 85, 0.3);
}

.spec-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #8b7355;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.spec-value {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: #f0ebe3;
}

.status-active {
    color: #4ecdc4;
}

/* ---- LEAF CIRCUIT DETAIL ---- */

.leaf-circuit-detail {
    width: 100%;
    max-width: 180px;
    margin: 0.5rem auto;
    display: block;
}

/* ---- CLOSING ---- */

#closing {
    width: 100%;
    padding: 4rem 2rem;
    text-align: center;
}

.closing-inner {
    max-width: 600px;
    margin: 0 auto;
}

.closing-text {
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.closing-wave {
    width: 100%;
    height: 40px;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .cell-1 { grid-column: 1; grid-row: 1; }
    .cell-2 { grid-column: 2; grid-row: 1; }
    .cell-3 { grid-column: 1; grid-row: 2; }
    .cell-4 { grid-column: 2; grid-row: 2; }
    .cell-5 { grid-column: 1; grid-row: 3; }
    .cell-6 { grid-column: 2; grid-row: 3; }
    .cell-7 { grid-column: 1 / 3; grid-row: 4; }
    .cell-8 { grid-column: 1 / 3; grid-row: 5; }

    .dial-cluster {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .cell-1, .cell-2, .cell-3, .cell-4,
    .cell-5, .cell-6, .cell-7, .cell-8 {
        grid-column: 1;
        grid-row: auto;
    }
}
