/* ==========================================================================
   1. Base Styles & Variables
   ========================================================================== */
:root {
    /* Brand colors */
    --primary: #FC4C02; /* Strava orange - keep as brand recognition */
    --secondary: #2D3748; /* Darker blue-gray - more modern than current blue */
    --accent: #38B2AC; /* Teal - complementary to orange */

    /* Neutral colors */
    --white: #FFFFFF;
    --light-gray: #F7FAFC; /* Lighter background */
    --dark-gray: #4A5568; /* For text */
    --text-light: #718096; /* For secondary text */

    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Shadows */
    --shadow-sm: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
    --shadow-md: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 1rem 2.5rem rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px; /* Base size for rem calculations */
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

/* ==========================================================================
   3. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary);
    margin-block-end: var(--space-md);
}

h1 {
    font-size: 3rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2.25rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition-normal);
}

a:hover {
    color: #E03E00;
}

a:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ==========================================================================
   4. Layout & Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-md);
}

/* ==========================================================================
   5. Buttons & Interactive Elements
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    background-color: var(--primary);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--radius-md);
    letter-spacing: 0.5px;
    box-shadow: 0 0.25rem 0.75rem rgba(252, 76, 2, 0.25);
    transition: all var(--transition-normal);
    cursor: pointer;
    text-align: center;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.375rem 1rem rgba(252, 76, 2, 0.35);
    background-color: #E03E00;
}

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

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: #FFF1EC;
}

.btn-large {
    padding: 1.125rem 2.25rem;
    font-size: 1.25rem;
}

.btn-full {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

/* Shared hover effect for cards and elements */
.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    width: 3.125rem;
    height: 3.125rem;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ==========================================================================
   6. Header & Navigation
   ========================================================================== */
header {
    position: sticky;
    top: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 100;
    padding-block: var(--space-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
}

.nav-links a {
    color: var(--dark-gray);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-normal);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
}

.mobile-menu-btn:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ==========================================================================
   7. Hero Section
   ========================================================================== */
.hero {
    background: linear-gradient(to right, var(--light-gray) 60%, var(--white) 40%);
    position: relative;
    overflow: hidden;
    padding-block: var(--space-xl);
}

.hero::before {
    content: '';
    position: absolute;
    top: -6.25rem;
    right: -6.25rem;
    width: 18.75rem;
    height: 18.75rem;
    border-radius: 50%;
    background-color: rgba(252, 76, 2, 0.05);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.hero-text {
    flex: 1;
    padding-right: var(--space-lg);
}

.hero-image {
    flex: 1;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero-image img:hover {
    transform: translateY(-5px);
    box-shadow: 0 1.5625rem 3.125rem rgba(0, 0, 0, 0.2);
}

.subheadline {
    margin-block: 1.5625rem 2.5rem;
    font-size: 1.375rem;
    color: var(--text-light);
}

/* ==========================================================================
   8. Features Section
   ========================================================================== */
.features {
    padding-block: var(--space-xl);
}

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

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.feature-card {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-lg);
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-normal);
    animation: fadeIn 0.6s ease forwards;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
    display: inline-block;
    margin-bottom: 1.5625rem;
}

.feature-title {
    margin-bottom: 0.9375rem;
}

/* ==========================================================================
   9. Example Section
   ========================================================================== */
.example {
    padding-block: var(--space-xl);
    background-color: var(--light-gray);
}

.example-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comparison {
    display: flex;
    gap: var(--space-md);
    margin-block: 3.75rem;
    width: 100%;
    max-width: 900px;
    position: relative;
}

/* Add arrow between cards to show transformation */
.comparison::after {
    content: '\2192'; /* Right arrow */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--primary);
    background-color: var(--white);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.comparison-card {
    flex: 1;
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

/* Make the "Before" card look less appealing */
.comparison-card:first-child {
    opacity: 0.85;
    transform: scale(0.95);
}

/* Make the "After" card more prominent */
.comparison-card:last-child {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Different header styles for before/after */
.comparison-header {
    padding: 0.9375rem;
    text-align: center;
    font-weight: 600;
}

/* Before header styling */
.comparison-card:first-child .comparison-header {
    background-color: var(--secondary);
    color: var(--white);
}

/* After header styling - use primary color */
.comparison-card:last-child .comparison-header {
    background-color: var(--primary);
    color: var(--white);
}

.comparison-body {
    padding: 1.25rem;
}

/* Style activity items differently */
.activity-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--light-gray);
    transition: background-color var(--transition-fast);
}

/* Highlight searchable terms in the "After" card */
.comparison-card:last-child .activity-item {
    position: relative;
}

.comparison-card:last-child .activity-item:hover {
    background-color: rgba(252, 76, 2, 0.05);
}

.activity-item:last-child {
    border-bottom: none;
}

/* Add search icon to the "After" card to emphasize searchability */
.comparison-card:last-child::before {
    content: '\1F50D'; /* Search icon */
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.25rem;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .comparison {
        flex-direction: column;
        gap: 3rem;
    }

    .comparison::after {
        top: calc(50% - 1.5rem);
        left: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
    }

    .comparison-card:first-child,
    .comparison-card:last-child {
        transform: scale(1);
    }
}

.caption {
    text-align: center;
    margin-top: var(--space-sm);
    font-style: italic;
    color: var(--dark-gray);
}

/* ==========================================================================
   10. How It Works Section
   ========================================================================== */
.how-it-works {
    padding-block: var(--space-xl);
}

.steps {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-lg);
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 4.375rem;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    height: 3px;
    opacity: 0.3;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 30%;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.6s ease forwards;
    transition: transform var(--transition-normal);
}

