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

/* Navigation Active State */
.nav-link.active,
.nav-link[aria-current="page"] {
    color: var(--teal);
}

.nav-link.active::after,
.nav-link[aria-current="page"]::after {
    width: 100%;
}

.nav-menu a[aria-current="page"] {
    color: var(--teal);
}

.footer-link[aria-current="page"] {
    color: var(--teal);
}

/* Page Header */
.page-header {
    min-height: 50vh;
    padding: 8rem var(--space-md) var(--space-2xl);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--teal-light) 0%, var(--white) 100%);
}

.page-header-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;
}

.page-header-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%);
}

.page-header-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

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

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

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

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

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

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

/* Features Sections */
.features-section {
    padding: var(--space-2xl) var(--space-md);
}

.features-section:nth-child(even) {
    background: var(--gray-100);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-label::after {
    content: '';
    width: 32px;
    height: 2px;
    background: var(--teal);
}

/* Feature Grid for Features Page */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.feature-card {
    background: var(--white);
    border-radius: 20px;
    padding: var(--space-lg);
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.features-section:nth-child(even) .feature-card {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--teal);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal) 0%, var(--coral) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out-expo);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
}

.feature-icon-teal {
    background: linear-gradient(135deg, var(--teal-light) 0%, rgba(78, 205, 196, 0.2) 100%);
}

.feature-icon-coral {
    background: linear-gradient(135deg, var(--coral-light) 0%, rgba(255, 107, 107, 0.2) 100%);
}

.feature-icon-gold {
    background: linear-gradient(135deg, #FFF9E6 0%, rgba(253, 203, 110, 0.3) 100%);
}

.feature-icon-green {
    background: linear-gradient(135deg, var(--green-light) 0%, rgba(0, 184, 148, 0.2) 100%);
}

.feature-icon-purple {
    background: linear-gradient(135deg, var(--purple-light) 0%, rgba(162, 155, 254, 0.2) 100%);
}

.feature-icon-blue {
    background: linear-gradient(135deg, var(--blue-light) 0%, rgba(116, 185, 255, 0.2) 100%);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.feature-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.feature-tag-core {
    background: var(--teal);
    color: var(--white);
}

.feature-tag-soon {
    background: var(--purple-light);
    color: var(--purple);
}

/* Large Feature Card */
.feature-card-large {
    grid-column: span 1;
}

.feature-card-large .feature-content {
    /* Content side of large feature card */
}

.feature-card-large .feature-visual {
    background: var(--gray-100);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Integration Items */
.integration-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 12px;
    transition: transform 0.2s var(--ease-out-expo);
}

.integration-item:hover {
    transform: translateX(4px);
}

.integration-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    font-weight: 700;
}

.integration-icon-apple {
    background: #000;
    color: #fff;
}

.integration-icon-garmin {
    background: #007CC3;
    color: #fff;
}

.integration-icon-strava {
    background: #FC4C02;
    color: #fff;
}

.integration-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
}

.integration-info p {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Feature List */
.feature-list {
    list-style: none;
    margin-top: var(--space-sm);
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.feature-check {
    width: 20px;
    height: 20px;
    background: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Roadmap */
.roadmap {
    padding: var(--space-2xl) var(--space-md);
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.roadmap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

.roadmap-inner {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.roadmap .section-header {
    margin-bottom: var(--space-xl);
}

.roadmap .section-label {
    color: var(--teal);
}

.roadmap .section-label::before,
.roadmap .section-label::after {
    background: var(--teal);
}

.roadmap .section-title {
    color: var(--white);
}

.roadmap .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--teal) 0%, var(--coral) 100%);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 18px;
    height: 18px;
    background: var(--teal);
    border-radius: 50%;
    border: 3px solid var(--dark);
    transform: translateX(calc(8px - 50%));
}

.timeline-item:nth-child(2) .timeline-dot {
    background: var(--gold);
}

.timeline-item:nth-child(3) .timeline-dot {
    background: var(--purple);
}

.timeline-item:nth-child(4) .timeline-dot {
    background: var(--coral);
}

.timeline-phase {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--teal);
    color: var(--white);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.timeline-item:nth-child(2) .timeline-phase {
    background: var(--gold);
    color: var(--dark);
}

.timeline-item:nth-child(3) .timeline-phase {
    background: var(--purple);
}

.timeline-item:nth-child(4) .timeline-phase {
    background: var(--coral);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: background 0.3s;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.08);
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--white);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.timeline-content ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.timeline-content li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.timeline-content li::before {
    content: '→';
    color: var(--teal);
    flex-shrink: 0;
    font-weight: 600;
}

/* Responsive Breakpoints for Features Page */

/* Tablet */
@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-card-large {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
        align-items: center;
    }

    .feature-card-large .feature-visual {
        margin-top: 0;
    }

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

/* Desktop */
@media (min-width: 1024px) {
    .page-header {
        padding: 10rem 2rem 6rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .feature-card-large {
        grid-column: span 2;
    }

    .feature-icon {
        width: 72px;
        height: 72px;
        font-size: 2rem;
    }

    .timeline {
        padding-left: 3rem;
    }

    .timeline::before {
        left: 12px;
    }

    .timeline-dot {
        left: -3rem;
        transform: translateX(calc(12px - 50%));
    }
}

