/* ===========================
   namu.farm — Bauhaus Agritech
   =========================== */

:root {
    --bg-dusk: #1c1a17;
    --surface-frame: #2a2520;
    --sunset-amber: #e8943a;
    --growth-vermillion: #d45a3b;
    --warm-straw: #f0d99a;
    --living-chlorophyll: #6b8f4e;
    --solar-flare: #f2784b;
    --twilight-soil: #3d3630;
    --dark-amber: #b87430;
    --deep-amber: #8a5723;
    --font-mono: 'Space Mono', monospace;
    --font-display: 'Anybody', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dusk);
    color: var(--warm-straw);
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: clamp(0.85rem, 1.5vw, 1.05rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ===========================
   Hero: Greenhouse Frame
   =========================== */

.greenhouse-frame {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 80px 1fr 80px;
    background: var(--bg-dusk);
    position: relative;
    overflow: hidden;
}

/* Frame cells */
.frame-cell {
    opacity: 0;
    overflow: hidden;
    position: relative;
}

.frame-cell.visible {
    opacity: 1;
    transition: opacity 800ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ===========================
   Top Status Bar
   =========================== */

.top-bar {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1rem, 3vw, 2.5rem);
    background: var(--surface-frame);
    border-bottom: 1px solid var(--twilight-soil);
    z-index: 2;
}

.top-bar::before {
    content: 'NAMU.FARM // SEASON:03 // GROWTH-IDX:0.847 // NAMU.FARM // SEASON:03 // GROWTH-IDX:0.847 // NAMU.FARM // SEASON:03';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--twilight-soil);
    letter-spacing: 0.15em;
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}

.data-label {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--warm-straw);
    position: relative;
    z-index: 1;
}

.data-readout {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--sunset-amber);
    position: relative;
    z-index: 1;
}

/* ===========================
   Bottom Status Bar
   =========================== */

.bottom-bar {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1rem, 3vw, 2.5rem);
    background: var(--surface-frame);
    border-top: 1px solid var(--twilight-soil);
    gap: 1.5rem;
    z-index: 2;
}

.bottom-bar::before {
    content: 'HARVEST-CYCLE:ACTIVE // LAT:35.6762 // LON:139.6503 // NAMU.FARM // HARVEST-CYCLE:ACTIVE // LAT:35.6762';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--twilight-soil);
    letter-spacing: 0.15em;
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}

.harvest-bar {
    width: 120px;
    height: 4px;
    background: var(--twilight-soil);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.harvest-fill {
    height: 100%;
    width: 0%;
    background: var(--growth-vermillion);
    border-radius: 2px;
    transition: width 100ms linear;
}

.enter-link {
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    letter-spacing: 0.15em;
    text-transform: lowercase;
    color: var(--warm-straw);
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: color 300ms ease;
}

.enter-link:hover {
    color: var(--sunset-amber);
}

/* ===========================
   Left & Right Columns
   =========================== */

.left-col {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface-frame);
    border-right: 1px solid var(--twilight-soil);
    padding: 1rem 0.5rem;
    gap: 0.5rem;
}

.right-col {
    grid-column: 3;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface-frame);
    border-left: 1px solid var(--twilight-soil);
    padding: 1rem 0.5rem;
    gap: 0.5rem;
}

.vertical-label {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, 0.9vw, 0.75rem);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--twilight-soil);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: rotate(180deg) translate(50%, 50%);
}

.growth-line {
    width: 2px;
    height: 60px;
    flex-shrink: 0;
}

.gline {
    stroke: var(--living-chlorophyll);
    stroke-width: 1;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.gline.animate {
    animation: growLine 20s linear infinite;
}

.gline-1.animate { animation-delay: 0s; }
.gline-2.animate { animation-delay: 5s; }
.gline-3.animate { animation-delay: 10s; }
.gline-4.animate { animation-delay: 2s; }
.gline-5.animate { animation-delay: 7s; }
.gline-6.animate { animation-delay: 12s; }

@keyframes growLine {
    0% { stroke-dashoffset: 200; }
    80% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 0; }
}

/* Corner cells */
.corner {
    background: var(--surface-frame);
    display: flex;
    align-items: center;
    justify-content: center;
}

.corner.tl {
    grid-column: 1;
    grid-row: 1;
    border-bottom: 1px solid var(--twilight-soil);
    border-right: 1px solid var(--twilight-soil);
    z-index: 3;
}

