/* tanso.biz - Chrome-Metallic Carbon Science */

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: #4A4F56;
    background: #F5F7FA;
    overflow-x: hidden;
}

/* ===== Zone System ===== */
.zone {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    overflow: hidden;
}

.zone-content {
    position: relative;
    z-index: 2;
}

/* ===== Chrome Gradient Surface ===== */
.zone-chrome {
    background: linear-gradient(135deg, #E8ECF0 0%, #F5F7FA 25%, #D4D8DC 50%, #F5F7FA 75%, #E8ECF0 100%);
    background-size: 200% 200%;
}

/* ===== Zone 1: The Lattice (Hero) ===== */
#zone-lattice {
    background: #F5F7FA;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.lattice-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.lattice-svg.interactive {
    pointer-events: all;
}

.zone-lattice-content {
    padding-top: 12vh;
    padding-left: 8vw;
}

.domain-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    letter-spacing: -0.03em;
    color: #2A2D32;
    line-height: 1.1;
}

.tagline {
    margin-top: 2vh;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    color: #6B7280;
    letter-spacing: 0.005em;
}

/* Lattice node styling */
.lattice-svg circle {
    fill: #D4D8DC;
    transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1), r 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lattice-svg line {
    stroke: #B8C6D0;
    stroke-width: 1.5;
    transition: stroke 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lattice-svg circle.bright {
    fill: #A8B8C8;
}

.lattice-svg line.bright {
    stroke: #A8B8C8;
}

/* Lattice draw animation */
.lattice-svg line.draw-in {
    stroke-dasharray: var(--line-len);
    stroke-dashoffset: var(--line-len);
    animation: drawLine 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--draw-delay, 0s);
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

@keyframes pulseNode {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.lattice-svg circle.pulse {
    animation: pulseNode 3s ease-in-out infinite;
    animation-delay: var(--pulse-delay, 0s);
    transform-origin: center;
    transform-box: fill-box;
}

/* ===== Zone 2: The Cycle ===== */
.zone-cycle-content {
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    padding: 4vh 0;
}

.cycle-left {
    width: 40%;
    padding-left: 8vw;
    display: flex;
    flex-direction: column;
    gap: 3vh;
}

.cycle-right {
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.data-card {
    border: 2px solid #D4D8DC;
    border-radius: 8px;
    padding: 2vh 2vw;
    background: rgba(245, 247, 250, 0.7);
    backdrop-filter: blur(4px);
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    letter-spacing: 0.04em;
    color: #8B9199;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1vh;
}

.data-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 2vw, 2rem);
    color: #2A2D32;
    display: block;
    margin-top: 0.5vh;
}

.sparkline {
    width: 100%;
    height: 80px;
    display: block;
}

.sparkline-fill {
    fill: rgba(52, 211, 153, 0.08);
    stroke: none;
}

.sparkline-fill.ember-fill {
    fill: rgba(245, 158, 11, 0.08);
}

.sparkline-path {
    fill: none;
    stroke: #4A4F56;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.sparkline-path.ember-path {
    stroke: #F59E0B;
}

/* Draw path animation */
.draw-path {
    stroke-dasharray: var(--path-len, 1000);
    stroke-dashoffset: var(--path-len, 1000);
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.draw-path.drawn {
    stroke-dashoffset: 0;
}

/* Carbon cycle */
.carbon-cycle {
    width: 80%;
    max-width: 450px;
    height: auto;
}

.cycle-ring {
    stroke-dasharray: 1131;
    stroke-dashoffset: 1131;
}

.cycle-ring.drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cycle-ring-accent {
    stroke-dasharray: 40 80;
    stroke-dashoffset: 1131;
}

.cycle-ring-accent.drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 3s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
}

.cycle-node-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    fill: #4A4F56;
    letter-spacing: 0.04em;
}

.cycle-node circle {
    transition: fill 0.3s ease;
}

/* ===== Zone 3: Allotropes ===== */
#zone-allotropes {
    display: flex;
    flex-direction: column;
    background: #F5F7FA;
}

.allotrope-band {
    flex: 1;
    min-height: 33.33vh;
    display: flex;
    align-items: center;
    padding: 4vh 0;
}

.allotrope-divider {
    width: 100%;
    height: 1px;
    background: #D4D8DC;
}

.allotrope-text {
    width: 35%;
    padding-left: 8vw;
}

.allotrope-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.8rem;
    color: #2A2D32;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
}

.allotrope-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #4A4F56;
    line-height: 1.72;
}

.allotrope-viz {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 7vw;
}

.allotrope-svg {
    width: 200px;
    height: 200px;
}

.allo-line {
    fill: none;
    stroke: #A8B8C8;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.allo-node {
    fill: #D4D8DC;
    stroke: #A8B8C8;
    stroke-width: 1;
}

/* ===== Zone 4: Root System ===== */
#zone-roots {
    background: #F5F7FA;
    position: relative;
    min-height: 100vh;
}

.root-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.root-svg path {
    fill: none;
    stroke: #34D399;
    stroke-linecap: round;
}

.root-svg circle {
    fill: #34D399;
}

.root-texts {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
}

.root-text {
    position: absolute;
    max-width: 280px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    color: #4A4F56;
    line-height: 1.6;
    background: rgba(245, 247, 250, 0.85);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border-left: 2px solid #34D399;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.root-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Zone 5: Horizon ===== */
.zone-horizon {
    background: linear-gradient(to bottom, #F5F7FA 0%, #E8ECF0 100%);
    display: flex;
    align-items: flex-end;
    min-height: 80vh;
}

.lattice-faint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.zone-horizon-content {
    padding-bottom: 15vh;
    padding-left: 8vw;
}

.domain-name-closing {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: #2A2D32;
    letter-spacing: -0.03em;
}

.closing-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #6B7280;
    margin-top: 0.8rem;
}

/* ===== SVG Noise Filter ===== */
.noise-filter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .zone-cycle-content {
        flex-direction: column;
        padding: 4vh 0;
    }
    .cycle-left {
        width: 100%;
        padding: 0 6vw;
    }
    .cycle-right {
        width: 100%;
        padding: 4vh 6vw;
    }
    .allotrope-band {
        flex-direction: column;
        padding: 3vh 0;
    }
    .allotrope-text {
        width: 100%;
        padding: 0 6vw;
        margin-bottom: 2vh;
    }
    .allotrope-viz {
        width: 100%;
        padding-left: 0;
        justify-content: center;
    }
    .root-text {
        max-width: 200px;
        font-size: 0.85rem;
    }
}
