
/* ==========================================
   MATT HARRIS DEVELOPMENT
   Welcome Page — Magical Color Foundation
   ========================================== */

:root {
    --magic-pink: #ff79c6;
    --magic-purple: #a78bfa;
    --magic-teal: #5eead4;

    --deep-space: #100c1c;
    --soft-white: #f8f4ff;
}

/* Reset */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main page */

body.welcome-page {
    min-height: 100vh;
    font-family: "Segoe UI", sans-serif;
    color: var(--soft-white);

    background:
        radial-gradient(
            ellipse at 15% 20%,
            rgba(255, 121, 198, 0.16),
            transparent 40%
        ),
        radial-gradient(
            ellipse at 85% 25%,
            rgba(167, 139, 250, 0.18),
            transparent 42%
        ),
        radial-gradient(
            ellipse at 50% 90%,
            rgba(94, 234, 212, 0.13),
            transparent 45%
        ),
        var(--deep-space);

    overflow-x: hidden;
}

/* Welcome layout */


.welcome-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    isolation: isolate;
}

/* Slowly shifting magical light */

.welcome-container::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background:
        radial-gradient(
            circle at 20% 35%,
            rgba(255, 121, 198, 0.12),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 65%,
            rgba(94, 234, 212, 0.10),
            transparent 35%
        );

    animation: magical-breath 12s ease-in-out infinite alternate;
}

@keyframes magical-breath {
    from {
        opacity: 0.45;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1.08);
    }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    .welcome-container::before {
        animation: none;
    }
}


/* Content */

.welcome-content {
    max-width: 850px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Business name */

.welcome-eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--magic-teal);
    margin-bottom: 28px;
}

/* Main heading */

.welcome-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 28px;
}

.welcome-content h1 span {
    display: block;
    background: linear-gradient(
        90deg,
        var(--magic-pink),
        var(--magic-purple),
        var(--magic-teal)
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Description */

.welcome-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
    color: #d8d0e8;
    margin-bottom: 42px;
}

/* Portal button */

.portal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    padding: 18px 32px;
    border-radius: 999px;

    color: var(--soft-white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;

    background: linear-gradient(
        135deg,
        rgba(255, 121, 198, 0.18),
        rgba(167, 139, 250, 0.18),
        rgba(94, 234, 212, 0.18)
    );

    border: 1px solid rgba(255, 255, 255, 0.2);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

/* Portal hover effect */

.portal-link:hover {
    transform: translateY(-3px);

    border-color: var(--magic-purple);

    box-shadow:
        0 0 20px rgba(255, 121, 198, 0.2),
        0 0 40px rgba(167, 139, 250, 0.2);
}

/* Portal arrow */

.portal-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.portal-link:hover .portal-arrow {
    transform: translate(4px, -4px);
}

/* Theme notice */

.theme-notice {
    margin-top: 28px;
    font-size: 0.85rem;
    color: #aaa0bf;
    letter-spacing: 0.03em;
}

/* Mobile adjustments */

@media (max-width: 600px) {

    .welcome-content h1 {
        font-size: clamp(2.7rem, 12vw, 4rem);
    }

    .portal-link {
        padding: 16px 24px;
    }

    .welcome-eyebrow {
        letter-spacing: 0.2em;
    }
}


/* ==========================================
   MAGICAL PARTICLES
   ========================================== */

.magic-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Individual particle */

.magic-particle {
    position: absolute;
    display: block;

    width: 4px;
    height: 4px;
    border-radius: 50%;

    background: var(--magic-pink);

    box-shadow:
        0 0 6px var(--magic-pink),
        0 0 14px var(--magic-purple);

    opacity: 0;

    animation: particle-twinkle 4s ease-in-out infinite;
}

/* Alternate particle colors */

.magic-particle:nth-child(3n) {
    background: var(--magic-purple);
    box-shadow:
        0 0 6px var(--magic-purple),
        0 0 14px var(--magic-pink);
}

.magic-particle:nth-child(3n + 1) {
    background: var(--magic-teal);
    box-shadow:
        0 0 6px var(--magic-teal),
        0 0 14px var(--magic-purple);
}

/* Twinkling animation */

@keyframes particle-twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 0.85;
        transform: scale(1.4);
    }
}