.corner.tr {
    grid-column: 3;
    grid-row: 1;
    border-bottom: 1px solid var(--twilight-soil);
    border-left: 1px solid var(--twilight-soil);
    z-index: 3;
}

.corner.bl {
    grid-column: 1;
    grid-row: 3;
    border-top: 1px solid var(--twilight-soil);
    border-right: 1px solid var(--twilight-soil);
    z-index: 3;
}

.corner.br {
    grid-column: 3;
    grid-row: 3;
    border-top: 1px solid var(--twilight-soil);
    border-left: 1px solid var(--twilight-soil);
    z-index: 3;
}

/* Leaf motifs in peripheral columns */
.leaf-motif {
    position: absolute;
    width: 40px;
    height: 55px;
    opacity: 0;
    transition: opacity 600ms ease;
}

.leaf-motif.visible {
    opacity: 1;
}

.leaf-left-1 {
    bottom: 15%;
    left: 20%;
    transform: rotate(-15deg) translate(-40px, 0);
    transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms ease;
}

.leaf-left-1.entered {
    transform: rotate(-15deg) translate(0, 0);
    opacity: 1;
}

.leaf-right-1 {
    top: 20%;
    right: 20%;
    transform: rotate(30deg) translate(40px, 0);
    transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms ease;
}

.leaf-right-1.entered {
    transform: rotate(30deg) translate(0, 0);
    opacity: 1;
}

.leaf-corner-tl {
    width: 28px;
    height: 35px;
    position: relative;
    transform: rotate(45deg) translate(0, 30px);
    transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms ease;
}

.leaf-corner-tl.entered {
    transform: rotate(45deg) translate(0, 0);
    opacity: 1;
}

.leaf-corner-br {
    width: 28px;
    height: 35px;
    position: relative;
    transform: rotate(-20deg) translate(0, -30px);
    transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms ease;
}

.leaf-corner-br.entered {
    transform: rotate(-20deg) translate(0, 0);
    opacity: 1;
}

/* ===========================
   Center Bed
   =========================== */

.center-bed {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1.5rem, 3vh, 3rem);
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Domain Name */
.domain-name {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sunset-amber);
    line-height: 1.1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.domain-name .char {
    display: inline-block;
    transform: scale(0);
    opacity: 0;
}

.domain-name .char.revealed {
    transform: scale(1);
    opacity: 1;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease;
}

/* Tagline */
.tagline {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    letter-spacing: -0.01em;
    font-stretch: 125%;
    color: var(--warm-straw);
    text-align: center;
    max-width: 600px;
    opacity: 0;
    transition: opacity 600ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.tagline.visible {
    opacity: 1;
}

/* Center leaf elements */
.center-leaves {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    justify-content: center;
}

.leaf-center {
    width: 35px;
    height: 50px;
    opacity: 0;
    transform: translateY(40px);
    transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms ease;
}

.leaf-center.entered {
    opacity: 1;
    transform: translateY(0);
}

.leaf-c1 {
    transform: translateX(-40px) rotate(0deg);
}

.leaf-c1.entered {
    transform: translateX(0) rotate(-15deg);
}

.leaf-c2 {
    transform: translateX(40px) rotate(0deg);
}

.leaf-c2.entered {
    transform: translateX(0) rotate(20deg);
}

.leaf-c3 {
    transform: translateY(40px) rotate(0deg);
}

.leaf-c3.entered {
    transform: translateY(0) rotate(-8deg);
}

/* ===========================
   Below the Fold
   =========================== */

.below-fold {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 6vh, 6rem) clamp(1rem, 4vw, 4rem);
    background: var(--bg-dusk);
}

.panels-row {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    gap: clamp(1.5rem, 3vw, 3rem);
    flex-wrap: wrap;
}

/* Isometric Panels */
.iso-panel {
    background: var(--surface-frame);
    border: 1px solid var(--twilight-soil);
    box-shadow: 0 0 0 1px var(--twilight-soil);
    padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 240px;
    max-width: 350px;
    cursor: default;
    transform: scale(1);
    transition: transform 500ms cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 500ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.iso-panel:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px 2px rgba(232, 148, 58, 0.15);
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.panel-caption {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm-straw);
    transition: color 300ms ease;
}

