﻿/* ==========================================
   WaterTagReborn - Main Stylesheet
   ========================================== */

/* -----------------------------------------
   CSS Variables
   ----------------------------------------- */
:root {
    --bg-primary: #D9ECFF;
    --bg-secondary: #F4FAFF;
    --bg-deep: #0A2A66;
    --accent-primary: #1F7DE8;
    --accent-secondary: #1FB8E0;
    --accent-violet: #6B5BD9;
    --accent-pink: #C7448A;
    --accent-mint: #2EBF9E;
    --accent-dim: rgba(31, 125, 232, 0.1);
    --accent-glow: rgba(31, 184, 224, 0.2);
    --text-primary: #0B2F6B;
    --text-secondary: #3A5783;
    --border-subtle: rgba(11, 47, 107, 0.1);
    --border-light: rgba(11, 47, 107, 0.16);
    --border-water: rgba(31, 125, 232, 0.35);
    --shadow-card: 0 8px 32px rgba(11, 47, 107, 0.12);
    --shadow-card-hover: 0 24px 64px rgba(11, 47, 107, 0.2);
    --shadow-glow: 0 8px 40px rgba(31, 125, 232, 0.2);
    --font-pixel: 'Pixelify Sans', 'Silkscreen', 'Press Start 2P', monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --radius-full: 999px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background-color: var(--bg-deep);
}

/* -----------------------------------------
   Custom Scrollbar (water themed)
   ----------------------------------------- */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-secondary);
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--accent-secondary), var(--accent-primary));
    border-radius: var(--radius-full);
    border: 3px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--accent-primary), var(--bg-deep));
}

::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(ellipse 90% 55% at 50% -10%, rgba(255, 255, 255, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse 70% 45% at 85% 20%, rgba(107, 91, 217, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 10% 45%, rgba(46, 191, 158, 0.12) 0%, transparent 50%),
        linear-gradient(to bottom, #D9ECFF 0%, #B4D8F8 20%, #7FAFE8 42%, #3D74C9 63%, #153D86 82%, #0A2A66 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

ul, ol {
    list-style: none;
}

/* -----------------------------------------
   Utility
   ----------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

/* -----------------------------------------
   Water Canvas Background
   ----------------------------------------- */
#water-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
}

/* -----------------------------------------
   Hero
   ----------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

/* Soft light pool rising from the water below */
.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1000px, 130%);
    height: 480px;
    background: radial-gradient(ellipse 50% 65% at 50% 100%, rgba(31, 125, 232, 0.16) 0%, rgba(31, 184, 224, 0.08) 45%, transparent 72%);
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 96px 28px 80px;
}

/* Logo */
.logo-container {
    position: relative;
    margin-bottom: 40px;
    animation: float 6s ease-in-out infinite;
}

.logo-container::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 18px;
    background: radial-gradient(ellipse at center, rgba(31, 125, 232, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.logo {
    width: 104px;
    height: 104px;
    filter: drop-shadow(0 0 32px rgba(31, 125, 232, 0.4));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Title */
.hero-title {
    font-family: var(--font-pixel);
    font-size: clamp(2.6rem, 8vw, 5.4rem);
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.05;
    margin-bottom: 20px;
    background: linear-gradient(120deg, var(--text-primary) 10%, var(--accent-primary) 55%, var(--accent-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 40px rgba(11, 47, 107, 0.15);
}

/* Subtitle */
.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 28px;
    letter-spacing: 0.4px;
}

/* Feature chips */
.hero-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 44px;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.hero-chip svg {
    width: 15px;
    height: 15px;
}

.hero-chip:nth-child(1) {
    color: var(--accent-primary);
    border-color: rgba(31, 125, 232, 0.35);
    box-shadow: 0 4px 16px rgba(31, 125, 232, 0.12);
}

.hero-chip:nth-child(2) {
    color: var(--accent-violet);
    border-color: rgba(107, 91, 217, 0.35);
    box-shadow: 0 4px 16px rgba(107, 91, 217, 0.12);
}

.hero-chip:nth-child(3) {
    color: var(--accent-pink);
    border-color: rgba(199, 68, 138, 0.35);
    box-shadow: 0 4px 16px rgba(199, 68, 138, 0.12);
}

.hero-chip:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.9);
}

/* Download Button */
.hero-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 52px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #06243B;
    font-family: var(--font-pixel);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    box-shadow: 0 10px 36px rgba(31, 125, 232, 0.35);
}

.hero-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.35) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.hero-button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 48px rgba(31, 184, 224, 0.4);
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
}

.hero-button:hover::before {
    opacity: 1;
}

.hero-button:active {
    transform: translateY(0) scale(0.98);
}

.hero-button:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-arrow {
    width: 19px;
    height: 19px;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-base);
}

.hero-button:hover .button-arrow {
    transform: translateY(3px);
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 72px;
    animation: scrollBounce 2.5s ease-in-out infinite;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.scroll-indicator:hover {
    opacity: 0.9;
}

.scroll-indicator svg {
    width: 26px;
    height: 26px;
    color: var(--accent-primary);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.45; }
    50% { transform: translateY(9px); opacity: 0.75; }
}

/* -----------------------------------------
   Showcase
   ----------------------------------------- */
.showcase {
    position: relative;
    z-index: 1;
    padding: 120px 0 140px;
    background: rgba(244, 250, 255, 0.55);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 60px rgba(244, 250, 255, 0.15) inset;
}

