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

:root {
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f2f2f7;
    --bg-tertiary: #e5e5ea;
    --bg-elevated: #f5f5f5;
    --bg-card: #ffffff;

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #595959;
    --text-tertiary: #666666;
    --text-muted: #737373;

    /* Green / Success */
    --green-primary: #23a147;
    --green-subtle: rgba(48, 209, 88, 0.12);
    --green-border: rgba(48, 209, 88, 0.40);
    --green-glow: rgba(48, 209, 88, 0.30);

    /* Borders & Shadows */
    --border: #e5e5e5;
    --border-subtle: #f0f0f0;
    --shadow-card: rgba(0, 0, 0, 0.08);

    /* Map Overlay */
    --map-overlay: rgba(255, 255, 255, 0.85);

    /* Buttons (derived from palette) */
    --btn-bg: #1a1a1a;
    --btn-text: #ffffff;
    --btn-hover: #333333;

    /* Legacy aliases for compatibility */
    --bg: var(--bg-secondary);
    --text: var(--text-primary);
    --text-faint: var(--text-muted);
}

[data-theme="dark"] {
    /* Background Colors */
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --bg-tertiary: #2c2c2e;
    --bg-elevated: #2c2c2e;
    --bg-card: #1c1c1e;

    /* Text Colors */
    --text-primary: #f5f5f5;
    --text-secondary: #b3b3b3;
    --text-tertiary: #9a9a9a;
    --text-muted: #8a8a8a;

    /* Green / Success */
    --green-primary: #30d158;
    --green-subtle: rgba(48, 209, 88, 0.15);
    --green-border: rgba(48, 209, 88, 0.30);
    --green-glow: rgba(48, 209, 88, 0.50);

    /* Borders & Shadows */
    --border: #2a2a2a;
    --border-subtle: #1f1f1f;
    --shadow-card: transparent;

    /* Map Overlay */
    --map-overlay: rgba(0, 0, 0, 0.70);

    /* Buttons */
    --btn-bg: #f5f5f5;
    --btn-text: #0a0a0a;
    --btn-hover: #e0e0e0;

    /* Legacy aliases */
    --bg: var(--bg-secondary);
    --text: var(--text-primary);
    --text-faint: var(--text-muted);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* Background Colors */
        --bg-primary: #000000;
        --bg-secondary: #1c1c1e;
        --bg-tertiary: #2c2c2e;
        --bg-elevated: #2c2c2e;
        --bg-card: #1c1c1e;

        /* Text Colors */
        --text-primary: #f5f5f5;
        --text-secondary: #b3b3b3;
        --text-tertiary: #9a9a9a;
        --text-muted: #8a8a8a;

        /* Green / Success */
        --green-primary: #30d158;
        --green-subtle: rgba(48, 209, 88, 0.15);
        --green-border: rgba(48, 209, 88, 0.30);
        --green-glow: rgba(48, 209, 88, 0.50);

        /* Borders & Shadows */
        --border: #2a2a2a;
        --border-subtle: #1f1f1f;
        --shadow-card: transparent;

        /* Map Overlay */
        --map-overlay: rgba(0, 0, 0, 0.70);

        /* Buttons */
        --btn-bg: #f5f5f5;
        --btn-text: #0a0a0a;
        --btn-hover: #e0e0e0;

        /* Legacy aliases */
        --bg: var(--bg-secondary);
        --text: var(--text-primary);
        --text-faint: var(--text-muted);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Skip Link - Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--btn-bg);
    color: var(--btn-text);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 16px;
}

/* Focus Styles - Accessibility */
:focus-visible {
    outline: 3px solid var(--green-primary);
    outline-offset: 2px;
}

/* Remove default outline, use focus-visible instead */
:focus:not(:focus-visible) {
    outline: none;
}

/* Button and link focus styles */
.btn:focus-visible,
.theme-toggle:focus-visible,
.carousel-dot:focus-visible {
    outline: 3px solid var(--green-primary);
    outline-offset: 2px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 24px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

/* Hero Section */
.hero {
    display: flex;
    gap: 48px;
    align-items: center;
    margin-bottom: 48px;
}

.hero-content {
    flex: 1;
}

.hero-phone {
    flex: 0 0 280px;
    perspective: 1000px;
}

.hero-mockup {
    width: 100%;
    aspect-ratio: 9/19;
    background: #0a0a0a;
    border-radius: 32px;
    border: 4px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 25px 50px -12px rgba(0,0,0,0.4),
        0 12px 24px -8px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.1) inset;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Glare/reflection overlay */
.hero-mockup::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.1) 100%
    );
    pointer-events: none;
    z-index: 10;
}

/* Phone edge/thickness */
.hero-mockup::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 32px;
    background: linear-gradient(to right, #1a1a1a, #4a4a4a, #1a1a1a);
    transform: translateZ(-8px);
    z-index: -1;
}

.hero-mockup .mockup-notch {
    width: 35%;
    height: 28px;
    background: #1a1a1a;
    border-radius: 0 0 14px 14px;
    margin: 0 auto;
}

