/* namu.biz — Scandinavian functional forestry commerce */

:root {
    --birch-white: #faf7f2;
    --light-grain: #e8dcc8;
    --pale-timber: #d4c4a8;
    --pale-timber-2: #c4b498;
    --warm-wood: #a67c52;
    --dark-bark: #2c2416;
    --living-green: #6b8f5e;
    --deep-forest: #3a5a40;

    --sidebar-w: 240px;

    --display: "Josefin Sans", "Space Grotesk", system-ui, sans-serif;
    --body: "Source Sans 3", "Inter", system-ui, sans-serif;
    --mono: "Overpass Mono", ui-monospace, "SFMono-Regular", monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body);
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--dark-bark);
    background: var(--birch-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--living-green);
    color: var(--birch-white);
}

/* ---------------------------------------------------------------
   SIDEBAR — wood-grain navigation panel (fixed)
---------------------------------------------------------------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background:
        linear-gradient(180deg, rgba(166, 124, 82, 0.08), rgba(166, 124, 82, 0.18)),
        repeating-linear-gradient(
            175deg,
            transparent 0px,
            transparent 8px,
            rgba(166, 124, 82, 0.10) 8px,
            rgba(166, 124, 82, 0.10) 9px
        ),
        repeating-linear-gradient(
            178deg,
            transparent 0px,
            transparent 22px,
            rgba(44, 36, 22, 0.04) 22px,
            rgba(44, 36, 22, 0.04) 23px
        ),
        linear-gradient(180deg, var(--pale-timber), var(--pale-timber-2));
    border-right: 1px solid rgba(44, 36, 22, 0.18);
    box-shadow: inset -10px 0 28px -22px rgba(44, 36, 22, 0.6);
    z-index: 10;
    overflow-y: auto;
}

.sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
            ellipse 70px 18px at 30% 22%,
            rgba(44, 36, 22, 0.10),
            transparent 70%
        ),
        radial-gradient(
            ellipse 90px 22px at 65% 58%,
            rgba(44, 36, 22, 0.08),
            transparent 70%
        ),
        radial-gradient(
            ellipse 60px 14px at 25% 82%,
            rgba(44, 36, 22, 0.10),
            transparent 70%
        );
    pointer-events: none;
    mix-blend-mode: multiply;
}

.sidebar-inner {
    position: relative;
    padding: 36px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-height: 100%;
    z-index: 1;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--deep-forest);
    box-shadow:
        inset 0 0 0 2px var(--birch-white),
        inset 0 0 0 4px var(--warm-wood),
        inset 0 0 0 6px var(--birch-white),
        inset 0 0 0 8px var(--living-green);
    flex: 0 0 auto;
}

.brand-text {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.01em;
    color: var(--dark-bark);
    line-height: 1;
    display: flex;
    align-items: baseline;
}

.brand-name {
    color: var(--dark-bark);
}

.brand-tld {
    color: var(--warm-wood);
    font-weight: 500;
}

.brand-sub {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--dark-bark);
    opacity: 0.72;
    font-style: italic;
    border-left: 2px solid var(--warm-wood);
    padding-left: 10px;
    margin-top: -10px;
}

/* nav */
.nav {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.nav-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--dark-bark);
    opacity: 0.55;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(44, 36, 22, 0.18);
    padding-bottom: 6px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    position: relative;
    display: block;
    padding: 7px 4px 7px 22px;
    font-family: var(--display);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--dark-bark);
    text-decoration: none;
    letter-spacing: 0.01em;
    border-radius: 2px;
    transition: color 0.25s ease, background 0.25s ease, padding-left 0.25s ease;
}

.nav-link::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--warm-wood);
    box-shadow:
        inset 0 0 0 1.5px var(--pale-timber),
        inset 0 0 0 3px var(--living-green);
    opacity: 0.55;
    transition: opacity 0.25s ease, transform 0.3s ease;
}

