/* digitaltelomere.com - Styles */
/* Colors: #b429f9 (Electric Orchid), #a3e635 (Vivid Chartreuse), #fef9ef (Cream Petal),
   #1e0a2e (Deep Plum), #2d2235 (Soft Carbon), #faf5eb (Warm Linen),
   #ff6b6b (Coral Burst), #38bdf8 (Sky Enzyme), #d4d0db (Skeleton Gray) */

:root {
    --orchid: #b429f9;
    --chartreuse: #a3e635;
    --cream: #fef9ef;
    --plum: #1e0a2e;
    --carbon: #2d2235;
    --linen: #faf5eb;
    --coral: #ff6b6b;
    --sky: #38bdf8;
    --skeleton: #d4d0db;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--carbon);
    background-color: var(--cream);
    overflow-x: hidden;
}

/* ========================
   SKELETON LOADING
   ======================== */
.skeleton-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cream);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

.skeleton-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.skeleton-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 80%;
    max-width: 500px;
}

.skeleton-line {
    height: 20px;
    background: var(--skeleton);
    border-radius: 10px;
    width: 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-line--title {
    height: 40px;
    width: 70%;
    border-radius: 20px;
}

.skeleton-line--subtitle {
    height: 24px;
    width: 50%;
}

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

.skeleton-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--skeleton);
    animation: skeletonPulse 1.5s ease-in-out infinite;
    animation-delay: 0.3s;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* ========================
   SECTIONS BASE
   ======================== */
.section {
    position: relative;
    min-height: 90vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.section--hero {
    min-height: 100vh;
}

.section--finale {
    min-height: 100vh;
}

.section--light {
    background-color: var(--cream);
    color: var(--carbon);
}

.section--dark {
    background-color: var(--plum);
    color: var(--linen);
}

.section__bg-tint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
}

.section--light .section__bg-tint {
    background: radial-gradient(ellipse at center, rgba(180, 41, 249, 0.06) 0%, transparent 70%);
}

.section__bg-tint--chartreuse {
    background: radial-gradient(ellipse at center, rgba(163, 230, 53, 0.08) 0%, transparent 70%) !important;
}

.section__bg-tint--orchid {
    background: radial-gradient(ellipse at center, rgba(180, 41, 249, 0.06) 0%, transparent 70%) !important;
}

.section--dark .section__bg-tint {
    background: radial-gradient(ellipse at center, rgba(180, 41, 249, 0.12) 0%, transparent 70%);
}

/* ========================
   SECTION CONTENT
   ======================== */
.section__content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
    padding: 80px 40px;
    gap: 60px;
    z-index: 2;
}

.content-block {
    max-width: 640px;
    flex: 1;
}

.content-block--left {
    text-align: left;
}

.content-block--right {
    text-align: left;
}

/* ========================
   TYPOGRAPHY
   ======================== */
h1, h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.hero__title {
    font-size: clamp(48px, 8vw, 96px);
    color: var(--orchid);
    margin-bottom: 16px;
}

.hero__tagline {
    font-family: 'Caveat', cursive;
    font-size: clamp(20px, 3vw, 28px);
    color: var(--coral);
    transform: rotate(-1.5deg);
}

.section__title {
    font-size: clamp(36px, 5vw, 72px);
    margin-bottom: 24px;
}

.section--light .section__title {
    color: var(--orchid);
}

.section--dark .section__title {
    color: var(--chartreuse);
}

.section__title--finale {
    color: var(--chartreuse) !important;
    text-align: center;
    font-size: clamp(40px, 6vw, 80px);
}

.section__body {
    font-size: clamp(16px, 1.8vw, 20px);
    margin-bottom: 20px;
    line-height: 1.75;
}

.section--dark .section__body {
    color: var(--linen);
}

.section__body--finale {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    color: var(--linen) !important;
}

/* ========================
   ANNOTATIONS (Caveat)
   ======================== */
.annotation {
    font-family: 'Caveat', cursive;
    font-size: 18px;
    font-weight: 400;
    color: var(--coral);
    display: inline-block;
}

.annotation--rotated {
    transform: rotate(-2deg);
    margin-bottom: 12px;
}

.annotation--inline {
    transform: rotate(1.5deg);
    margin-top: 8px;
    display: block;
}

.annotation--illustration {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 16px;
}

.annotation--finale {
    display: block;
    text-align: center;
    font-size: 22px;
    color: var(--coral);
    transform: rotate(-1deg);
    margin-top: 24px;
}

/* ========================
   HERO
   ======================== */
.hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
}

.hero__illustration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(80vw, 500px);
    height: auto;
    opacity: 0.18;
    z-index: 1;
}

.hero-telomere-svg {
    width: 100%;
    height: auto;
}

/* ========================
   ILLUSTRATION FLOATS
   ======================== */
