/* persopass.io - Botanical Data Fortress */
/* Colors: #d4cfc6, #6b9e82, #f0ece4, #c9873a, #2d6a4f, #1a1f1c, #e8e4dc, #7b4f8a */

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

html, body {
    overflow: hidden;
    height: 100vh;
    background: #1a1f1c;
    color: #e8e4dc;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* Grid Substrate */
#grid-substrate {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(107, 158, 130, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 158, 130, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Root Progress Indicator */
#root-progress {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 400px;
    z-index: 100;
    opacity: 0.7;
    transition: opacity 0.3s;
}

#root-progress .root-node {
    transition: fill 0.4s, stroke 0.4s;
}

#root-progress .root-node.active {
    fill: #7b4f8a;
    stroke: #7b4f8a;
}

/* Vascular SVG */
#vascular-svg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
}

/* Header */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    mix-blend-mode: difference;
}

.wordmark {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: #e8e4dc;
}

.enter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(107, 158, 130, 0.4);
    color: #e8e4dc;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.enter-btn:hover {
    border-color: #6b9e82;
    background: rgba(107, 158, 130, 0.1);
}

.stoma {
    position: relative;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stoma-outer {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid #6b9e82;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: stoma-breathe 4s ease-in-out infinite;
}

.stoma-inner {
    width: 4px;
    height: 4px;
    background: #6b9e82;
    border-radius: 50%;
    animation: stoma-pulse 4s ease-in-out infinite;
}

@keyframes stoma-breathe {
    0%, 100% { transform: scale(1); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    50% { transform: scale(1.1); border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; }
}

@keyframes stoma-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.6); opacity: 0.6; }
}

/* Main Scroll Container */
#scroll-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    position: relative;
    z-index: 10;
}

/* Tissue Layers */
.tissue-layer {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 3rem;
}

.section-content {
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 5;
}

/* Blob Backgrounds */
.blob-bg {
    position: absolute;
    border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%;
    opacity: 0.08;
    filter: blur(60px);
    animation: blob-morph 20s ease-in-out infinite alternate;
}

.blob-bg-1 {
    width: 60vw;
    height: 60vh;
    top: 10%;
    left: -10%;
    background: #2d6a4f;
}

.blob-bg-2 {
    width: 40vw;
    height: 40vh;
    top: 30%;
    right: -5%;
    background: #7b4f8a;
    animation-delay: -7s;
}

.blob-bg-3 {
    width: 30vw;
    height: 30vh;
    bottom: 10%;
    left: 30%;
    background: #c9873a;
    animation-delay: -14s;
}

@keyframes blob-morph {
    0% { border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%; }
    25% { border-radius: 55% 45% 60% 40% / 40% 60% 45% 55%; }
    50% { border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%; }
    75% { border-radius: 60% 40% 45% 55% / 45% 55% 40% 60%; }
    100% { border-radius: 50% 50% 55% 45% / 50% 50% 45% 55%; }
}

/* Headlines */
.headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #f0ece4;
}

.section-title {
    margin-bottom: 3rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
}

/* Hero Section */
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-sub {
    font-size: 1.1rem;
    color: #d4cfc6;
}

.meta-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b9e82;
    display: block;
    margin-bottom: 0.5rem;
}

/* Cell containers */
.cell {
    background: rgba(26, 31, 28, 0.6);
    border: 1px solid rgba(107, 158, 130, 0.15);
    border-radius: 32% 68% 55% 45% / 45% 55% 45% 55%;
    padding: 2.5rem;
    backdrop-filter: blur(8px);
    transition: border-color 0.4s, border-radius 0.8s, transform 0.4s;
}

.cell:hover {
    border-color: rgba(107, 158, 130, 0.4);
    border-radius: 45% 55% 60% 40% / 55% 45% 50% 50%;
}

.hero-desc {
    max-width: 600px;
    border-radius: 28% 72% 60% 40% / 50% 50% 50% 50%;
    font-size: 1rem;
    color: #d4cfc6;
}

/* Skeleton Loading */
.skeleton-line {
    display: block;
    height: 12px;
    background: linear-gradient(90deg, rgba(107, 158, 130, 0.1) 25%, rgba(107, 158, 130, 0.2) 50%, rgba(107, 158, 130, 0.1) 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    margin-bottom: 8px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-block {
    padding: 1rem 0;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Reveal states */
.cell .skeleton-block,
.cell .skeleton-line,
.hero-desc .skeleton-line {
    transition: opacity 0.5s;
}

.cell.revealed .skeleton-block,
.hero-desc.revealed .skeleton-line {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.cell .actual-content,
.hero-desc .actual-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cell.revealed .actual-content,
.hero-desc.revealed .actual-content {
    opacity: 1;
    transform: translateY(0);
}

/* Features Grid */
.features-grid {
    display: flex;
    flex-direction: column;
}

.features-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-cell {
    position: relative;
}

.feature-cell h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #f0ece4;
}

.feature-cell p {
    font-size: 0.95rem;
    color: #d4cfc6;
    line-height: 1.7;
}

/* How It Works / Steps */
.steps-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.step-item {
    max-width: 500px;
    width: 100%;
    text-align: center;
    border-radius: 45% 55% 50% 50% / 50% 50% 55% 45%;
}

.step-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #7b4f8a;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}

.step-item h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #f0ece4;
}

.step-item p {
    font-size: 0.9rem;
    color: #d4cfc6;
}

.vascular-connector {
    height: 80px;
    width: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.connector-svg {
    width: 4px;
    height: 80px;
}

.vascular-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1s ease;
}

.vascular-connector.active .vascular-path {
    stroke-dashoffset: 0;
}

.nutrient-node {
    opacity: 0;
    transition: opacity 0.5s 0.5s;
}

.vascular-connector.active .nutrient-node {
    opacity: 1;
}

/* Trust Section */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.trust-cell h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: #f0ece4;
}

.trust-cell p {
    font-size: 0.9rem;
    color: #d4cfc6;
    margin-bottom: 1rem;
}

.protocol-detail {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #c9873a;
    background: rgba(201, 135, 58, 0.08);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid rgba(201, 135, 58, 0.2);
    display: inline-block;
}

/* CTA / Root Section */
.root-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.root-blob {
    text-align: center;
    max-width: 500px;
    border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%;
    padding: 4rem;
}

.root-blob h2 {
    margin-bottom: 1rem;
}

.root-blob p {
    color: #d4cfc6;
    margin-bottom: 2rem;
}

.cta-final {
    font-size: 0.9rem;
    padding: 0.75rem 2rem;
    border-color: #7b4f8a;
}

.cta-final:hover {
    border-color: #7b4f8a;
    background: rgba(123, 79, 138, 0.15);
}

/* Glow Pulse */
.glow-pulse {
    animation: glow 4s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 30px rgba(123, 79, 138, 0.1), 0 0 60px rgba(45, 106, 79, 0.05); }
    50% { box-shadow: 0 0 50px rgba(123, 79, 138, 0.2), 0 0 100px rgba(45, 106, 79, 0.1); }
}

/* Tissue layer transitions */
.tissue-layer {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.tissue-layer.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .tissue-layer {
        padding: 3rem 1.5rem;
    }

    #site-header {
        padding: 1rem 1.5rem;
    }

    #root-progress {
        display: none;
    }

    .cell {
        padding: 1.5rem;
    }

    .features-wrap {
        grid-template-columns: 1fr;
    }

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