/* ============================================
   V4 — COMPONENTS
   Buttons, Forms, Cards, Section Headers
============================================ */

/* ============================================
   BUTTONS
============================================ */
.btn-arrow {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px 14px 28px;
    background: var(--accent);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    transition: all 0.3s;
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(35, 71, 159, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(35, 71, 159, 0);
    }
}

.btn-arrow .arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-style: normal;
    transition: all 0.3s;
}

.btn-arrow:hover {
    background: var(--accent-hover);
    animation: none;
}

.btn-arrow:hover .arrow {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: 2px solid var(--border);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   SECTION HEADER
============================================ */
.section-header {
    margin-bottom: 64px;
}

.section-header.light {
    color: white;
}

.section-header.light .section-label span:last-child,
.section-header.light p {
    color: rgba(255,255,255,0.7);
}

.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.label-line {
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.8s ease-out;
}

.label-line.visible {
    width: 40px;
}

.section-header.light .label-line {
    background: rgba(255,255,255,0.7);
}

.section-label span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-soft);
    max-width: 500px;
    transition: color 0.4s ease;
}

/* ============================================
   FORMS
============================================ */
.cta-form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg-alt);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s, background-color 0.4s ease, color 0.4s ease;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.field textarea {
    resize: vertical;
    min-height: 100px;
}

.cf-turnstile {
    margin-bottom: 20px;
}

.btn-submit {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    margin: 0 auto;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s ease;
    overflow: hidden;
}

.btn-submit:hover {
    background: var(--accent-hover);
}

.btn-submit.loading {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    pointer-events: none;
    margin: 0 auto;
}

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

.btn-submit .spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.loading .spinner {
    opacity: 1 !important;
    animation: spinRotate 0.8s linear infinite !important;
}

@keyframes spinRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-icon {
    transition: transform 0.3s, opacity 0.3s;
}

.btn-text {
    transition: opacity 0.3s;
}

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

.form-alert {
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    margin-bottom: 0;
    padding: 0 20px;
    overflow: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out, max-height 0.4s ease-in-out, margin 0.4s ease-in-out, padding 0.4s ease-in-out;
}

.form-alert.visible {
    opacity: 1;
    visibility: visible;
    max-height: 80px;
    margin-bottom: 24px;
    padding: 16px 20px;
}

.form-alert-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.form-alert.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #86efac;
}

.form-alert.success .form-alert-icon {
    background: #166534;
    color: #fff;
}

.form-alert.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.form-alert.error .form-alert-icon {
    background: #dc2626;
    color: #fff;
}

.field-error {
    display: block;
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 6px;
    min-height: 1.2em;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.field-error.visible {
    opacity: 1;
    transform: translateY(0);
}

.field.has-error input,
.field.has-error textarea {
    border-color: #dc2626;
    background: #fef2f2;
}

.field.has-error input:focus,
.field.has-error textarea:focus {
    border-color: #dc2626;
}

[data-theme="dark"] .field.has-error input,
[data-theme="dark"] .field.has-error textarea {
    background: rgba(220, 38, 38, 0.1);
}

[data-theme="dark"] .field-error {
    color: #f87171;
}

[data-theme="dark"] .form-alert.error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(185, 28, 28, 0.15) 100%);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

[data-theme="dark"] .form-alert.error .form-alert-icon {
    background: #f87171;
    color: #1a1a1a;
}

[data-theme="dark"] .form-alert.success {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.2) 0%, rgba(21, 128, 61, 0.15) 100%);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
}

[data-theme="dark"] .form-alert.success .form-alert-icon {
    background: #4ade80;
    color: #1a1a1a;
}

/* ============================================
   CARDS - Solution Block
============================================ */
.solution-block {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    padding: 36px;
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    overflow: hidden;
}

/* Dark mode glassmorphism */
[data-theme="dark"] .solution-block {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .solution-block {
        background: rgba(20, 20, 20, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.solution-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.solution-block:nth-child(1) { transition-delay: 0s; }
.solution-block:nth-child(2) { transition-delay: 0.1s; }
.solution-block:nth-child(3) { transition-delay: 0.2s; }
.solution-block:nth-child(4) { transition-delay: 0.3s; }
.solution-block:nth-child(5) { transition-delay: 0.4s; }

/* Subtle top highlight */
.solution-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

[data-theme="dark"] .solution-block::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .solution-block::before {
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    }
}

.solution-block:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(35, 71, 159, 0.25);
    box-shadow: 0 25px 80px rgba(35, 71, 159, 0.12);
    transform: translateY(-6px);
}

[data-theme="dark"] .solution-block:hover {
    background: rgba(30, 30, 30, 0.75);
    border-color: rgba(35, 71, 159, 0.35);
    box-shadow: 0 25px 80px rgba(35, 71, 159, 0.25);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .solution-block:hover {
        background: rgba(30, 30, 30, 0.75);
        border-color: rgba(35, 71, 159, 0.35);
        box-shadow: 0 25px 80px rgba(35, 71, 159, 0.25);
    }
}

/* Card icon - circle style with gradient mask like network edge nodes */
/* Wrapper for icon with outer ring (ring is outside mask) */
.solution-icon-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    margin-bottom: 28px;
}

/* Outer ring - on wrapper, not affected by mask */
.solution-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    opacity: 0.4;
    transition: all 0.4s ease;
}

.solution-icon {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 40%, rgba(0,0,0,0.5) 100%);
    mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 40%, rgba(0,0,0,0.5) 100%);
}

.solution-icon svg {
    width: 26px;
    height: 26px;
    color: white;
    transition: all 0.3s ease;
}

.solution-block:hover .solution-icon {
    transform: scale(1.1);
    -webkit-mask-image: none;
    mask-image: none;
    box-shadow: 0 0 20px rgba(35, 71, 159, 0.4);
}

.solution-block:hover .solution-icon-wrapper::before {
    opacity: 0.7;
    inset: -12px;
}

/* Card content */
.solution-body h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.solution-block:hover .solution-body h3 {
    color: var(--accent);
}

.solution-body > p {
    color: var(--text-soft);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Tech icons - Glow orbs */
.solution-tech-icons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    position: relative;
}

.tech-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-soft);
    font-size: 0;
    transition: all 0.4s ease;
    cursor: default;
}

.tech-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.tech-icon::after {
    content: attr(data-name);
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tech-icon:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 20px rgba(35, 71, 159, 0.5), 0 0 40px rgba(35, 71, 159, 0.3);
    transform: translateY(-3px);
}

.tech-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   PRINCIPLE CARDS
============================================ */
.principle {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.principle-icon {
    color: var(--accent);
    font-size: 1.2rem;
}

.principle strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.principle p {
    font-size: 0.9rem;
    color: var(--text-soft);
}

/* ============================================
   COMPANY PROFILE CARD
============================================ */
.company-profile {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    position: sticky;
    top: 120px;
}

.profile-logo img {
    width: 80px;
    margin: 0 auto 24px;
}

.profile-details h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-details > p {
    color: var(--text-soft);
    margin-bottom: 32px;
}

.profile-meta {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.meta-item {
    text-align: center;
}

.meta-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.meta-value {
    font-weight: 700;
}

/* ============================================
   SHOWCASE CARD
============================================ */
.showcase-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 16px;
    overflow: hidden;
}

.showcase-card img {
    width: 200px;
    height: auto;
}

.showcase-card video {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    display: block;
}