@import url('./variables.css');

/* Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 1rem 2rem;
    background: var(--teal);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 0;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--dark);
    flex-shrink: 0;
}

.logo:hover {
    text-decoration: none;
}

.logo-mark {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-img {
    width: 100%;
    height: 100%;
    max-width: 44px;
    max-height: 44px;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover {
    color: var(--teal);
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--teal);
    transition: width 0.3s var(--ease-out-expo);
}

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

.nav-cta {
    display: none;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

.nav-cta .btn {
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: all 0.3s var(--ease-out-expo);
}

/* Mobile Toggle */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border-radius: 8px;
}

.nav-toggle:hover {
    background: var(--gray-100);
}

/* Mobile Menu */
.nav-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.nav-menu.open {
    display: flex;
}

.nav-menu a {
    display: block;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
    cursor: pointer;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

.nav-menu a:hover {
    background: var(--gray-100);
}

.nav-menu .mobile-cta {
    padding: 1.25rem 1.5rem;
    background: var(--gray-100);
}

.nav-menu .mobile-cta .btn {
    width: 100%;
    text-align: center;
}

.nav-menu .mobile-login {
    display: flex;
    justify-content: center;
    padding-bottom: 0.5rem;
}

.nav-menu .mobile-login .btn-ghost {
    width: 100%;
    justify-content: center;
    border: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 5rem var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--teal-light) 0%, var(--white) 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(78, 205, 196, 0.25) 0%, transparent 50%), radial-gradient(ellipse 60% 40% at 100% 50%, rgba(255, 107, 107, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(78, 205, 196, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(78, 205, 196, 0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 0%, transparent 70%);
}

.hero-inner {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 680px;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--coral);
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.15);
    animation: fadeSlideUp 0.6s var(--ease-out-expo) both;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--coral);
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(255, 107, 107, 0);
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
    color: var(--dark);
    animation: fadeSlideUp 0.6s var(--ease-out-expo) 0.1s both;
}

.hero-title-line {
    display: block;
}

.hero-title-accent {
    background: linear-gradient(135deg, var(--teal) 0%, var(--coral) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(1rem, 3vw, 1.25rem);
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeSlideUp 0.6s var(--ease-out-expo) 0.2s both;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    animation: fadeSlideUp 0.6s var(--ease-out-expo) 0.3s both;
}

.hero-cta .btn {
    width: 100%;
}

.hero-meta {
    font-size: 0.9rem;
    color: var(--gray-600);
    animation: fadeSlideUp 0.6s var(--ease-out-expo) 0.4s both;
}

.hero-meta strong {
    color: var(--teal-dark);
    font-weight: 700;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-sm);
    animation: fadeSlideUp 0.6s var(--ease-out-expo) 0.5s both;
}

.hero-trust-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.hero-trust-icon {
    font-size: 1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.4s both;
    width: 100%;
    max-width: 320px;
}

/* Phone Visual Styles */
.phone-wrapper {
    position: relative;
    width: 100%;
    z-index: 1;
}

.phone-glow {
    position: absolute;
    width: 140%;
    height: 140%;
    top: -20%;
    left: -20%;
    background: radial-gradient(ellipse at center, rgba(78, 205, 196, 0.3) 0%, transparent 60%);
    filter: blur(50px);
    pointer-events: none;
}

.phone {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    background: #1C1C1E;
    border-radius: 36px;
    padding: 10px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.phone-screen {
    background: var(--white);
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 9/19.5;
}

.phone-notch {
    width: 100px;
    height: 24px;
    background: #1C1C1E;
    border-radius: 0 0 16px 16px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.phone-content {
    padding: 0.6rem;
    height: calc(100% - 24px);
    overflow: hidden;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem;
    margin-bottom: 0.6rem;
}

.app-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--dark);
}