.iso-panel:hover .panel-caption {
    color: var(--sunset-amber);
}

/* ===========================
   Isometric Icon System
   =========================== */

.iso-icon-container {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 600px;
}

.iso-object {
    position: relative;
    width: 70px;
    height: 70px;
    transform: rotateX(55deg) rotateZ(-45deg);
    transform-style: preserve-3d;
}

.iso-face {
    position: absolute;
    transition: background-color 300ms ease;
}

/* Planter */
.planter .iso-top {
    width: 70px;
    height: 70px;
    background: var(--sunset-amber);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.planter .iso-left {
    width: 70px;
    height: 40px;
    background: var(--dark-amber);
    position: absolute;
    bottom: -40px;
    left: 0;
    transform: rotateX(-90deg);
    transform-origin: top;
}

.planter .iso-right {
    width: 40px;
    height: 70px;
    background: var(--deep-amber);
    position: absolute;
    top: 0;
    right: -40px;
    transform: rotateY(90deg);
    transform-origin: left;
}

.iso-panel:hover .planter .iso-top {
    background: var(--solar-flare);
}

.planter .iso-leaf {
    position: absolute;
    width: 20px;
    height: 35px;
    top: -25px;
    left: 50%;
    transform: translateX(-50%) rotateZ(45deg) rotateX(-55deg);
    z-index: 10;
}

/* Tower */
.tower .iso-top.tall {
    width: 50px;
    height: 50px;
    background: var(--sunset-amber);
    left: 10px;
    top: 10px;
}

.tower .iso-left.tall {
    width: 50px;
    height: 60px;
    background: var(--dark-amber);
    position: absolute;
    bottom: -60px;
    left: 10px;
    transform: rotateX(-90deg);
    transform-origin: top;
}

.tower .iso-right.tall {
    width: 60px;
    height: 50px;
    background: var(--deep-amber);
    position: absolute;
    top: 10px;
    right: -50px;
    transform: rotateY(90deg);
    transform-origin: left;
}

.iso-panel:hover .tower .iso-top.tall {
    background: var(--solar-flare);
}

.tower-ring {
    position: absolute;
    width: 54px;
    height: 3px;
    background: var(--living-chlorophyll);
    left: 8px;
    opacity: 0.7;
}

.tower-ring.ring-1 { bottom: -15px; }
.tower-ring.ring-2 { bottom: -30px; }
.tower-ring.ring-3 { bottom: -45px; }

/* Vault */
.vault .iso-top {
    width: 65px;
    height: 65px;
    background: var(--sunset-amber);
    left: 2px;
    top: 2px;
}

.vault .iso-left {
    width: 65px;
    height: 35px;
    background: var(--dark-amber);
    position: absolute;
    bottom: -33px;
    left: 2px;
    transform: rotateX(-90deg);
    transform-origin: top;
}

.vault .iso-right {
    width: 35px;
    height: 65px;
    background: var(--deep-amber);
    position: absolute;
    top: 2px;
    right: -33px;
    transform: rotateY(90deg);
    transform-origin: left;
}

.iso-panel:hover .vault .iso-top {
    background: var(--solar-flare);
}

.vault-lock {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--warm-straw);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* ===========================
   Footer
   =========================== */

.footer-rule {
    width: 100%;
    max-width: 1200px;
    border: none;
    border-top: 1px solid var(--twilight-soil);
    margin-top: clamp(3rem, 6vh, 6rem);
}

.site-footer {
    width: 100%;
    max-width: 1200px;
    padding: 2rem 0;
    text-align: center;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, 0.9vw, 0.75rem);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--twilight-soil);
}

/* ===========================
   Responsive
   =========================== */

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

    .top-bar,
    .bottom-bar {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    .top-bar .data-readout:nth-child(2) {
        display: none;
    }

    .vertical-label {
        font-size: 0.5rem;
    }

    .panels-row {
        flex-direction: column;
        align-items: center;
    }

    .iso-panel {
        max-width: 100%;
        width: 100%;
    }

    .domain-name {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .enter-link {
        display: none;
    }
}

@media (max-width: 480px) {
    .greenhouse-frame {
        grid-template-columns: 40px 1fr 40px;
        grid-template-rows: 50px 1fr 50px;
    }

    .growth-line {
        height: 40px;
    }

    .left-col,
    .right-col {
        padding: 0.5rem 0.25rem;
    }
}
