/* ============================================
   Friiboz Landing Page — Premium Dark Theme
   ============================================ */

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16162366;
    --bg-card-hover: #1e1e2d88;
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556a;
    --accent-1: #7c3aed;
    --accent-2: #06b6d4;
    --accent-3: #f43f5e;
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #f43f5e 0%, #7c3aed 100%);
    --gradient-glow: linear-gradient(135deg, #7c3aed33 0%, #06b6d433 100%);
    --border: #ffffff0a;
    --border-hover: #ffffff15;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.nav.scrolled {
    padding: 10px 0;
    background: rgba(10, 10, 15, 0.95);
}

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

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

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

.logo-text {
    font-family: var(--font-heading);
}

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

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-outline:hover {
    border-color: var(--accent-1);
    background: rgba(124, 58, 237, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: 10px;
}

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

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(124, 58, 237, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 70% 60%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 30%, transparent 70%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.25);
    color: #a78bfa;
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease-out;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-slogan {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
    letter-spacing: 0.04em;
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

.hero-slogan em {
    font-style: italic;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 36px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.footer-slogan {
    font-style: italic;
    color: #a78bfa;
    font-size: 0.85rem;
    margin-top: 8px;
    margin-bottom: 4px;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-suffix {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-2);
}

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

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ============================================
   Section Common
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(124, 58, 237, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.2);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Departments Grid
   ============================================ */
.departments {
    padding: 120px 0;
}

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

.dept-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.dept-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

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

.dept-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.dept-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.dept-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.dept-agents {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.agent-chip {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(124, 58, 237, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.15);
}

/* ============================================
   AI Agents Section
   ============================================ */
.agents {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.agents-showcase {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.agent-feature {
    display: flex;
    gap: 60px;
    align-items: center;
}

.agent-feature.reverse {
    flex-direction: row-reverse;
}

.agent-feature-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.agent-feature-content {
    flex: 1;
}

.agent-feature h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.agent-feature p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1rem;
}

/* Preview Cards */
.agent-preview {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-primary);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.preview-dot.green {
    background: #10b981;
}

.preview-dot.red {
    background: #ef4444;
}

.preview-dot.blue {
    background: #3b82f6;
}

.preview-dot.pulse {
    animation: pulse 1.5s infinite;
}

.preview-body {
    padding: 16px;
}

.preview-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.preview-metric:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metric-value {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
}

.metric-value.up {
    color: #10b981;
}

.metric-value small {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Monitor */
.monitor-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.monitor-dept {
    font-size: 0.85rem;
    width: 80px;
    color: var(--text-secondary);
}

.monitor-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.monitor-fill {
    height: 100%;
    border-radius: 3px;
    background: #10b981;
    transition: width 1s ease;
}

.monitor-fill.yellow {
    background: #f59e0b;
}

.monitor-status {
    font-size: 0.85rem;
    font-weight: 600;
    width: 40px;
    text-align: right;
}

.monitor-status.green {
    color: #10b981;
}

.monitor-status.yellow {
    color: #f59e0b;
}

/* Chat */
.chat-msg {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 85%;
}

.chat-msg.user {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.2);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-msg.agent {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-msg.agent strong {
    color: #10b981;
}

/* ============================================
   How It Works
   ============================================ */
.how-it-works {
    padding: 120px 0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    align-items: center;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

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

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 80px;
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.step-visual {
    width: 160px;
    display: flex;
    justify-content: center;
}

/* Step visuals */
.integration-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.integration-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 12px;
    font-size: 1.3rem;
    border: 1px solid rgba(124, 58, 237, 0.15);
    animation: float 3s ease-in-out infinite;
}

.integration-icon:nth-child(2) {
    animation-delay: 0.5s;
}

.integration-icon:nth-child(3) {
    animation-delay: 1s;
}

.integration-icon:nth-child(4) {
    animation-delay: 1.5s;
}

.deploy-animation {
    display: flex;
    gap: 12px;
}

.deploy-agent {
    font-size: 2rem;
    animation: deployBounce 2s ease-in-out infinite;
    animation-delay: var(--delay);
}

.scale-chart {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    height: 80px;
}

.chart-bar {
    width: 14px;
    height: var(--height);
    background: var(--gradient-primary);
    border-radius: 4px 4px 0 0;
    animation: growUp 1s ease-out both;
}

.chart-bar:nth-child(1) {
    animation-delay: 0.1s;
}

.chart-bar:nth-child(2) {
    animation-delay: 0.2s;
}

.chart-bar:nth-child(3) {
    animation-delay: 0.3s;
}

.chart-bar:nth-child(4) {
    animation-delay: 0.4s;
}

.chart-bar:nth-child(5) {
    animation-delay: 0.5s;
}

.chart-bar:nth-child(6) {
    animation-delay: 0.6s;
}

.chart-bar:nth-child(7) {
    animation-delay: 0.7s;
}

/* ============================================
   Pricing
   ============================================ */
.pricing {
    padding: 120px 0;
    background: var(--bg-secondary);
}

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

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
    position: relative;
}

.price-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.price-card.featured {
    border-color: rgba(124, 58, 237, 0.4);
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, var(--bg-card) 100%);
    transform: scale(1.05);
}

.price-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
    white-space: nowrap;
}

.price-header {
    margin-bottom: 24px;
}

.price-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}

.price-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.price-amount {
    margin-bottom: 28px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.price-currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.price-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
}

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

.price-features {
    margin-bottom: 28px;
}

.price-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-features li::before {
    content: '✓';
    color: #10b981;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
}

.cta-content {
    position: relative;
    text-align: center;
}

.cta h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 16px;
}

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

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
    max-width: 300px;
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: var(--transition);
}

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

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

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes deployBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes growUp {
    from {
        height: 0;
    }

    to {
        height: var(--height);
    }
}

/* Scroll reveal */
.dept-card,
.agent-feature,
.step,
.price-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.dept-card.visible,
.agent-feature.visible,
.step.visible,
.price-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.price-card.featured.visible {
    transform: scale(1.05);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .dept-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .price-card.featured {
        transform: none;
    }

    .price-card.featured:hover {
        transform: translateY(-4px);
    }

    .price-card.featured.visible {
        transform: none;
    }

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

@media (max-width: 768px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        padding: 24px;
        border-bottom: 1px solid var(--border);
        gap: 16px;
    }

    .nav-actions.open {
        display: flex;
        position: absolute;
        top: calc(100% + 150px);
        left: 0;
        right: 0;
        padding: 0 24px 24px;
        background: var(--bg-primary);
    }

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

    .hero-stats {
        gap: 20px;
    }

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

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

    .agent-feature,
    .agent-feature.reverse {
        flex-direction: column;
        gap: 24px;
    }

    .step {
        grid-template-columns: auto 1fr;
        gap: 20px;
        padding: 24px;
    }

    .step-visual {
        display: none;
    }

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