.illustration-float {
    flex: 0 0 auto;
    width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.illustration-float--right {
    order: 2;
}

.illustration-float--left {
    order: -1;
}

.illustration-float svg {
    width: 100%;
    height: auto;
}

/* ========================
   SVG DRAW ANIMATIONS
   ======================== */
.svg-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.svg-draw--delay1 {
    transition-delay: 0.2s;
}

.svg-draw--delay2 {
    transition-delay: 0.4s;
}

.svg-draw--delay3 {
    transition-delay: 0.6s;
}

.svg-fill {
    transition: opacity 0.4s ease-out;
}

.svg-fill--delay1 {
    transition-delay: 0.9s;
}

.svg-fill--delay2 {
    transition-delay: 1.1s;
}

.svg-fill--delay3 {
    transition-delay: 1.3s;
}

.section.in-view .svg-draw {
    stroke-dashoffset: 0;
}

.section.in-view .svg-fill {
    opacity: 0.2;
}

/* ========================
   FADE UP ANIMATIONS
   ======================== */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.fade-up--delay1 {
    transition-delay: 0.08s;
}

.fade-up--delay2 {
    transition-delay: 0.16s;
}

.fade-up--delay3 {
    transition-delay: 0.24s;
}

.section.in-view .fade-up {
    opacity: 1;
    transform: translateY(0);
}

/* ========================
   LEAF DECORATIONS
   ======================== */
.leaf-decoration {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.leaf-decoration--hero-left {
    left: 5%;
    bottom: 15%;
    width: 60px;
    transform: rotate(-15deg);
}

.leaf-decoration--hero-right {
    right: 8%;
    top: 20%;
    width: 45px;
    transform: rotate(20deg);
}

/* Leaf scatter positions */
.leaf-scatter {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.leaf-scatter--1 { right: 5%; bottom: 20%; width: 35px; transform: rotate(-10deg); }
.leaf-scatter--2 { left: 8%; bottom: 30%; width: 28px; transform: rotate(25deg); }
.leaf-scatter--3 { right: 15%; bottom: 35%; width: 24px; transform: rotate(-30deg); }
.leaf-scatter--4 { right: 3%; bottom: 25%; width: 30px; transform: rotate(15deg); }
.leaf-scatter--5 { left: 5%; bottom: 20%; width: 22px; transform: rotate(-20deg); }
.leaf-scatter--6 { right: 10%; bottom: 15%; width: 20px; transform: rotate(35deg); }
.leaf-scatter--7 { left: 12%; bottom: 10%; width: 18px; transform: rotate(-5deg); }
.leaf-scatter--8 { left: 3%; bottom: 8%; width: 24px; transform: rotate(10deg); }
.leaf-scatter--9 { left: 8%; bottom: 5%; width: 20px; transform: rotate(-25deg); }
.leaf-scatter--10 { left: 15%; bottom: 3%; width: 18px; transform: rotate(20deg); }
.leaf-scatter--11 { right: 12%; bottom: 6%; width: 16px; transform: rotate(-15deg); }
.leaf-scatter--12 { right: 5%; bottom: 4%; width: 22px; transform: rotate(30deg); }
.leaf-scatter--13 { right: 18%; bottom: 2%; width: 14px; transform: rotate(-8deg); }

/* Finale leaves */
.finale-leaves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 1;
    pointer-events: none;
}

.leaf-scatter--f1 { left: 5%; bottom: 10px; width: 35px; transform: rotate(-12deg); }
.leaf-scatter--f2 { left: 15%; bottom: 5px; width: 28px; transform: rotate(18deg); }
.leaf-scatter--f3 { left: 28%; bottom: 15px; width: 24px; transform: rotate(-25deg); }
.leaf-scatter--f4 { right: 30%; bottom: 8px; width: 20px; transform: rotate(8deg); }
.leaf-scatter--f5 { right: 15%; bottom: 12px; width: 26px; transform: rotate(-18deg); }
.leaf-scatter--f6 { right: 5%; bottom: 6px; width: 16px; transform: rotate(22deg); }

.leaf-cluster {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: 1;
    pointer-events: none;
}

/* ========================
   SPROUT DECORATIONS
   ======================== */
.sprout-decoration {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.sprout--1 {
    left: 8%;
    bottom: 15%;
    width: 40px;
}

.sprout--2 {
    right: 6%;
    bottom: 20%;
    width: 32px;
    transform: scaleX(-1);
}

/* ========================
   CELL DIVISION DECORATIONS
   ======================== */
.cell-divisions-decoration {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    opacity: 0.3;
    z-index: 1;
}

.mini-cell--1 { width: 50px; }
.mini-cell--2 { width: 40px; }
.mini-cell--3 { width: 30px; }

/* ========================
   SECTION DIVIDERS
   ======================== */
.section-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 5;
    display: block;
}

/* ========================
   FINALE SECTION
   ======================== */
.finale__illustration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(70vw, 450px);
    opacity: 0.15;
    z-index: 1;
}

.finale-telomere-svg {
    width: 100%;
    height: auto;
}

.finale__content {
    position: relative;
    z-index: 3;
    padding: 60px 20px;
    text-align: center;
}

/* ========================
   SCROLL PROGRESS INDICATOR
   ======================== */
.scroll-indicator {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--orchid);
    background: rgba(30, 10, 46, 0.6);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cellPulse 2s ease-in-out infinite;
    backdrop-filter: blur(4px);
}

.scroll-indicator__inner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: conic-gradient(var(--orchid) 0%, transparent 0%);
    transition: background 0.1s linear;
}

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

/* ========================
   CONTENT REVEAL ANIMATION
   ======================== */
.section.reveal .fade-up {
    opacity: 1;
    transform: translateY(0);
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 768px) {
    .section__content {
        flex-direction: column;
        padding: 60px 24px;
        gap: 30px;
    }

    .illustration-float {
        width: 200px;
        order: 0 !important;
    }

    .illustration-float--right,
    .illustration-float--left {
        order: 0 !important;
    }

    .content-block {
        max-width: 100%;
    }

    .section {
        min-height: auto;
        min-height: 80vh;
    }

    .hero__illustration {
        width: 90vw;
    }

    .leaf-decoration--hero-left,
    .leaf-decoration--hero-right {
        display: none;
    }

    .leaf-scatter,
    .sprout-decoration {
        display: none;
    }

    .cell-divisions-decoration {
        display: none;
    }

    .leaf-cluster {
        display: none;
    }

    .finale-leaves {
        display: none;
    }

    .finale__illustration {
        width: 90vw;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .section__content {
        padding: 40px 16px;
    }

    .illustration-float {
        width: 160px;
    }
}