.step:hover {
    transform: translateY(-5px);
}

.step-icon {
    width: 5rem;
    height: 5rem;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    font-size: 2rem;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.step-title {
    margin-bottom: 0.625rem;
    font-weight: 600;
}

/* Apply animation delays to steps */
.step:nth-child(2) {
    animation-delay: 0.2s;
}

.step:nth-child(3) {
    animation-delay: 0.4s;
}

/* ==========================================================================
   11. Social Proof Section
   ========================================================================== */
.social-proof {
    padding-block: var(--space-lg);
    background-color: var(--secondary);
    color: var(--white);
    text-align: center;
}

.counters {
    display: flex;
    justify-content: center;
    gap: 3.75rem;
    margin-top: var(--space-sm);
}

.counter {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
}

/* ==========================================================================
   12. Trust Section
   ========================================================================== */
.trust {
    padding-block: var(--space-xl);
    background-color: var(--light-gray);
}

.trust-badges {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-lg);
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 22%;
    animation: fadeIn 0.6s ease forwards;
    transition: transform var(--transition-normal);
}

.trust-badge:hover {
    transform: translateY(-5px);
}

.trust-badge:nth-child(2) {
    animation-delay: 0.2s;
}

.trust-badge:nth-child(3) {
    animation-delay: 0.4s;
}

.trust-badge:nth-child(4) {
    animation-delay: 0.6s;
}

.trust-icon {
    font-size: 2.25rem;
    color: var(--secondary);
    margin-bottom: 0.9375rem;
}

/* ==========================================================================
   13. FAQ Section
   ========================================================================== */
.faq {
    padding-block: var(--space-xl);
}

.accordion {
    margin-top: var(--space-lg);
    max-width: 800px;
    margin-inline: auto;
}

