/* ================================================
   TOOLIFY.AI - Dark Theme with Green Accent
   SaaS Style - Full Featured
   ================================================ */

/* CSS Variables - Dark Mode Protected */
:root {
    /* Force dark color scheme - prevents Dark Reader and similar extensions */
    color-scheme: dark only;
    forced-color-adjust: none;

    --bg-primary: #050508;
    --bg-secondary: #0f0f14;
    --bg-card: #14141a;
    --bg-card-hover: #1a1a20;
    --bg-elevated: #1f1f28;

    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    /* Darker Sharp Green Accent */
    --accent-gradient: linear-gradient(135deg, #047857 0%, #059669 100%);
    --highlight-color: #059669;
    --accent-glow: rgba(4, 120, 87, 0.5);
    --accent-dark: #065f46;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);

    --mac-red: #ff5f57;
    --mac-yellow: #febc2e;
    --mac-green: #28c840;

    --ticker-height: 36px;
    --nav-height: 64px;
    --container-width: 1200px;
    --section-padding: 100px;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================
   PERFORMANCE OPTIMIZATIONS
   ================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--ticker-height) + var(--nav-height) + 120px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: dark only;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-primary) 30%, var(--bg-secondary) 70%, var(--bg-secondary) 100%) !important;
    min-height: 100vh;
    color: var(--text-primary) !important;
    line-height: 1.6;
    overflow-x: hidden;
    touch-action: manipulation;
    forced-color-adjust: none;
}

/* Smooth background transitions for sections */
section {
    contain: layout style;
    transition: background-color 0.6s ease;
    content-visibility: auto;
}

.mac-card,
.mac-cursor,
.hero-glow,
.flow-particle,
.timeline-progress {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ================================================
   NEWS TICKER - FASTER
   ================================================ */
.news-ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ticker-height);
    background: linear-gradient(90deg, #050508 0%, #0a0a0f 50%, #050508 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 9999;
    overflow: hidden;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: tickerScroll 45s linear infinite; /* Slower for better readability */
}

.ticker-content {
    display: flex;
    align-items: center;
    height: var(--ticker-height);
    gap: 48px;
    padding-right: 48px;
}

.ticker-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.ticker-highlight {
    color: var(--highlight-color);
    font-weight: 600;
}

.ticker-dot {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.5;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-track:hover {
    animation-play-state: paused;
}

/* ================================================
   NAVIGATION
   ================================================ */
.navbar {
    position: fixed;
    top: var(--ticker-height);
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-color);
    z-index: 9998;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.navbar.scrolled {
    background: rgba(5, 5, 8, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity var(--transition-fast);
}

.logo:hover { opacity: 0.8; }

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo .highlight,
.highlight {
    color: var(--highlight-color);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--highlight-color);
    transition: width var(--transition-fast);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 10px 20px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

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

/* ================================================
   CONTAINER
   ================================================ */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: calc(var(--ticker-height) + var(--nav-height) + 60px) 32px 200px;
    overflow: hidden;
    background: transparent;
}

/* Smooth gradient transition from hero green glow to dark background */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(5, 5, 8, 0.3) 30%,
        rgba(5, 5, 8, 0.7) 60%,
        var(--bg-primary) 100%);
    pointer-events: none;
    z-index: 5;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: glowFloat 20s ease-in-out infinite;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(4, 120, 87, 0.35) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes glowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Floating Green Gradient Bubbles - Desktop Only */
.floating-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.55;
}

.bubble-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.4) 0%, rgba(4, 120, 87, 0.2) 30%, rgba(5, 150, 105, 0.08) 55%, transparent 85%);
    top: 5%;
    left: -5%;
    animation: bubbleFloat1 30s ease-in-out infinite;
}

.bubble-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(5, 150, 105, 0.18) 30%, rgba(16, 185, 129, 0.06) 55%, transparent 85%);
    bottom: 5%;
    right: -5%;
    animation: bubbleFloat2 35s ease-in-out infinite;
}

