/* =============================================
   GRAFISITY — Premium SaaS Design System
   Base Styles
   ============================================= */

/* === CSS Variables === */
:root {
    --primary: #5e17eb;
    --primary-glow: rgba(94, 23, 235, 0.35);
    --primary-light: #8e5cf2;
    --primary-dark: #4b12bd;
    --primary-subtle: rgba(94, 23, 235, 0.06);
    --bg-page: #ffffff;
    --bg-section-alt: #f9f9fb;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-solid: #ffffff;
    --bg-input: transparent;
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-border-dark: rgba(255, 255, 255, 0.08);
    --text-main: #09090b;
    --text-secondary: #71717a;
    --text-muted: #a1a1aa;
    --border-light: rgba(0, 0, 0, 0.06);
    --border-medium: rgba(0, 0, 0, 0.1);
    --navbar-bg: rgba(255, 255, 255, 0.88);
    --navbar-border: rgba(0, 0, 0, 0.05);
    --nav-link-hover-bg: rgba(0, 0, 0, 0.04);
    --btn-ghost-bg: rgba(0, 0, 0, 0.04);
    --btn-ghost-hover: rgba(0, 0, 0, 0.07);
    --metrics-bg: #fafafa;
    --theme-icon-sun: block;
    --theme-icon-moon: none;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 4px 20px rgba(94, 23, 235, 0.3);
    --shadow-glow-lg: 0 8px 40px rgba(94, 23, 235, 0.25);
}

/* === DARK MODE === */
[data-theme="dark"] {
    --bg-page: #0c0c0e;
    --bg-section-alt: #111114;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-solid: #161618;
    --bg-input: transparent;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-dark: rgba(255, 255, 255, 0.08);
    --text-main: #fcfcfc;
    --text-secondary: #c0c0c7;
    --text-muted: #6e6e77;
    --border-light: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.12);
    --navbar-bg: rgba(12, 12, 14, 0.92);
    --navbar-border: rgba(255, 255, 255, 0.08);
    --nav-link-hover-bg: rgba(255, 255, 255, 0.05);
    --btn-ghost-bg: rgba(255, 255, 255, 0.06);
    --btn-ghost-hover: rgba(255, 255, 255, 0.1);
    --metrics-bg: #111114;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* === Reset & Base === */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.015em;
    line-height: 1.65;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* === Container === */
.container {
    max-width: 1200px;
}

/* === Typography === */
.gradient-text {
    background: linear-gradient(135deg, #5e17eb 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.tracking-widest {
    letter-spacing: 0.12em;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

/* === Glass Effects === */
.glass-effect {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    border: 1px solid var(--glass-border);
}

.glass-effect-dark {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border-dark);
}

/* === Gradient Background === */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

/* === Buttons === */
.btn-saas {
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition-spring);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    letter-spacing: -0.01em;
}

.btn-saas-sm {
    padding: 8px 16px;
    font-size: 0.82rem;
    border-radius: 9px;
    gap: 6px;
}

.btn-saas-primary {
    background: var(--primary);
    color: #fff !important;
    box-shadow: var(--shadow-glow);
}

.btn-saas-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-lg);
}

.btn-saas-ghost {
    background: var(--btn-ghost-bg);
    color: var(--text-main) !important;
    border: 1px solid var(--border-light);
}

.btn-saas-ghost:hover {
    background: var(--btn-ghost-hover);
    transform: translateY(-1px);
}

/* Form inputs */
.saas-input {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0 !important;
    color: #fff !important;
    padding: 10px 0 !important;
    transition: border-color 0.25s ease;
    box-shadow: none !important;
    font-size: 0.95rem;
}

.saas-input:focus {
    border-bottom-color: var(--primary-light) !important;
    background: transparent !important;
}

.saas-input::placeholder {
    color: rgba(255, 255, 255, 0.25) !important;
}

.form-label-dark {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 6px;
}

/* Additional Variables from landing.css */
:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow-2xl: 0 40px 100px -20px rgba(0, 0, 0, 0.15);
    --shadow-primary: 0 10px 40px -10px var(--primary-glow);
}

[data-theme="dark"] {
    --glass-bg: rgba(255, 255, 255, 0.03);
}

/* Base Utility Classes */
.text-primary {
    color: #5e17eb !important;
}

.bg-primary {
    background-color: #5e17eb !important;
}

.border-primary {
    border-color: #5e17eb !important;
}

.btn-primary {
    background-color: #5e17eb !important;
    border-color: #5e17eb !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-dark {
    color: var(--text-main) !important;
}

.text-black {
    color: var(--text-main) !important;
}

.bg-section-alt {
    background-color: var(--bg-section-alt) !important;
}

/* Grayscale effect */
.grayscale {
    filter: grayscale(1);
    transition: var(--transition);
}

[data-theme="dark"] .grayscale {
    filter: grayscale(1);
    opacity: 0.4;
}

.grayscale:hover {
    filter: none !important;
    opacity: 1 !important;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition-spring);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-lg), 0 20px 40px -20px var(--primary-glow);
    border-color: var(--primary-light);
}

.shadow-2xl {
    box-shadow: var(--shadow-2xl) !important;
}

/* Micro-interactions for buttons */
.btn-saas,
.btn-modern {
    transition: var(--transition-spring) !important;
}

.btn-saas:active,
.btn-modern:active {
    transform: scale(0.96);
}

/* Animation utilities */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-subtle);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Section Spacing */
section {
    padding: 120px 0;
    position: relative;
    scroll-margin-top: 80px;
    /* Offset for sticky navbar */
}