/* -------------------------------------------------------------
   Focusly Official Website - Core Stylesheet
   Design Philosophy: Premium, Minimal, Fast, Dark Mode First
   Inspirations: Apple, Linear, Raycast, Stripe, Vercel
   ------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Palette */
    --bg: #050505;
    --card-bg: #111111;
    --surface: #181818;
    --primary-orange: #FF6B00;
    --secondary-orange: #FF8F1F;
    --accent-yellow: #FFC83D;
    --white: #FFFFFF;
    --gray: #A1A1AA;
    --divider: rgba(255, 255, 255, 0.08);

    /* Gradients */
    --gradient-orange: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-orange) 100%);
    --gradient-glow: radial-gradient(circle, rgba(255, 107, 0, 0.15) 0%, rgba(5, 5, 5, 0) 70%);
    --gradient-dark: linear-gradient(180deg, #111111 0%, #050505 100%);

    /* Typography */
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Layout & Spacing */
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s var(--ease-out-expo);
    --transition-normal: 0.4s var(--ease-out-expo);
    --transition-slow: 0.8s var(--ease-out-expo);
    
    /* Elevation & Glows */
    --glow-spotlight: radial-gradient(600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(255, 107, 0, 0.08), transparent 40%);
    --card-border-glow: radial-gradient(300px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(255, 107, 0, 0.25), transparent 40%);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg);
    color: var(--white);
    font-family: var(--font-family);
    overflow-x: hidden;
}

body {
    background-color: var(--bg);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 4px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* 2. Typography & Globals */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--white);
}

.text-gradient {
    background: linear-gradient(135deg, var(--white) 30%, var(--primary-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-tag {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-orange);
    margin-bottom: 1rem;
    display: inline-block;
}

.section-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.03em;
}

.section-desc {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3.5rem;
    text-align: center;
    font-weight: 400;
}

/* Layout Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Focus States for Accessibility */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* 3. Navigation Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: background-color var(--transition-normal), border-color var(--transition-normal), backdrop-filter var(--transition-normal);
}

.header.scrolled {
    background-color: rgba(5, 5, 5, 0.75);
    border-color: var(--divider);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.brand img {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

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

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

.nav-link {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    color: var(--white);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media(max-width: 480px) {
    .nav-actions .btn-primary {
        display: none;
    }
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 24px;
    justify-content: center;
    z-index: 1001;
}

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

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition-fast);
}

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

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

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

/* Mobile Nav Drawer */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--bg);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right var(--transition-normal);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav .nav-link {
    font-size: 1.5rem;
    font-weight: 600;
}

/* 4. Buttons (Stripe / Linear Style) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-orange);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(255, 107, 0, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--white);
    border: 1px solid var(--divider);
}

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

.btn-play-store {
    background-color: #000000;
    color: #FFFFFF;
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    padding: 0.6rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-play-store:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: #0b0b0b;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.15);
}

.btn-play-store svg {
    width: 24px;
    height: 24px;
}

.btn-play-store .btn-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.btn-play-store .btn-sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
}

.btn-play-store .btn-main {
    font-size: 0.95rem;
    font-weight: 700;
}

/* 5. Hero Section */
.hero {
    position: relative;
    padding-top: 150px;
    padding-bottom: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-glow-bg {
    position: absolute;
    top: -15%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 80vh;
    background: radial-gradient(ellipse 70% 50% at 50% 10%, rgba(255, 107, 0, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: floating-shape infinite alternate ease-in-out;
}

.hero-shape-1 {
    top: 15%;
    left: 10%;
    width: 300px;
    height: 300px;
    background-color: var(--primary-orange);
    animation-duration: 20s;
}

.hero-shape-2 {
    bottom: 20%;
    right: 10%;
    width: 350px;
    height: 350px;
    background-color: var(--secondary-orange);
    animation-duration: 25s;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media(min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.hero-content {
    text-align: center;
}

@media(min-width: 1024px) {
    .hero-content {
        text-align: left;
    }
}

.hero-badge {
    background-color: rgba(255, 107, 0, 0.08);
    border: 1px solid rgba(255, 107, 0, 0.25);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-orange);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.05);
}

.hero-title {
    font-size: clamp(2.25rem, 8vw, 4.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.6;
}

@media(max-width: 1023px) {
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

@media(min-width: 1024px) {
    .hero-buttons {
        justify-content: flex-start;
    }
}

.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    justify-content: center;
}

@media(min-width: 1024px) {
    .trust-indicators {
        justify-content: flex-start;
    }
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}

.trust-item svg {
    width: 16px;
    height: 16px;
    color: var(--primary-orange);
}

.trust-item.stars svg {
    color: var(--accent-yellow);
}

/* Apple-style Abstract Hero Illustration */
.hero-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.abstract-scene {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
    position: relative;
}

@media(max-width: 480px) {
    .abstract-scene {
        max-width: 320px;
    }
    .abstract-element {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    .elem-title {
        font-size: 0.75rem;
    }
    .elem-subtitle {
        font-size: 0.6rem;
    }
    .elem-icon {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
    }
}

.abstract-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.25) 0%, transparent 60%);
    filter: blur(40px);
    z-index: 1;
    border-radius: 50%;
    animation: pulse-glow 8s infinite alternate ease-in-out;
}

.abstract-circle {
    position: absolute;
    border: 1px solid var(--divider);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.abstract-circle-1 {
    width: 100%;
    height: 100%;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.05);
    animation: rotate-circle 40s linear infinite;
}

.abstract-circle-2 {
    width: 75%;
    height: 75%;
    border-color: rgba(255, 255, 255, 0.1);
    animation: rotate-circle 30s linear infinite reverse;
}

.abstract-circle-3 {
    width: 50%;
    height: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.08) 0%, rgba(255, 200, 61, 0.02) 100%);
    border-color: rgba(255, 107, 0, 0.2);
}