.bubble-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(4, 120, 87, 0.32) 0%, rgba(5, 150, 105, 0.15) 30%, rgba(4, 120, 87, 0.05) 55%, transparent 85%);
    top: 50%;
    left: -8%;
    animation: bubbleFloat3 38s ease-in-out infinite;
}

.bubble-4 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.3) 0%, rgba(16, 185, 129, 0.15) 30%, rgba(5, 150, 105, 0.05) 55%, transparent 85%);
    top: 15%;
    right: -8%;
    animation: bubbleFloat4 32s ease-in-out infinite;
}

.bubble-5 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.32) 0%, rgba(4, 120, 87, 0.15) 30%, rgba(5, 150, 105, 0.05) 55%, transparent 85%);
    top: 30%;
    left: 35%;
    animation: bubbleFloat5 36s ease-in-out infinite;
}

.bubble-6 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.12) 30%, rgba(16, 185, 129, 0.04) 55%, transparent 85%);
    top: 55%;
    left: 50%;
    animation: bubbleFloat6 33s ease-in-out infinite;
}

@keyframes bubbleFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, 50px) scale(1.1); }
    50% { transform: translate(50px, 100px) scale(0.95); }
    75% { transform: translate(-50px, 50px) scale(1.05); }
}

@keyframes bubbleFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-80px, -40px) scale(1.05); }
    50% { transform: translate(-40px, 80px) scale(1.1); }
    75% { transform: translate(60px, 40px) scale(0.95); }
}

@keyframes bubbleFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -60px) scale(0.95); }
    50% { transform: translate(120px, 30px) scale(1.1); }
    75% { transform: translate(40px, 80px) scale(1); }
}

@keyframes bubbleFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-70px, 70px) scale(1.1); }
    50% { transform: translate(50px, 50px) scale(0.9); }
    75% { transform: translate(-30px, -50px) scale(1.05); }
}

@keyframes bubbleFloat5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-60px, 40px) scale(1.05); }
    50% { transform: translate(40px, -30px) scale(0.95); }
    75% { transform: translate(20px, 60px) scale(1.08); }
}

@keyframes bubbleFloat6 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(0.95); }
    50% { transform: translate(-30px, 40px) scale(1.1); }
    75% { transform: translate(-50px, -20px) scale(1); }
}

.hero-content {
    text-align: center;
    z-index: 10;
    position: relative;
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 32px;
    max-width: 100%;
}

.title-line {
    display: inline;
}

.title-smaller {
    font-size: 0.85em;
}

/* Desktop: hide mobile breaks, show desktop text */
.mobile-break {
    display: none;
}

.desktop-text {
    display: inline;
}

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

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
}

.text-accent {
    color: var(--highlight-color);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 160px; /* Large spacing - search bar pushed much lower */
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 12px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-bounce);
}

.btn-primary svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

/* ================================================
   SEARCH BAR - Typing Effect
   ================================================ */
.search-bar {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    margin-top: 40px; /* Additional spacing to push search bar lower */
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-icon svg {
    width: 100%;
    height: 100%;
}

.search-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.typing-text {
    color: var(--highlight-color);
    font-weight: 500;
}

.cursor {
    color: var(--highlight-color);
    animation: cursorBlink 0.8s step-end infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ================================================
   FLOATING MAC CARDS - BIGGER WITH GREEN THEME
   ================================================ */
.floating-cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 3;
}

.mac-card {
    position: absolute;
    background: #fafafa;
    border-radius: 12px;
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        0 30px 60px -30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: visible;
    animation: cardFloat 25s ease-in-out infinite;
    transform-style: preserve-3d;
    perspective: 1000px;
    isolation: isolate;
}

.mac-header {
    background: linear-gradient(180deg, #ebebeb 0%, #d5d5d5 100%);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px 12px 0 0;
}

.mac-buttons {
    display: flex;
    gap: 8px;
}

.mac-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.mac-btn.red { background: var(--mac-red); }
.mac-btn.yellow { background: var(--mac-yellow); }
.mac-btn.green { background: var(--mac-green); }

.mac-title {
    font-size: 0.7rem;
    color: #666;
    font-weight: 500;
    flex: 1;
    text-align: center;
    margin-right: 44px;
}

.mac-body {
    padding: 20px;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    min-height: 120px;
}

/* Mac Cursor */
.mac-cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 100;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.mac-cursor svg {
    width: 100%;
    height: 100%;
}

/* Card 1 - Form Builder (Top Left) */
.card-1 {
    width: 250px;
    top: 12%;
    left: 4%;
    animation-delay: 0s;
}

.cursor-1 {
    top: 70px;
    left: 40px;
    animation: cursorMove1 8s ease-in-out infinite;
}

@keyframes cursorMove1 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(120px, 10px); }
    40% { transform: translate(100px, 50px); }
    60% { transform: translate(80px, 90px); }
    80% { transform: translate(150px, 130px); }
}

