/* ========================================
   We Wins! Landing Page Styles
   Mobile-First Responsive Design
   ======================================== */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --success: #10b981;
    --background: #ffffff;
    --surface: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    --shadow: 0 2px 4px -1px rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 4px 8px -2px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 8px 16px -4px rgb(0 0 0 / 0.06), 0 4px 8px -4px rgb(0 0 0 / 0.05);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    /* Spacing scale - based on 8px base unit */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 5rem;
    --spacing-5xl: 6rem;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7; /* Increased from 1.6 for better readability */
    color: var(--text-primary);
    background: var(--background);
    overflow-x: hidden;
    font-weight: 400; /* Explicit weight for body text */
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

p {
    margin: 0;
}

/* Consistent spacing for consecutive paragraphs */
p + p {
    margin-top: 1rem;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2.5rem;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-top: 0;
}

h1 { 
    font-size: 2.25rem;
    font-weight: 700; /* Reduced from 800 */
    letter-spacing: -0.02em; /* Slightly looser tracking */
}
h2 { 
    font-size: 1.875rem;
    font-weight: 600; /* Reduced from 700 */
}
h3 { 
    font-size: 1.25rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    h1 { 
        font-size: 3rem;
        letter-spacing: -0.03em; /* Slightly looser */
    }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.5rem; }
}

@media (min-width: 1024px) {
    h1 { 
        font-size: 3.5rem;
        letter-spacing: -0.04em; /* Slightly looser */
    }
    h2 { font-size: 2.5rem; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px 0 rgba(99, 102, 241, 0.2);
    font-weight: 500; /* Reduced from 600 */
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgba(99, 102, 241, 0.25);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--primary-light);
    font-weight: 600;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-nav {
    padding: 0.625rem 1.25rem; /* Slightly larger */
    font-size: 0.875rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.15);
    font-weight: 500; /* Reduced from 600 */
    transition: all var(--transition);
}

.btn-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
}

/* Navigation */
.navbar {
    position: static;
    background: var(--background);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    transition: all var(--transition);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.2) 50%, transparent 100%);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700; /* Reduced from 800 */
    color: var(--primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-icon-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary); /* Increased contrast from text-secondary */
    transition: color var(--transition);
}

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

.nav-links a:not(.btn) {
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: 1px;
}

.nav-links a:not(.btn):hover::after {
    opacity: 0.6;
}

.nav-links .app-store-badge {
    display: flex;
    align-items: center;
}

.nav-links .app-store-badge-img {
    height: 36px; /* Slightly smaller for navigation bar while maintaining readability */
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
    .mobile-menu-btn {
        display: none;
    }
}

/* Hero Section */
.hero {
    position: relative;
    padding: 2rem 0 4rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero {
        padding: 3rem 0 5rem;
    }
}

.hero .container {
    display: grid;
    gap: 3rem;
    align-items: start; /* Changed from center for baseline alignment */
}

/* Create consistent vertical rhythm - base unit: 0.5rem (8px) */
.hero-content > * + * {
    margin-top: 0; /* Let individual elements control spacing */
}

.hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.hero-logo-icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.hero-logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    .hero-logo {
        margin-bottom: 1.75rem;
    }
    
    .hero-logo-icon {
        width: 64px;
        height: 64px;
    }
    
    .hero-logo-text {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .hero-logo {
        justify-content: flex-start;
        margin-bottom: 2rem;
    }
    
    .hero-logo-icon {
        width: 72px;
        height: 72px;
    }
    
    .hero-logo-text {
        font-size: 2.25rem;
    }
}

.hero h1 {
    margin-bottom: 1.5rem;
    margin-top: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero h1 {
        margin-bottom: 1.75rem;
    }
}

.highlight {
    color: var(--text-primary);
    font-weight: 700; /* Reduced from 800 */
    position: relative;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    margin-top: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-weight: 400;
}

.hero-supporting {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    margin-top: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-weight: 400;
}

@media (min-width: 768px) {
    .hero-supporting {
        margin-bottom: 2.25rem;
    }
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    margin-top: 0;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Phone Mockup */
.hero-image {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 0;
}

/* App icon removed - phone is the hero */

.phone-mockup {
    width: 302px; /* Increased by ~8% from 280px */
    position: relative;
    padding: 0.5rem;
    margin-top: 0; /* Removed for baseline alignment */
}

/* Subtle circular backdrop behind phone */
.phone-mockup::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 130%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.02) 0%, rgba(245, 158, 11, 0.01) 40%, transparent 65%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

