/* ============================================
   mystical.quest - Styles
   Graffiti + Portfolio Hybrid
   Burgundy-Cream Palette
   ============================================ */

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

:root {
    --burgundy-deep: #7d2e3d;
    --cream-soft: #f5f0e8;
    --burgundy-light: #c44569;
    --cream-darker: #e8dcc8;
    --gold-accent: #d4a574;
    --charcoal-dark: #2c2c2c;
    --burgundy-pale: #f0e6e6;
    --accent-navy: #1a3a52;

    --font-headline: 'Fredoka One', 'Nunito', sans-serif;
    --font-subheading: 'Nunito', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --font-accent: 'Fredoka', 'Nunito', sans-serif;

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;

    --ease-playful: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--charcoal-dark);
    background-color: var(--cream-soft);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Floating Bubbles --- */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.4s var(--ease-playful), opacity 0.4s var(--ease-smooth);
}

.bubble:hover {
    transform: scale(1.3);
    opacity: 0.25;
}

.bubble-1 {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 8%;
    background: linear-gradient(135deg, var(--burgundy-deep), var(--cream-soft));
    animation: bubbleFloat1 8s ease-in-out infinite;
}

.bubble-2 {
    width: 50px;
    height: 50px;
    top: 40%;
    right: 10%;
    background: linear-gradient(135deg, var(--burgundy-light), var(--burgundy-pale));
    animation: bubbleFloat2 10s ease-in-out infinite;
}

.bubble-3 {
    width: 120px;
    height: 120px;
    bottom: 25%;
    left: 5%;
    background: linear-gradient(135deg, var(--burgundy-deep), var(--cream-darker));
    animation: bubbleFloat3 12s ease-in-out infinite;
}

.bubble-4 {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 20%;
    background: var(--gold-accent);
    animation: bubbleFloat1 9s ease-in-out infinite reverse;
}

.bubble-5 {
    width: 65px;
    height: 65px;
    bottom: 10%;
    right: 8%;
    background: linear-gradient(135deg, var(--burgundy-light), var(--cream-soft));
    animation: bubbleFloat2 11s ease-in-out infinite;
}

@keyframes bubbleFloat1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(15px, -20px); }
    50% { transform: translate(-10px, -35px); }
    75% { transform: translate(20px, -15px); }
}

@keyframes bubbleFloat2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-20px, 15px); }
    66% { transform: translate(15px, -25px); }
}

@keyframes bubbleFloat3 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(10px, -15px); }
    40% { transform: translate(-15px, -30px); }
    60% { transform: translate(20px, -20px); }
    80% { transform: translate(-5px, -10px); }
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 16px 32px;
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 0.3s var(--ease-smooth), padding 0.3s var(--ease-smooth);
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(44, 44, 44, 0.08);
    padding: 10px 32px;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-headline);
    font-size: 1.2rem;
    color: var(--burgundy-deep);
    transition: transform 0.3s var(--ease-playful);
}

.nav-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--charcoal-dark);
    position: relative;
    transition: color 0.3s var(--ease-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2.5px;
    background: var(--burgundy-light);
    border-radius: 2px;
    transition: width 0.3s var(--ease-playful);
}

.nav-link:hover {
    color: var(--burgundy-light);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-cta {
    background: var(--burgundy-deep);
    color: var(--cream-soft);
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    transition: background 0.3s var(--ease-smooth), transform 0.3s var(--ease-playful);
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    background: var(--burgundy-light);
    color: var(--cream-soft);
    transform: scale(1.05);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 32px 80px;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.color-splash {
    position: absolute;
    border-radius: 50%;
}

.splash-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -80px;
    background: radial-gradient(circle, var(--burgundy-light) 0%, transparent 70%);
    opacity: 0.12;
}

.splash-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -80px;
    background: radial-gradient(circle, var(--burgundy-deep) 0%, transparent 70%);
    opacity: 0.1;
}

.splash-3 {
    width: 200px;
    height: 200px;
    top: 30%;
    left: 50%;
    background: radial-gradient(circle, var(--gold-accent) 0%, transparent 70%);
    opacity: 0.08;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    text-align: left;
}

.hero-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
}

