/* ===================================
   IronBoard Landing Page
   Design System: Editorial Athletics
   =================================== */

:root {
    /* Surfaces */
    --surface: #131315;
    --surface-low: #1b1b1d;
    --surface-high: #2a2a2c;
    --surface-highest: #3a3a3c;

    /* Brand */
    --primary: #E8392E;
    --primary-hover: #ff4a3f;
    --secondary: #F0A500;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-tertiary: rgba(255, 255, 255, 0.3);

    /* Borders */
    --outline: rgba(255, 255, 255, 0.15);

    /* Layout */
    --max-width: 1120px;
    --gutter: 24px;
}

/* ---- Reset & Base ---- */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---- Utilities ---- */

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--secondary);
}

/* ---- Hero ---- */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem var(--gutter) 4rem;
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-text h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 480px;
    margin-bottom: 2.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text-primary);
    color: var(--surface);
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 980px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.cta-button:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 0.9);
}

.cta-button:active {
    transform: scale(0.98);
}

.cta-button-disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.apple-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Phone frame */

.phone-frame {
    width: 280px;
    aspect-ratio: 9 / 19.5;
    background: var(--surface-low);
    border: 2px solid var(--outline);
    border-radius: 36px;
    padding: 8px;
    position: relative;
    margin: 0 auto;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Features ---- */

.features {
    padding: 6rem var(--gutter);
    background: var(--surface-low);
}

.features-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--surface-high);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.2s ease;
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---- Screenshots ---- */

.screenshots {
    padding: 6rem var(--gutter);
}

.screenshots-scroll {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: var(--max-width);
    margin: 0 auto;
}

.phone-small {
    width: 200px;
    border-radius: 28px;
    padding: 6px;
}

.phone-small .phone-screen {
    border-radius: 22px;
}

/* ---- Bottom CTA ---- */

.bottom-cta {
    padding: 6rem var(--gutter);
    text-align: center;
    background: var(--surface-low);
}

.bottom-cta h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.bottom-cta p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ---- Footer ---- */

.footer {
    padding: 2.5rem var(--gutter);
    border-top: 1px solid var(--outline);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-logo {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.footer-tagline {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

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

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.15s ease;
}

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

/* ---- Scroll Animations ---- */

.feature-card,
.phone-small {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

.phone-small:nth-child(1) { animation-delay: 0.1s; }
.phone-small:nth-child(2) { animation-delay: 0.2s; }
.phone-small:nth-child(3) { animation-delay: 0.3s; }
.phone-small:nth-child(4) { animation-delay: 0.4s; }

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

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-button {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-scroll {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0 var(--gutter);
        -webkit-overflow-scrolling: touch;
    }

    .phone-small {
        flex-shrink: 0;
        scroll-snap-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --gutter: 16px;
    }

    .hero {
        min-height: auto;
        padding-top: 4rem;
    }

    .phone-frame {
        width: 220px;
    }

    .phone-small {
        width: 160px;
    }

    .feature-card {
        padding: 1.5rem;
    }
}
