/* Base Variables & Reset */
:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor */
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.brand {
    font-family: 'Syne', sans-serif;
    text-transform: uppercase;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
}

.cursor.hovering {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    mix-blend-mode: difference;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.nav-status {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    transition: background 0.3s, color 0.3s;
}

.nav-status:hover {
    background: #ffffff;
    color: #000000;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50vw;
    height: 50vw;
    max-width: 800px;
    max-height: 800px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
    animation: pulseGlow 4s ease-in-out infinite alternate;
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 0.9;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1.2s var(--transition) forwards;
    position: relative;
    z-index: 2;
}

/* Enhanced Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1.2s var(--transition) 0.4s forwards;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    z-index: 2;
    transition: color 0.3s ease;
}

.scroll-indicator:hover {
    color: #ffffff;
}

.scroll-text {
    font-size: 0.75rem;
    letter-spacing: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.scroll-indicator .mouse-icon {
    width: 22px;
    height: 22px;
    animation: bounceScroll 2s infinite;
}

/* Phone Showcase Section with Dynamic Background */
.showcase {
    height: 100vh;
    position: relative;
    background-color: #050505;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.showcase-bg-grid {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
    z-index: 1;
}

.showcase-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}

.showcase-glow.glow-1 {
    top: 25%;
    left: 15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(120, 119, 198, 0.4), transparent 70%);
    animation: floatGlow1 8s ease-in-out infinite alternate;
}

.showcase-glow.glow-2 {
    bottom: 20%;
    right: 15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
    animation: floatGlow2 10s ease-in-out infinite alternate;
}

.showcase-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Syne', sans-serif;
    font-size: clamp(6rem, 18vw, 22rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.025);
    letter-spacing: -6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    user-select: none;
}

.sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 5;
}

/* The Phone Hardware */
.phone-frame {
    width: 340px;
    height: 680px;
    border: 8px solid #222;
    border-radius: 40px;
    background: #000;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.8) translateY(100px);
    opacity: 0;
    transition: transform 0.1s linear, opacity 0.1s linear;
}

/* Phone Status Bar & Safe Area */
.phone-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
}

.status-time {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Dynamic Island / Notch */
.notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 25px;
    background: #111;
    border-radius: 20px;
    z-index: 35;
}

.swipe-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff;
    z-index: 40;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 4px;
    font-weight: 800;
    padding: 1.1rem 2.2rem;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    animation: pulseHintBadge 2s ease-in-out infinite alternate;
}

.phone-frame:hover .swipe-hint,
.swipe-hint.hidden {
    opacity: 0;
}

.swipe-hint i {
    width: 28px;
    height: 28px;
    color: #ffffff;
    stroke-width: 2.5;
    animation: swipeUpAnim 1.8s ease-in-out infinite;
}