.hero-tag .tag-stroke {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-tag span {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--burgundy-light);
    padding: 10px 28px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-headline);
    color: var(--burgundy-deep);
    line-height: 1.1;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.line-1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s var(--ease-playful) 0.3s forwards;
}

.line-2 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s var(--ease-playful) 0.5s forwards;
}

.title-accent {
    display: block;
    margin-top: -8px;
    opacity: 0;
    animation: fadeIn 0.6s var(--ease-smooth) 0.9s forwards;
}

.hand-underline {
    max-width: 100%;
    height: auto;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--charcoal-dark);
    line-height: 1.7;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s var(--ease-smooth) 0.7s forwards;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s var(--ease-smooth) 0.9s forwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: transform 0.3s var(--ease-playful), background 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.btn-primary {
    background: var(--burgundy-deep);
    color: var(--cream-soft);
}

.btn-primary:hover {
    background: var(--burgundy-light);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(125, 46, 61, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--burgundy-deep);
    border: 2.5px solid var(--burgundy-deep);
}

.btn-secondary:hover {
    background: var(--burgundy-pale);
    transform: scale(1.05);
}

/* Hero Illustration */
.hero-illustration {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    opacity: 0;
    animation: fadeIn 1.2s var(--ease-smooth) 0.5s forwards;
}

.hero-crystal {
    max-width: 300px;
    height: auto;
}

.orbit-ring {
    animation: orbitSpin 20s linear infinite;
    transform-origin: center;
}

.pulse-circle {
    animation: pulseGlow 3s ease-in-out infinite;
}

.orb {
    transition: transform 0.5s var(--ease-playful);
}

.orb-1 { animation: orbFloat 6s ease-in-out infinite; }
.orb-2 { animation: orbFloat 8s ease-in-out infinite 1s; }
.orb-3 { animation: orbFloat 7s ease-in-out infinite 2s; }
.orb-4 { animation: orbFloat 9s ease-in-out infinite 0.5s; }

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes orbitSpin {
    to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% { r: 60; opacity: 0.15; }
    50% { r: 68; opacity: 0.22; }
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(8px, -12px); }
}

/* --- Section Shared Styles --- */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-family: var(--font-headline);
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--burgundy-deep);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.section-underline {
    display: block;
    margin: 0 auto 16px;
}

.section-desc {
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--charcoal-dark);
    max-width: 560px;
    margin: 0 auto;
    opacity: 0.8;
}

/* --- Explore / Portfolio Grid --- */
.explore-section {
    padding: 100px 32px;
    position: relative;
    z-index: 2;
}

.portfolio-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.grid-card {
    background: var(--cream-soft);
    border: 2px solid var(--cream-darker);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: transform 0.4s var(--ease-playful), box-shadow 0.4s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.grid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--burgundy-light) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

.grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(125, 46, 61, 0.12);
    border-color: var(--burgundy-light);
}

.grid-card:hover::before {
    opacity: 0.04;
}

.grid-card:nth-child(even) {
    background: var(--burgundy-pale);
}

.card-icon {
    margin-bottom: 20px;
}

.card-icon svg {
    display: block;
}

.card-title {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: var(--burgundy-deep);
    margin-bottom: 12px;
}

.card-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--charcoal-dark);
    margin-bottom: 20px;
    opacity: 0.85;
}

.card-link {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--burgundy-light);
    padding: 8px 20px;
    border: 2px solid var(--burgundy-light);
    border-radius: var(--radius-pill);
    transition: background 0.3s var(--ease-smooth), color 0.3s var(--ease-smooth), transform 0.3s var(--ease-playful);
}

.card-link:hover {
    background: var(--burgundy-light);
    color: var(--cream-soft);
    transform: scale(1.05);
}

/* Slide animations */
.card-slide-left {
    transform: translateX(-60px);
}

.card-slide-right {
    transform: translateX(60px);
}

.card-slide-left.revealed,
.card-slide-right.revealed {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-playful);
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 100px 32px;
    background: var(--burgundy-pale);
    position: relative;
    z-index: 2;
}

/* Graffiti pattern overlay */
.gallery-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, var(--burgundy-deep) 1px, transparent 1px),
        radial-gradient(circle, var(--burgundy-deep) 0.5px, transparent 0.5px);
    background-size: 40px 40px, 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.04;
    pointer-events: none;
}

