/* ── RESET ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── TOKENS ── */
:root {
    --blue: #178DF2;
    --blue-border: rgba(23, 141, 242, 0.25);
    --bg: #0a0a0f;
    --surface: #13131a;
    --surface-hover: #1a1a24;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.55);
    --text-faint: rgba(255, 255, 255, 0.3);
    --radius-card: 18px;
    --radius-pill: 50px;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
    font-family: 'Unbounded', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* ── BACKGROUND ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(ellipse 65% 45% at 10% 25%,  rgba(23, 141, 242, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 75%,  rgba(99,  60, 220, 0.09) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 55%  5%,  rgba(23, 141, 242, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse 35% 35% at 80% 20%,  rgba(180, 80, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 30% 25% at 20% 85%,  rgba(0,  200, 180, 0.05) 0%, transparent 50%),
        radial-gradient(circle, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: auto, auto, auto, auto, auto, 36px 36px;
    pointer-events: none;
    z-index: 0;
}

/* ── PARTICLES ── */
.particle {
    position: fixed;
    border-radius: 50%;
    background: var(--blue);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    animation: particleFloat linear infinite;
}
.particle:nth-child(1) { width: 4px; height: 4px; top: 10%;    left: 7%;    animation-duration: 9s;  animation-delay: 0s;   }
.particle:nth-child(2) { width: 3px; height: 3px; top: 22%;    right: 11%;  animation-duration: 11s; animation-delay: 2.5s; }
.particle:nth-child(3) { width: 5px; height: 5px; bottom: 22%; left: 16%;   animation-duration: 8s;  animation-delay: 5s;   }
.particle:nth-child(4) { width: 3px; height: 3px; bottom: 15%; right: 9%;   animation-duration: 12s; animation-delay: 7s;   }
.particle:nth-child(5) { width: 4px; height: 4px; top: 52%;    left: 4%;    animation-duration: 10s; animation-delay: 1.5s; }
.particle:nth-child(6) { width: 3px; height: 3px; top: 38%;    right: 4%;   animation-duration: 9s;  animation-delay: 3.5s; }

@keyframes particleFloat {
    0%   { transform: translateY(0)     scale(1);   opacity: 0;    }
    20%  {                                           opacity: 0.4;  }
    50%  { transform: translateY(-26px) scale(1.4); opacity: 0.55; }
    80%  {                                           opacity: 0.25; }
    100% { transform: translateY(0)     scale(1);   opacity: 0;    }
}

/* ── LAYOUT ── */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    padding: 64px 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── LOGO ── */
.logo-wrapper {
    margin-bottom: 32px;
    animation: fadeDown 0.6s ease both;
}
.logo-wrapper img {
    height: 68px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(23, 141, 242, 0.3));
}

/* ── BADGE ── */
.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(23, 141, 242, 0.08);
    border: 1px solid var(--blue-border);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    margin-bottom: 28px;
    font-size: 0.73rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
    animation: badgePulse 3s ease-in-out infinite, fadeDown 0.6s 0.1s ease both;
}
.dev-badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
    animation: dotBlink 2s ease-in-out infinite;
}

@keyframes dotBlink {
    0%, 100% { opacity: 1;    transform: scale(1);   }
    50%       { opacity: 0.35; transform: scale(0.7); }
}
@keyframes badgePulse {
    0%, 100% { border-color: rgba(23, 141, 242, 0.25); }
    50%       { border-color: rgba(23, 141, 242, 0.6); box-shadow: 0 0 14px rgba(23, 141, 242, 0.13); }
}

/* ── HERO ── */
.hero-title {
    font-size: clamp(2rem, 5.5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    margin-bottom: 16px;
    background: linear-gradient(140deg, #fff 0%, #b3d9ff 50%, #178DF2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeDown 0.6s 0.15s ease both;
}
.hero-subtitle {
    font-size: clamp(0.85rem, 2vw, 1.05rem);
    font-weight: 300;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.75;
    margin-bottom: 48px;
    max-width: 520px;
    animation: fadeDown 0.6s 0.25s ease both;
}

/* ── SERVICE GRID ── */
/* 6-column base: first 3 cards = 2 cols each, last 2 = 3 cols each (centered pair) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    width: 100%;
    margin-bottom: 36px;
    animation: fadeDown 0.6s 0.35s ease both;
}
.service-card:nth-child(1),
.service-card:nth-child(2),
.service-card:nth-child(3) { grid-column: span 2; }
.service-card:nth-child(4) { grid-column: 1 / span 3; }
.service-card:nth-child(5) { grid-column: 4 / span 3; }

.service-card {
    position: relative;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-card);
    padding: 30px 20px 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    cursor: default;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    isolation: isolate;
    transform: translate3d(0, 0, 0.01px);
    /* border-glow CSS vars */
    --edge-proximity: 0;
    --cursor-angle: 45deg;
    --glow-padding: 28px;
    --cone-spread: 25;
    --edge-sensitivity: 28;
    --color-sensitivity: 48;
}
.service-card:hover {
    background: var(--surface-hover);
    transform: translateY(-5px) translate3d(0, 0, 0.01px);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
}

/* border-glow: colour gradient border that follows the cursor */
.service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--surface) 0 100%) padding-box,
        linear-gradient(rgba(255, 255, 255, 0) 0 100%) border-box,
        radial-gradient(at 80% 55%, hsla(268, 100%, 76%, 1) 0px, transparent 50%) border-box,
        radial-gradient(at 30% 20%, hsla(349, 100%, 74%, 1) 0px, transparent 50%) border-box,
        radial-gradient(at  8%  6%, hsla(136, 100%, 78%, 1) 0px, transparent 50%) border-box,
        radial-gradient(at 50% 80%, hsla(192, 100%, 64%, 1) 0px, transparent 50%) border-box,
        linear-gradient(#178DF2 0 100%) border-box;
    opacity: calc((var(--edge-proximity) - var(--color-sensitivity)) / (100 - var(--color-sensitivity)));
    mask-image: conic-gradient(
        from var(--cursor-angle) at center,
        black        calc(var(--cone-spread) * 1%),
        transparent  calc((var(--cone-spread) + 15) * 1%),
        transparent  calc((100 - var(--cone-spread) - 15) * 1%),
        black        calc((100 - var(--cone-spread)) * 1%)
    );
    transition: opacity 0.25s ease-out;
    z-index: -1;
    pointer-events: none;
}
.service-card:not(:hover)::before {
    opacity: 0;
    transition: opacity 0.75s ease-in-out;
}

