/* Golf Pulse Website Styles — Apple-style product marketing */

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

/* ─── Design Tokens ─── */
:root {
    /* Brand */
    --color-primary: #006747;
    --color-primary-light: #00875A;
    --color-primary-dark: #004D35;

    /* Score colors */
    --color-under-par: #C41E3A;
    --color-over-par: #1E4D8C;
    --color-live: #E31837;

    /* Neutrals */
    --color-text: #1C1C1E;
    --color-text-secondary: #8E8E93;
    --color-background: #ffffff;
    --color-surface: #f5f5f7;

    /* Typography */
    --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    --fs-hero: clamp(2.75rem, 5vw + 1rem, 5rem);
    --fs-headline: clamp(2rem, 3vw + 0.5rem, 3.5rem);
    --fs-eyebrow: 0.8125rem;
    --fs-body: 1.125rem;
    --fs-small: 0.875rem;

    /* Spacing */
    --section-pad: clamp(4rem, 8vw, 8rem);
    --content-max: 1200px;
    --content-narrow: 800px;

    /* Misc */
    --nav-height: 56px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;
}

/* ─── Base ─── */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-stack);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ─── Utility ─── */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.container--narrow {
    max-width: var(--content-narrow);
}

/* ─── Animations ─── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* Scroll-triggered animation base */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    animation-play-state: paused;
}

/* Modern browsers: scroll-driven animations */
@supports (animation-timeline: view()) {
    .animate-on-scroll {
        animation-play-state: running;
        animation-timeline: view();
        animation-range: entry 0% entry 100%;
    }
}

/* Fallback: staggered load animations */
@supports not (animation-timeline: view()) {
    .animate-on-scroll {
        animation-play-state: running;
    }
    .animate-on-scroll.delay-1 { animation-delay: 0.1s; }
    .animate-on-scroll.delay-2 { animation-delay: 0.2s; }
    .animate-on-scroll.delay-3 { animation-delay: 0.3s; }
    .animate-on-scroll.delay-4 { animation-delay: 0.4s; }
}

/* ─── 1. Sticky Nav ─── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    height: var(--nav-height);
}

.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
}

.nav-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary);
    color: #fff;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: var(--fs-small);
    transition: background-color 0.2s ease;
}

.nav-download:hover {
    background: var(--color-primary-light);
}

/* ─── 2. Hero ─── */
.hero {
    background: linear-gradient(180deg, #f0faf5 0%, #ffffff 100%);
    padding: clamp(2rem, 4vw, 4rem) 0 var(--section-pad);
    overflow: hidden;
}

.hero .container {
    text-align: center;
}

.hero__eyebrow {
    display: inline-block;
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.hero__title {
    font-size: var(--fs-hero);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.06;
    margin-bottom: 16px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero__subtitle {
    font-size: var(--fs-body);
    color: var(--color-text-secondary);
    line-height: 1.5;
    max-width: 540px;
    margin: 0 auto 24px;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-text);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.2s ease;
}

.hero__cta:hover {
    opacity: 0.85;
}

.hero__cta svg {
    flex-shrink: 0;
}

.hero__screenshot {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.hero__screenshot img {
    width: 340px;
    border-radius: 40px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
    animation: float 6s ease-in-out infinite;
}

/* Desktop hero: two columns */
@media (min-width: 1024px) {
    .hero .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        text-align: left;
        gap: 48px;
    }

    .hero__content {
        order: 1;
    }

    .hero__title {
        margin-left: 0;
        margin-right: 0;
    }

    .hero__subtitle {
        margin-left: 0;
        margin-right: 0;
    }

    .hero__screenshot {
        order: 2;
        margin-top: 0;
    }

    .hero__screenshot img {
        width: 380px;
    }
}

/* ─── 3-5. Feature Sections ─── */
.feature-section {
    padding: var(--section-pad) 0;
    position: relative;
    overflow: hidden;
}

.feature-section--gray {
    background-color: var(--color-surface);
}

.feature-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 48px;
}

.feature-section__text {
    max-width: 540px;
}

.feature-section__eyebrow {
    position: relative;
    display: inline-block;
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 16px;
    padding-top: 20px;
}

.feature-section__eyebrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.feature-section__title {
    font-size: var(--fs-headline);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.12;
    margin-bottom: 16px;
}

.feature-section__body {
    font-size: var(--fs-body);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.feature-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.feature-chip {
    display: inline-block;
    padding: 6px 16px;
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-pill);
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--color-primary);
}