.gallery-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-item {
    background: var(--cream-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    opacity: 0;
    transition: transform 0.4s var(--ease-playful), box-shadow 0.4s var(--ease-smooth);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(125, 46, 61, 0.12);
}

.gallery-large {
    grid-column: 1 / 3;
}

.gallery-wide {
    grid-column: 1 / -1;
}

.gallery-visual {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.gallery-visual svg {
    display: block;
    width: 100%;
}

.gallery-caption {
    padding: 20px 24px;
}

.gallery-caption h3 {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--burgundy-deep);
    margin-bottom: 4px;
}

.gallery-caption p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--charcoal-dark);
    opacity: 0.7;
}

/* --- About Section --- */
.about-section {
    padding: 100px 32px;
    position: relative;
    z-index: 2;
}

.about-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-text .section-title {
    text-align: left;
}

.about-text .section-underline {
    margin: 0 0 24px;
}

.about-text p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--charcoal-dark);
    margin-bottom: 16px;
    opacity: 0.85;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-visual svg {
    max-width: 320px;
    width: 100%;
    height: auto;
}

/* --- Contact Section --- */
.contact-section {
    padding: 100px 32px;
    background: var(--cream-darker);
    position: relative;
    overflow: hidden;
    z-index: 2;
    text-align: center;
}

.contact-inner {
    position: relative;
    z-index: 2;
    max-width: 560px;
    margin: 0 auto;
}

.contact-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.splash-contact-1 {
    position: absolute;
    width: 350px;
    height: 350px;
    top: -80px;
    left: -100px;
    background: radial-gradient(circle, var(--burgundy-deep) 0%, transparent 70%);
    opacity: 0.06;
    border-radius: 50%;
}

.splash-contact-2 {
    position: absolute;
    width: 280px;
    height: 280px;
    bottom: -60px;
    right: -80px;
    background: radial-gradient(circle, var(--gold-accent) 0%, transparent 70%);
    opacity: 0.08;
    border-radius: 50%;
}

.contact-text {
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--charcoal-dark);
    margin-bottom: 36px;
    opacity: 0.85;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-input {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--charcoal-dark);
    background: var(--cream-soft);
    border: 2px solid var(--cream-darker);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    outline: none;
    transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
    width: 100%;
}

.form-input::placeholder {
    color: var(--charcoal-dark);
    opacity: 0.4;
}

.form-input:focus {
    border-color: var(--burgundy-light);
    box-shadow: 0 0 0 4px rgba(196, 69, 105, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    align-self: center;
    min-width: 200px;
    font-size: 1.05rem;
    padding: 16px 36px;
}

/* --- Footer --- */
.site-footer {
    padding: 40px 32px;
    background: var(--burgundy-deep);
    color: var(--cream-soft);
    position: relative;
    z-index: 2;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-headline);
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--cream-darker);
    transition: color 0.3s var(--ease-smooth);
}

.footer-links a:hover {
    color: var(--gold-accent);
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--cream-darker);
    opacity: 0.6;
    width: 100%;
    text-align: center;
    margin-top: 16px;
}

/* --- SVG Stroke Animation --- */
.stroke-animate {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.stroke-animate.drawn {
    animation: drawStroke 2s var(--ease-smooth) forwards;
}

@keyframes drawStroke {
    to { stroke-dashoffset: 0; }
}

/* --- Bubble Ripple Effect --- */
@keyframes bubbleRipple {
    0% { transform: scale(1); opacity: 0.12; }
    50% { transform: scale(1.8); opacity: 0.05; }
    100% { transform: scale(1); opacity: 0.12; }
}

.bubble.ripple {
    animation: bubbleRipple 0.6s var(--ease-playful);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 120px 24px 60px;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-illustration {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 40px;
    }

    .hero-crystal {
        max-width: 200px;
    }

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

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

    .gallery-large,
    .gallery-wide {
        grid-column: 1;
    }

    .about-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-text .section-title {
        text-align: center;
    }

    .about-text .section-underline {
        margin: 0 auto 24px;
    }

    .nav-links {
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 12px 16px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 100px 16px 40px;
    }

    .explore-section,
    .gallery-section,
    .about-section,
    .contact-section {
        padding: 60px 16px;
    }

    .grid-card {
        padding: 24px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