.form-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-label {
    width: 40%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
}

.preview-label.short {
    width: 25%;
}

.preview-input {
    width: 100%;
    height: 32px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.preview-input.typing-effect::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 12px;
    background: linear-gradient(90deg, #d0d0d0 0%, #d0d0d0 100%);
    border-radius: 2px;
    animation: typeWidth 4s ease-in-out infinite;
}

@keyframes typeWidth {
    0%, 100% { width: 0; }
    50% { width: 60%; }
}

.preview-textarea {
    width: 100%;
    height: 50px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.preview-button {
    width: 80px;
    height: 28px;
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    border-radius: 6px;
    align-self: flex-end;
}

.preview-button.pulse-effect {
    animation: buttonPulse 3s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

/* Card 2 - Analytics (Top Right) */
.card-2 {
    width: 280px;
    top: 16%;
    right: 4%;
    animation-delay: -5s;
}

.cursor-2 {
    top: 100px;
    left: 30px;
    animation: cursorMove2 9s ease-in-out infinite;
}

@keyframes cursorMove2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(60px, -20px); }
    50% { transform: translate(150px, 10px); }
    75% { transform: translate(100px, 40px); }
}

.dashboard-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 60px;
    padding: 8px;
    background: #f8f8f8;
    border-radius: 8px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, #047857 0%, #059669 100%);
    border-radius: 4px 4px 0 0;
    animation: barGrow 4s ease-in-out infinite;
    transform-origin: bottom;
}

.bar-1 { height: 40%; animation-delay: 0s; }
.bar-2 { height: 70%; animation-delay: 0.2s; }
.bar-3 { height: 50%; animation-delay: 0.4s; }
.bar-4 { height: 90%; animation-delay: 0.6s; }
.bar-5 { height: 65%; animation-delay: 0.8s; }

@keyframes barGrow {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.7); }
}

.mini-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mac-card .stat-label {
    width: 50%;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
}

.mac-card .stat-label.short { width: 35%; }

.stat-value {
    width: 25%;
    height: 10px;
    background: #d0d0d0;
    border-radius: 4px;
}

.stat-value.growing {
    animation: valueGrow 5s ease-in-out infinite;
    width: 40%;
}

@keyframes valueGrow {
    0%, 100% { width: 25%; }
    50% { width: 40%; }
}

/* Card 3 - Workflow (Middle-Lower Left) */
.card-3 {
    width: 245px;
    top: 44%;
    left: 2.5%;
    animation-delay: -10s;
}

.cursor-3 {
    top: 90px;
    left: 50px;
    animation: cursorMove3 10s ease-in-out infinite;
}

@keyframes cursorMove3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(60px, 0); }
    66% { transform: translate(120px, 0); }
}

