/* ==========================================================================
   COMPONENTS - Reusable UI Elements
   
   This file contains all the reusable components like:
   - Buttons (primary, secondary, etc.)
   - Cards (feature cards, product cards)
   - Forms (inputs, textareas, form layouts)
   - Logo component (animated brand logo)
   ========================================================================== */

/* ==========================================================================
   ANIMATED HERO LOGO - Simplified without connection lines
   ========================================================================== */

.hero-logo {
    width: 150px;
    height: 150px;
    position: relative;
    margin-bottom: 2rem;
}

.hero-logo .logo-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5a87 0%, #1a365d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(45, 90, 135, 0.3);
}

.hero-logo .logo-circle::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4a90e2, #2d5a87, #6bb6ff);
    z-index: -1;
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-logo .neural-network {
    width: 70px;
    height: 70px;
    position: relative;
}

.hero-logo .node {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    opacity: 0.9;
    animation: pulse 3s ease-in-out infinite;
}

/* Simplified node positions - no connection lines */
.hero-logo .node:nth-child(1) {
    top: 8px;
    left: 31px;
    animation-delay: 0s;
}

.hero-logo .node:nth-child(2) {
    top: 25px;
    left: 10px;
    animation-delay: 0.5s;
}

.hero-logo .node:nth-child(3) {
    top: 25px;
    left: 52px;
    animation-delay: 1s;
}

.hero-logo .node:nth-child(4) {
    top: 42px;
    left: 20px;
    animation-delay: 1.5s;
}

.hero-logo .node:nth-child(5) {
    top: 42px;
    left: 42px;
    animation-delay: 2s;
}

.hero-logo .node:nth-child(6) {
    top: 58px;
    left: 31px;
    animation-delay: 2.5s;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ==========================================================================
   FOOTER SVG LOGO - Using actual brand SVG files
   ========================================================================== */

.footer-logo-svg {
    width: 50px;
    height: 50px;
    display: inline-block;
}

.footer-logo-svg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==========================================================================
   BUTTONS - Call-to-action and interactive elements
   ========================================================================== */

/* Base button styles - applies to all buttons */
.btn {
    /* Layout */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);

    /* Sizing */
    padding: var(--space-4) var(--space-6);
    min-height: 48px;
    /* Ensures touch target is large enough */

    /* Typography */
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;

    /* Appearance */
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;

    /* Transitions */
    transition: var(--transition-all);

    /* States */
    user-select: none;
    /* Prevents text selection on buttons */
}

/* Primary button - main call-to-action */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(45, 90, 135, 0.4);
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-primary);
}

.btn-primary:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Secondary button - alternative actions */
.btn-secondary {
    background: var(--color-background);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Contact form button - special styling for dark background */
.btn-contact {
    background: white;
    color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.btn-contact:hover {
    background: var(--color-background-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Button sizes */
.btn-large {
    padding: var(--space-5) var(--space-8);
    font-size: var(--font-size-lg);
    min-height: 56px;
}

.btn-small {
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-size-sm);
    min-height: 40px;
}

/* Button group - for multiple buttons side by side */
.btn-group {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* ==========================================================================
   CARDS - Content containers
   ========================================================================== */

/* Base card styles */
.card {
    background: var(--color-background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-all);
    overflow: hidden;
    /* Ensures content stays within rounded corners */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Feature cards - for the "What We Do" section */
.feature-card {
    background: linear-gradient(135deg, var(--color-background-light) 0%, var(--color-background-medium) 100%);
    padding: var(--space-12);
    text-align: center;
    border: 1px solid rgba(45, 90, 135, 0.1);
    transition: var(--transition-all);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary-light);
}

/* Feature card icon */
.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6) auto;
    font-size: var(--font-size-3xl);
    color: white;
    box-shadow: var(--shadow-primary);
}

/* Feature card title */
.feature-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

/* Feature card description */
.feature-description {
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

/* Product showcase card */
.product-showcase {
    background: var(--color-background);
    border-radius: var(--radius-2xl);
    padding: var(--space-16);
    box-shadow: var(--shadow-2xl);
    text-align: center;
    margin-top: var(--space-8);
}

/* Product badge */
.product-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Product title */
.product-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

/* Product description */
.product-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: var(--line-height-relaxed);
}

/* ==========================================================================
   FORMS - Input fields, textareas, form layouts
   ========================================================================== */

/* Form container */
.form {
    display: grid;
    gap: var(--space-6);
    max-width: 600px;
}

/* Form group - for side-by-side inputs */
.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

/* Base input styles */
.form-input,
.form-textarea {
    /* Layout */
    width: 100%;
    padding: var(--space-4);

    /* Typography */
    font-family: var(--font-primary);
    font-size: var(--font-size-base);

    /* Appearance */
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    color: white;
    backdrop-filter: blur(10px);

    /* Transitions */
    transition: var(--transition-all);
}

/* Placeholder styling */
.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Focus states */
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(107, 182, 255, 0.1);
}

/* Textarea specific styles */
.form-textarea {
    min-height: 120px;
    resize: vertical;
    /* Allows vertical resizing only */
    font-family: var(--font-primary);
    /* Prevents system monospace font */
}

/* Form validation states */
.form-input:valid {
    border-color: var(--color-success);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--color-error);
}

/* ==========================================================================
   CTA BUTTONS - Call-to-action button groups
   ========================================================================== */

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* ==========================================================================
   FOOTER ELEMENTS
   ========================================================================== */

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.footer-brand {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: white;
}

.footer-tagline {
    color: var(--color-text-light);
    margin-bottom: var(--space-6);
    font-style: italic;
    text-align: center;
}

/* ==========================================================================
   ANIMATION UTILITIES - Fade-in effects
   ========================================================================== */

/* Fade-in animation for scroll effects */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   LOADING STATES - For future use
   ========================================================================== */

/* Button loading state */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: var(--space-2);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}