/* Scrollable Track inside the phone */
.feed-track {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.feed-track::-webkit-scrollbar {
    display: none;
}

/* Individual Video Post */
.post {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000000;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post video {
    width: 100%;
    height: calc(100% - 44px);
    margin-top: 44px;
    object-fit: contain; /* Preserves 100% of the video without cropping top, bottom, or sides */
    filter: none;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.post.active video {
    opacity: 1;
    filter: none;
}

/* Color mode default */
.phone-frame:hover .post.active video {
    filter: none;
    opacity: 1;
}

/* App UI Overlay with Safe Area Padding */
.app-ui {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.8rem 1rem 1.5rem 1rem; /* 3.8rem top padding places UI nicely below notch safe area */
    z-index: 10;
}

/* Top Overlay */
.ui-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.sound-toggle-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.3s ease, transform 0.2s ease;
    pointer-events: auto;
}

.sound-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.sound-toggle-btn svg {
    width: 14px;
    height: 14px;
}

/* Bottom Details & Buttons */
.ui-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.post-info {
    max-width: 75%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.post-info h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    font-family: 'Inter', sans-serif;
    text-transform: none;
}

.post-info p {
    font-size: 0.8rem;
    color: #ddd;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.tags {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* App Buttons (Like, Comment, Share) */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    pointer-events: auto;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.action-btn svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    transition: transform 0.2s, fill 0.2s;
}

.action-btn:hover svg {
    transform: scale(1.1);
}

.action-btn span {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Contact Section & Footer */
.contact-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8rem 4rem 3rem 4rem;
    position: relative;
    background: #050505;
    z-index: 10;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.contact-glow {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.contact-tag {
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-title {
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 2rem;
}

.contact-desc {
    font-size: 1.1rem;
    color: #aaa;
    max-width: 550px;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.contact-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3.5rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 50px;
    letter-spacing: 1px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

.contact-btn:hover {
    transform: translateY(-5px) scale(1.03);
    background: #e0e0e0;
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.25);
}

.contact-btn i {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.contact-btn:hover i:last-child {
    transform: translate(3px, -3px);
}

.contact-socials {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 2px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #ffffff;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes swipeUpAnim {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }

    50% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-15px);
        opacity: 0;
    }
}

@keyframes pulseHintBadge {
    0% {
        transform: translate(-50%, -50%) scale(0.96);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 255, 255, 0.15);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.04);
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 255, 255, 0.35);
    }
}

@keyframes pulseGlow {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.6;
    }

    to {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

@keyframes bounceScroll {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

@keyframes floatGlow1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.2); }
}

@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, -40px) scale(1.15); }
}

/* Responsive Mobile & Tablet Adjustments */
@media (max-width: 768px) {
    nav {
        padding: 1rem 1.2rem;
        background: linear-gradient(to bottom, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0) 100%);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .brand {
        font-size: 0.85rem;
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    .nav-status {
        font-size: 0.7rem;
        padding: 0.35rem 0.75rem;
        letter-spacing: 1px;
    }

    .hero {
        padding: 6rem 1.2rem 2rem 1.2rem;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 11vw, 4.5rem);
        line-height: 0.95;
        letter-spacing: -1.5px;
        word-break: break-word;
    }

    .scroll-indicator {
        bottom: 1.5rem;
    }

    .phone-frame {
        width: min(320px, 86vw);
        height: min(620px, 75vh);
        border: 6px solid #222;
        border-radius: 36px;
    }

    .notch {
        display: block;
        width: 85px;
        height: 20px;
        top: 8px;
    }

    .phone-status-bar {
        display: flex;
        height: 38px;
        padding: 0 1rem;
    }

    .app-ui {
        padding: 3rem 0.8rem 1.2rem 0.8rem;
    }

    .ui-top {
        font-size: 0.75rem;
    }

    .sound-toggle-btn {
        padding: 0.25rem 0.55rem;
        font-size: 0.65rem;
    }

    .contact-section {
        padding: 6rem 1.2rem 2rem 1.2rem;
    }

    .contact-container {
        width: 100%;
        max-width: 100%;
    }

    .contact-title {
        font-size: clamp(1.8rem, 8vw, 3.8rem);
        line-height: 1.05;
        letter-spacing: -1px;
        word-break: break-word;
        margin-bottom: 1.5rem;
    }

    .contact-desc {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 2rem;
        word-break: break-word;
    }

    .contact-actions {
        margin-bottom: 2.5rem;
        width: 100%;
    }

    .contact-btn {
        padding: 1rem 2rem;
        font-size: 0.85rem;
        max-width: 100%;
    }

    .social-link {
        font-size: 0.75rem;
        word-break: break-all;
        overflow-wrap: anywhere;
        letter-spacing: 1px;
        text-align: center;
        max-width: 100%;
    }

    footer {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
        padding-top: 2rem;
        font-size: 0.7rem;
    }

    .cursor {
        display: none;
    }

    * {
        cursor: auto !important;
    }
}

@media (max-width: 380px) {
    .brand {
        font-size: 0.75rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .contact-title {
        font-size: 1.6rem;
    }

    .phone-frame {
        width: 290px;
        height: 540px;
    }
}