.workflow-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.workflow-node {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-start {
    background: #e8f5e9;
    border: 2px solid #059669;
}

.node-dot {
    width: 12px;
    height: 12px;
    background: #059669;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

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

.node-process {
    background: #fff3e0;
    border: 2px solid #ff9800;
}

.node-icon {
    width: 20px;
    height: 20px;
    color: #ff9800;
    animation: iconSpin 8s linear infinite;
}

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

.node-end {
    background: #e3f2fd;
    border: 2px solid #059669;
}

.node-check {
    width: 18px;
    height: 18px;
    color: #059669;
}

.workflow-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 8px;
    position: relative;
    overflow: hidden;
}

.flow-particle {
    position: absolute;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #059669, transparent);
    animation: flowMove 3s linear infinite;
}

.line-2 .flow-particle {
    animation-delay: 1s;
}

@keyframes particleFlow {
    0% { left: -20px; }
    100% { left: 100%; }
}

/* Card 4 - Spreadsheet (Bottom Left-Center) */
.card-4 {
    width: 300px;
    bottom: 12%;
    left: 15%;
    animation-delay: -15s;
}

.cursor-4 {
    top: 80px;
    left: 60px;
    animation: cursorMove4 11s ease-in-out infinite;
}

@keyframes cursorMove4 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(80px, 0); }
    50% { transform: translate(80px, 25px); }
    75% { transform: translate(160px, 25px); }
}

.spreadsheet-preview {
    font-size: 11px;
    color: #666;
}

.sheet-header {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    margin-bottom: 6px;
    padding-left: 30px;
}

.sheet-header span {
    text-align: center;
    color: #999;
    font-weight: 600;
    font-size: 10px;
}

.sheet-row {
    display: grid;
    grid-template-columns: 30px repeat(4, 1fr);
    gap: 3px;
    margin-bottom: 3px;
}

.sheet-row.processing .cell {
    animation: cellProcess 1.5s ease-in-out infinite;
}

@keyframes cellProcess {
    0%, 100% { background: #f0f0f0; }
    50% { background: #d1fae5; }
}

.row-num {
    color: #999;
    text-align: center;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell {
    height: 24px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
}

.cell.highlight-cell {
    background: #d1fae5;
    border-color: #059669;
}

/* Card 5 - Calendar (Bottom Right) */
.card-5 {
    width: 250px;
    bottom: 11%;
    right: 4%;
    animation-delay: -20s;
}

.cursor-5 {
    top: 100px;
    left: 40px;
    animation: cursorMove5 8s ease-in-out infinite;
}

@keyframes cursorMove5 {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(40px, 20px); }
    40% { transform: translate(80px, 0); }
    60% { transform: translate(60px, 40px); }
    80% { transform: translate(100px, 20px); }
}

.calendar-preview {
    font-size: 10px;
}

.cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    color: #999;
    text-align: center;
    font-weight: 600;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    aspect-ratio: 1;
    background: #f5f5f5;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.cal-day.active {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.cal-day.pulse-dot {
    animation: calPulse 2s ease-in-out infinite;
}

@keyframes calPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(5, 150, 105, 0); }
}

.cal-day.hover-effect {
    animation: calHover 2.5s ease-in-out infinite;
}

@keyframes calHover {
    0%, 100% { background: #f5f5f5; }
    50% { background: #e8e8e8; }
}

/* Card 6 - Bookkeeping Calculator (Middle Right) */
.card-6 {
    width: 165px;
    top: 42%;
    right: 8%;
    animation: cardFloat6 20s ease-in-out infinite;
    animation-delay: -12s;
}

@keyframes cardFloat6 {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    25% { transform: translateY(-25px) rotate(1deg); }
    50% { transform: translateY(-10px) rotate(-3deg); }
    75% { transform: translateY(-30px) rotate(0deg); }
}

.cursor-6 {
    top: 60px;
    left: 25px;
    animation: cursorMove6 7s ease-in-out infinite;
}

@keyframes cursorMove6 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, 15px); }
    50% { transform: translate(60px, 30px); }
    75% { transform: translate(45px, 45px); }
}

.calc-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calc-display {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: right;
}

.calc-amount {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    font-family: 'SF Mono', 'Monaco', monospace;
    animation: amountPulse 3s ease-in-out infinite;
}

@keyframes amountPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
}

.calc-btn {
    background: #f0f0f0;
    border-radius: 4px;
    padding: 5px;
    font-size: 9px;
    font-weight: 500;
    text-align: center;
    color: #333;
    transition: all 0.15s ease;
}

.calc-btn.op {
    background: #e8e8e8;
    color: #059669;
    font-weight: 600;
}

.calc-btn.accent {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: white;
}

/* Card Float Animation */
@keyframes cardFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(1deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
    75% { transform: translateY(-25px) rotate(0.5deg); }
}

