/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d1b1b;
    background-color: #fefefe;
    overflow-x: hidden;
}

/* Typography Scale */
h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.4;
}

p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

/* Header */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #f5e6e6;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8b2635;
    text-decoration: none;
    background: linear-gradient(135deg, #8b2635 0%, #a52a2a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #ffffff;
    padding: 32px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(139, 38, 53, 0.2);
    border: 1px solid #f5e6e6;
}

.modal h2 {
    margin-bottom: 16px;
    color: #2d1b1b;
}

.modal p {
    margin-bottom: 24px;
    color: #5a3a3a;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #8b2635 0%, #a52a2a 100%);
    color: #ffffff;
    border: 1px solid #8b2635;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a52a2a 0%, #b83141 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 38, 53, 0.3);
}

.btn-secondary {
    background-color: #f5e6e6;
    color: #8b2635;
    border: 1px solid #e5d5d5;
}

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

/* Hero Section */
.hero {
    padding: 48px 0 64px;
    background: linear-gradient(135deg, #fefefe 0%, #f9f5f5 100%);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(139, 38, 53, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(165, 42, 42, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2d1b1b;
    margin-bottom: 16px;
    line-height: 1.1;
    background: linear-gradient(135deg, #8b2635 0%, #a52a2a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #5a3a3a;
    margin-bottom: 24px;
    line-height: 1.5;
}

.convenience-link {
    margin-bottom: 24px;
}

.auto-store-link {
    color: #8b2635;
    text-decoration: underline;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auto-store-link:hover {
    color: #a52a2a;
}

.download-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #8b2635 0%, #a52a2a 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    min-height: 56px;
    border: 1px solid #8b2635;
}

.download-btn:hover {
    background: linear-gradient(135deg, #a52a2a 0%, #b83141 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 38, 53, 0.25);
}

.download-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.trust-note {
    font-size: 0.875rem;
    color: #7a5a5a;
    text-align: center;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hero-image img[src*="fermologo.png"] {
    max-width: 200px;
    width: 200px;
    height: 200px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(139, 38, 53, 0.15);
    border: 1px solid #f5e6e6;
}

/* Screenshots Carousel */
.screenshots-section {
    padding: 48px 0;
    background-color: #f9f5f5;
    border-top: 1px solid #f5e6e6;
    border-bottom: 1px solid #f5e6e6;
}

.screenshots-title {
    text-align: center;
    margin-bottom: 32px;
    color: #2d1b1b;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #8b2635 0%, #a52a2a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.screenshots-carousel {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(139, 38, 53, 0.1);
    background-color: #ffffff;
    padding: 16px 0;
    border: 1px solid #f5e6e6;
}

.screenshots-track {
    display: flex;
    animation: scroll 30s linear infinite;
    width: calc(200% + 2rem);
}

.screenshots-carousel:hover .screenshots-track {
    animation-play-state: paused;
}

.screenshot-slide {
    flex: 0 0 auto;
    width: 200px;
    margin-right: 16px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.screenshot-slide:hover {
    transform: scale(1.05);
}

.screenshot-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(139, 38, 53, 0.1);
    border: 1px solid #f5e6e6;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Social Proof */
.social-proof {
    padding: 32px 0;
    background-color: #ffffff;
}

.social-proof-text {
    text-align: center;
    font-size: 1.125rem;
    color: #5a3a3a;
    margin-bottom: 24px;
    font-weight: 500;
}

.proof-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 24px;
    max-width: 600px;
    margin: 0 auto;
}

.proof-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.proof-icon {
    font-size: 1.5rem;
}

.proof-item span:last-child {
    font-size: 0.875rem;
    font-weight: 500;
    color: #5a3a3a;
}

/* Features */
.features {
    padding: 64px 0;
    background-color: #ffffff;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
    color: #2d1b1b;
    background: linear-gradient(135deg, #8b2635 0%, #a52a2a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.feature-card {
    background-color: #f9f5f5;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #f5e6e6;
    transition: all 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 38, 53, 0.1);
    border-color: #e5d5d5;
    background-color: #ffffff;
}

.feature-title {
    margin-bottom: 12px;
    color: #2d1b1b;
}

.feature-description {
    color: #5a3a3a;
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    padding: 64px 0;
    background-color: #f9f5f5;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #8b2635 0%, #a52a2a 100%);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(139, 38, 53, 0.2);
}

.step-title {
    color: #2d1b1b;
    font-size: 1.125rem;
}

/* Privacy Callout */
.privacy-callout {
    padding: 48px 0;
    background-color: #ffffff;
}

.privacy-box {
    background-color: #f9f5f5;
    border: 1px solid #f5e6e6;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.privacy-title {
    color: #8b2635;
    margin-bottom: 12px;
}

.privacy-text {
    color: #5a3a3a;
}

.privacy-text a {
    color: #8b2635;
    text-decoration: underline;
}

.privacy-text a:hover {
    color: #a52a2a;
}

/* Disclaimer */
.disclaimer {
    padding: 24px 0;
    background-color: #f5e6e6;
    border-top: 1px solid #e5d5d5;
    border-bottom: 1px solid #e5d5d5;
}

.disclaimer-text {
    text-align: center;
    color: #8b2635;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer */
.footer {
    padding: 32px 0;
    background: linear-gradient(135deg, #2d1b1b 0%, #3d2525 100%);
    color: #ffffff;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #e5d5d5;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.copyright {
    text-align: center;
    font-size: 0.75rem;
    color: #b8a8a8;
}

/* Mobile Screenshots Adjustments */
@media (max-width: 480px) {
    .screenshots-section {
        padding: 32px 0;
    }

    .screenshots-title {
        font-size: 1.25rem;
        margin-bottom: 24px;
    }

    .screenshot-slide {
        width: 160px;
        margin-right: 12px;
    }

    .screenshots-carousel {
        padding: 12px 0;
    }
}

@media (max-width: 360px) {
    .screenshot-slide {
        width: 140px;
        margin-right: 10px;
    }

    .hero-image img[src*="fermologo.png"] {
        max-width: 150px;
        width: 150px;
        height: 150px;
        padding: 15px;
    }
}

/* Desktop Styles */
@media (min-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 80px 0 96px;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .download-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .screenshots-section {
        padding: 64px 0;
    }

    .screenshots-title {
        font-size: 2rem;
        margin-bottom: 48px;
    }

    .screenshot-slide {
        width: 250px;
        margin-right: 24px;
    }

    .screenshots-carousel {
        padding: 24px 0;
    }

    .hero-image img[src*="fermologo.png"] {
        max-width: 300px;
        width: 300px;
        height: 300px;
        padding: 30px;
        box-shadow: 0 20px 40px rgba(139, 38, 53, 0.2);
    }

    .features {
        padding: 96px 0;
    }

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

    .how-it-works {
        padding: 96px 0;
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 48px;
    }

    .privacy-callout {
        padding: 64px 0;
    }
}

/* Large Desktop */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.75rem;
    }

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

/* Focus States for Accessibility */
.btn:focus,
.download-btn:focus,
.auto-store-link:focus {
    outline: 2px solid #8b2635;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .feature-card {
        border-width: 2px;
        border-color: #8b2635;
    }

    .btn-primary {
        background: #8b2635;
        border: 2px solid #8b2635;
    }

    .download-btn {
        background: #8b2635;
        border: 2px solid #8b2635;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .screenshots-track {
        animation: none !important;
    }

    .screenshots-carousel:hover .screenshots-track {
        animation-play-state: running !important;
    }
}