.nav-link:hover {
    color: var(--deep-forest);
    background: rgba(250, 247, 242, 0.32);
    padding-left: 26px;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link.active {
    color: var(--deep-forest);
    background: rgba(250, 247, 242, 0.55);
    font-weight: 600;
}

.nav-link.active::before {
    opacity: 1;
    border-color: var(--deep-forest);
    box-shadow:
        inset 0 0 0 1.5px var(--birch-white),
        inset 0 0 0 3px var(--living-green);
    transform: translateY(-50%) scale(1.08);
}

.nav-list--quiet .nav-link {
    font-size: 0.88rem;
    font-weight: 400;
    opacity: 0.85;
}

/* sidebar foot */
.sidebar-foot {
    margin-top: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-top: 22px;
    border-top: 1px solid rgba(44, 36, 22, 0.18);
}

.foot-line {
    font-family: var(--mono);
    font-size: 0.7rem;
    line-height: 1.5;
    color: var(--dark-bark);
    opacity: 0.65;
}

/* leaf */
.leaf-mark {
    display: inline-block;
    width: 8px;
    height: 12px;
    background: var(--living-green);
    border-radius: 0 50% 50% 0;
    transform: rotate(-45deg);
    flex: 0 0 auto;
    margin-top: 4px;
}

/* ---------------------------------------------------------------
   MAIN CONTENT
---------------------------------------------------------------- */
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    background: var(--birch-white);
}

/* HERO — birch bark gradient */
.hero {
    position: relative;
    padding: 100px 80px 80px;
    background: linear-gradient(90deg, var(--birch-white), var(--light-grain), var(--birch-white));
    overflow: hidden;
    border-bottom: 1px solid rgba(44, 36, 22, 0.12);
}

.hero-grain {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 14px,
            rgba(44, 36, 22, 0.035) 14px,
            rgba(44, 36, 22, 0.035) 15px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 60px,
            rgba(166, 124, 82, 0.05) 60px,
            rgba(166, 124, 82, 0.05) 62px
        ),
        radial-gradient(
            ellipse 320px 18px at 30% 28%,
            rgba(44, 36, 22, 0.05),
            transparent 70%
        ),
        radial-gradient(
            ellipse 240px 14px at 75% 70%,
            rgba(44, 36, 22, 0.045),
            transparent 70%
        );
    pointer-events: none;
    opacity: 0.9;
}

.hero-content {
    position: relative;
    max-width: 760px;
    z-index: 1;
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--warm-wood);
    margin-bottom: 22px;
    display: inline-block;
    padding: 5px 0;
    border-bottom: 1px solid var(--warm-wood);
}

.hero-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(2.6rem, 6.5vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--dark-bark);
    margin-bottom: 26px;
}

.hero-dot {
    color: var(--living-green);
}

.hero-tag {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 1.5;
    color: var(--dark-bark);
    opacity: 0.82;
    max-width: 580px;
    margin-bottom: 36px;
}

.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--dark-bark);
    letter-spacing: 0.04em;
}

.meta-item em {
    font-style: normal;
    color: var(--warm-wood);
    margin-right: 6px;
    font-weight: 500;
}

.meta-divider {
    width: 5px;
    height: 5px;
    background: var(--warm-wood);
    border-radius: 50%;
    opacity: 0.5;
}

/* STRIP — secondary horizontal band */
.strip {
    background: var(--deep-forest);
    color: var(--birch-white);
    padding: 26px 80px;
    border-bottom: 1px solid rgba(44, 36, 22, 0.2);
}

.strip-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: end;
}

.strip-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid rgba(250, 247, 242, 0.18);
    padding-left: 18px;
}

.strip-cell:first-child {
    border-left: none;
    padding-left: 0;
}

.strip-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--pale-timber);
    opacity: 0.85;
}

.strip-value {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.1;
    color: var(--birch-white);
    letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------
   BLOCKS — alternating widths, F-pattern
---------------------------------------------------------------- */
.block {
    padding: 76px 80px;
    border-bottom: 1px solid rgba(44, 36, 22, 0.10);
    position: relative;
}

.block:nth-child(even) {
    background: var(--light-grain);
}

.block:nth-child(odd) {
    background: var(--birch-white);
}

.block--full .block-body {
    max-width: 100%;
}

.block--two-thirds .block-body {
    max-width: 68%;
}

.block-head {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(166, 124, 82, 0.35);
    max-width: 720px;
}

.block-num {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--warm-wood);
    letter-spacing: 0.18em;
    font-weight: 500;
}