.accordion-item {
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.accordion-header {
    padding: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.accordion-header:hover {
    background-color: var(--light-gray);
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--white);
}

.accordion-content.active {
    padding: 1.25rem;
    max-height: 18.75rem;
}

/* ==========================================================================
   14. CTA Section
   ========================================================================== */
.cta {
    padding-block: var(--space-xl);
    background-color: var(--primary);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.cta .btn {
    background-color: var(--white);
    color: var(--primary);
    font-size: 1.125rem;
    padding: 0.9375rem 1.875rem;
}

.cta .btn:hover {
    background-color: var(--light-gray);
}

.cta-subtext {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    color: #FFFFFF; /* Ensure high contrast */
}

/* ==========================================================================
   15. Footer
   ========================================================================== */
footer {
    background-color: var(--secondary);
    color: var(--white);
    padding-block: var(--space-xl) var(--space-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    gap: 3.75rem;
}

.footer-logo {
    flex: 1;
}

.footer-logo .logo {
    color: var(--white);
    margin-bottom: 0.9375rem;
    display: inline-block;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.8);
    max-width: 300px;
}

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

.footer-links h3 {
    color: var(--white);
    margin-bottom: var(--space-sm);
    font-size: 1.125rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.625rem;
}

.footer-links a {
    color: var(--white);
    opacity: 0.8;
    transition: opacity var(--transition-normal);
}

.footer-links a:hover {
    opacity: 1;
}

.footer-links a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   16. Signup Page Styles
   ========================================================================== */
.signup-page {
    padding-block: var(--space-xl);
    background-color: #f9f9f9;
}

.signup-page h1 {
    text-align: center;
    margin-bottom: var(--space-sm);
}

.signup-subtext {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    font-size: 1.1rem;
    color: #555;
}

.signup-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.signup-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.info-card {
    background: white;
    padding: 1.5625rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.9375rem;
    color: #333;
}

.info-card i {
    color: #4CAF50;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

fieldset.form-group {
    border: none;
    padding: 0;
    margin: 0;
}

fieldset.form-group legend {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consent-group {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   17. Animations
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   18. Responsive Styles
   ========================================================================== */
/* Mobile first approach */
@media (min-width: 480px) {
    /* Very small devices */
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

@media (min-width: 768px) {
    /* Medium devices */
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

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

    .hero-content {
        flex-direction: row;
    }

    .comparison {
        flex-direction: row;
    }

    .steps {
        flex-direction: row;
    }

    .counters {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    /* Large devices */
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

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

@media (max-width: 1023px) {
    .trust-badges {
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .trust-badge {
        width: 45%;
    }
}

@media (max-width: 767px) {
    .header-container {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.9375rem;
        margin-top: var(--space-sm);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .step {
        width: 100%;
        max-width: 300px;
    }

    .steps::before {
        display: none;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
    }

    .trust-badge {
        width: 100%;
        max-width: 300px;
        margin-bottom: var(--space-md);
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding-inline: var(--space-sm);
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }

    .btn-large {
        padding: 0.875rem 1.75rem;
        font-size: 1.125rem;
    }

    .hero {
        padding-block: var(--space-lg);
    }

    .features, .example, .how-it-works, .trust, .faq, .cta {
        padding-block: var(--space-lg);
    }

    .section-title {
        margin-bottom: var(--space-lg);
    }

    .comparison {
        margin-block: var(--space-lg);
    }

    /* Terms of Service Page Styles */
    .terms-section {
        padding: 80px 0;
    }

    .page-title {
        font-size: 2.5rem;
        margin-bottom: 10px;
        color: #333;
        text-align: center;
    }

    .last-updated {
        text-align: center;
        color: #666;
        margin-bottom: 40px;
        font-style: italic;
    }

    .terms-content {
        max-width: 800px;
        margin: 0 auto;
        background: #fff;
        padding: 30px;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

    .terms-section {
        margin-bottom: 30px;
    }

    .terms-section h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
        color: #333;
    }

    .terms-section p, .terms-section li {
        margin-bottom: 15px;
        line-height: 1.6;
        color: #555;
    }

    .terms-section ul {
        padding-left: 20px;
        margin-bottom: 20px;
    }

    .terms-section a {
        color: #4a90e2;
        text-decoration: none;
    }

    .terms-section a:hover {
        text-decoration: underline;
    }

    @media (max-width: 768px) {
        .terms-content {
            padding: 20px;
        }

        .page-title {
            font-size: 2rem;
        }

        .terms-section h2 {
            font-size: 1.3rem;
        }
    }


}