/* ================================================
   FADE ANIMATIONS
   ================================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.fade-up.delay-1 { animation-delay: 0.2s; }
.fade-up.delay-2 { animation-delay: 0.4s; }
.fade-up.delay-3 { animation-delay: 0.6s; }

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

.fade-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ================================================
   SECTION TITLES
   ================================================ */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 60px;
}

/* ================================================
   RESULTS SECTION - Charts & Stats
   ================================================ */
.results-section {
    padding: var(--section-padding) 0;
    background: transparent;
}

.results-chart {
    margin-bottom: 60px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.chart-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.chart-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    text-align: center;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bar-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 24px;
}

.bar-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: right;
}

.bar-container {
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--bar-width);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-fill {
    position: absolute;
    inset: 0;
    border-radius: 8px;
}

.bar-value {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.bar-toolify .bar-fill {
    background: linear-gradient(90deg, #047857 0%, #059669 100%);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-light);
}

.stat-card .stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    display: inline;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-unit {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline;
    margin-left: 4px;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 12px;
    width: auto;
    height: auto;
    background: none;
}

/* ================================================
   FEATURES SECTION
   ================================================ */
.features-section {
    padding: var(--section-padding) 0;
    background: transparent;
    position: relative;
}

/* Features Flow - Ultra Compact 2x2 Grid */
.features-flow {
    max-width: 1200px;
    margin: 20px auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px 50px;
}

.flow-item {
    position: relative;
    padding: 0 25px;
    transition: all 0.3s ease;
}

/* Alternating Layout */
.flow-left {
    margin: 0;
}

.flow-right {
    margin: 0;
}

/* Large Number - Brighter */
.flow-number {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.25) 0%, rgba(5, 150, 105, 0.08) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: absolute;
    top: -12px;
    right: 0;
    z-index: 0;
    user-select: none;
    pointer-events: none;
}

.flow-left .flow-number {
    right: 0;
    left: auto;
}

.flow-right .flow-number {
    left: auto;
    right: 0;
}

/* Title */
.flow-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

/* Green Divider */
.flow-divider {
    width: 45px;
    height: 2px;
    background: linear-gradient(90deg, var(--highlight-color) 0%, transparent 100%);
    margin-bottom: 10px;
}

.flow-right .flow-divider {
    background: linear-gradient(90deg, transparent 0%, var(--highlight-color) 100%);
    margin-left: auto;
}

/* Description */
.flow-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* Much Brighter sections 02 and 03 */
.flow-item:nth-child(2) .flow-title,
.flow-item:nth-child(3) .flow-title {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.flow-item:nth-child(2) .flow-description,
.flow-item:nth-child(3) .flow-description {
    color: #d4d7de;
}

.flow-item:nth-child(2) .flow-number,
.flow-item:nth-child(3) .flow-number {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.35) 0%, rgba(5, 150, 105, 0.12) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tags */
.flow-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.flow-tags span {
    padding: 4px 12px;
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 20px;
    font-size: 0.72rem;
    color: var(--highlight-color);
    font-weight: 500;
}

/* Hover Effects */
.flow-item:hover {
    transform: translateX(8px);
}

.flow-right:hover {
    transform: translateX(-8px);
}

.flow-item:hover .flow-divider {
    width: 120px;
}

/* Responsive */
@media (max-width: 968px) {
    .features-flow {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 20px;
    }

    .flow-item {
        padding: 0 20px;
    }

    .flow-number {
        font-size: 2.8rem;
        top: -10px;
    }

    .flow-title {
        font-size: 1.3rem;
    }

    .flow-description {
        font-size: 0.88rem;
    }

    .flow-item:hover,
    .flow-right:hover {
        transform: none;
    }
}

/* ================================================
   PROCESS SECTION
   ================================================ */
.process-section {
    padding: var(--section-padding) 0;
    background: transparent;
}

.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--accent-gradient);
    transition: height 0.5s ease;
}

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

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

.step-marker {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all var(--transition-smooth);
}

.process-step:hover .step-marker {
    border-color: var(--highlight-color);
    transform: scale(1.1);
}