/* Soft glow effect - more subtle */
.phone-mockup::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 55%);
    border-radius: 50%;
    z-index: -2;
    pointer-events: none;
    filter: blur(30px);
    opacity: 0.25;
}

.iphone-frame {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 3rem;
    padding: 0.5rem;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 1px 6px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(99, 102, 241, 0.1); /* Softer glow */
    overflow: hidden;
    transform: translateY(0); /* Grounded position */
    transition: transform var(--transition);
}

.iphone-frame:hover {
    transform: translateY(-2px); /* Subtle lift on hover */
}

.iphone-screen {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 2.5rem;
    overflow: hidden;
    aspect-ratio: 9 / 19.5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.screenshot-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.phone-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: #000; /* Fallback background while loading */
}

.iphone-home-indicator {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 10;
}

.screenshot-container {
    touch-action: pan-y; /* Allow vertical scrolling but handle horizontal swipes */
}

/* Screenshot Pagination Dots */
.screenshot-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0;
}

.screenshot-pagination-dot {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: all var(--transition);
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-pagination-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.3);
    display: block;
    transition: all var(--transition);
}

.screenshot-pagination-dot:hover::after {
    background: rgba(99, 102, 241, 0.5);
    transform: scale(1.2);
}

.screenshot-pagination-dot.active::after {
    background: var(--primary);
    width: 24px;
    height: 8px;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .screenshot-pagination {
        margin-top: 2rem;
        gap: 0.625rem;
    }
    
    .screenshot-pagination-dot::after {
        width: 10px;
        height: 10px;
    }
    
    .screenshot-pagination-dot.active::after {
        width: 32px;
        height: 10px;
    }
}

/* Micro Callouts - Subtle annotations pointing to key features */
.callout {
    position: absolute;
    z-index: 10;
    opacity: 0;
    animation: fadeInCallout 1.2s ease-in-out 0.8s forwards;
    pointer-events: none;
}

.callout-1 {
    bottom: 8rem; /* Snapped to vertical rhythm */
    left: -100px;
}

.callout-2 {
    top: 6rem; /* Snapped to vertical rhythm */
    right: -110px;
}

.callout-3 {
    bottom: 5rem; /* Snapped to vertical rhythm */
    right: -115px;
}

.callout-line {
    position: absolute;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.1) 100%);
    height: 1.5px;
    transform-origin: left center;
}

.callout-1 .callout-line {
    width: 75px;
    bottom: 10px;
    left: 0;
    transform: rotate(0deg);
}

.callout-2 .callout-line {
    width: 85px;
    top: 10px;
    right: 0;
    transform: rotate(180deg);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.3) 100%);
}

.callout-3 .callout-line {
    width: 90px;
    bottom: 10px;
    right: 0;
    transform: rotate(180deg);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.3) 100%);
}

