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

:root {
    --bg: #0a0a0c;
    --bg-elevated: #131317;
    --bg-card: #1a1a20;
    --text: #f0ede8;
    --text-muted: #8a8694;
    --accent: #c084fc;
    --accent-warm: #f9a8d4;
    --accent-cool: #818cf8;
    --border: rgba(255, 255, 255, 0.06);
    --glow: rgba(192, 132, 252, 0.15);
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'Montserrat', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-back:hover {
    color: var(--text);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Dark overlay so text remains readable */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to bottom,
            rgba(10, 10, 12, 0.55) 0%,
            rgba(10, 10, 12, 0.7) 50%,
            rgba(10, 10, 12, 0.95) 100%
    );
}

.hero > *:not(.hero-bg) {
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(ellipse, var(--glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    animation: pulse 6s ease-in-out infinite;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    animation: fadeUp 0.8s ease both;
}

.hero-badge span {
    color: var(--accent);
    font-weight: 600;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 800px;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s 0.1s ease both;
}

.hero h1 em {
    font-style: italic;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.125rem;
    max-width: 520px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    animation: fadeUp 0.8s 0.2s ease both;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeUp 0.8s 0.3s ease both;
}

.app-store-badge {
    transition: transform 0.3s, filter 0.3s;
    display: block;
}

.app-store-badge img {
    height: 54px;
    display: block;
}

.app-store-badge:hover {
    transform: scale(1.05);
    filter: brightness(1.15);
}

.hero-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── BEFORE/AFTER SLIDER ── */
.slider-section {
    padding: 2rem 2rem 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-section h2 {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 0.75rem;
}

.slider-section .section-sub {
    color: var(--text-muted);
    text-align: center;
    max-width: 480px;
    margin-bottom: 3rem;
    font-size: 1rem;
}

.ba-slider {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    cursor: ew-resize;
    border: 1px solid var(--border);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-select: none;
}

.ba-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.ba-slider .ba-before {
    clip-path: inset(0 0 0 0);
}

.ba-slider .ba-after {
    clip-path: inset(0 25% 0 0);
}

/* ── BEFORE/AFTER THUMBNAILS ── */
.ba-thumbs {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ba-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color 0.3s, transform 0.3s;
    opacity: 0.6;
}

.ba-thumb.active {
    border-color: var(--accent);
    opacity: 1;
    transform: scale(1.08);
}

.ba-thumb:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.ba-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: white;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 5;
}

.ba-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.ba-handle::after {
    content: '⟨  ⟩';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bg);
    z-index: 6;
    letter-spacing: 0.2em;
}

.ba-label {
    position: absolute;
    bottom: 16px;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: white;
    z-index: 4;
    pointer-events: none;
}

.ba-label-before {
    left: 16px;
}

.ba-label-after {
    right: 16px;
}

/* ── FEATURES ── */
.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-header h2 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin-bottom: 0.75rem;
}

.features-header p {
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    border-color: rgba(192, 132, 252, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

.fi-1 {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.15), rgba(129, 140, 248, 0.15));
}

.fi-2 {
    background: linear-gradient(135deg, rgba(249, 168, 212, 0.15), rgba(252, 165, 165, 0.15));
}

.fi-3 {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15), rgba(96, 165, 250, 0.15));
}

.fi-4 {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(96, 165, 250, 0.15));
}

.fi-5 {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(249, 168, 212, 0.15));
}

.fi-6 {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.15), rgba(192, 132, 252, 0.15));
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.65;
}

/* ── GALLERY ── */
.gallery {
    padding: 4rem 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-header h2 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin-bottom: 0.75rem;
}

.gallery-header p {
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    transition: transform 0.3s;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
}

.gallery-placeholder svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

/* ── SUPPORT ── */
.support {
    padding: 4rem 2rem 6rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.support h2 {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0.75rem;
}

.support p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.7;
}

.support-email {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.support-email:hover {
    border-color: rgba(192, 132, 252, 0.3);
    box-shadow: 0 8px 32px rgba(192, 132, 252, 0.1);
    transform: translateY(-2px);
}

.support-email svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

/* ── DOC PAGES (Privacy, Terms) ── */
.doc {
    max-width: 720px;
    margin: 0 auto;
    padding: 7rem 1.5rem 4rem;
}

.doc h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.doc .updated {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 3rem;
}

.doc h2 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 400;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.doc h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.doc p {
    color: var(--text-muted);
    font-size: 0.925rem;
    margin-bottom: 1rem;
}

.doc ul {
    color: var(--text-muted);
    font-size: 0.925rem;
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.doc ul li {
    margin-bottom: 0.4rem;
}

.doc strong {
    color: var(--text);
    font-weight: 600;
}

.doc a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.3s;
}

.doc a:hover {
    opacity: 0.8;
}

/* ── FOOTER ── */
footer {
    padding: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    nav {
        padding: 1rem 1.25rem;
    }

    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 12, 0.95);
        backdrop-filter: blur(20px);
        padding: 1.5rem 2rem;
        gap: 1.25rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        padding: 7rem 1.5rem 3rem;
    }

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

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .doc {
        padding: 6rem 1.25rem 3rem;
    }

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

/* ── SCROLL REVEAL ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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