.block-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--deep-forest);
}

.block-body.two-thirds {
    max-width: 68%;
}

.block-body p {
    margin-bottom: 18px;
    max-width: 64ch;
}

.block-body .lead {
    font-size: 1.08rem;
    line-height: 1.65;
    color: var(--dark-bark);
    margin-bottom: 26px;
    max-width: 60ch;
}

.aside {
    font-style: italic;
    color: var(--dark-bark);
    opacity: 0.78;
    border-left: 2px solid var(--warm-wood);
    padding-left: 14px;
    margin-top: 18px;
}

/* growth-ring list */
.ring-list {
    list-style: none;
    margin: 18px 0 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ring-list li {
    position: relative;
    padding-left: 30px;
    line-height: 1.65;
    max-width: 64ch;
}

.ring-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--living-green);
    box-shadow:
        inset 0 0 0 2px var(--birch-white),
        inset 0 0 0 4px var(--warm-wood);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.block:nth-child(even) .ring-list li::before {
    box-shadow:
        inset 0 0 0 2px var(--light-grain),
        inset 0 0 0 4px var(--warm-wood);
}

.ring-list li:hover::before {
    transform: scale(1.18) rotate(45deg);
}

/* leaf end mark */
.leaf-end {
    display: inline-block;
    width: 10px;
    height: 14px;
    background: var(--living-green);
    border-radius: 0 50% 50% 0;
    transform: rotate(-45deg);
    margin-top: 18px;
    opacity: 0.85;
}

/* species table */
.species-table {
    width: 100%;
    max-width: 720px;
    margin-top: 22px;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.species-table thead th {
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--warm-wood);
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1.5px solid var(--warm-wood);
    font-weight: 500;
}

.species-table tbody td {
    padding: 14px;
    border-bottom: 1px solid rgba(166, 124, 82, 0.22);
    vertical-align: middle;
    color: var(--dark-bark);
}

.species-table tbody tr {
    transition: background 0.25s ease;
}

.species-table tbody tr:hover {
    background: rgba(107, 143, 94, 0.08);
}

.species-table em {
    font-style: italic;
    color: var(--dark-bark);
    opacity: 0.65;
    font-size: 0.85rem;
    margin-left: 6px;
}

.mono {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--deep-forest);
    letter-spacing: 0.02em;
}

/* harvest cycle */
.cycle {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 26px;
    border-top: 1px solid rgba(166, 124, 82, 0.32);
    border-bottom: 1px solid rgba(166, 124, 82, 0.32);
    position: relative;
}

.cycle-phase {
    padding: 22px 22px 22px 22px;
    border-right: 1px solid rgba(166, 124, 82, 0.2);
    position: relative;
    transition: background 0.3s ease;
}

.cycle-phase:last-child {
    border-right: none;
}

.cycle-phase:hover {
    background: rgba(107, 143, 94, 0.06);
}

.phase-mark {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--deep-forest);
    box-shadow:
        inset 0 0 0 2px var(--birch-white),
        inset 0 0 0 4px var(--warm-wood),
        inset 0 0 0 6px var(--birch-white),
        inset 0 0 0 7px var(--living-green);
    margin-bottom: 14px;
    transition: transform 0.5s ease;
}

.cycle-phase:hover .phase-mark {
    transform: rotate(45deg) scale(1.08);
}

.phase-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--deep-forest);
    letter-spacing: 0.01em;
    margin-bottom: 8px !important;
}

.phase-text {
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--dark-bark);
    opacity: 0.85;
    margin-bottom: 0 !important;
}

/* ledger */
.ledger {
    margin-top: 22px;
    border-top: 1px solid rgba(166, 124, 82, 0.32);
    max-width: 720px;
}

.ledger-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(166, 124, 82, 0.18);
    align-items: baseline;
    transition: padding-left 0.3s ease;
}

.ledger-row:hover {
    padding-left: 12px;
    background: rgba(107, 143, 94, 0.05);
}

