/* ========================================
   KPS Landing Page Styles
   Brand Colors:
   - Navy Blue: #1a365d
   - Emerald Green: #2dd4a8
   ======================================== */

:root {
    /* Primary Colors from Logo */
    --navy-blue: #1a365d;
    --navy-dark: #0f2340;
    --navy-light: #2a4a7a;
    --emerald: #2dd4a8;
    --emerald-dark: #1fb389;
    --emerald-light: #5fecc6;

    /* Neutral Colors */
    --white: #ffffff;
    --off-white: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-dark) 100%);
    --gradient-accent: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(26, 54, 93, 0.95) 0%, rgba(15, 35, 64, 0.98) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 60px rgba(45, 212, 168, 0.3);
    --shadow-logo: 0 25px 80px rgba(26, 54, 93, 0.25);

    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Animations */
    --transition-fast: 150ms ease;
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--white);
    color: var(--gray-800);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background - Interactive Light Theme */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4f8 50%, #f0fdf4 100%);
}

/* Animated Gradient Mesh Background */
.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(45, 212, 168, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(26, 54, 93, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 70% 60% at 60% 80%, rgba(45, 212, 168, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 70% at 10% 90%, rgba(26, 54, 93, 0.08) 0%, transparent 50%);
    animation: meshGradient 20s ease-in-out infinite;
}

@keyframes meshGradient {

    0%,
    100% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }

    33% {
        opacity: 0.8;
        transform: scale(1.05) translate(2%, -2%);
    }

    66% {
        opacity: 0.9;
        transform: scale(0.98) translate(-2%, 2%);
    }
}

/* Aurora Effect Layer */
.bg-animation::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        conic-gradient(from 0deg at 50% 50%,
            transparent 0deg,
            rgba(45, 212, 168, 0.05) 60deg,
            transparent 120deg,
            rgba(26, 54, 93, 0.04) 180deg,
            transparent 240deg,
            rgba(45, 212, 168, 0.03) 300deg,
            transparent 360deg);
    animation: auroraRotate 40s linear infinite;
}

@keyframes auroraRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Floating Shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    background: linear-gradient(135deg, rgba(45, 212, 168, 0.2), rgba(45, 212, 168, 0.05));
    animation: float1 20s ease-in-out infinite;
}

.shape-2 {
    width: 350px;
    height: 350px;
    bottom: -80px;
    left: -80px;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.15), rgba(26, 54, 93, 0.03));
    animation: float2 25s ease-in-out infinite;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 35%;
    left: 10%;
    background: linear-gradient(135deg, rgba(45, 212, 168, 0.12), transparent);
    animation: float3 18s ease-in-out infinite;
}

.shape-4 {
    width: 180px;
    height: 180px;
    top: 15%;
    right: 20%;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.1), transparent);
    animation: float4 22s ease-in-out infinite;
}

.shape-5 {
    width: 250px;
    height: 250px;
    bottom: 20%;
    right: 15%;
    background: linear-gradient(135deg, rgba(45, 212, 168, 0.15), transparent);
    animation: float5 24s ease-in-out infinite;
}

@keyframes float1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-30px, 40px) scale(1.1);
    }

    50% {
        transform: translate(20px, -30px) scale(0.95);
    }

    75% {
        transform: translate(-10px, 20px) scale(1.05);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -40px) scale(1.08);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.92);
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(60px, -40px) rotate(180deg);
    }
}

@keyframes float4 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-40px, 60px) scale(1.15);
        opacity: 1;
    }
}

@keyframes float5 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 30px) rotate(240deg);
    }
}

/* Interactive Particle Canvas */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Hero Section */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

/* Logo Container */
.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 3.5rem;
    animation: logoEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(50px);
    }

    60% {
        opacity: 1;
        transform: scale(1.05) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.logo {
    width: 160px;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(26, 54, 93, 0.15));
    transition: all var(--transition-spring);
    animation: logoBreathing 6s ease-in-out infinite;
}