.abstract-element {
    position: absolute;
    background: rgba(24, 24, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
    animation: float-element 6s infinite ease-in-out;
}

.elem-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.elem-2 {
    bottom: 25%;
    left: -5%;
    animation-delay: 2s;
}

.elem-3 {
    top: 40%;
    right: -5%;
    animation-delay: 4s;
}

.elem-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.elem-1 .elem-icon { background: rgba(255, 107, 0, 0.15); color: var(--primary-orange); }
.elem-2 .elem-icon { background: rgba(255, 200, 61, 0.15); color: var(--accent-yellow); }
.elem-3 .elem-icon { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

.elem-text {
    display: flex;
    flex-direction: column;
}

.elem-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white);
}

.elem-subtitle {
    font-size: 0.7rem;
    color: var(--gray);
}

/* Floating Particles */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: var(--primary-orange);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
    animation: particle-rise 10s infinite linear;
}

/* 6. Feature Highlights Section */
.features-section {
    padding: 100px 0;
    position: relative;
}

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

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

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

.feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    cursor: default;
}

/* Spotlight Glow Effect for Cards */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: var(--glow-spotlight);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: var(--card-border-glow);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

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

.feature-card-content {
    position: relative;
    z-index: 2;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(255, 107, 0, 0.08);
    border: 1px solid rgba(255, 107, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.05) rotate(5deg);
    background-color: rgba(255, 107, 0, 0.12);
    border-color: rgba(255, 107, 0, 0.3);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

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

/* 7. Screenshots Gallery Showcase */
.screenshots-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg) 0%, rgba(17, 17, 17, 0.5) 50%, var(--bg) 100%);
    position: relative;
}

.screenshots-container {
    position: relative;
    width: 100%;
}

/* Device Frame Mockup */
.device-mockup {
    background: #000000;
    border-radius: 36px;
    padding: 10px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 2px 4px rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    width: 100%;
}

.device-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 28px;
    display: block;
}

.device-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 24px;
    background-color: #000000;
    border-radius: 12px;
    z-index: 10;
}

/* Desktop: Staggered Grid (Apple & Linear design style) */
.screenshot-grid-desktop {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    padding: 2rem 0;
}

@media(min-width: 1024px) {
    .screenshot-grid-desktop {
        display: grid;
    }
}

