/* Custom CSS Design System - Clarity Solutions */

/* Variables and Theme Config */
:root {
    --bg-color: #050505;
    --bg-alt: #0b0b0c;
    --bg-card: rgba(20, 20, 22, 0.6);
    --bg-input: rgba(15, 15, 17, 0.8);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-inverse: #050505;
    
    --brand-primary: #3b82f6;
    --brand-secondary: #8b5cf6;
    --brand-success: #10b981;
    --brand-error: #ef4444;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(96, 165, 250, 0.5);
    
    --glow: 0 0 30px rgba(59, 130, 246, 0.25);
    --glow-violet: 0 0 30px rgba(139, 92, 246, 0.25);
    --gradient-text: linear-gradient(135deg, #60a5fa, #a78bfa);
    --gradient-btn: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-btn-hover: linear-gradient(135deg, #8b5cf6, #3b82f6);
    
    --font-sans: 'Outfit', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.6rem, 7vw, 4.5rem);
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

p {
    color: var(--text-muted);
}

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

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Layout Utilities */
.ce-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.ce-section {
    padding: 7.5rem 0;
    position: relative;
}

.bg-alt {
    background-color: var(--bg-alt);
}

.ce-grid {
    display: grid;
    gap: 2rem;
    width: 100%;
}

.section-header {
    max-width: 700px;
    margin: 0 auto 5rem;
    text-align: center;
}

.section-header .subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-top: 1rem;
}

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

/* Navigation */
.ce-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.8rem 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    background: rgba(5, 5, 5, 0.4);
    transition: var(--transition-smooth);
}

.ce-nav.scrolled {
    background: rgba(5, 5, 5, 0.88);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    padding: 1.1rem 0;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
}

.nav-links a:hover:not(.ce-btn) {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #ffffff;
    transition: var(--transition-smooth);
}

@media (max-width: 767px) {
    .nav-links {
        display: none; /* Can be expanded in JS if needed */
    }
}

/* Buttons */
.ce-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--gradient-btn);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-btn-hover);
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: var(--glow);
    transform: translateY(-3px);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.ce-hero {
    min-height: 100vh;
    padding: 11rem 0 6rem 0;
    display: flex;
    align-items: center;
    position: relative;
    text-align: center;
    overflow: hidden;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    z-index: 2;
    position: relative;
}

.hero-content h1 {
    max-width: 900px;
}

.ce-hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 1.5rem auto 2.5rem;
    line-height: 1.6;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 950px;
    height: 950px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16) 0%, rgba(139, 92, 246, 0.06) 35%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    animation: pulseGlow 10s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% {
        transform: translate(-50%, -50%) scale(0.92);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 1.2;
    }
}

.btn-group {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Philosophy / Reality Section */
.section-p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2.2rem;
}

.check-list {
    list-style: none;
    margin-bottom: 2.5rem;
    padding: 0;
}

.check-list li {
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 1.2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
}

.check-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.philosophical-quote {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 2rem;
    border-left: 4px solid var(--brand-primary);
    padding-left: 1.2rem;
}

.img-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
}

.img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-wrapper:hover img {
    transform: scale(1.04);
}

.img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.85), transparent 60%);
    pointer-events: none;
}

/* Service & Case Cards */
.ce-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.ce-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-text);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ce-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), var(--glow);
}

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

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    transition: var(--transition-smooth);
}

.ce-card:hover .card-icon {
    transform: scale(1.1) rotate(6deg);
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
    color: #ffffff;
}

.card-text {
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Results section badges and stats */
.card-badge {
    color: var(--brand-primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
}

.stat-box {
    background: rgba(0, 0, 0, 0.45);
    padding: 1.8rem 1.5rem;
    border-radius: 18px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.ce-card:hover .stat-box {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.015);
}

.stat-box span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.stat-box strong {
    font-size: 1.9rem;
    color: #ffffff;
    font-weight: 700;
}

.stat-box.violet {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.03);
}

.stat-box.violet strong {
    color: #a78bfa;
}

.stat-box.blue {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.03);
}

.stat-box.blue strong {
    color: #60a5fa;
}

.ce-card:hover .stat-box.violet {
    box-shadow: var(--glow-violet);
    border-color: rgba(139, 92, 246, 0.5);
}

.ce-card:hover .stat-box.blue {
    box-shadow: var(--glow);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Interactive Audit Card & Form */
.audit-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 5rem 4rem;
    background: linear-gradient(135deg, rgba(20, 20, 22, 0.95), rgba(5, 5, 5, 1));
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 32px;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.12);
    position: relative;
    overflow: hidden;
}

.audit-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3.5rem;
}

.audit-title {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.1;
    margin-bottom: 1.2rem;
}

.audit-subtitle {
    font-size: 1.15rem;
    color: #e2e8f0;
    line-height: 1.6;
}

/* Form Styling */
.lead-form {
    text-align: left;
    width: 100%;
}

.form-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-group label .required {
    color: var(--brand-error);
}

.form-group input,
.form-group textarea {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition-smooth);
    width: 100%;
}

.form-group textarea {
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #52525b;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
    background-color: rgba(20, 20, 22, 0.95);
}

/* Validation styling */
.form-group.invalid input {
    border-color: var(--brand-error);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.form-group .error-msg {
    display: none;
    font-size: 0.8rem;
    color: var(--brand-error);
    font-weight: 500;
    margin-top: 0.2rem;
}

.form-group.invalid .error-msg {
    display: block;
}

/* Submit container and loading */
.form-submit-container {
    display: flex;
    justify-content: center;
    margin-top: 2.2rem;
}

.btn-submit {
    font-size: 1.15rem;
    padding: 1.2rem 3.5rem;
    position: relative;
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s infinite linear;
}

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

/* Form Feedback */
.form-feedback {
    margin-top: 1.5rem;
    padding: 1.1rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.form-feedback.success {
    display: block;
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.form-feedback.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

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

.call-to-action-tel {
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    text-align: center;
}

.call-to-action-tel a {
    color: #ffffff;
    font-weight: 600;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

.call-to-action-tel a:hover {
    border-bottom-color: #ffffff;
}

@media (max-width: 767px) {
    .audit-card {
        padding: 3.5rem 2rem;
        border-radius: 24px;
    }
}

/* Scroll Animations reveal class */
.ce-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Footer Section */
.ce-footer {
    border-top: 1px solid var(--border-color);
    padding: 6rem 0 3.5rem;
    background-color: #000000;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.footer-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    height: 250px;
    background: radial-gradient(ellipse at bottom, rgba(59, 130, 246, 0.13) 0%, rgba(139, 92, 246, 0.03) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    display: inline-block;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.footer-text {
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.footer-contacts {
    display: flex;
    gap: 1.8rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 3.5rem;
    font-size: 1.05rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.footer-contacts a {
    color: #e2e8f0;
}

.footer-contacts a:hover {
    color: var(--brand-primary);
}

.contact-divider {
    color: #27272a;
}

.copyright {
    font-size: 0.9rem;
    color: #52525b;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}