.section-title {
    font-family: var(--font-pixel);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 28px;
    letter-spacing: 1px;
    background: linear-gradient(120deg, var(--text-primary) 10%, var(--accent-primary) 55%, var(--accent-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Water wave decoration under section titles */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 72px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    height: 1px;
    width: 56px;
    background: linear-gradient(to right, transparent, var(--border-water));
}

.section-divider::after {
    background: linear-gradient(to left, transparent, var(--border-water));
}

.section-divider svg {
    width: 26px;
    height: 26px;
    color: var(--accent-secondary);
    filter: drop-shadow(0 0 8px rgba(31, 184, 224, 0.4));
    opacity: 1;
}

/* Screenshot Grid */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.screenshot-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(36px);
    box-shadow: var(--shadow-card);
}

.screenshot-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(31, 125, 232, 0.55) 0%, rgba(107, 91, 217, 0.35) 35%, transparent 55%, transparent 70%, rgba(31, 184, 224, 0.45) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-out);
}

.screenshot-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.screenshot-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--border-water);
    box-shadow: var(--shadow-card-hover), 0 0 50px rgba(31, 125, 232, 0.18);
}

.screenshot-item:hover::before {
    opacity: 1;
}

/* Screenshot Image */
.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.screenshot-item:hover .screenshot-img {
    transform: scale(1.07);
}

.screenshot-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 13, 23, 0.4) 0%, transparent 45%);
    mix-blend-mode: normal;
    pointer-events: none;
    transition: background 0.4s var(--ease-out);
}

.screenshot-item:hover .screenshot-overlay {
    background: linear-gradient(to top, rgba(10, 13, 23, 0.5) 0%, rgba(31, 125, 232, 0.15) 60%, transparent 100%);
}

/* -----------------------------------------
   Carousel (Mobile)
   ----------------------------------------- */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 40px;
}

.carousel-btn {
    position: relative;
    overflow: hidden;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.carousel-btn:hover {
    border-color: var(--border-water);
    background: var(--accent-dim);
    box-shadow: 0 0 20px rgba(31, 125, 232, 0.18);
}

.carousel-btn:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

.carousel-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.carousel-btn:hover svg {
    color: var(--accent-secondary);
}

.carousel-dots {
    display: flex;
    gap: 10px;
    align-items: center;
}

.carousel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border-light);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.carousel-dot.active {
    background: var(--accent-secondary);
    box-shadow: 0 0 10px rgba(31, 184, 224, 0.6);
    transform: scale(1.25);
}

.carousel-dot:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* -----------------------------------------
   Footer (sits on the deep blue end of the gradient)
   ----------------------------------------- */
.footer {
    position: relative;
    z-index: 1;
    padding: 64px 0 56px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(to top, rgba(6, 20, 51, 0.55) 0%, transparent 100%);
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-brand {
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #FFFFFF;
    background: linear-gradient(120deg, #FFFFFF 30%, #A6E3FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-copyright {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: rgba(214, 232, 255, 0.75);
    opacity: 1;
}

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

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #FFFFFF;
    background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
    border: 1px solid rgba(114, 137, 218, 0.4);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    text-transform: uppercase;
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.3);
}

.footer-link svg {
    width: 17px;
    height: 17px;
    transition: transform var(--transition-base);
}

.footer-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(114, 137, 218, 0.45);
    filter: brightness(1.1);
}

.footer-link:hover svg {
    transform: translateY(-1px);
}

.footer-link:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

/* -----------------------------------------
   Particles (rising bubbles)
   ----------------------------------------- */
.particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95) 0%, rgba(31, 184, 224, 0.35) 40%, transparent 100%);
    box-shadow: inset -1px -1px 3px rgba(255, 255, 255, 0.3), 0 0 8px rgba(31, 184, 224, 0.25);
    border: 1px solid rgba(31, 184, 224, 0.4);
}

/* -----------------------------------------
   Scroll Reveal
   ----------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* -----------------------------------------
   Mobile Carousel Mode
   ----------------------------------------- */
.screenshots-grid.carousel-mode {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.screenshots-grid.carousel-mode::-webkit-scrollbar {
    display: none;
}

.screenshots-grid.carousel-mode .screenshot-item {
    flex: 0 0 calc(100% - 40px);
    scroll-snap-align: center;
    opacity: 1;
    transform: none;
}

/* -----------------------------------------
   Responsive — Tablet
   ----------------------------------------- */
@media (max-width: 900px) {
    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .section-title {
        margin-bottom: 22px;
    }

    .section-divider {
        margin-bottom: 48px;
    }

    .showcase {
        padding: 96px 0 112px;
    }
}

/* -----------------------------------------
   Responsive — Phone
   ----------------------------------------- */
@media (max-width: 600px) {
    .container {
        padding: 0 18px;
    }

    .hero-content {
        padding: 72px 18px 64px;
    }

    .hero-title {
        letter-spacing: 1px;
    }

    .hero-subtitle {
        margin-bottom: 24px;
    }

    .hero-chips {
        gap: 10px;
        margin-bottom: 36px;
    }

    .hero-chip {
        padding: 8px 14px;
        font-size: 0.78rem;
    }

    .hero-button {
        padding: 16px 36px;
        font-size: 0.92rem;
    }

    .section-title {
        margin-bottom: 18px;
    }

    .section-divider {
        margin-bottom: 40px;
    }

    .section-divider::before,
    .section-divider::after {
        width: 30px;
    }

    .showcase {
        padding: 72px 0 88px;
    }

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

    .screenshot-item {
        border-radius: var(--radius-lg);
    }

    .scroll-indicator {
        margin-top: 56px;
    }

    .footer {
        padding: 44px 0 40px;
    }

    .footer-links {
        gap: 16px;
    }

    .logo {
        width: 76px;
        height: 76px;
    }

    .logo-container {
        margin-bottom: 28px;
    }
}

/* -----------------------------------------
   Reduced Motion
   ----------------------------------------- */
@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;
    }

    .logo-container {
        animation: none;
    }

    .scroll-indicator {
        animation: none;
    }
}