.grid-item {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.grid-item:nth-child(1) { transform: translateY(0); }
.grid-item:nth-child(2) { transform: translateY(40px); }
.grid-item:nth-child(3) { transform: translateY(80px); }
.grid-item:nth-child(4) { transform: translateY(-40px); }
.grid-item:nth-child(5) { transform: translateY(0px); }
.grid-item:nth-child(6) { transform: translateY(40px); }
.grid-item:nth-child(7) { transform: translateY(-80px); }
.grid-item:nth-child(8) { transform: translateY(-40px); }
.grid-item:nth-child(9) { transform: translateY(0px); }

/* Make spacing adjust cleanly */
.screenshot-grid-desktop {
    margin-bottom: 80px;
}

.grid-item:hover {
    transform: translateY(var(--hover-translate-y, 0px)) scale(1.03) !important;
    z-index: 10;
}

.grid-item:nth-child(1):hover { --hover-translate-y: -10px; }
.grid-item:nth-child(2):hover { --hover-translate-y: 30px; }
.grid-item:nth-child(3):hover { --hover-translate-y: 70px; }
.grid-item:nth-child(4):hover { --hover-translate-y: -50px; }
.grid-item:nth-child(5):hover { --hover-translate-y: -10px; }
.grid-item:nth-child(6):hover { --hover-translate-y: 30px; }
.grid-item:nth-child(7):hover { --hover-translate-y: -90px; }
.grid-item:nth-child(8):hover { --hover-translate-y: -50px; }
.grid-item:nth-child(9):hover { --hover-translate-y: -10px; }

/* Mobile Carousel (Framer/Raycast inspired swipe gallery) */
.screenshot-carousel-mobile {
    display: block;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
    cursor: grab;
}

.screenshot-carousel-mobile:active {
    cursor: grabbing;
}

@media(min-width: 1024px) {
    .screenshot-carousel-mobile {
        display: none;
    }
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform var(--transition-normal);
    will-change: transform;
}

.carousel-item {
    flex: 0 0 260px;
    transform: scale(0.95);
    opacity: 0.6;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

@media(min-width: 480px) {
    .carousel-item {
        flex: 0 0 290px;
    }
}

.carousel-item.active {
    transform: scale(1);
    opacity: 1;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--divider);
    transition: var(--transition-fast);
}

.carousel-dot.active {
    background-color: var(--primary-orange);
    width: 18px;
    border-radius: 3px;
}

/* 8. Productivity System Flowchart Diagram */
.system-section {
    padding: 100px 0;
    position: relative;
}

.system-diagram {
    background-color: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-xl);
    padding: 3rem 1.5rem;
    overflow: hidden;
    position: relative;
}

@media(min-width: 768px) {
    .system-diagram {
        padding: 4.5rem 3rem;
    }
}

.system-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.5rem;
    position: relative;
}

@media(min-width: 1024px) {
    .system-flow {
        flex-direction: row;
        justify-content: space-between;
        gap: 1.5rem;
    }
}

.system-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 260px;
    z-index: 5;
    position: relative;
}

@media(min-width: 1024px) {
    .system-node {
        width: 140px;
    }
}

.node-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--surface);
    border: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.system-node:hover .node-icon-wrapper {
    border-color: var(--primary-orange);
    box-shadow: 0 0 25px rgba(255, 107, 0, 0.25);
    color: var(--primary-orange);
}

.node-icon-wrapper::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--primary-orange);
    opacity: 0;
    transform: scale(0.8);
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.system-node:hover .node-icon-wrapper::after {
    opacity: 1;
    transform: scale(1.15);
}

.node-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.node-desc {
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.4;
}

/* Connecting Arrows SVG overlay */
.flow-connections-svg {
    position: absolute;
    top: 32px;
    left: 0;
    width: 100%;
    height: 20px;
    pointer-events: none;
    display: none;
    z-index: 1;
}

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

.flow-line {
    stroke: var(--divider);
    stroke-width: 2;
    stroke-dasharray: 6, 6;
    fill: none;
}

.flow-line-active {
    stroke: var(--primary-orange);
    stroke-width: 2;
    stroke-dasharray: 6, 12;
    stroke-dashoffset: 0;
    animation: dash 15s linear infinite;
    opacity: 0.8;
}

.vertical-arrow-mobile {
    color: var(--divider);
    font-size: 1.5rem;
    animation: pulse-arrow 2s infinite ease-in-out;
}

@media(min-width: 1024px) {
    .vertical-arrow-mobile {
        display: none;
    }
}

/* 9. Why Focusly Grid */
.why-section {
    padding: 100px 0;
}

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

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

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

.why-card {
    background-color: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: border-color var(--transition-normal);
}

.why-card:hover {
    border-color: rgba(255, 107, 0, 0.2);
}

.why-icon {
    font-size: 1.75rem;
    color: var(--primary-orange);
    margin-bottom: 1.25rem;
    display: block;
}

.why-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.why-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Big Grid Banner Span (One App, Everything You Need) */
.why-card-featured {
    grid-column: 1 / -1;
    background: radial-gradient(circle at 80% 50%, rgba(255, 107, 0, 0.08), transparent 70%), var(--card-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-color: rgba(255, 107, 0, 0.15);
    position: relative;
    overflow: hidden;
}

@media(min-width: 1024px) {
    .why-card-featured {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 3rem;
        padding: 3.5rem;
    }
}

.why-featured-content {
    max-width: 500px;
}

.why-card-featured .why-icon {
    color: var(--accent-yellow);
}

.why-featured-cta {
    margin-top: 1.5rem;
}

@media(min-width: 1024px) {
    .why-featured-cta {
        margin-top: 0;
        flex-shrink: 0;
    }
}

/* 10. FAQ Section (Accordion) */
.faq-section {
    padding: 100px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--divider);
}