.logo:hover {
    transform: scale(1.1) translateY(-3px);
    filter: drop-shadow(0 20px 40px rgba(26, 54, 93, 0.2));
}

@keyframes logoBreathing {

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

    50% {
        transform: scale(1.02) translateY(-3px);
    }
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(45, 212, 168, 0.1) 0%, rgba(26, 54, 93, 0.03) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Tagline */
.tagline {
    margin-bottom: 3.5rem;
    overflow: hidden;
}

.tagline-line {
    display: block;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--navy-blue);
    opacity: 0;
    transform: translateY(100%);
    animation: textReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.tagline-line:first-child {
    animation-delay: 0.4s;
}

.tagline-line.accent {
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-delay: 0.6s;
}

@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(100%) rotateX(-20deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 20px 42px;
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    background: var(--gradient-primary);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-spring);
    box-shadow: 0 10px 40px rgba(26, 54, 93, 0.3);
    opacity: 0;
    animation: buttonEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s forwards;
}

@keyframes buttonEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.cta-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 60px rgba(26, 54, 93, 0.35), 0 0 40px rgba(45, 212, 168, 0.2);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover::after {
    opacity: 1;
}

.cta-button:active {
    transform: translateY(-2px) scale(1);
}

.btn-text,
.btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    display: flex;
    align-items: center;
    transition: transform var(--transition-base);
}

.cta-button:hover .btn-icon {
    transform: translateX(5px) rotate(5deg);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 54, 93, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    transform: translateY(40px) scale(0.92);
    transition: transform var(--transition-spring);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--white);
}

.modal-logo {
    width: 70px;
    height: auto;
    margin-bottom: 1.25rem;
    filter: brightness(0) invert(1);
}

.modal-header h2 {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.modal-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 400;
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 18px;
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    outline: none;
    transition: all var(--transition-base);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(45, 212, 168, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy-dark);
    background: var(--gradient-accent);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition-spring);
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

.submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(45, 212, 168, 0.35);
}

.submit-btn:active {
    transform: translateY(-1px) scale(1);
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.85;
}

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

.btn-loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 2.5px solid transparent;
    border-top-color: var(--navy-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 2.5rem 0;
    color: var(--white);
}

.success-message.show {
    display: block;
    animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    background: var(--gradient-accent);
    border-radius: 50%;
    margin-bottom: 1.75rem;
    animation: iconBounce 0.6s ease-out 0.2s;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.success-icon svg {
    color: var(--navy-dark);
}

.success-message h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.success-message p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Hide form when success is shown */
.contact-form.hidden {
    display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .logo {
        width: 140px;
    }

    .logo-glow {
        width: 200px;
        height: 200px;
    }

    .logo-container {
        margin-bottom: 2.5rem;
    }

    .tagline {
        margin-bottom: 2.5rem;
    }

    .cta-button {
        padding: 18px 32px;
        font-size: 1rem;
    }

    .modal {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .modal-header h2 {
        font-size: 1.6rem;
    }

    .floating-shape {
        filter: blur(80px);
    }

    .shape-1 {
        width: 350px;
        height: 350px;
    }

    .shape-2 {
        width: 280px;
        height: 280px;
    }

    .shape-3,
    .shape-4,
    .shape-5 {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1.5rem;
    }

    .logo {
        width: 120px;
    }

    .logo-container {
        margin-bottom: 2rem;
    }

    .tagline-line {
        font-size: 1.8rem;
    }

    .cta-button {
        padding: 16px 28px;
        font-size: 0.95rem;
    }

    .modal {
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 16px;
    }
}

/* Scrollbar Styling */
.modal::-webkit-scrollbar {
    width: 6px;
}

.modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-shape {
        animation: none;
    }
}

/* Focus States */
.cta-button:focus-visible,
.modal-close:focus-visible,
.submit-btn:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 3px;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
    outline: none;
}

/* Additional Hover Effects */
@media (hover: hover) {
    .logo-container:hover .logo-glow {
        animation-play-state: paused;
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.4);
    }
}