/* Reduced motion accessibility */

@media (prefers-reduced-motion: reduce) {
    .magic-particle {
        animation: none;
        opacity: 0.5;
    }
}


/* ==========================================
   MAGICAL CURSOR SPARKLES
   ========================================== */

.cursor-sparkle {
    position: fixed;
    width: 7px;
    height: 7px;
    border-radius: 50%;

    pointer-events: none;
    z-index: 1000;

    background: var(--magic-pink);

    box-shadow:
        0 0 8px var(--magic-pink),
        0 0 16px var(--magic-purple);

    transform: translate(-50%, -50%);
    animation: sparkle-fade 0.8s ease-out forwards;
}

@keyframes sparkle-fade {
    0% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cursor-sparkle {
        display: none;
    }
}


/* ==========================================
   PORTAL SHIMMER EFFECT
   ========================================== */

.portal-link {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

/* Moving band of magical light */

.portal-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;

    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(255, 255, 255, 0.08) 45%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0.08) 55%,
        transparent 80%
    );

    transform: translateX(-120%);
    transition: transform 0.8s ease;
}

/* Keep the button text above the shimmer */

.portal-link span {
    position: relative;
    z-index: 1;
}

/* Sweep the light across on hover */

.portal-link:hover::before {
    transform: translateX(120%);
}

/* Disable the shimmer for reduced-motion visitors */

@media (prefers-reduced-motion: reduce) {
    .portal-link::before {
        display: none;
    }
}


/* ==========================================
   WELCOME ENTRANCE ANIMATION
   ========================================== */

.welcome-content > * {
    opacity: 0;
    animation: welcome-arrive 1s ease forwards;
}

.welcome-eyebrow {
    animation-delay: 0.2s;
}

.welcome-content h1 {
    animation-delay: 0.5s;
}

.welcome-description {
    animation-delay: 0.8s;
}

.portal-link {
    animation-delay: 1.1s;
}

.theme-notice {
    animation-delay: 1.4s;
}

@keyframes welcome-arrive {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .welcome-content > * {
        opacity: 1;
        animation: none;
    }
}


/* ==========================================
   CURIOSITY REWARD
   ========================================== */


/* ==========================================
   FOUR CORNER CURIOSITY DISCOVERIES
   ========================================== */

.curiosity-reward {
    position: fixed;
    z-index: 10;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    width: min(210px, calc(100vw - 32px));
    margin: 0;
}

/* Position each discovery */

.curiosity-reward:has(#curiosity-hint) {
    top: 20px;
    left: 20px;
    align-items: flex-start;
}

.curiosity-reward:has(#curiosity-hint-two) {
    top: 20px;
    right: 20px;
    align-items: flex-end;
}

.curiosity-reward:has(#curiosity-hint-three) {
    bottom: 20px;
    left: 20px;
    align-items: flex-start;
}

.curiosity-reward:has(#curiosity-hint-four) {
    bottom: 20px;
    right: 20px;
    align-items: flex-end;
}

/* The mysterious symbols */

.curiosity-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border: 1px solid rgba(167, 139, 250, 0.45);
    border-radius: 50%;

    background: rgba(16, 12, 28, 0.25);
    color: var(--magic-teal);
    font-size: 1.3rem;

    cursor: pointer;

    box-shadow: 0 0 12px rgba(167, 139, 250, 0.15);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        color 0.3s ease;
}

/* Symbol hover effect */

.curiosity-hint:hover {
    transform: rotate(45deg) scale(1.2);
    color: var(--magic-pink);

    box-shadow:
        0 0 12px rgba(255, 121, 198, 0.4),
        0 0 24px rgba(167, 139, 250, 0.3);
}

/* Hidden messages */

