/* ==========================================
   DUSKLY WEBSITE - STYLES
   Colors from App Design System
   ========================================== */

:root {
    /* Duskly Colors */
    --accent: #E85A4F;
    --accent-muted: #D4726A;
    --accent-glow: rgba(232, 90, 79, 0.4);
    --background: #0D0D0F;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    /* Spacing */
    --container-width: 1120px;
    --section-padding: 100px;
}

/* ==========================================
   RESET & BASE
   ========================================== */

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

html {
    scroll-behavior: smooth;
}

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

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

/* ==========================================
   UTILITIES
   ========================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   NAVIGATION
   ========================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(13, 13, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
}

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

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

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

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

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #FF7B54);
    color: white;
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
}

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

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

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

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

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

.hero-content {
    text-align: center;
    max-width: 600px;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.highlight {
    background: linear-gradient(135deg, var(--accent), #FF7B54);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    margin-bottom: 16px;
}

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

/* Phone Mockup */
.hero-phone {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    display: none;
}

@media (min-width: 1200px) {
    .hero {
        justify-content: flex-start;
        padding-left: 10%;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-phone {
        display: block;
    }
}

.phone-frame {
    width: 300px;
    height: 640px;
    background: linear-gradient(145deg, #1a1a1d, #0d0d0f);
    border-radius: 48px;
    padding: 10px;
    box-shadow: 
        0 50px 100px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--background);
    border-radius: 40px;
    overflow: hidden;
    position: relative;
}

/* Carousel Styles */
.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.6s ease;
    /* Chrome blur fixes */
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.carousel-slide.active {
    opacity: 1;
}

/* Navigation Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 12px 0 8px;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* ==========================================
   FEATURES SECTION
   ========================================== */

.features {
    padding: var(--section-padding) 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
}

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

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-card .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

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

/* ==========================================
   PREMIUM SECTION
   ========================================== */

.premium {
    padding: var(--section-padding) 0;
}

.premium-card {
    background: linear-gradient(145deg, rgba(232, 90, 79, 0.1), rgba(255, 123, 84, 0.05));
    border: 1px solid rgba(232, 90, 79, 0.3);
    border-radius: 28px;
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 50%);
    opacity: 0.3;
    pointer-events: none;
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #FF7B54);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.premium-card h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.premium-card > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.premium-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
    text-align: left;
}

.premium-column h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--accent);
}

.premium-features {
    list-style: none;
}

.premium-features li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.premium-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.premium-pricing {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.price-option {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px 40px;
    position: relative;
}

.price-option.popular {
    border-color: var(--accent);
    background: rgba(232, 90, 79, 0.1);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.price {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
}

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

/* ==========================================
   DOWNLOAD SECTION
   ========================================== */

.download {
    padding: var(--section-padding) 0;
    text-align: center;
}

.download h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

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

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--card-border);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.3rem;
}

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--card-border);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================
   LEGAL PAGES (Privacy & Terms)
   ========================================== */