.app-add-btn {
    width: 32px;
    height: 32px;
    background: var(--coral);
    border-radius: 50%;
    border: none;
    color: var(--white);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.run-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.run-card-top {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.run-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE5E5 0%, #FFF0F0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.run-info h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1px;
}

.run-host {
    font-size: 0.7rem;
    color: var(--gray-600);
}

.run-verified {
    color: var(--teal);
    font-weight: 600;
}

.run-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.run-detail {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.run-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.run-spots {
    display: flex;
    gap: 2px;
}

.spot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
}

.spot-empty {
    background: var(--gray-200);
}

.run-join-btn {
    padding: 0.3rem 0.75rem;
    background: var(--teal);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.run-hosting-btn {
    background: var(--teal-light);
    color: var(--teal);
}

.phone-nav {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: var(--white);
    border-radius: 0 0 28px 28px;
    padding: 0.5rem;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--gray-200);
}

.phone-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: 0.9rem;
    color: var(--gray-400);
}

.phone-nav-item.active {
    color: var(--teal);
}

.phone-nav-label {
    font-size: 0.55rem;
    font-weight: 600;
}

.floating-card {
    display: flex;
    position: absolute;
    background: var(--white);
    border-radius: 14px;
    padding: 0.875rem 1rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    align-items: center;
    gap: 0.6rem;
    z-index: 10;
    animation: float 6s ease-in-out infinite;
}

.floating-card-1 {
    top: 5%;
    right: -10px;
    z-index: 200;
}

.floating-card-2 {
    bottom: 10%;
    left: -20px;
    animation-delay: -3s;
}

/* Mobile adjustments */
@media (max-width: 639px) {
    .floating-card {
        padding: 0.75rem 0.875rem;
        gap: 0.5rem;
        z-index: 15;
    }

    .floating-card-1 {
        top: 2%;
        right: -5px;
        z-index: 200;
    }

    .floating-card-2 {
        bottom: 5%;
        left: -10px;
    }

    .floating-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .floating-text strong {
        font-size: 0.8rem;
    }

    .floating-text span {
        font-size: 0.65rem;
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.floating-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.floating-icon-teal {
    background: var(--teal-light);
}

.floating-icon-coral {
    background: var(--coral-light);
}

.floating-text {
    color: var(--dark);
}

.floating-text strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.floating-text span {
    font-size: 0.7rem;
    color: var(--gray-600);
}

/* Responsive Breakpoints */

/* Tablet */
@media (min-width: 640px) {
    .hero-cta {
        flex-direction: row;
        justify-content: center;
    }

    .hero-cta .btn {
        width: auto;
    }

    .floating-card {
        display: flex;
        z-index: 10;
    }

    .floating-card-1 {
        top: 5%;
        right: -10px;
    }

    .floating-card-2 {
        bottom: 10%;
        left: -20px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .nav {
        padding: 1.25rem 2rem;
    }

    .logo-mark {
        width: 44px;
        height: 44px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .nav-links {
        display: flex;
    }

    .nav-cta {
        display: flex;
        gap: 0.875rem;
        align-items: center;
    }

    .nav-cta .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50px;
    }

    .nav-cta .btn-ghost {
        background: transparent;
        color: var(--gray-600);
        border: 1px solid var(--gray-200);
        border-radius: 50px;
    }

    .nav-cta .btn-ghost:hover {
        background: var(--gray-100);
        border-color: var(--gray-400);
        color: var(--dark);
        text-decoration: none;
    }

    .nav-cta .btn-primary {
        background: var(--coral);
        color: var(--white);
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
        border: none;
        border-radius: 50px;
    }

    .nav-cta .btn-primary:hover {
        background: var(--coral-dark);
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
        text-decoration: none;
    }

    .nav-toggle {
        display: none;
    }

    .hero {
        padding: 8rem 2rem 4rem;
    }

    .hero-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        text-align: left;
    }

    .hero-content {
        max-width: 600px;
    }

    .hero-description {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-cta {
        justify-content: flex-start;
    }

    .hero-trust {
        justify-content: flex-start;
    }

    .hero-visual {
        max-width: none;
    }

    .phone {
        max-width: 320px;
        transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
        transition: transform 0.6s var(--ease-out-expo);
    }

    .phone:hover {
        transform: perspective(1000px) rotateY(-3deg) rotateX(1deg);
    }

    .floating-card {
        z-index: 20;
    }

    .floating-card-1 {
        right: -10px;
        z-index: 200;
    }

    .floating-card-2 {
        left: -20px;
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    .phone {
        max-width: 340px;
    }
}