.faq-item:first-child {
    border-top: 1px solid var(--divider);
}

.faq-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    text-align: left;
    transition: color var(--transition-fast);
}

@media(max-width: 480px) {
    .faq-trigger {
        font-size: 1rem;
        padding: 1.25rem 0.25rem;
    }
}

.faq-trigger:hover {
    color: var(--primary-orange);
}

.faq-icon-shape {
    position: relative;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-icon-shape span {
    position: absolute;
    background-color: var(--gray);
    transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.faq-icon-shape span:nth-child(1) {
    width: 100%;
    height: 2px;
}

.faq-icon-shape span:nth-child(2) {
    width: 2px;
    height: 100%;
}

.faq-trigger:hover .faq-icon-shape span {
    background-color: var(--primary-orange);
}

.faq-item.active .faq-icon-shape span:nth-child(2) {
    transform: rotate(90deg);
}

.faq-item.active .faq-icon-shape span:nth-child(1) {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal), padding var(--transition-normal);
    padding: 0 0.5rem;
}

.faq-item.active .faq-content {
    max-height: 200px; /* Overwritten dynamically by JS */
    padding-bottom: 1.75rem;
}

.faq-content p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 11. Download CTA Section */
.cta-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-box {
    background: radial-gradient(circle at 50% -20%, rgba(255, 107, 0, 0.12) 0%, transparent 60%), var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-xl);
    padding: 4.5rem 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

@media(min-width: 768px) {
    .cta-box {
        padding: 6rem 3rem;
    }
}

.cta-box h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

@media(min-width: 768px) {
    .cta-box h2 {
        font-size: 3.5rem;
    }
}

.cta-box p {
    color: var(--gray);
    font-size: 1.15rem;
    max-width: 550px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
}

/* 12. Footer Section */
.footer {
    border-top: 1px solid var(--divider);
    padding: 80px 0 40px;
    background-color: #030303;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(2, 0.9fr);
    gap: 3.5rem 2rem;
    margin-bottom: 5rem;
}

@media(max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-logo img {
    height: 28px;
    width: 28px;
    object-fit: contain;
}

.footer-desc {
    color: var(--gray);
    font-size: 0.9rem;
    max-width: 280px;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-links a {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 400;
}

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

.footer-bottom {
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--divider);
    color: var(--gray);
    font-size: 0.85rem;
}

@media(min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* 13. Page-Specific Styling (Legal pages & 404) */
.legal-page {
    padding-top: 160px;
    padding-bottom: 100px;
    min-height: 80vh;
}

.legal-header {
    border-bottom: 1px solid var(--divider);
    padding-bottom: 2rem;
    margin-bottom: 3rem;
}

.legal-header h1 {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
}

.legal-header .updated {
    font-size: 0.9rem;
    color: var(--gray);
}

.legal-body {
    max-width: 800px;
}

.legal-body h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
}

.legal-body p {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.legal-body ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--gray);
}

.legal-body li {
    margin-bottom: 0.5rem;
}

/* Custom 404 Styling */
.not-found-page {
    padding-top: 140px;
    padding-bottom: 80px;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
}

.not-found-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.not-found-page p {
    color: var(--gray);
    max-width: 480px;
    margin-bottom: 2rem;
}

/* 404 Game Container */
.game-container {
    background-color: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    margin-bottom: 3rem;
}

.game-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.mini-timer {
    font-size: 3rem;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 2px;
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
    line-height: 1;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.game-score-board {
    font-size: 0.85rem;
    color: var(--gray);
}

.game-score-board span {
    color: var(--accent-yellow);
    font-weight: 700;
}

/* 14. Performance-friendly Scroll Animations (using Intersection Observer classes) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    will-change: opacity, transform;
}

.reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

.reveal-blur {
    opacity: 0;
    filter: blur(10px);
    transition: opacity var(--transition-slow), filter var(--transition-slow);
}

.reveal-blur.reveal-active {
    opacity: 1;
    filter: blur(0);
}

/* 15. Keyframes & Animation Declarations */
@keyframes floating-shape {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-40px) rotate(15deg); }
}

@keyframes pulse-glow {
    0% { opacity: 0.25; transform: translate(-50%, -50%) scale(0.95); }
    100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes rotate-circle {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

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

@keyframes particle-rise {
    0% { transform: translateY(100px) translateX(0); opacity: 0; }
    50% { opacity: 0.6; }
    100% { transform: translateY(-200px) translateX(20px); opacity: 0; }
}

@keyframes dash {
    to {
        stroke-dashoffset: -360px;
    }
}

@keyframes pulse-arrow {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(6px); opacity: 1; color: var(--primary-orange); }
}