.hero-mockup .mockup-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-mockup .mockup-header {
    text-align: center;
    color: #f5f5f5;
    font-size: 0.75rem;
    font-weight: 600;
}

.hero-mockup .mockup-timer {
    text-align: center;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 2.25rem;
    color: #30d158;
    padding: 20px;
    background: #141414;
    border-radius: 16px;
}

.hero-mockup .mockup-project {
    background: #141414;
    padding: 14px;
    border-radius: 10px;
    color: #a0a0a0;
    font-size: 0.75rem;
}

.hero-mockup .mockup-project strong {
    color: #f5f5f5;
    display: block;
    margin-bottom: 4px;
}

.hero-mockup .mockup-map {
    flex: 1;
    background: linear-gradient(135deg, #1a3a1a 0%, #0a2a0a 100%);
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-mockup .mockup-geofence {
    width: 80px;
    height: 80px;
    border: 2px solid #30d158;
    border-radius: 50%;
    background: rgba(48, 209, 88, 0.2);
}

.hero-mockup .mockup-pin {
    position: absolute;
    font-size: 1.75rem;
}

.hero-screenshot {
    flex: 1;
    width: 100%;
    object-fit: cover;
    object-position: top;
}

/* Hide dark hero by default (light mode) */
.hero-screenshot-dark {
    display: none !important;
}

/* Show dark, hide light when dark theme is active */
[data-theme="dark"] .hero-screenshot-dark {
    display: block !important;
}

[data-theme="dark"] .hero-screenshot-light {
    display: none !important;
}

/* System dark mode preference (when no manual override to light) */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .hero-screenshot-dark {
        display: block !important;
    }

    html:not([data-theme="light"]) .hero-screenshot-light {
        display: none !important;
    }
}

/* Intro Section */
.intro {
    margin-bottom: 48px;
}

.intro p {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom:20px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 24px;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-cta {
    margin-top: 8px;
}

.harvest-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff4ed;
    border: 1px solid #ffcdb2;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #c44d00;
    margin-bottom: 24px;
    font-weight: 500;
}

.harvest-badge svg {
    width: 18px;
    height: 18px;
}

/* Geofence Demo */
.demo-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 48px;
}

.demo-section h2 {
    text-align: center;
    margin-bottom: 8px;
}

.demo-lead {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.geofence-demo {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.demo-map {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.demo-map-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0);
    opacity: 0.6;
}

/* Adaptive overlay */
.demo-map::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--map-overlay);
    z-index: 1;
}

.geofence-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--green-subtle);
    border: 3px dashed var(--green-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, border-color 0.3s;
    z-index: 2;
}

.geofence-circle.active {
    background: var(--green-subtle);
    border-style: solid;
    border-color: var(--green-border);
    animation: glow 1.5s ease-in-out infinite;
    box-shadow:
        0 0 30px var(--green-glow),
        0 0 60px var(--green-glow),
        0 0 100px var(--green-glow);
}

@keyframes glow {
    0%, 100% {
        box-shadow:
            0 0 30px var(--green-glow),
            0 0 60px var(--green-glow),
            0 0 100px var(--green-glow);
    }
    50% {
        box-shadow:
            0 0 50px var(--green-glow),
            0 0 100px var(--green-glow),
            0 0 150px var(--green-glow);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .geofence-circle.active {
        animation: none;
    }

    .hero-mockup {
        transform: none !important;
    }
}

.geofence-label {
    font-size: 1.5rem;
    text-align: center;
    pointer-events: none;
}

.geofence-label span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.phone-icon {
    position: absolute;
    font-size: 2.5rem;
    cursor: grab;
    user-select: none;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: transform 0.1s;
    z-index: 10;
}

.phone-icon:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.tracking-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 16px;
    background: var(--border);
    border-radius: 8px;
    font-weight: 500;
}

.tracking-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.3s;
}

.tracking-dot.active {
    background: var(--green-primary);
    animation: pulse 1.5s infinite;
}

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

.timer-display {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 1.25rem;
    color: var(--text);
}

/* Screenshot Carousel */
.carousel-section {
    margin-bottom: 48px;
}

.carousel-section h2 {
    margin-bottom: 24px;
}

.carousel-container {
    position: relative;
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px 24px;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
}

.carousel::-webkit-scrollbar {
    height: 8px;
}

.carousel::-webkit-scrollbar-track {
    background: #e5e5e5;
    border-radius: 4px;
}

.carousel::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 4px;
}

.carousel-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.carousel-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.screenshot {
    width: 100%;
    aspect-ratio: 9/16;
    background: var(--bg-tertiary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
}

.carousel-phone {
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    border-radius: 24px;
    border: 3px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 8px 24px -4px rgba(0,0,0,0.25),
        0 4px 12px -4px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.1) inset;
}

.carousel-phone-notch {
    width: 35%;
    height: 20px;
    background: #1a1a1a;
    border-radius: 0 0 10px 10px;
    margin: 0 auto;
    flex-shrink: 0;
}

