/*
 * Seasons Merge Official Website
 * Custom Stylesheet
 * Version: 1.0.0
 * Author: Kunpo
 */

/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */
:root {
    --color-spring: #FFB7C5;
    --color-summer: #87CEEB;
    --color-autumn: #FFB347;
    --color-winter: #B0E0E6;
    --color-primary: #d946ef;
    --color-primary-light: #f0abfc;
    --color-primary-dark: #a21caf;
    --color-cream: #FFF8F0;
    --color-soft: #FDF6F0;

    --gradient-primary: linear-gradient(135deg, #d946ef 0%, #ec4899 50%, #f472b6 100%);
    --gradient-spring: linear-gradient(135deg, #FFB7C5 0%, #FFC8DD 50%, #FFAFCC 100%);
    --gradient-summer: linear-gradient(135deg, #87CEEB 0%, #89CFF0 50%, #A7C7E7 100%);
    --gradient-autumn: linear-gradient(135deg, #FFB347 0%, #FFCC70 50%, #FFD93D 100%);
    --gradient-winter: linear-gradient(135deg, #B0E0E6 0%, #CCE5FF 50%, #E0FFFF 100%);

    --shadow-soft: 0 4px 20px rgba(217, 70, 239, 0.15);
    --shadow-medium: 0 8px 30px rgba(217, 70, 239, 0.2);
    --shadow-large: 0 15px 50px rgba(217, 70, 239, 0.25);

    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;

    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2rem;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: var(--color-primary-light);
    color: white;
}

/* ============================================
   Typography
   ============================================ */
.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

.font-body {
    font-family: 'Quicksand', 'Segoe UI', sans-serif;
}

/* ============================================
   Navigation Styles
   ============================================ */
.nav-link {
    position: relative;
    color: #4b5563;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-medium);
    border-radius: 2px;
}

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

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

/* Navbar scroll effect */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Button Styles
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-medium);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Download Buttons */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    transition: all var(--transition-medium);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

.download-btn-light {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.download-btn-light:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-gradient {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 183, 197, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(240, 171, 252, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(135, 206, 235, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, var(--color-soft) 0%, #fff 100%);
}

/* Floating Elements */
.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(40px);
}

.floating-element-1 {
    width: 300px;
    height: 300px;
    background: var(--color-spring);
    top: 10%;
    left: 5%;
    animation: float 8s ease-in-out infinite;
}

.floating-element-2 {
    width: 200px;
    height: 200px;
    background: var(--color-primary-light);
    top: 60%;
    right: 10%;
    animation: float 10s ease-in-out infinite reverse;
}

.floating-element-3 {
    width: 150px;
    height: 150px;
    background: var(--color-summer);
    bottom: 20%;
    left: 15%;
    animation: float 7s ease-in-out infinite 1s;
}

.floating-element-4 {
    width: 100px;
    height: 100px;
    background: var(--color-autumn);
    top: 30%;
    right: 25%;
    animation: float 9s ease-in-out infinite 0.5s;
}

.floating-element-5 {
    width: 180px;
    height: 180px;
    background: var(--color-winter);
    bottom: 10%;
    right: 5%;
    animation: float 11s ease-in-out infinite 2s;
}

/* ============================================
   Feature Cards
   ============================================ */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-medium);
    border: 1px solid rgba(217, 70, 239, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform var(--transition-medium);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* ============================================
   Island Section - Immersive Full-Screen Design
   ============================================ */
.islands-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.island-tab {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-medium);
    cursor: pointer;
    border: none;
    outline: none;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.island-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.island-tab:hover::before {
    transform: translateX(100%);
}

.island-tab:hover {
    transform: translateY(-3px) scale(1.05);
}

.island-tab.active {
    animation: tab-glow 2s ease-in-out infinite;
}

@keyframes tab-glow {
    0%, 100% {
        box-shadow: 0 0 20px currentColor;
    }
    50% {
        box-shadow: 0 0 40px currentColor, 0 0 60px currentColor;
    }
}

/* Island Showcase Container */
.island-showcase {
    position: relative;
    width: 100%;
    min-height: 80vh;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Full-width Island Image */
.island-image-container {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    border-radius: 1.5rem;
}

.island-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.island-image-container:hover .island-image {
    transform: scale(1.08);
}

/* Parallax overlay layers */
.island-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.island-overlay-gradient {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 40%,
        rgba(0, 0, 0, 0.2) 70%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.island-overlay-vignette {
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

/* Floating particles effect */
.island-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: particle-float 8s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 6s; }
.particle:nth-child(8) { left: 80%; animation-delay: 7s; }

@keyframes particle-float {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(10vh) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
}

/* Season-specific particles */
.particles-spring .particle {
    background: linear-gradient(135deg, #FFB7C5, #FFC8DD);
    box-shadow: 0 0 10px #FFB7C5;
}

.particles-summer .particle {
    background: linear-gradient(135deg, #87CEEB, #FFD700);
    box-shadow: 0 0 10px #87CEEB;
}

.particles-autumn .particle {
    background: linear-gradient(135deg, #FFB347, #FF6B35);
    box-shadow: 0 0 10px #FFB347;
}

.particles-winter .particle {
    background: linear-gradient(135deg, #E0FFFF, #B0E0E6);
    box-shadow: 0 0 15px #fff;
}

/* Island Info Panel */
.island-info-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        transparent 100%
    );
    transform: translateY(60%);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.island-image-container:hover .island-info-panel {
    transform: translateY(0);
}

.island-info-panel h3 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.island-info-panel p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 600px;
}

/* Island Badge */
.island-badge {
    position: absolute;
    top: 2rem;
    left: 2rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    animation: badge-pulse 3s ease-in-out infinite;
    z-index: 10;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 currentColor;
    }
    50% {
        box-shadow: 0 0 0 10px transparent;
    }
}

.badge-spring {
    background: rgba(255, 183, 197, 0.9);
    color: #831843;
}

.badge-summer {
    background: rgba(135, 206, 235, 0.9);
    color: #0c4a6e;
}

.badge-autumn {
    background: rgba(255, 179, 71, 0.9);
    color: #7c2d12;
}

.badge-winter {
    background: rgba(176, 224, 230, 0.9);
    color: #1e3a5f;
}

/* Feature Tags */
.island-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    color: white;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Decorative corner elements */
.island-corner {
    position: absolute;
    width: 100px;
    height: 100px;
    pointer-events: none;
    opacity: 0.6;
}

.island-corner-tl {
    top: 1rem;
    left: 1rem;
    border-top: 3px solid currentColor;
    border-left: 3px solid currentColor;
    border-radius: 1rem 0 0 0;
}

.island-corner-tr {
    top: 1rem;
    right: 1rem;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
    border-radius: 0 1rem 0 0;
}

.island-corner-bl {
    bottom: 1rem;
    left: 1rem;
    border-bottom: 3px solid currentColor;
    border-left: 3px solid currentColor;
    border-radius: 0 0 0 1rem;
}

.island-corner-br {
    bottom: 1rem;
    right: 1rem;
    border-bottom: 3px solid currentColor;
    border-right: 3px solid currentColor;
    border-radius: 0 0 1rem 0;
}

/* Shimmer scan effect */
.island-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.1) 45%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.1) 55%,
        transparent 60%
    );
    background-size: 200% 100%;
    animation: shimmer-scan 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer-scan {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Island navigation dots */
.island-nav-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot:hover {
    transform: scale(1.3);
}

.nav-dot.active {
    background: white;
    box-shadow: 0 0 20px currentColor;
}

/* Legacy support */
.island-card {
    background: white;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-large);
}

/* ============================================
   Gallery Section
   ============================================ */
.gallery-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16 / 9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Large gallery item */
.gallery-item.col-span-2.row-span-2 {
    aspect-ratio: 1 / 1;
}

@media (min-width: 1024px) {
    .gallery-item.col-span-2.row-span-2 {
        aspect-ratio: auto;
    }
}

/* ============================================
   Update Cards
   ============================================ */
.update-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-medium);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.update-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

/* ============================================
   Animations
   ============================================ */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(-5deg);
    }
}

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

@keyframes sparkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Animation Classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.animate-pulse-soft {
    animation: pulse-soft 3s ease-in-out infinite;
}

.animate-sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

/* Hover animations */
.hover-lift {
    transition: transform var(--transition-medium);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform var(--transition-medium);
}

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

.hover-glow {
    transition: box-shadow var(--transition-medium);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(217, 70, 239, 0.4);
}

/* ============================================
   Back to Top Button
   ============================================ */
#backToTop {
    z-index: 9999;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    transform: translateY(-3px);
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary-light) #f1f1f1;
}

/* ============================================
   Decorative Elements
   ============================================ */
.decorated-title {
    position: relative;
    display: inline-block;
}

.decorated-title::before,
.decorated-title::after {
    content: '✿';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-spring);
    font-size: 1.5rem;
    opacity: 0.6;
}

.decorated-title::before {
    left: -2.5rem;
}

.decorated-title::after {
    right: -2.5rem;
}

/* Gradient text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Shimmer effect */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   Loading Animation
   ============================================ */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* ============================================
   Responsive Utilities
   ============================================ */
@media (max-width: 768px) {
    .floating-element {
        display: none;
    }

    .hero-gradient {
        background:
            radial-gradient(ellipse at 50% 0%, rgba(255, 183, 197, 0.4) 0%, transparent 60%),
            linear-gradient(180deg, var(--color-soft) 0%, #fff 100%);
    }

    .decorated-title::before,
    .decorated-title::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .island-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .download-btn,
    .download-btn-light {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .floating-element,
    #navbar,
    #backToTop,
    .download-btn,
    .download-btn-light {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}