.callout-label {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(99, 102, 241, 0.15);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.callout-1 .callout-label {
    margin-left: 75px;
}

.callout-2 .callout-label,
.callout-3 .callout-label {
    margin-right: 85px;
    text-align: right;
}

@keyframes fadeInCallout {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide callouts on mobile and tablet, show on desktop */
@media (max-width: 1023px) {
    .callout {
        display: none;
    }
}

@media (min-width: 1024px) {
    .callout {
        display: block;
    }
}

@media (min-width: 1280px) {
    .callout-1 {
        left: -120px;
    }
    
    .callout-2 {
        right: -130px;
    }
    
    .callout-3 {
        right: -135px;
    }
    
    .callout-1 .callout-line {
        width: 95px;
    }
    
    .callout-2 .callout-line {
        width: 105px;
    }
    
    .callout-3 .callout-line {
        width: 110px;
    }
    
    .callout-1 .callout-label {
        margin-left: 95px;
    }
    
    .callout-2 .callout-label,
    .callout-3 .callout-label {
        margin-right: 105px;
    }
}

@media (min-width: 768px) {
    .phone-mockup {
        width: 324px; /* Increased by ~8% from 300px */
    }
    
    .phone-mockup::before {
        width: 135%;
        height: 135%;
    }
    
    .phone-mockup::after {
        width: 125%;
        height: 125%;
        filter: blur(30px);
        opacity: 0.35;
    }
}

@media (min-width: 1024px) {
    .phone-mockup {
        width: 367px; /* Increased by ~8% from 340px */
        margin-top: 0; /* Baseline alignment */
    }
    
    .hero-image {
        padding-top: 0; /* Baseline alignment */
    }
    
    .phone-mockup::before {
        width: 140%;
        height: 140%;
        background: radial-gradient(circle, rgba(99, 102, 241, 0.02) 0%, rgba(245, 158, 11, 0.01) 40%, transparent 65%);
    }
    
    .phone-mockup::after {
        width: 130%;
        height: 130%;
        filter: blur(35px);
        opacity: 0.2;
    }
    
    .iphone-frame {
        border-radius: 3.5rem;
        padding: 0.625rem;
    }
    
    .iphone-screen {
        border-radius: 3rem;
    }
    
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 32px;
    overflow: hidden;
    padding: 3rem 1rem 1rem;
}

.app-preview {
    height: 100%;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.points {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.task-item.completed {
    background: rgba(16, 185, 129, 0.1);
}

.task-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--success);
}

.task-item.completed .task-check {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.task-name {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
}

.task-points {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--secondary);
}

/* Single floating badge - matches screenshot design */
.floating-badge {
    position: absolute;
    background: #ffffff; /* Solid white background */
    padding: 0.5rem 0.875rem; /* Comfortable padding */
    border-radius: 999px; /* Pill shape */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08); /* Subtle drop shadow */
    font-weight: 500;
    font-size: 0.875rem; /* Readable text size */
    color: #374151; /* Dark gray/charcoal text */
    animation: subtleFloat 4s ease-in-out infinite;
    top: 1.5rem; /* Snapped to vertical rhythm (24px) */
    right: -15px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.375rem; /* Space between star and text */
}

/* Subtle floating animation - gentle orbit around phone */
@keyframes subtleFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
    }
    50% { 
        transform: translate(-5px, -8px) scale(1.02);
    }
}

@media (min-width: 768px) {
    .floating-badge {
        right: -20px;
        top: 2rem; /* Snapped to vertical rhythm (32px) */
    }
}

@media (min-width: 1024px) {
    .floating-badge {
        right: -25px;
        top: 2.5rem; /* Snapped to vertical rhythm (40px) */
    }
}

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


.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('hero-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

@media (min-width: 768px) {
    .hero-cta {
        flex-direction: row;
        align-items: center;
    }

    .hero-stats {
        gap: 3rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 4rem 0 6rem;
    }
    
    .hero .container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center; /* Center align with phone height */
    }

    .hero-content {
        text-align: left;
        padding-top: 0;
        margin-top: -3.5rem; /* Move content up more */
    }
    
    .hero h1 {
        margin-bottom: 1.75rem;
    }

    .hero-subtitle {
        margin-left: 0;
        max-width: 520px;
        margin-bottom: 1.25rem;
    }

    .hero-supporting {
        margin-left: 0;
        max-width: 520px;
        margin-bottom: 2.25rem;
    }

    .hero-cta {
        justify-content: flex-start;
        align-items: center;
        margin-top: 0;
    }

    .hero-stats {
        justify-content: flex-start;
    }

    .hero-image {
        padding-top: 0;
        align-items: center;
        justify-content: center;
    }

    .phone-mockup {
        width: 367px; /* Consistent with earlier definition */
        margin-top: 0; /* Baseline alignment */
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 4rem;
    }
}

.section-header .section-tag {
    margin-bottom: 1.25rem; /* Increased from default */
}

.section-tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    padding: 0.375rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500; /* Reduced from 600 */
    margin-bottom: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.section-header h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .section-header h2 {
        margin-bottom: 1.25rem;
    }
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .section-header p {
        margin-top: 1.25rem;
    }
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--surface);
    position: relative;
}

@media (min-width: 768px) {
    .features {
        padding: 5rem 0;
    }
}

@media (min-width: 1024px) {
    .features {
        padding: 6rem 0;
    }
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0.15;
}

.features-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .features-grid {
        gap: 2rem;
    }
}

.feature-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
}

