/* ============================================================
   layer2.id - Watercolor Identity Passport
   ============================================================ */

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

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

body {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.7;
    color: #2a2a38;
    background: #f8f0e0;
    overflow-x: hidden;
}

/* ---------- Typography ---------- */
.section-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(12px, 1.5vw, 14px);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5a4a7a;
    margin-bottom: 8px;
}

.section-headline {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 64px);
    letter-spacing: 0.02em;
    color: #2a2a38;
    margin-bottom: 24px;
    line-height: 1.15;
}

.section-body {
    color: #6a6a78;
    max-width: 520px;
    margin-bottom: 16px;
}

/* ---------- Watercolor Washes (shared) ---------- */
.watercolor-sky,
.watercolor-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.wash {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Sky washes */
.wash-sage {
    width: 120%;
    height: 80%;
    top: -10%;
    left: -10%;
    background: radial-gradient(ellipse at 30% 40%, #d5e8d4 0%, transparent 70%);
    opacity: 0.6;
}

.wash-lavender {
    width: 100%;
    height: 70%;
    top: 5%;
    right: -20%;
    background: radial-gradient(ellipse at 70% 30%, #e0d4e8 0%, transparent 65%);
    opacity: 0.5;
}

.wash-cream {
    width: 90%;
    height: 60%;
    top: 20%;
    left: 10%;
    background: radial-gradient(ellipse at 50% 60%, #e8e0d4 0%, transparent 60%);
    opacity: 0.45;
}

/* Hero title */
.hero-title-area {
    position: relative;
    z-index: 10;
    text-align: center;
    margin-bottom: 10vh;
}

.hero-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(40px, 8vw, 96px);
    letter-spacing: 0.06em;
    color: #2a2a38;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}

.typewriter-cursor {
    font-weight: 300;
    animation: blink 0.8s step-end infinite;
    color: #5a4a7a;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(16px, 2vw, 22px);
    color: #6a6a78;
    margin-top: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mountains */
.mountains-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    z-index: 5;
    pointer-events: none;
}

.mountain-layer {
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mountain-far {
    height: 50%;
    background: linear-gradient(180deg, #a8c4a0 0%, #d5e8d4 100%);
    clip-path: polygon(0% 100%, 0% 65%, 5% 55%, 12% 40%, 18% 48%, 25% 30%, 32% 45%, 38% 25%, 44% 38%, 50% 20%, 56% 35%, 62% 22%, 68% 40%, 75% 28%, 82% 42%, 88% 35%, 95% 50%, 100% 38%, 100% 100%);
    opacity: 0;
}

.mountain-mid {
    height: 45%;
    background: linear-gradient(180deg, #6b8f7a 0%, #a8c4a0 100%);
    clip-path: polygon(0% 100%, 0% 70%, 8% 55%, 15% 45%, 22% 58%, 30% 35%, 38% 50%, 45% 30%, 52% 45%, 58% 28%, 65% 42%, 72% 32%, 78% 48%, 85% 38%, 92% 52%, 100% 42%, 100% 100%);
    opacity: 0;
}

.mountain-near {
    height: 38%;
    background: linear-gradient(180deg, #6b8f7a 0%, #4a6b5a 60%, #2a2a38 100%);
    clip-path: polygon(0% 100%, 0% 60%, 6% 48%, 12% 55%, 20% 38%, 28% 50%, 35% 32%, 42% 45%, 48% 28%, 55% 40%, 62% 25%, 70% 42%, 78% 30%, 85% 45%, 92% 35%, 100% 50%, 100% 100%);
    opacity: 0;
}

.mountain-layer.visible {
    opacity: 1;
}

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 1s ease 2s;
}

.hero-scroll-hint.visible {
    opacity: 1;
}

.scroll-text {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6a6a78;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid #6a6a78;
    border-bottom: 2px solid #6a6a78;
    transform: rotate(45deg);
    animation: bounceArrow 2s ease infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(6px); }
}

/* ---------- Watercolor Bleed Edge ---------- */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #c4a8904d);
    z-index: 30;
    pointer-events: none;
    filter: blur(4px);
}

/* ============================================================
   CREDENTIALS SECTION
   ============================================================ */
.credentials-section {
    position: relative;
    min-height: 100vh;
    padding: clamp(60px, 10vh, 120px) 40px;
    overflow: hidden;
}

.credentials-bg .wash-sage-light {
    width: 140%;
    height: 100%;
    top: -20%;
    left: -20%;
    background: radial-gradient(ellipse at 20% 50%, #d5e8d4 0%, transparent 60%);
    opacity: 0.3;
}

.credentials-bg .wash-lavender-light {
    width: 100%;
    height: 80%;
    top: 30%;
    right: -10%;
    background: radial-gradient(ellipse at 80% 60%, #e0d4e8 0%, transparent 55%);
    opacity: 0.25;
}

.credentials-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(40px, 6vw, 100px);
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* Main stamp */
.stamp-hero {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stamp-main {
    position: relative;
    width: clamp(200px, 30vw, 320px);
    height: clamp(200px, 30vw, 320px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-20px) scale(1.1);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stamp-main.stamped {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.stamp-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid #5a4a7a;
}

.stamp-ring-outer {
    width: 100%;
    height: 100%;
    opacity: 0.7;
    filter: blur(0.5px);
}

.stamp-ring-inner {
    width: 82%;
    height: 82%;
    border-width: 2px;
    opacity: 0.5;
}

.stamp-text-top,
.stamp-text-center,
.stamp-text-bottom {
    font-family: 'Josefin Sans', sans-serif;
    color: #5a4a7a;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 2;
}

.stamp-text-top {
    font-size: clamp(10px, 1.5vw, 14px);
    font-weight: 600;
    margin-bottom: 4px;
}

.stamp-text-center {
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: 0.15em;
}

.stamp-text-bottom {
    font-size: clamp(10px, 1.5vw, 14px);
    font-weight: 600;
    margin-top: 4px;
}

.stamp-ink-bleed {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(90, 74, 122, 0.08) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.stamp-main.stamped .stamp-ink-bleed {
    animation: inkBleed 0.3s ease forwards;
}

@keyframes inkBleed {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Credentials text */
.credentials-text {
    flex: 1;
    min-width: 280px;
    max-width: 520px;
}

/* Scattered mini stamps */
.stamps-scattered {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: clamp(40px, 6vh, 80px) auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(20px, 3vw, 40px);
    padding: 0 20px;
}

.mini-stamp {
    width: clamp(90px, 12vw, 130px);
    height: clamp(90px, 12vw, 130px);
    border-radius: 50%;
    border: 2px solid var(--stamp-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(var(--stamp-angle)) translateY(-20px) scale(1.1);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: blur(0.3px);
    position: relative;
}

.mini-stamp.stamped {
    opacity: 0.85;
    transform: rotate(var(--stamp-angle)) translateY(0) scale(1);
}

.mini-stamp span {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(8px, 1.2vw, 11px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--stamp-color);
    text-align: center;
    padding: 4px;
}

.mini-stamp::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    /* Watercolor bleed: #c4a890 at 30% opacity */
    background: radial-gradient(circle, #c4a89026 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mini-stamp.stamped::after {
    opacity: 1;
}

/* ============================================================
   JOURNEY SECTION
   ============================================================ */
.journey-section {
    position: relative;
    padding: clamp(60px, 10vh, 120px) 40px;
    min-height: 100vh;
    overflow: hidden;
}

.journey-bg .wash-cream-deep {
    width: 120%;
    height: 100%;
    top: 0;
    left: -10%;
    background: radial-gradient(ellipse at 50% 30%, #e8e0d4 0%, transparent 55%);
    opacity: 0.35;
}

.journey-bg .wash-sage-mid {
    width: 80%;
    height: 60%;
    bottom: 0;
    right: -5%;
    background: radial-gradient(ellipse at 70% 80%, #d5e8d4 0%, transparent 60%);
    opacity: 0.25;
}

.journey-label,
.journey-headline {
    position: relative;
    z-index: 2;
    text-align: center;
}

.journey-container {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 40px auto 0;
    height: clamp(600px, 80vh, 1000px);
}

/* SVG path */
.journey-path-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

#journey-path {
    stroke-dasharray: 2600;
    stroke-dashoffset: 2600;
    transition: stroke-dashoffset 0.05s linear;
}

/* Checkpoints */
.journey-checkpoints {
    position: absolute;
    inset: 0;
}

.checkpoint {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.checkpoint-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #6b8f7a;
    background: rgba(248, 240, 224, 0.8);
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    flex-shrink: 0;
}

.checkpoint.active .checkpoint-circle {
    background: #a8c4a0;
    border-color: #5a4a7a;
    box-shadow: 0 0 12px rgba(90, 74, 122, 0.25);
}

.checkpoint-label {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.checkpoint-number {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #5a4a7a;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkpoint.active .checkpoint-number {
    opacity: 1;
}

.checkpoint-text {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(13px, 1.5vw, 16px);
    letter-spacing: 0.04em;
    color: #2a2a38;
    overflow: hidden;
    display: inline-block;
    white-space: nowrap;
    width: 0;
    transition: none;
}

.checkpoint.active .checkpoint-text {
    /* Width animated via JS typewriter */
}

/* ============================================================
   PASSPORT SECTION
   ============================================================ */
.passport-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(60px, 10vh, 120px) 20px;
    background: #f8f0e0;
}

.passport-page {
    position: relative;
    width: clamp(340px, 60vw, 700px);
    background: #f8f0e0;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(42, 42, 56, 0.12), 0 2px 8px rgba(42, 42, 56, 0.06);
    overflow: hidden;
}

.passport-border {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.passport-border-pattern {
    position: absolute;
    inset: 0;
    border: 12px solid transparent;
    border-image: repeating-linear-gradient(
        45deg,
        rgba(168, 196, 160, 0.3) 0px,
        rgba(168, 196, 160, 0.3) 4px,
        rgba(224, 212, 232, 0.3) 4px,
        rgba(224, 212, 232, 0.3) 8px,
        rgba(196, 168, 144, 0.25) 8px,
        rgba(196, 168, 144, 0.25) 12px
    ) 12;
}

/* Ornamental border circles */
.passport-border::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(90, 74, 122, 0.15);
    border-radius: 4px;
}

.passport-border::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(90, 74, 122, 0.1);
    border-radius: 2px;
}

.passport-inner {
    position: relative;
    z-index: 2;
    padding: clamp(30px, 5vw, 60px);
}

.passport-header {
    text-align: center;
    margin-bottom: 32px;
}

.passport-header-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(14px, 2.5vw, 20px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5a4a7a;
    display: block;
    margin-bottom: 16px;
}

.passport-emblem {
    display: flex;
    justify-content: center;
}

.emblem-svg {
    width: 80px;
    height: 80px;
}

.passport-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 30px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(90, 74, 122, 0.12);
}

.passport-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6a6a78;
}

.field-value {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: clamp(14px, 1.8vw, 18px);
    color: #2a2a38;
}

.field-verified {
    color: #6b8f7a;
}

/* Passport stamps area */
.passport-stamps-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 28px;
    padding: 20px 0;
}

.passport-stamp {
    width: clamp(80px, 10vw, 110px);
    height: clamp(80px, 10vw, 110px);
    border-radius: 50%;
    border: 2px solid #5a4a7a;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(var(--stamp-angle));
    opacity: 0.65;
    filter: blur(0.3px);
}

.passport-stamp span {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(7px, 1vw, 9px);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5a4a7a;
    text-align: center;
    padding: 8px;
    line-height: 1.4;
}

/* Barcode */
.passport-barcode {
    text-align: center;
    margin-bottom: 20px;
    padding: 12px 0;
    border-top: 1px solid rgba(90, 74, 122, 0.08);
}

.barcode-text {
    font-family: 'Libre Barcode 128 Text', cursive;
    font-size: clamp(32px, 5vw, 48px);
    color: #2a2a38;
    letter-spacing: 0;
    opacity: 0.7;
}

/* Footer */
.passport-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(90, 74, 122, 0.08);
}

.passport-footer-text {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(12px, 1.2vw, 14px);
    color: #6a6a78;
    line-height: 1.6;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .credentials-content {
        flex-direction: column;
        text-align: center;
    }

    .credentials-text {
        text-align: center;
    }

    .section-body {
        margin-left: auto;
        margin-right: auto;
    }

    .passport-details {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .checkpoint {
        gap: 8px;
    }

    .checkpoint-label {
        font-size: 12px;
    }

    .journey-container {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(32px, 10vw, 56px);
    }

    .stamps-scattered {
        gap: 16px;
    }

    .mini-stamp {
        width: 80px;
        height: 80px;
    }
}
