/* ==========================================================================
   Hunting Apps - Professional Landing Page
   Target audience: Hunters, 40+, USA
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables & Base Styles
   -------------------------------------------------------------------------- */
:root {
    --color-bg: #1a1f14;
    --color-bg-light: #242b1c;
    --color-bg-card: #2d3623;
    --color-primary: #4a5d31;
    --color-primary-light: #5c7340;
    --color-accent: #8fa66b;
    --color-text: #f5f2eb;
    --color-text-muted: #b8b3a6;
    --color-border: #3d4a2d;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.25);
    --transition: 0.2s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-width: 320px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.85;
}

ul {
    list-style: none;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 32px;
    }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    padding: 60px 0 50px;
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg) 100%);
    border-bottom: 1px solid var(--color-border);
}

/* Card badges */
.card-badge {
    position: absolute;
    top: -8px;
    right: 16px;
    padding: 4px 10px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 1;
    color: #1a1f14;
}

.card-badge.new {
    background: #7cb563;
}

.card-badge.top {
    background: #d4a855;
}

.hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--color-text);
}

.hero-text {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    .hero {
        padding: 80px 0 70px;
    }

    .hero-stats {
        gap: 60px;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* --------------------------------------------------------------------------
   Main Content
   -------------------------------------------------------------------------- */
.main {
    padding: 40px 0 60px;
}

@media (min-width: 768px) {
    .main {
        padding: 60px 0 80px;
    }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
    margin-bottom: 50px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
    letter-spacing: -0.01em;
    text-align: center;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    text-align: center;
}

.section-title + .apps-grid {
    margin-top: 24px;
}

@media (min-width: 768px) {
    .section {
        margin-bottom: 60px;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* --------------------------------------------------------------------------
   App Cards Grid (iOS-style icons)
   -------------------------------------------------------------------------- */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 12px;
}

@media (min-width: 480px) {
    .apps-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px 16px;
    }
}

@media (min-width: 768px) {
    .apps-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 28px 20px;
    }
}

@media (min-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 32px 24px;
    }
}

.apps-grid.featured {
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .apps-grid.featured {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* --------------------------------------------------------------------------
   App Card (iOS-style icon)
   -------------------------------------------------------------------------- */
.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.app-card:hover {
    transform: scale(1.05);
}

.app-card:hover .app-image {
    box-shadow: var(--shadow-md);
}

.app-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--color-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow var(--transition);
}

@media (min-width: 480px) {
    .app-image {
        width: 88px;
        height: 88px;
        border-radius: 20px;
    }
}

@media (min-width: 768px) {
    .app-image {
        width: 96px;
        height: 96px;
        border-radius: 22px;
    }
}

.app-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-content {
    text-align: center;
    width: 100%;
}

.app-content h3 {
    font-size: 0.8125rem;
    font-weight: 500;
    margin: 0;
    color: var(--color-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 480px) {
    .app-content h3 {
        font-size: 0.875rem;
    }
}

.app-description {
    display: none;
}

/* Featured cards - keep card style */
.featured-card {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.featured-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
}

.featured-card .app-image {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    box-shadow: none;
}

.featured-card .app-content {
    text-align: left;
    flex: 1;
}

.featured-card .app-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    white-space: normal;
    margin-bottom: 6px;
}

.featured-card .app-description {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Store Buttons
   -------------------------------------------------------------------------- */
.app-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.store-btn {
    display: block;
    height: 36px;
    transition: all var(--transition);
}

.store-btn:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.store-btn img {
    height: 100%;
    width: auto;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
    text-align: center;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* Hide iOS-only apps on Android */
.is-android .ios-only {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Platform Selection Modal
   -------------------------------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.modal-content p {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.modal-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.modal-btn {
    display: block;
    transition: all var(--transition);
}

.modal-btn:hover {
    transform: scale(1.05);
    opacity: 1;
}

.modal-btn img {
    height: 44px;
    width: auto;
}

/* --------------------------------------------------------------------------
   Reviews Slider
   -------------------------------------------------------------------------- */
.reviews-section {
    margin-top: 20px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

.reviews-slider {
    position: relative;
    overflow: hidden;
}

.reviews-track {
    display: flex;
    transition: transform 0.4s ease;
}

.review-slide {
    flex: 0 0 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .review-slide {
        flex: 0 0 50%;
    }
}

@media (min-width: 1024px) {
    .review-slide {
        flex: 0 0 33.333%;
    }
}

.review-slide-inner {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
    height: 100%;
}

.review-stars {
    color: var(--color-accent);
    font-size: 1.125rem;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.review-slide .review-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 16px;
    font-style: italic;
}

.review-author {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.reviews-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.reviews-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.reviews-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.reviews-dots {
    display: flex;
    gap: 8px;
}

.reviews-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.reviews-dots .dot.active {
    background: var(--color-accent);
    width: 24px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-border: #5c7340;
    }

    .app-card,
    .review {
        border-width: 2px;
    }
}