@media (min-width: 768px) {
    .feature-card {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .feature-card {
        padding: 2.5rem;
    }
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1;
    display: block;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    margin-top: 0;
    color: var(--primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    font-weight: 400;
    margin: 0;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Video Section */
.video-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.video-content {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.video-text .section-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.video-text h2 {
    color: white;
    margin-bottom: 1rem;
}

.video-text p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.video-text .btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2);
}

.video-text .btn-primary:hover {
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.3);
}

.video-player {
    display: flex;
    justify-content: center;
}

.video-placeholder {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16/9;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.play-btn {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all var(--transition);
}

.play-btn:hover {
    transform: scale(1.1);
}

.play-btn svg {
    margin-left: 4px;
}

.video-duration {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

@media (min-width: 1024px) {
    .video-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
}

.testimonials-grid {
    display: grid;
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.stars {
    color: var(--secondary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-card > p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.author-detail {
    font-size: 0.875rem;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Built for Families Section */
.families-section {
    padding: 4rem 0;
    background: var(--background);
}

@media (min-width: 768px) {
    .families-section {
        padding: 5rem 0;
    }
}

@media (min-width: 1024px) {
    .families-section {
        padding: 6rem 0;
    }
}

.families-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .families-section .section-header {
        margin-bottom: 4rem;
    }
}

.families-section .section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.families-section .section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
}

.families-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .families-grid {
        gap: 2rem;
    }
}

.families-card {
    background: var(--surface);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
}

@media (min-width: 768px) {
    .families-card {
        padding: 2.5rem 2rem;
    }
}

.families-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.families-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1;
    display: block;
}

.families-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.families-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
    line-height: 1.7;
}

.families-features {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 0;
}

.families-features li {
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.families-features li:last-child {
    margin-bottom: 0;
}

.families-features .checkmark {
    color: var(--success);
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 0.125rem;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .families-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .families-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .families-card {
        padding: 3rem 2.5rem;
    }
}

/* Download Section */
.download {
    padding: 4rem 0;
    background: var(--surface);
    position: relative;
}

@media (min-width: 768px) {
    .download {
        padding: 5rem 0;
    }
}

@media (min-width: 1024px) {
    .download {
        padding: 6rem 0;
    }
}

.download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0.15;
}

.download-content {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.download-content h2 {
    margin-bottom: 2rem;
    margin-top: 0;
}

@media (min-width: 768px) {
    .download-content h2 {
        margin-bottom: 2.5rem;
    }
}

.download-content > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    margin-top: 0;
    font-size: 1.0625rem;
    line-height: 1.7;
    font-weight: 400;
    max-width: 520px;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .download-buttons {
        margin-top: 0.5rem;
    }
}

/* App Store Badge - Following Apple Guidelines */
/* Per Apple: Don't modify, angle, or animate the App Store badge */
.app-store-badge {
    display: inline-block;
    text-decoration: none;
    /* Minimum clear space: one-quarter the height of the badge (10px for 40px badge) */
    margin: 0;
    line-height: 0;
    vertical-align: middle;
}

.app-store-badge:hover {
    opacity: 0.85; /* Subtle opacity change only, no transforms/animations */
}

.app-store-badge-img {
    height: 40px;
    width: auto;
    display: block;
    margin: 0;
    /* Official badge width is 119.66407px at 40px height - width: auto maintains aspect ratio */
    /* Don't modify the badge - no filters, transforms, or animations */
}

/* Legacy store-btn class for backward compatibility */
.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--text-primary);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.store-btn:hover {
    background: #0f172a;
    transform: translateY(-2px);
}

.store-btn-hero {
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.3);
}

.store-btn-hero:hover {
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.4);
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-subtitle {
    font-size: 0.6875rem;
    opacity: 0.8;
}

.store-title {
    font-size: 1.0625rem;
    font-weight: 600;
}

.social-login p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--transition);
}

.social-btn:hover {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.05);
}

@media (min-width: 640px) {
    .download-buttons {
        flex-direction: row;
        align-items: center;
    }
    
    .app-store-badge-img {
        height: 50px; /* Scaled proportionally, maintaining aspect ratio */
    }
}

@media (min-width: 768px) {
    .app-store-badge-img {
        height: 60px; /* Scaled proportionally, maintaining aspect ratio */
    }
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 2rem;
}

@media (min-width: 768px) {
    .footer {
        padding: 4rem 0 2rem;
    }
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
    justify-content: space-between;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition);
}

.social-icons a:hover {
    color: white;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .footer-nav {
        justify-content: flex-end;
    }
}

/* Mobile Menu */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: var(--shadow-lg);
    gap: 1rem;
}

.nav-links.active a {
    color: var(--text-primary);
    font-weight: 500;
}

.nav-links.active a.btn-nav {
    justify-content: center;
    margin-top: 0.5rem;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
    .feature-card,
    .testimonial-card,
    .step {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s 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; }
    .feature-card:nth-child(5) { animation-delay: 0.5s; }
    .feature-card:nth-child(6) { animation-delay: 0.6s; }
}

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

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