/* Score demo chips */
.score-demo {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.score-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-small);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.score-chip--under {
    background: rgba(196, 30, 58, 0.1);
    color: var(--color-under-par);
}

.score-chip--even {
    background: rgba(142, 142, 147, 0.12);
    color: var(--color-text-secondary);
}

.score-chip--over {
    background: rgba(30, 77, 140, 0.1);
    color: var(--color-over-par);
}

/* Feature screenshot */
.feature-section__media {
    position: relative;
    display: flex;
    justify-content: center;
}

.feature-section__media::before {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    background: var(--color-primary);
    opacity: 0.04;
    border-radius: 40px;
    transform: rotate(12deg);
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: 0;
}

.feature-section__media img {
    position: relative;
    z-index: 1;
    width: 320px;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.06);
}

/* Desktop feature layout */
@media (min-width: 1024px) {
    .feature-section .container {
        flex-direction: row;
        text-align: left;
        gap: 80px;
    }

    .feature-section__text {
        flex: 1;
    }

    .feature-section__media {
        flex: 1;
    }

    .feature-section__eyebrow::before {
        left: 0;
        transform: none;
    }

    .feature-chips {
        justify-content: flex-start;
    }

    .score-demo {
        justify-content: flex-start;
    }

    /* Reversed layout */
    .feature-section--reversed .container {
        flex-direction: row-reverse;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .feature-section__media img {
        width: 360px;
    }

    .feature-section__media::before {
        width: 380px;
        height: 380px;
    }
}

/* ─── 6. CTA Section ─── */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: var(--section-pad) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section__title {
    font-size: var(--fs-headline);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.12;
    margin-bottom: 16px;
}

.cta-section__subtitle {
    font-size: var(--fs-body);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--color-primary);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.2s ease;
}

.cta-section__button:hover {
    opacity: 0.9;
}

.cta-section__note {
    margin-top: 16px;
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.65);
}

.cta-section__note .live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    animation: pulse 2s ease-in-out infinite;
}

/* ─── 7. Footer ─── */
.site-footer {
    background: var(--color-surface);
    padding: 48px 0 32px;
}

.site-footer .container {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.footer-brand img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.footer-brand span {
    font-weight: 600;
    font-size: 1rem;
}

.footer-tagline {
    font-size: var(--fs-small);
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

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

.footer-links a {
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--color-primary);
    transition: opacity 0.2s ease;
}

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

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

/* ─── Page Header (Privacy, Support) ─── */
.page-header {
    padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.page-header .last-updated,
.page-header .subtitle {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

/* ─── Content Sections (Privacy, Support) ─── */
.content {
    padding: 0 0 clamp(3rem, 6vw, 5rem);
}

.policy-section,
.faq-section,
.contact-section {
    margin-bottom: 48px;
}

.policy-section h2,
.faq-section h2,
.contact-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.policy-section p,
.faq-answer p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.policy-section ul,
.faq-answer ul,
.faq-answer ol {
    margin: 16px 0;
    padding-left: 24px;
}

.policy-section li,
.faq-answer li {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.contact-email a {
    color: var(--color-primary);
    font-weight: 600;
}

.contact-email a:hover {
    text-decoration: underline;
}

/* FAQ Styles */
.faq-item {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
}

.faq-item h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.faq-answer {
    font-size: 0.9375rem;
}

.faq-answer strong {
    color: var(--color-text);
}

/* Contact Section */
.contact-section {
    text-align: center;
    padding: 40px;
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
}

.contact-section p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--color-primary);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.contact-button:hover {
    background-color: var(--color-primary-light);
}

/* ─── Responsive ─── */
@media (max-width: 767px) {
    .hero__screenshot img {
        width: 280px;
    }

    .feature-section__media img {
        width: 260px;
    }

    .feature-section__media::before {
        width: 280px;
        height: 280px;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }

    .faq-item {
        padding: 20px;
    }

    .contact-section {
        padding: 24px;
    }
}

/* ─── Accessibility ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