/* border-glow: outer edge-light halo */
.service-card > .edge-light {
    position: absolute;
    inset: calc(var(--glow-padding) * -1);
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
    mask-image: conic-gradient(
        from var(--cursor-angle) at center,
        black 2.5%, transparent 10%, transparent 90%, black 97.5%
    );
    opacity: calc((var(--edge-proximity) - var(--edge-sensitivity)) / (100 - var(--edge-sensitivity)));
    mix-blend-mode: plus-lighter;
    transition: opacity 0.25s ease-out;
}
.service-card:not(:hover) > .edge-light {
    opacity: 0;
    transition: opacity 0.75s ease-in-out;
}
.service-card > .edge-light::before {
    content: "";
    position: absolute;
    inset: var(--glow-padding);
    border-radius: inherit;
    box-shadow:
        inset 0 0  0px 1px hsl(210deg 80% 70% / 100%),
        inset 0 0  8px 0px hsl(210deg 80% 70% /  50%),
        inset 0 0 22px 0px hsl(210deg 80% 70% /  22%),
              0 0  8px 0px hsl(210deg 80% 70% /  38%),
              0 0 22px 2px hsl(210deg 80% 70% /  14%);
}

.service-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}
.service-desc {
    font-size: 0.76rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── CTA BUTTONS ── */
.cta-wrapper {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 48px;
    animation: fadeDown 0.6s 0.45s ease both;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 15px 32px;
    border-radius: var(--radius-pill);
    font-family: 'Unbounded', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}
/* shimmer on hover */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    transition: left 0.5s;
}
.cta-button:hover::before { left: 100%; }
.cta-button:hover  { transform: translateY(-3px) scale(1.02); filter: brightness(1.08); }
.cta-button:active { transform: translateY(0)    scale(0.98); }
.cta-button svg    { width: 17px; height: 17px; flex-shrink: 0; }

.cta-button--tg {
    background: linear-gradient(135deg, #178DF2 0%, #0b70d0 100%);
    color: #fff;
    box-shadow: 0 4px 22px rgba(23, 141, 242, 0.35);
}
.cta-button--tg:hover { box-shadow: 0 8px 34px rgba(23, 141, 242, 0.5); }

.cta-button--phone {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.cta-button--phone:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* ── DIVIDER ── */
.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    margin-bottom: 26px;
}

/* ── FOOTER ── */
.footer {
    text-align: center;
    font-size: 0.76rem;
    font-weight: 300;
    color: var(--text-faint);
    line-height: 2;
    animation: fadeDown 0.6s 0.55s ease both;
}
.footer a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s;
}
.footer a:hover { color: #6dbeff; }

/* ── KEYFRAMES ── */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
    .container { padding: 44px 16px 60px; }
    .logo-wrapper img { height: 52px; }

    .services-grid { grid-template-columns: 1fr 1fr; }
    /* reset desktop column placements */
    .service-card:nth-child(n)  { grid-column: span 1; }
    /* last card full-width on the 2-col grid */
    .service-card:nth-child(5)  { grid-column: 1 / -1; }
}

@media (max-width: 400px) {
    .services-grid { grid-template-columns: 1fr; }
    .service-card:nth-child(n) { grid-column: 1; }
    .cta-wrapper { flex-direction: column; align-items: center; }
}