.step-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
}

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

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.step-time {
    font-size: 0.8rem;
    color: var(--highlight-color);
    font-weight: 500;
}

/* ================================================
   CONTACT SECTION
   ================================================ */
.contact-section {
    padding: var(--section-padding) 0;
    background: transparent;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
}

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

.contact-benefits {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.benefit svg {
    width: 20px;
    height: 20px;
    color: var(--highlight-color);
}

.benefit span {
    color: var(--text-secondary);
}

.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group .optional {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-group input,
.form-group textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    font-family: inherit;
}

.submit-btn svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.15);
}

.submit-btn:hover svg {
    transform: translateX(4px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    padding: 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--highlight-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    padding: 80px 0 40px;
    background: transparent;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

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

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

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

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

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

/* Laptop screens - zoom down like Chrome 90% */
@media (max-width: 1500px) {
    .hero {
        zoom: 0.9;
    }

    .card-1 {
        top: 15%;
    }

    .card-3 {
        top: 50%;
    }

    .card-4 {
        bottom: 5%;
        left: 18%;
    }
}

@media (max-width: 1350px) {
    .hero {
        zoom: 0.8;
    }

    .card-1 {
        top: 18%;
    }

    .card-3 {
        top: 52%;
    }

    .card-4 {
        bottom: 2%;
        left: 20%;
    }
}

@media (max-width: 1200px) {
    .floating-cards,
    .floating-bubbles {
        display: none;
    }

    .hero {
        min-height: 80vh;
    }
}

@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
        --ticker-height: 32px;
        --nav-height: 56px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(13, 17, 23, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: calc(var(--ticker-height) + var(--nav-height) + 60px) 24px 60px;
        overflow-x: hidden;
    }

    .hero-content {
        max-width: 100%;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    /* Stack title lines on mobile */
    .title-line {
        display: block;
        white-space: nowrap;
    }

    .title-smaller {
        font-size: 0.95em;
    }

    /* Hide desktop-only content on mobile */
    .desktop-only {
        display: none;
    }

    /* Preload features section on iOS (iPhone) */
    @supports (-webkit-touch-callout: none) {
        #features.fade-section {
            opacity: 1;
            transform: none;
        }

        #features .flow-item {
            opacity: 1;
            transform: none;
        }
    }

    /* Reduce hero CTA gap on mobile */
    .hero-cta {
        gap: 80px;
    }

    /* Fix search bar overflow */
    .search-bar {
        max-width: 100%;
        padding: 10px 16px;
        box-sizing: border-box;
    }

    .search-text {
        white-space: nowrap;
        font-size: 0.75rem;
    }

    .hero-subtitle br {
        display: none;
    }

    .bar-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bar-label {
        text-align: left;
        font-size: 0.85rem;
    }

    .bar-container {
        height: 32px;
    }

    .chart-card {
        padding: 24px;
    }

    .process-step {
        flex-direction: column;
        gap: 16px;
        padding-left: 70px;
    }

    .step-marker {
        position: absolute;
        left: 0;
    }

    .timeline-line {
        left: 24px;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-content {
        padding: 0 8px;
    }

    .hero-title {
        font-size: 1.45rem;
    }

    .title-smaller {
        font-size: 0.95em;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .search-bar {
        padding: 8px 14px;
        gap: 6px;
    }

    .search-text {
        font-size: 0.7rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .btn-primary {
        padding: 14px 24px;
        font-size: 0.9rem;
    }

    .stat-card .stat-number {
        font-size: 2.5rem;
    }
}

/* ================================================
   REDUCED MOTION
   ================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-section,
    .fade-up {
        opacity: 1;
        transform: none;
    }

    .ticker-track {
        animation: none;
    }
}

/* ================================================
   LOW PERFORMANCE MODE
   ================================================ */
body.reduce-animations .mac-card,
body.reduce-animations .mac-cursor,
body.reduce-animations .hero-glow,
body.reduce-animations .flow-particle {
    animation: none !important;
}

@media (min-width: 1200px) {
    .mac-card,
    .mac-cursor {
        animation-play-state: running;
    }
}
