/* ========================================
   Tarkiz — Focus Timer | Product Page Styles
   ======================================== */

:root {
    --bg-primary: #030014;
    --bg-secondary: #0a0a1a;
    --accent-cyan: #00f5ff;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: rgba(255,255,255,0.4);
    --glass: rgba(255,255,255,0.03);
    --glass-border: rgba(255,255,255,0.08);
}

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

html {
    scroll-behavior: smooth;
}

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

/* ========================================
   Background Effects
   ======================================== */

/* Aurora Background */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.aurora-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 245, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    animation: aurora 20s ease-in-out infinite;
}

@keyframes aurora {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(1deg); }
    50% { transform: translate(-1%, 3%) rotate(-1deg); }
    75% { transform: translate(3%, -2%) rotate(2deg); }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-cyan);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

.particle:nth-child(2n) { background: var(--accent-purple); animation-delay: -2s; }
.particle:nth-child(3n) { background: var(--accent-pink); animation-delay: -4s; }
.particle:nth-child(4n) { background: var(--accent-blue); animation-delay: -6s; }

@keyframes float {
    0%, 100% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* Grid Background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* ========================================
   Navigation
   ======================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(3, 0, 20, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav.scrolled {
    padding: 12px 40px;
    background: rgba(3, 0, 20, 0.95);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.nav-logo span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.nav-cta {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple)) !important;
    color: var(--bg-primary) !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
}

/* ========================================
   Hero Section
   ======================================== */

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

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.app-icon-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.app-icon-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(40px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.app-icon {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 36px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero h1 .gradient-text,
.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 50%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 50px;
    font-weight: 400;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: var(--bg-primary);
    box-shadow: 0 10px 40px rgba(0, 245, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 245, 255, 0.4);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-4px);
}

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

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

/* ========================================
   Stats Section
   ======================================== */

.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 80px;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========================================
   Section Common Styles
   ======================================== */

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

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(0, 245, 255, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   Timer Cards Section
   ======================================== */

.timers-section {
    padding: 120px 40px;
    position: relative;
}

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

.timer-card {
    position: relative;
    padding: 40px 24px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s ease;
    overflow: hidden;
}

.timer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timer-card:hover::before {
    opacity: 1;
}

.timer-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 245, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 245, 255, 0.1);
}

.timer-card:nth-child(1) { --card-color: var(--accent-cyan); }
.timer-card:nth-child(2) { --card-color: var(--accent-purple); }
.timer-card:nth-child(3) { --card-color: var(--accent-pink); }
.timer-card:nth-child(4) { --card-color: var(--accent-blue); }

.timer-card:hover {
    border-color: var(--card-color);
}

.timer-card:hover::before {
    background: linear-gradient(90deg, transparent, var(--card-color), transparent);
}

.timer-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--card-color), transparent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.timer-duration {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timer-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   Features Section
   ======================================== */

.features-section {
    padding: 120px 40px;
    background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.03), transparent);
}

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

.feature-card {
    position: relative;
    padding: 40px 32px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: all 0.4s ease;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255,255,255,0.15);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.2);
}

.feature-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
}

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

/* ========================================
   How It Works Section
   ======================================== */

.how-section {
    padding: 120px 40px;
}

.steps-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.steps-line {
    position: absolute;
    left: 40px;
    top: 60px;
    bottom: 60px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
    border-radius: 2px;
}

.step {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    position: relative;
}

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

.step-number {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: var(--glass);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-cyan);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.step:hover .step-number {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.3);
}

.step-content {
    flex: 1;
    padding-top: 16px;
}

.step-content h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    padding: 120px 40px;
    text-align: center;
    position: relative;
}

.cta-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 60px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(0, 245, 255, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 32px;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(0, 245, 255, 0.1), transparent 50%);
    animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}

.cta-card p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    position: relative;
}

.cta-card .btn {
    position: relative;
}

/* ========================================
   Footer
   ======================================== */

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

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.footer-logo span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

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

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--accent-cyan);
}

/* ========================================
   Scroll Animations (JS-triggered)
   ======================================== */

.animate-target {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-target.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.stagger-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-child.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Legacy fade-in support */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive Design
   ======================================== */

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

@media (max-width: 768px) {
    .nav {
        padding: 16px 20px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .timer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        gap: 30px;
    }

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

    .steps-line {
        display: none;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .timer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .timer-card {
        padding: 24px 16px;
    }

    .timer-duration {
        font-size: 2.2rem;
    }

    .cta-card {
        padding: 50px 30px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