.carousel-phone .screenshot-img {
    flex: 1;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top;
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Hide dark screenshots by default (light mode) */
.screenshot-dark {
    display: none !important;
}

/* Show dark, hide light when dark theme is active */
[data-theme="dark"] .screenshot-dark {
    display: block !important;
}

[data-theme="dark"] .screenshot-light {
    display: none !important;
}

/* System dark mode preference (when no manual override to light) */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .screenshot-dark {
        display: block !important;
    }

    html:not([data-theme="light"]) .screenshot-light {
        display: none !important;
    }
}

.screenshot-mockup {
    width: 85%;
    height: 90%;
    background: #0a0a0a;
    border-radius: 24px;
    border: 3px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.mockup-notch {
    width: 40%;
    height: 24px;
    background: #1a1a1a;
    border-radius: 0 0 12px 12px;
    margin: 0 auto;
}

.mockup-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mockup-header {
    text-align: center;
    color: #f5f5f5;
    font-size: 0.7rem;
    font-weight: 600;
}

.mockup-timer {
    text-align: center;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 1.75rem;
    color: #30d158;
    padding: 16px;
    background: #141414;
    border-radius: 12px;
}

.mockup-project {
    background: #141414;
    padding: 12px;
    border-radius: 8px;
    color: #a0a0a0;
    font-size: 0.65rem;
}

.mockup-project strong {
    color: #f5f5f5;
    display: block;
    margin-bottom: 2px;
}

.mockup-map {
    flex: 1;
    background: linear-gradient(135deg, #1a3a1a 0%, #0a2a0a 100%);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-geofence {
    width: 60px;
    height: 60px;
    border: 2px dashed #fa5d00;
    border-radius: 50%;
    background: rgba(250, 93, 0, 0.2);
}

.mockup-pin {
    position: absolute;
    font-size: 1.5rem;
}

.mockup-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mockup-list-item {
    background: #141414;
    padding: 10px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f5f5f5;
    font-size: 0.6rem;
}

.mockup-list-item .icon {
    font-size: 1rem;
}

.mockup-oauth {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 16px;
    text-align: center;
}

.mockup-oauth-logo {
    width: 48px;
    height: 48px;
    background: #fa5d00;
    border-radius: 12px;
}

.mockup-oauth-text {
    color: #a0a0a0;
    font-size: 0.65rem;
    line-height: 1.4;
}

.mockup-oauth-btn {
    background: #fa5d00;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.carousel-caption {
    padding: 16px;
}

.carousel-caption h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.carousel-caption p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-dot.active {
    background: var(--text);
}

/* How it works */
.how-it-works {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 48px;
}

.how-it-works h2 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin-bottom: 24px;
}

.step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--btn-bg);
    color: var(--btn-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    padding-top: 2px;
}

/* At a Glance */
.at-a-glance {
    margin-bottom: 48px;
}

.at-a-glance-lead {
    color: var(--text-muted);
    margin-bottom: 24px;
}

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

.glance-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.glance-screenshot {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.glance-screenshot img {
    width: 100%;
    height: auto;
    display: block;
}

.glance-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.glance-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 600px) {
    .glance-cards {
        grid-template-columns: 1fr;
    }
}

/* Pricing */
.pricing {
    margin-bottom: 48px;
}

.price-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.price-card.featured {
    border-color: #fa5d00;
    border-width: 2px;
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.price-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.price-features {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.price-contact {
    display: inline-block;
    margin-top: 16px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
}

/* CTA */
.cta {
    margin-bottom: 48px;
}

.btn {
    display: inline-block;
    background: var(--btn-bg);
    color: var(--btn-text);
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.btn:hover {
    background: var(--btn-hover);
}

.note {
    font-size: 0.875rem;
    color: var(--text-faint);
    margin-top: 12px;
}

/* FAQ */
.faq {
    margin-bottom: 48px;
}

.faq-item {
    margin-bottom: 24px;
}

.faq-q {
    font-weight: 600;
    margin-bottom: 8px;
}

.faq-a {
    color: var(--text-muted);
}

/* About Section */
.about {
    display: flex;
    gap: 24px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 48px;
}

.about-photo {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--border);
    overflow: hidden;
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.about-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.about-content a {
    color: var(--text);
}

@media (max-width: 600px) {
    .about {
        flex-direction: column;
        text-align: center;
    }
}

footer {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    font-size: 0.875rem;
    color: var(--text-faint);
}

footer a {
    color: var(--text-muted);
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .hero {
        flex-direction: column;
        gap: 32px;
    }

    .hero-phone {
        flex: none;
        width: 220px;
        order: -1;
    }

    .price-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .carousel-item {
        flex: 0 0 240px;
    }

    .screenshot {
        padding: 12px;
    }

    .carousel-phone {
        border-radius: 20px;
        border-width: 2px;
    }

    .carousel-phone-notch {
        height: 16px;
        border-radius: 0 0 8px 8px;
    }

    .geofence-circle {
        width: 140px;
        height: 140px;
    }
}
