/* talegrapher.com - Honeycomb Narrative */

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

:root {
    --umber-deep: #1c1510;
    --umber-dark: #2d1e14;
    --umber-mid: #2a1f15;
    --terracotta: #8b6b4a;
    --terracotta-warm: #8b7b5a;
    --gold: #d4a87a;
    --gold-light: #d4b896;
    --parchment: #f2e0c8;
    --parchment-warm: #e8c4a0;
    --accent: #c4704a;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--umber-deep);
    font-family: 'Source Serif 4', serif;
    color: var(--parchment);
}

/* Honeycomb Container */
#honeycomb-container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
    padding: 40px;
    position: relative;
}

/* Hex Cell */
.hex-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--umber-dark);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease, background 0.3s ease;
}

.hex-cell.visible {
    opacity: 1;
    transform: scale(1);
}

.hex-cell:hover {
    background: var(--umber-mid);
}

/* Hex Border SVG */
.hex-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.hex-outline {
    fill: none;
    stroke: var(--terracotta);
    stroke-width: 1.2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.2s ease;
}

.hex-cell.visible .hex-outline {
    stroke-dashoffset: 0;
}

/* Hex Content */
.hex-content {
    padding: 30px;
    text-align: center;
    z-index: 1;
    max-width: 90%;
}

/* Hero Gate */
.hex-gate {
    grid-column: 2;
    grid-row: 1;
    background: var(--umber-deep);
}

.hex-gate .hex-outline {
    stroke: var(--gold);
    stroke-width: 2;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 0.92;
    letter-spacing: -0.03em;
    color: var(--parchment);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta-warm);
}

/* Typography */
h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--gold);
    margin-bottom: 10px;
    line-height: 1.1;
}

p {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    line-height: 1.6;
    color: var(--parchment-warm);
}

/* Data Cell */
.data-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.data-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    color: var(--gold);
    line-height: 1;
}

.data-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta-warm);
    margin-top: 8px;
}

/* Leaf Motif */
.leaf-motif {
    width: 60px;
    height: 90px;
}

.leaf-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.5s ease 0.5s;
}

.hex-cell.visible .leaf-path {
    stroke-dashoffset: 0;
}

/* List */
.hex-list {
    list-style: none;
    text-align: left;
}

.hex-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Source Serif 4', serif;
    font-size: 0.9rem;
    color: var(--parchment-warm);
    margin-bottom: 8px;
}

.leaf-bullet {
    width: 12px;
    height: 18px;
    flex-shrink: 0;
}

/* Blockquote */
blockquote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: var(--parchment-warm);
    line-height: 1.5;
    border-left: 2px solid var(--terracotta);
    padding-left: 16px;
    text-align: left;
}

/* Navigation */
#hex-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--terracotta);
    background: transparent;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    cursor: pointer;
    transition: background 0.3s ease;
}

.nav-dot.active {
    background: var(--gold);
}

/* Floating Leaves */
#floating-leaves {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.floating-leaf {
    position: absolute;
    opacity: 0.3;
    animation: leafFloat 12s ease-in-out infinite;
}

@keyframes leafFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-30px) rotate(15deg); opacity: 0.15; }
}

/* Grid placement */
.hex-cell:nth-child(2) { grid-column: 1; grid-row: 2; }
.hex-cell:nth-child(3) { grid-column: 3; grid-row: 1; }
.hex-cell:nth-child(4) { grid-column: 2; grid-row: 2; }
.hex-cell:nth-child(5) { grid-column: 1; grid-row: 3; }
.hex-cell:nth-child(6) { grid-column: 3; grid-row: 2; }
.hex-cell:nth-child(7) { grid-column: 2; grid-row: 3; }

/* Responsive */
@media (max-width: 768px) {
    #honeycomb-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 8px;
        padding: 20px;
        overflow-y: auto;
        height: auto;
    }

    html, body {
        overflow: auto;
    }

    .hex-cell {
        grid-column: 1 !important;
        grid-row: auto !important;
        min-height: 250px;
    }

    #hex-nav {
        display: none;
    }
}