.legal-page {
    min-height: 100vh;
    padding: 120px 24px 80px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.legal-content .last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 48px;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--accent);
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.legal-content ul {
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.legal-content a {
    color: var(--accent);
    text-decoration: underline;
}

.legal-content a:hover {
    color: var(--accent-muted);
}

/* ==========================================
   PHONE MOCKUP - REALISTIC DASHBOARD
   ========================================== */

.phone-frame {
    width: 300px;
    height: 640px;
    background: linear-gradient(145deg, #1a1a1d, #0d0d0f);
    border-radius: 48px;
    padding: 10px;
    box-shadow: 
        0 50px 100px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #000;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--background);
    border-radius: 40px;
    overflow: hidden;
}

.app-preview {
    padding: 52px 14px 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Mock Header */
.mock-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.mock-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mock-greeting {
    font-size: 1.3rem;
    font-weight: 700;
}

.mock-subtitle {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.mock-settings-btn {
    width: 32px;
    height: 32px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mock Cards */
.mock-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

/* Cutoff Card */
.mock-cutoff {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.mock-cutoff-icon {
    font-size: 0.7rem;
}

.mock-cutoff-text {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Feature Rows */
.mock-feature-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.mock-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.mock-feature-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.mock-feature-title {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-feature-sub {
    font-size: 0.6rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-feature-value {
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.mock-chevron {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 300;
    flex-shrink: 0;
}

/* Bottom Row */
.mock-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.mock-mini-card {
    padding: 12px;
}

.mock-mini-header {
    margin-bottom: 6px;
}

.mock-mini-header span {
    font-size: 0.9rem;
}

.mock-mini-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.mock-mini-value.mock-score {
    color: #4ade80;
}

.mock-mini-label {
    display: block;
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.mock-mini-label.mock-score-label {
    color: #4ade80;
}

/* ==========================================
   SCREENSHOT GALLERY
   ========================================== */

.screenshots {
    padding: 80px 0 100px;
    overflow: visible;
}

.screenshots h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.screenshots-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 48px;
}

.screenshots-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0;
}

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

.screenshots-track {
    display: flex;
    gap: 24px;
    padding: 0 max(24px, calc((100vw - 1120px) / 2 + 24px));
    width: max-content;
}

.screenshot-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.screenshot-phone {
    width: 220px;
    height: 476px;
    background: linear-gradient(145deg, #1a1a1d, #0d0d0f);
    border-radius: 36px;
    padding: 8px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-phone:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.5),
        0 0 40px var(--accent-glow),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.screenshot-phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 28px;
    background: var(--background);
}

/* Placeholder style when no image */
.screenshot-phone img[src=""],
.screenshot-phone img:not([src]) {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(232, 90, 79, 0.1) 100%);
}

.screenshot-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Scroll Indicator Dots */
.scroll-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.scroll-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--card-border);
    transition: background 0.3s ease, transform 0.3s ease;
}

.scroll-indicator span:first-child {
    background: var(--accent);
    transform: scale(1.2);
}

/* Desktop: Center the screenshots */
@media (min-width: 1200px) {
    .screenshots-wrapper {
        overflow-x: auto;
        overflow-y: visible;
        padding: 20px 0 40px;
    }
    
    .screenshots-track {
        justify-content: center;
        padding: 0 48px;
        width: max-content;
        min-width: 100%;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* Extra large screens: truly centered without scroll */
@media (min-width: 1400px) {
    .screenshots-wrapper {
        overflow-x: visible;
    }
    
    .screenshots-track {
        width: 100%;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .screenshots {
        padding: 60px 0 80px;
    }
    
    .screenshots h2 {
        font-size: 1.8rem;
    }
    
    .screenshot-phone {
        width: 180px;
        height: 390px;
        border-radius: 28px;
    }
    
    .screenshot-phone img {
        border-radius: 22px;
    }
    
    .screenshots-track {
        gap: 16px;
        padding: 0 24px;
    }
}

/* ==========================================
   COMPARISON TABLE
   ========================================== */

.comparison {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(232, 90, 79, 0.03) 50%, transparent 100%);
}

.comparison h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.comparison-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 48px;
}

.comparison-table {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
}

.comparison-header {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--card-border);
    font-weight: 700;
    font-size: 0.9rem;
}

.comparison-free,
.comparison-premium {
    text-align: center;
}

.comparison-premium {
    color: var(--accent);
}

.comparison-section-title {
    padding: 16px 24px 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--card-border);
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    gap: 16px;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row .comparison-feature {
    color: var(--text-secondary);
}

.comparison-row .comparison-free,
.comparison-row .comparison-premium {
    text-align: center;
}

.check {
    color: #4ade80;
    font-weight: 700;
}

.check-note {
    color: #4ade80;
    font-size: 0.75rem;
    font-weight: 600;
}

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

/* Premium Section Updates */
.monthly-equivalent {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features h2,
    .comparison h2,
    .download h2 {
        font-size: 1.8rem;
    }
    
    .comparison-table {
        border-radius: 16px;
    }
    
    .comparison-header {
        grid-template-columns: 1fr 60px 60px;
        gap: 8px;
        padding: 16px;
        font-size: 0.8rem;
    }
    
    .comparison-section-title {
        padding: 12px 16px 6px;
        font-size: 0.85rem;
    }
    
    .comparison-row {
        grid-template-columns: 1fr 60px 60px;
        gap: 8px;
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .check-note {
        font-size: 0.65rem;
    }
    
    .premium-card {
        padding: 40px 24px;
    }
    
    .premium-card h2 {
        font-size: 1.8rem;
    }
    
    .premium-columns {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
