/* codeacode — Landing Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ── Grain Texture (pseudo-element, no z-index conflicts) ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

/* ── Glassmorphism ── */
.glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/*
   Scroll Reveal Animations
*/

.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);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

.reveal-delay-5 {
    transition-delay: 0.5s;
}

/* 
   Hero Section
 */

/* ── Title Reveal ── */
.hero-line {
    overflow: hidden;
}

.hero-line-inner {
    transform: translateY(110%);
    animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-line-inner.delay {
    animation-delay: 0.15s;
}

@keyframes heroReveal {
    to {
        transform: translateY(0);
    }
}

/* ── Blinking Cursor ── */
.cursor-blink {
    display: inline-block;
    width: 4px;
    height: 0.85em;
    background: #6366f1;
    margin-left: 6px;
    vertical-align: baseline;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ── Fade-in for subtitle and CTAs ── */
.hero-fade {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-fade.d1 {
    animation-delay: 0.4s;
}

.hero-fade.d2 {
    animation-delay: 0.6s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Parallax Blobs ── */
.hero-blob {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

/* ── Hero Particle Canvas ── */
#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Hero content must sit above the canvas */
#heroSection>.z-10 {
    position: relative;
    z-index: 5;
}

/* 
   Service Cards
 */

.service-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #6366f1, #a855f7);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0 2px 2px 0;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.08);
}

.service-card:hover::before {
    transform: scaleY(1);
}

.service-card .arrow {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.service-card:hover .arrow {
    opacity: 1;
    transform: translateX(0);
}

/* 
   Infinite Marquee
 */

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.marquee-track {
    display: flex;
    animation: marquee 25s linear infinite;
    width: max-content;
}

.marquee-wrapper {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

/*
   Contact Form
 */

/* ── Form Focus Gradient Border ── */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ── Valid Input Check ── */
.form-input:valid:not(:placeholder-shown) {
    border-color: rgba(34, 197, 94, 0.4);
}

/* ── Floating Label ── */
.float-group {
    position: relative;
}

.float-group label {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: #4b5563;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    padding: 0 4px;
}

.float-group.textarea-group label {
    top: 20px;
    transform: translateY(0);
}

.float-group input:focus~label,
.float-group input:not(:placeholder-shown)~label,
.float-group textarea:focus~label,
.float-group textarea:not(:placeholder-shown)~label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: #6366f1;
    background: #0a0a0f;
    letter-spacing: 0.05em;
    padding: 0 8px;
}

/* ── Submit Button Loading ── */
.btn-submit {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit:hover {
    background: #6366f1 !important;
    color: white !important;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

.btn-submit.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 
   Mobile Menu
  */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 5, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu a {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #e5e7eb;
    padding: 16px;
    transition: color 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.mobile-menu.open a {
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-menu.open a:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-menu.open a:nth-child(2) {
    animation-delay: 0.2s;
}

.mobile-menu.open a:nth-child(3) {
    animation-delay: 0.3s;
}

.mobile-menu.open a:nth-child(4) {
    animation-delay: 0.4s;
}

/* ── Hamburger Button ── */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 80;
    gap: 5px;
    padding: 8px;
    border: none;
    background: none;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger.active span:first-child {
    transform: rotate(45deg) translate(3.5px, 3.5px);
}

.hamburger.active span:last-child {
    transform: rotate(-45deg) translate(3.5px, -3.5px);
}

/* 
   Footer
*/

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.social-icon:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-2px);
}


/* 
   Launch Rocket — Page Load Animation
 */

.launch-rocket {
    position: fixed;
    z-index: 9999;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
}

.launch-rocket.flying {
    opacity: 1;
    animation: rocketLaunch 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.launch-rocket.done {
    display: none;
}

@keyframes rocketLaunch {
    0%   { bottom: -80px; opacity: 0; }
    5%   { opacity: 1; }
    85%  { opacity: 1; }
    100% { bottom: calc(100vh + 100px); opacity: 0; }
}

/* ── Rocket Body ── */
.launch-rocket-body {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8))
            drop-shadow(0 0 60px rgba(99, 102, 241, 0.4));
    transform: rotate(-45deg);
    animation: none;
}

.launch-rocket.flying .launch-rocket-body {
    animation: rocketShake 0.08s linear infinite;
}

@keyframes rocketShake {
    0%, 100% { transform: rotate(-45deg) translate(0, 0); }
    25%      { transform: rotate(-45deg) translate(-1px, 1px); }
    50%      { transform: rotate(-45deg) translate(1px, -1px); }
    75%      { transform: rotate(-45deg) translate(-1px, -1px); }
}

/* ── Glowing Trail ── */
.launch-rocket-trail {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 0;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(
        to bottom,
        rgba(99, 102, 241, 0.9),
        rgba(168, 85, 247, 0.6),
        rgba(168, 85, 247, 0.2),
        transparent
    );
    opacity: 0;
    filter: blur(2px);
}

.launch-rocket.flying .launch-rocket-trail {
    animation: trailGrow 0.4s ease-out 0.1s forwards;
}

@keyframes trailGrow {
    0%   { height: 0; opacity: 0; }
    100% { height: 300px; opacity: 1; }
}

/* ── Sparkles ── */
.launch-rocket-sparkles {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
}

.launch-rocket-sparkles span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0;
    top: 50%;
    left: 50%;
}

.launch-rocket-sparkles span:nth-child(1) { background: #6366f1; }
.launch-rocket-sparkles span:nth-child(2) { background: #a855f7; }
.launch-rocket-sparkles span:nth-child(3) { background: #c7d2fe; }
.launch-rocket-sparkles span:nth-child(4) { background: #818cf8; }
.launch-rocket-sparkles span:nth-child(5) { background: #e9d5ff; }
.launch-rocket-sparkles span:nth-child(6) { background: #a78bfa; }

.launch-rocket.flying .launch-rocket-sparkles span {
    animation: sparkleScatter 0.6s ease-out infinite;
}

.launch-rocket.flying .launch-rocket-sparkles span:nth-child(1) { animation-delay: 0s;    --sx: -14px; --sy: 20px; }
.launch-rocket.flying .launch-rocket-sparkles span:nth-child(2) { animation-delay: 0.08s; --sx: 12px;  --sy: 25px; }
.launch-rocket.flying .launch-rocket-sparkles span:nth-child(3) { animation-delay: 0.16s; --sx: -8px;  --sy: 30px; }
.launch-rocket.flying .launch-rocket-sparkles span:nth-child(4) { animation-delay: 0.24s; --sx: 16px;  --sy: 18px; }
.launch-rocket.flying .launch-rocket-sparkles span:nth-child(5) { animation-delay: 0.1s;  --sx: -18px; --sy: 22px; }
.launch-rocket.flying .launch-rocket-sparkles span:nth-child(6) { animation-delay: 0.2s;  --sx: 6px;   --sy: 28px; }

@keyframes sparkleScatter {
    0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(0); }
}

/* ── Screen Flash at the top ── */
.launch-flash {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.2), transparent 60%);
    opacity: 0;
    pointer-events: none;
    animation: flashPulse 0.8s ease-out forwards;
}

@keyframes flashPulse {
    0%   { opacity: 0; }
    30%  { opacity: 1; }
    100% { opacity: 0; }
}

/* Toast Notification */

.toast {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #6366f1;
    color: white;
    padding: 16px 28px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}