.curiosity-message {
    max-width: 210px;

    color: var(--magic-teal);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-align: inherit;

    opacity: 0;
    transform: translateY(8px);

    transition:
        opacity 0.4s ease,
        transform 0.4s ease;

    pointer-events: none;
}

/* Reveal on hover or keyboard focus */

.curiosity-reward:hover .curiosity-message,
.curiosity-hint:focus-visible + .curiosity-message {
    opacity: 1;
    transform: translateY(0);
}

/* Reveal after clicking */

.curiosity-message.curiosity-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile adjustments */

@media (max-width: 600px) {
    .curiosity-reward {
        width: 150px;
    }


@media (max-width: 600px) {

    .curiosity-reward {
        width: 150px;
    }

    .curiosity-reward:has(#curiosity-hint),
    .curiosity-reward:has(#curiosity-hint-two) {
        top: 20px;
    }

    .curiosity-reward:has(#curiosity-hint),
    .curiosity-reward:has(#curiosity-hint-three) {
        left: 20px;
    }

    .curiosity-reward:has(#curiosity-hint-two),
    .curiosity-reward:has(#curiosity-hint-four) {
        right: 20px;
    }

    .curiosity-reward:has(#curiosity-hint-three),
    .curiosity-reward:has(#curiosity-hint-four) {
        bottom: 20px;
    }

    .curiosity-message {
        max-width: 100%;
        font-size: 0.75rem;
        overflow-wrap: break-word;
    }
}
}

@media (prefers-reduced-motion: reduce) {
    .curiosity-hint,
    .curiosity-message {
        transition: none;
    }
}



/* ==========================================
   PORTAL TRANSITION
   ========================================== */

.portal-link {
    z-index: 2;
}

.portal-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;

    pointer-events: none;
    opacity: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 121, 198, 0.85) 12%,
            rgba(167, 139, 250, 0.9) 35%,
            rgba(94, 234, 212, 0.95) 65%,
            rgba(16, 12, 28, 1) 100%
        );

        transform: scale(0);
        border-radius: 50%;
        transform-origin: center;
}

.welcome-page.portal-opening .portal-transition {
    animation: portal-expand 1.2s ease-in forwards;
}

.welcome-page.portal-opening .welcome-content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

@keyframes portal-expand {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    35% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: scale(3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-page.portal-opening .portal-transition {
        animation-duration: 0.2s;
    }
}


/* ==========================================
   DRIFTING STARS
   ========================================== */

.drifting-stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.drifting-star {
    position: absolute;
    display: block;

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: white;

    box-shadow:
        0 0 6px white,
        0 0 12px var(--magic-purple),
        0 0 20px var(--magic-teal);

    opacity: 0;

    animation: star-drift 12s linear infinite;
}

@keyframes star-drift {
    0% {
        opacity: 0;
        transform: translate3d(0, 30px, 0) scale(0.5);
    }

    15% {
        opacity: 0.8;
    }

    75% {
        opacity: 0.7;
    }

    100% {
        opacity: 0;
        transform: translate3d(45px, -180px, 0) scale(1.3);
    }
}

/* Reduced motion accessibility */

@media (prefers-reduced-motion: reduce) {
    .drifting-star {
        animation: none;
        opacity: 0.5;
    }
}


/* ==========================================
   SUBTLE CURIOSITY REACTIONS
   ========================================== */

@media (hover: hover) and (prefers-reduced-motion: no-preference) {

    .welcome-content h1 {
        transition: transform 0.4s ease, filter 0.4s ease;
    }

    .welcome-content h1:hover {
        transform: translateY(-3px);
        filter: drop-shadow(0 0 12px rgba(255, 121, 198, 0.3));
    }

    .welcome-description {
        transition: transform 0.4s ease, color 0.4s ease;
    }

    .welcome-description:hover {
        transform: translateY(-2px);
        color: var(--soft-white);
    }

    .theme-notice {
        transition: text-shadow 0.4s ease;
    }

    .theme-notice:hover {
        text-shadow: 0 0 10px rgba(94, 234, 212, 0.6);
    }
}
