/* ============================================================
   persona.quest Styles
   ============================================================ */

/* Color Palette */
:root {
    --color-teal: #5A8A82;
    --color-brown: #3A3228;
    --color-coral: #C47A6B;
    --color-sand: #D4A060;
    --color-sage: #7A7068;
    --color-cream: #F5EDE0;
    --color-soft-green: #D4E4DB;
}

/* ============================================================
   Base Styles
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--color-brown);
    background-color: var(--color-cream);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================================
   Progress Line (Fixed Left Edge)
   ============================================================ */

.progress-line {
    position: fixed;
    left: 20px;
    top: 0;
    width: 4px;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
}

.progress-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 0.05s linear;
}

/* ============================================================
   Typography
   ============================================================ */

h1 {
    font-family: 'Caveat', cursive;
    font-size: clamp(2.2rem, 5.5vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--color-brown);
}

h2 {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--color-brown);
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--color-brown);
}

p {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.015em;
    color: var(--color-brown);
}

/* ============================================================
   Waypoints - Layout Structure
   ============================================================ */

.waypoint {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background-color: var(--color-cream);
    overflow: hidden;
}

.waypoint-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    text-align: center;
    padding: 40px;
}

/* ============================================================
   Blobitecture Elements
   ============================================================ */

.waypoint-blob {
    position: absolute;
    opacity: 0.3;
    filter: blur(1px);
    animation: blob-float 6s ease-in-out infinite;
}

.blob-lg {
    width: 400px;
    height: 400px;
    border-radius: 40% 60% 50% 50% / 45% 45% 55% 50%;
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-soft-green) 100%);
}

.blob-md {
    width: 280px;
    height: 280px;
    border-radius: 50% 40% 55% 45% / 50% 50% 45% 55%;
    background: linear-gradient(135deg, var(--color-coral) 0%, var(--color-sand) 100%);
}

.blob-sm {
    width: 140px;
    height: 140px;
    border-radius: 45% 55% 50% 50% / 50% 50% 48% 52%;
    background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-teal) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    font-weight: 600;
}

@keyframes blob-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -20px) scale(1.05);
    }
    50% {
        transform: translate(-10px, 30px) scale(0.95);
    }
    75% {
        transform: translate(30px, 10px) scale(1.02);
    }
}

/* ============================================================
   Waypoint-Specific Styles
   ============================================================ */

/* Waypoint Zero - Trailhead */
.waypoint-zero {
    background: linear-gradient(135deg, var(--color-soft-green) 0%, var(--color-cream) 100%);
    position: relative;
}

.logotype {
    font-size: clamp(3rem, 7vw, 5rem);
    margin-bottom: 1rem;
    color: var(--color-teal);
    text-shadow: 2px 2px 4px rgba(58, 50, 40, 0.1);
}

.subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--color-sage);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Waypoint One - Persona Map */
.persona-map {
    margin: 40px auto;
    filter: drop-shadow(0 8px 16px rgba(58, 50, 40, 0.08));
}

.connecting-line {
    animation: draw-line 2s ease-in-out forwards;
    animation-delay: 0.3s;
}

@keyframes draw-line {
    from {
        stroke-dashoffset: 50;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Waypoint Two - Values */
.values-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.value-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.value-label {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.value-divider {
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--color-brown), transparent);
}

/* Waypoint Three - Fears & Aspirations */
.fears-aspirations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.fear-section,
.aspiration-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.fear-section h3,
.aspiration-section h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

.icon-svg {
    filter: drop-shadow(0 4px 8px rgba(58, 50, 40, 0.1));
}

@media (max-width: 768px) {
    .fears-aspirations {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Waypoint Four - Habits Grid */
.habits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-top: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.habit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 30px 20% 35% 25% / 25% 35% 20% 30%;
    transition: transform 0.3s ease;
}

.habit-card:hover {
    transform: scale(1.05) translateY(-5px);
}

.habit-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-teal), var(--color-soft-green));
    animation: pulse-circle 3s ease-in-out infinite;
}

@keyframes pulse-circle {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.habit-card p {
    margin: 0;
    text-align: center;
    font-weight: 600;
}

/* Waypoint Five - Reflections */
.reflection-container {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.reflection-diagram {
    filter: drop-shadow(0 8px 16px rgba(58, 50, 40, 0.1));
}

.reflection-circle {
    animation: orbit 8s linear infinite;
}

@keyframes orbit {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
}

.reflection-line {
    animation: pulse-line 3s ease-in-out infinite;
}

@keyframes pulse-line {
    0%, 100% {
        stroke-opacity: 0.3;
    }
    50% {
        stroke-opacity: 0.8;
    }
}

/* Waypoint Six - Threshold */
.threshold-button {
    margin-top: 50px;
}

.cta-button {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    padding: 20px 50px;
    border: 3px solid var(--color-teal);
    background: linear-gradient(135deg, var(--color-teal), var(--color-soft-green));
    color: var(--color-cream);
    border-radius: 50px 60% 45% 55% / 55% 45% 60% 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 600;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 20px rgba(90, 138, 130, 0.2);
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(90, 138, 130, 0.4);
    border-color: var(--color-brown);
}

.cta-button:active {
    transform: translateY(-2px) scale(0.98);
}

/* Waypoint Seven - Closing */
.waypoint-seven {
    background: linear-gradient(135deg, var(--color-soft-green) 0%, var(--color-cream) 100%);
    padding-bottom: 100px;
}

.final-message {
    text-align: center;
}

.final-message p {
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.closing-signature {
    margin-top: 3rem;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    font-style: italic;
    color: var(--color-teal);
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .waypoint {
        padding: 40px 20px;
        min-height: 80vh;
    }

    .waypoint-content {
        padding: 20px;
    }

    .blob-lg {
        width: 250px;
        height: 250px;
        left: -100px;
        top: 50%;
        transform: translateY(-50%);
    }

    .blob-md {
        width: 180px;
        height: 180px;
        right: -80px;
        top: 20%;
    }

    .persona-map,
    .reflection-diagram {
        width: 100%;
        max-width: 300px;
        height: auto;
    }

    .values-container {
        gap: 20px;
    }

    .value-divider {
        width: 100%;
        height: 2px;
    }
}

@media (max-width: 480px) {
    .waypoint {
        padding: 30px 15px;
        min-height: 100vh;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1rem;
    }

    .cta-button {
        font-size: 1.3rem;
        padding: 15px 30px;
    }

    .habits-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .habit-card {
        padding: 15px;
    }

    .habit-circle {
        width: 70px;
        height: 70px;
    }
}

/* ============================================================
   Animations & Transitions
   ============================================================ */

body {
    animation: fade-in 0.6s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.waypoint {
    animation: waypoint-enter 0.8s ease-out backwards;
}

@keyframes waypoint-enter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.waypoint:nth-child(n+2) {
    animation-delay: 0.2s;
}
