/*
Theme Name: focalScan
Theme URI: https://focalscan.app
Author: focalScan
Description: Custom theme for focalScan - Material calculator for paint, flooring, trim, and wall coverings
Version: 2.1
License: GNU General Public License v2 or later
Text Domain: focalscan
*/

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

:root {
    --bg-dark: #0a0a0f;
    --bg-section: #0f1015;
    --bg-card: #16181f;
    --cyan: #00d4ff;
    --cyan-dim: #00a8cc;
    --cyan-glow: rgba(0, 212, 255, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --gradient: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: opacity 0.2s;
}

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

/* Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-label {
    display: inline-block;
    color: var(--cyan);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.logo span {
    color: var(--cyan);
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gradient);
    color: var(--bg-dark);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 100px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--cyan-glow);
}

.btn-download svg {
    width: 18px;
    height: 18px;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(10, 10, 15, 0.3) 0%,
        rgba(10, 10, 15, 0.7) 50%,
        rgba(10, 10, 15, 1) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--cyan);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient);
    color: var(--bg-dark);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px var(--cyan-glow);
}

.btn-primary svg {
    width: 22px;
    height: 22px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
    border-color: var(--cyan);
    background: rgba(0, 212, 255, 0.05);
}

/* Story Sections */
.story-section {
    padding: 100px 0;
}

.story-section:nth-child(even) {
    background: var(--bg-section);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.story-grid.reverse {
    direction: rtl;
}

.story-grid.reverse > * {
    direction: ltr;
}

.story-image {
    position: relative;
}

.story-image img {
    border-radius: 20px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.story-image.phone-frame img {
    border-radius: 32px;
    max-width: 300px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.story-text h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.story-text h2 .highlight {
    color: var(--cyan);
}

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

.story-text ul {
    list-style: none;
}

.story-text ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 1rem;
}

.story-text ul li::before {
    content: '✓';
    color: var(--cyan);
    font-weight: bold;
    flex-shrink: 0;
}

/* Who It's For Section */
.who-section {
    padding: 80px 0;
    background: var(--bg-dark);
}

.who-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.who-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.who-text:last-child {
    margin-bottom: 0;
}

.who-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Features Grid */
.features-section {
    padding: 100px 0;
    background: var(--bg-section);
}

.features-header {
    text-align: center;
    margin-bottom: 60px;
}

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

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.3);
}

.feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

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

/* Feature Cards with Images */
.feature-card.has-image {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.feature-card.has-image .feature-image {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(0, 168, 204, 0.1) 100%);
    padding: 24px 24px 0;
    display: flex;
    justify-content: center;
}

.feature-card.has-image .feature-image img {
    max-height: 320px;
    width: auto;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

.feature-card.has-image .feature-content {
    padding: 24px 32px 32px;
}

.feature-card.has-image .feature-icon {
    margin-bottom: 16px;
}

.feature-card.has-image h3 {
    margin-bottom: 8px;
}

.feature-card.has-image p {
    margin-bottom: 0;
}

/* Screenshots Carousel */
.screenshots-section {
    padding: 100px 0;
    overflow: hidden;
}

.screenshots-header {
    text-align: center;
    margin-bottom: 48px;
}

.screenshots-scroll {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    flex-shrink: 0;
    width: 240px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    scroll-snap-align: center;
    transition: transform 0.3s;
}

.screenshot-item:hover {
    transform: scale(1.03);
}

/* Pricing Section */
.pricing-section {
    padding: 100px 0;
    background: var(--surface);
}

.pricing-header {
    text-align: center;
    margin-bottom: 60px;
}

.pricing-intro {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 16px auto 0;
    line-height: 1.6;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
}

.pricing-card.featured {
    border-color: var(--cyan);
    position: relative;
    box-shadow: 0 0 30px rgba(0, 195, 255, 0.1);
}

.pricing-badge {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cyan);
    margin-bottom: 16px;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-note {
    font-size: 0.875rem;
    color: var(--cyan);
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    text-align: left;
}

.pricing-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pricing-features li::before {
    content: '✓';
    color: var(--cyan);
    font-weight: 700;
    margin-right: 10px;
}

/* CTA Section */
.cta-section {
    padding: 0;
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.cta-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.cta-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(10, 10, 15, 1) 0%,
        rgba(10, 10, 15, 0.6) 30%,
        rgba(10, 10, 15, 0.6) 70%,
        rgba(10, 10, 15, 1) 100%
    );
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 100px 0;
}

.cta-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.app-store-badge {
    display: inline-block;
    transition: transform 0.2s;
}

.app-store-badge:hover {
    transform: scale(1.05);
}

.app-store-badge img {
    height: 54px;
}

/* Footer */
.site-footer {
    padding: 48px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-dark);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.footer-logo img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.footer-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

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

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

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 968px) {
    .nav-links { display: none; }
    .btn-download { display: none; }

    .story-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .story-grid.reverse { direction: ltr; }
    .story-image { order: -1; }

    .story-text ul {
        max-width: 400px;
        margin: 0 auto;
        text-align: left;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

@media (max-width: 640px) {
    .site-header { padding: 14px 0; }
    .logo { font-size: 1.2rem; }
    .logo img { width: 32px; height: 32px; }

    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    .hero-badge { font-size: 0.75rem; padding: 6px 12px; }
    .hero-title { font-size: 2rem; margin-bottom: 16px; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 32px; }
    .hero-cta { flex-direction: column; gap: 12px; }
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 1rem;
    }

    .story-section { padding: 60px 0; }
    .section-label { font-size: 0.75rem; }
    .story-text h2 { font-size: 1.5rem; }
    .story-text p { font-size: 1rem; }

    .features-section { padding: 60px 0; }
    .features-header .section-title { font-size: 1.75rem; }
    .feature-card { padding: 24px; }
    .feature-card.has-image { padding: 0; }
    .feature-card.has-image .feature-image { padding: 20px 20px 0; }
    .feature-card.has-image .feature-image img { max-height: 260px; }
    .feature-card.has-image .feature-content { padding: 20px 24px 24px; }

    .screenshot-item { width: 180px; border-radius: 24px; }

    .cta-section { min-height: 450px; }
    .cta-content h2 { font-size: 1.75rem; }
    .cta-content p { font-size: 1rem; }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}

/* Accessibility: Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 8px;
}

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