.ledger-row dt {
    font-family: var(--display);
    font-weight: 500;
    color: var(--dark-bark);
}

.ledger-row dd {
    text-align: right;
}

.ledger-pos {
    color: var(--living-green);
    font-weight: 500;
}

/* notes */
.note {
    border-left: 2px solid var(--warm-wood);
    padding: 8px 0 8px 22px;
    margin-bottom: 28px;
    max-width: 64ch;
    transition: border-left-color 0.3s ease;
}

.note:hover {
    border-left-color: var(--living-green);
}

.note-date {
    margin-bottom: 6px !important;
    color: var(--warm-wood);
}

.note-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--deep-forest);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.note p {
    margin-bottom: 0;
}

/* contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 26px;
    border-top: 1px solid rgba(166, 124, 82, 0.32);
    padding-top: 26px;
}

.contact-cell {
    padding-right: 16px;
    border-right: 1px solid rgba(166, 124, 82, 0.18);
}

.contact-cell:last-child {
    border-right: none;
}

.contact-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--warm-wood);
    margin-bottom: 10px !important;
}

.contact-line {
    font-family: var(--display);
    font-weight: 500;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--dark-bark);
    margin-bottom: 8px !important;
}

.contact-cell .mono {
    font-size: 0.82rem;
    color: var(--deep-forest);
}

/* footer */
.foot {
    background: var(--dark-bark);
    color: var(--pale-timber);
    padding: 36px 80px;
}

.foot-line-top {
    height: 2px;
    background: linear-gradient(90deg, var(--warm-wood), transparent);
    margin-bottom: 26px;
}

.foot-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 28px;
    align-items: baseline;
    font-size: 0.85rem;
}

.foot-mark {
    font-family: var(--display);
    font-weight: 600;
    color: var(--birch-white);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.foot-meta {
    color: var(--pale-timber);
    opacity: 0.78;
}

/* ---------------------------------------------------------------
   ANIMATIONS — quiet, slow
---------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s ease, transform 0.9s ease;
    will-change: opacity, transform;
}

.reveal.is-in {
    opacity: 1;
    transform: translateY(0);
}

@keyframes ringDraw {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }
    to {
        opacity: var(--ring-opacity, 0.55);
        transform: translateY(-50%) scale(1);
    }
}

/* ---------------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------------- */
@media (max-width: 1100px) {
    .block,
    .hero,
    .strip,
    .foot {
        padding-left: 56px;
        padding-right: 56px;
    }

    .block--two-thirds .block-body,
    .block-body.two-thirds {
        max-width: 88%;
    }

    .strip-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px 24px;
    }

    .strip-cell:nth-child(3) {
        border-left: none;
        padding-left: 0;
    }

    .cycle {
        grid-template-columns: repeat(2, 1fr);
    }

    .cycle-phase:nth-child(2) {
        border-right: none;
    }

    .cycle-phase:nth-child(1),
    .cycle-phase:nth-child(2) {
        border-bottom: 1px solid rgba(166, 124, 82, 0.2);
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-cell:nth-child(2) {
        border-right: none;
    }
}

@media (max-width: 820px) {
    :root {
        --sidebar-w: 0px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.4s ease;
        width: 240px;
    }

    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: 8px 0 38px -10px rgba(44, 36, 22, 0.4);
    }

    .main {
        margin-left: 0;
    }

    .hero {
        padding: 70px 32px 52px;
    }

    .strip,
    .block,
    .foot {
        padding-left: 32px;
        padding-right: 32px;
    }

    .block {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .block--two-thirds .block-body,
    .block-body.two-thirds {
        max-width: 100%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-cell {
        border-right: none;
        border-bottom: 1px solid rgba(166, 124, 82, 0.18);
        padding-right: 0;
        padding-bottom: 18px;
    }

    .contact-cell:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .foot-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 540px) {
    .strip-row {
        grid-template-columns: 1fr 1fr;
    }

    .cycle {
        grid-template-columns: 1fr;
    }

    .cycle-phase {
        border-right: none;
        border-bottom: 1px solid rgba(166, 124, 82, 0.2);
    }

    .cycle-phase:last-child {
        border-bottom: none;
    }
}
