/* ═══════════════════════════════════════════════════════════════════
   Servent Apps — Landing Page Styles
   Brand: Dark, neon-accented, hexagon motif. Consistent with servent.co.uk
   ═══════════════════════════════════════════════════════════════════ */

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

/* ─── Design tokens ─── */
:root {
    /* Backgrounds */
    --bg-base: #07070f;
    --bg-surface: #0d0d1e;
    --bg-card: rgba(255, 255, 255, 0.042);
    --bg-card-hover: rgba(255, 255, 255, 0.075);

    /* Brand colours */
    --pink: #e91e8c;
    --pink-dim: rgba(233, 30, 140, 0.18);
    --pink-glow: rgba(233, 30, 140, 0.28);
    --cyan: #00d4ff;
    --cyan-dim: rgba(0, 212, 255, 0.15);
    --cyan-glow: rgba(0, 212, 255, 0.28);
    --blue: #1252d3;
    --blue-dim: rgba(18, 82, 211, 0.18);
    --blue-glow: rgba(18, 82, 211, 0.28);
    --purple: #7b2fff;
    --amber: #f59e0b;
    --amber-dim: rgba(245, 158, 11, 0.15);
    --amber-glow: rgba(245, 158, 11, 0.22);

    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #8a8aaa;
    --text-muted: #4a4a6a;

    /* Borders */
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.14);

    /* Misc */
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.28s;
}

/* ─── Base ─── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ══════════════════════════════════════════════════════════════════
   AMBIENT BACKGROUND
   ══════════════════════════════════════════════════════════════════ */

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.bg-glow--blue {
    width: 650px;
    height: 650px;
    background: var(--blue);
    opacity: 0.12;
    top: -220px;
    left: -180px;
    animation: glow-drift 22s var(--ease) infinite;
}

.bg-glow--pink {
    width: 520px;
    height: 520px;
    background: var(--pink);
    opacity: 0.1;
    top: 35%;
    right: -160px;
    animation: glow-drift 28s var(--ease) infinite reverse;
    animation-delay: -6s;
}

.bg-glow--cyan {
    width: 420px;
    height: 420px;
    background: var(--cyan);
    opacity: 0.08;
    bottom: 8%;
    left: 18%;
    animation: glow-drift 20s var(--ease) infinite;
    animation-delay: -12s;
}

@keyframes glow-drift {
    0%,
    100% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(28px, -24px) scale(1.06);
    }
    66% {
        transform: translate(-18px, 18px) scale(0.94);
    }
}

/* ─── Floating hex shapes ─── */
.hex-float {
    position: fixed;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.hex-float--1 {
    width: 84px;
    height: 84px;
    background: var(--pink-dim);
    top: 14%;
    left: 4%;
    animation: hex-bob 14s var(--ease) infinite;
}

.hex-float--2 {
    width: 52px;
    height: 52px;
    background: var(--cyan-dim);
    top: 58%;
    right: 6%;
    animation: hex-bob 17s var(--ease) infinite;
    animation-delay: -6s;
}

.hex-float--3 {
    width: 106px;
    height: 106px;
    background: var(--blue-dim);
    bottom: 18%;
    left: 8%;
    animation: hex-bob 19s var(--ease) infinite;
    animation-delay: -11s;
}

.hex-float--4 {
    width: 42px;
    height: 42px;
    background: rgba(123, 47, 255, 0.12);
    top: 42%;
    left: 48%;
    animation: hex-bob 11s var(--ease) infinite;
    animation-delay: -4s;
}

@keyframes hex-bob {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-22px) rotate(25deg);
    }
}

/* ══════════════════════════════════════════════════════════════════
   LAYOUT UTILITY
   ══════════════════════════════════════════════════════════════════ */
.container {
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 24px;
    position: relative;
    z-index: 1;
}

/* ══════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════ */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(7, 7, 15, 0.82);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-bottom: 1px solid var(--border);
    padding-block: 14px;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* Subtle pulse on the logo hexes */
.logo-svg {
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.35));
    animation: logo-pulse 4s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%,
    100% {
        filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.35));
    }
    50% {
        filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.55));
    }
}

.header__wordmark {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.header__wordmark strong {
    font-weight: 800;
    background: linear-gradient(130deg, var(--cyan) 0%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header__link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
    white-space: nowrap;
}

.header__link:hover {
    color: var(--cyan);
}

/* ══════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    padding-block: 100px 84px;
    text-align: center;
    overflow: hidden;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--pink-dim);
    border: 1px solid rgba(233, 30, 140, 0.28);
    color: var(--pink);
    font-size: 0.7875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 100px;
    margin-bottom: 28px;
    animation: fade-up 0.6s var(--ease) both;
}

.hero__title {
    font-size: clamp(2.6rem, 6.5vw, 4.25rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 22px;
    animation: fade-up 0.65s var(--ease) both;
    animation-delay: 0.09s;
}

.gradient-text {
    background: linear-gradient(
        135deg,
        var(--pink) 0%,
        var(--purple) 42%,
        var(--cyan) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-inline: auto;
    line-height: 1.72;
    animation: fade-up 0.65s var(--ease) both;
    animation-delay: 0.18s;
}

/* Rotating neon hex decoration */
.hero__hex-deco {
    position: absolute;
    right: 6%;
    top: 8%;
    width: 280px;
    height: 280px;
    opacity: 0.3;
    pointer-events: none;
    animation: spin-slow 32s linear infinite;
}

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

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══════════════════════════════════════════════════════════════════
   MAIN / CATEGORY SECTIONS
   ══════════════════════════════════════════════════════════════════ */
.main {
    padding-top: 56px;
    padding-bottom: 96px;
}

/* ─── Section divider ─── */
.section-divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--border-hover) 30%,
        var(--border-hover) 70%,
        transparent 100%
    );
    margin-block: 16px 64px;
}

/* ─── Category ─── */
.category {
    margin-bottom: 64px;
}

.category__header {
    margin-bottom: 36px;
    animation: fade-up 0.6s var(--ease) both;
    animation-delay: 0.05s;
}

.category__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 13px;
    border-radius: 100px;
    margin-bottom: 14px;
}

.category__badge--corporate {
    background: var(--cyan-dim);
    color: var(--cyan);
    border: 1px solid rgba(0, 212, 255, 0.25);
}

.category__badge--ai {
    background: var(--pink-dim);
    color: var(--pink);
    border: 1px solid rgba(233, 30, 140, 0.28);
}

.category__title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.category__desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════
   TILES GRID
   ══════════════════════════════════════════════════════════════════ */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 18px;
}

/* ══════════════════════════════════════════════════════════════════
   TILE
   ══════════════════════════════════════════════════════════════════ */
.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 28px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
    cursor: pointer;
    transition:
        background var(--duration) var(--ease),
        border-color var(--duration) var(--ease),
        transform var(--duration) var(--ease),
        box-shadow var(--duration) var(--ease);

    /* Staggered entrance animation */
    animation: fade-up 0.55s var(--ease) both;
}

/* Stagger delays */
.tiles-grid .tile:nth-child(1) {
    animation-delay: 0.1s;
}
.tiles-grid .tile:nth-child(2) {
    animation-delay: 0.16s;
}
.tiles-grid .tile:nth-child(3) {
    animation-delay: 0.22s;
}
.tiles-grid .tile:nth-child(4) {
    animation-delay: 0.28s;
}

.tile:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
}

/* ─── Top glow overlay (colour varies per tile) ─── */
.tile__glow {
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
    pointer-events: none;
    z-index: 0;
}

.tile:hover .tile__glow {
    opacity: 1;
}

/* ─── AI "pill" badge ─── */
.tile__ai-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 6px;
    background: linear-gradient(
        135deg,
        rgba(233, 30, 140, 0.18),
        rgba(123, 47, 255, 0.18)
    );
    border: 1px solid rgba(233, 30, 140, 0.35);
    color: var(--pink);
    z-index: 1;
}

/* ─── Icon ─── */
.tile__icon {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 54px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-shrink: 0;
    transition: transform var(--duration) var(--ease);
}

.tile:hover .tile__icon {
    transform: scale(1.1) rotate(-3deg);
}

/* ─── Content ─── */
.tile__content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.tile__name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
    transition: color var(--duration) var(--ease);
}

.tile__desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 16px;
}

.tile__url {
    font-size: 0.775rem;
    font-family: "Courier New", Courier, monospace;
    color: var(--text-muted);
    transition: color var(--duration) var(--ease);
}

.tile:hover .tile__url {
    color: var(--text-secondary);
}

/* ─── Arrow ─── */
.tile__arrow {
    position: absolute;
    bottom: 22px;
    right: 24px;
    z-index: 1;
    font-size: 1.15rem;
    opacity: 0;
    transform: translate(-6px, 6px);
    transition:
        opacity var(--duration) var(--ease),
        transform var(--duration) var(--ease);
    color: var(--text-secondary);
}

.tile:hover .tile__arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* ══════════════════════════════════════════════════════════════════
   PER-TILE COLOUR THEMING
   ══════════════════════════════════════════════════════════════════ */

/* ─── Docs (cyan) ─── */
.tile--docs .tile__icon {
    background: var(--cyan-dim);
    color: var(--cyan);
}
.tile--docs .tile__glow {
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(0, 212, 255, 0.09) 0%,
        transparent 70%
    );
}
.tile--docs:hover {
    border-color: rgba(0, 212, 255, 0.32);
    box-shadow:
        0 0 28px -6px var(--cyan-glow),
        0 22px 48px -12px rgba(0, 0, 0, 0.45);
}
.tile--docs:hover .tile__name {
    color: var(--cyan);
}

/* ─── Links (blue) ─── */
.tile--links .tile__icon {
    background: var(--blue-dim);
    color: #4d8bff;
}
.tile--links .tile__glow {
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(18, 82, 211, 0.1) 0%,
        transparent 70%
    );
}
.tile--links:hover {
    border-color: rgba(18, 82, 211, 0.32);
    box-shadow:
        0 0 28px -6px var(--blue-glow),
        0 22px 48px -12px rgba(0, 0, 0, 0.45);
}
.tile--links:hover .tile__name {
    color: #4d8bff;
}

/* ─── Secrets (purple) ─── */
.tile--secrets .tile__icon {
    background: rgba(123, 47, 255, 0.14);
    color: #a78bfa;
}
.tile--secrets .tile__glow {
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(123, 47, 255, 0.1) 0%,
        transparent 70%
    );
}
.tile--secrets:hover {
    border-color: rgba(123, 47, 255, 0.32);
    box-shadow:
        0 0 28px -6px rgba(123, 47, 255, 0.28),
        0 22px 48px -12px rgba(0, 0, 0, 0.45);
}
.tile--secrets:hover .tile__name {
    color: #a78bfa;
}

/* ─── Copilot Leaderboard (pink) ─── */
.tile--copilot .tile__icon {
    background: var(--pink-dim);
    color: var(--pink);
}
.tile--copilot .tile__glow {
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(233, 30, 140, 0.09) 0%,
        transparent 70%
    );
}
.tile--copilot:hover {
    border-color: rgba(233, 30, 140, 0.32);
    box-shadow:
        0 0 28px -6px var(--pink-glow),
        0 22px 48px -12px rgba(0, 0, 0, 0.45);
}
.tile--copilot:hover .tile__name {
    color: var(--pink);
}

/* ─── PQQ Buddy (cyan) ─── */
.tile--pqq .tile__icon {
    background: var(--cyan-dim);
    color: var(--cyan);
}
.tile--pqq .tile__glow {
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(0, 212, 255, 0.1) 0%,
        transparent 70%
    );
}
.tile--pqq:hover {
    border-color: rgba(0, 212, 255, 0.32);
    box-shadow:
        0 0 28px -6px var(--cyan-glow),
        0 22px 48px -12px rgba(0, 0, 0, 0.45);
}
.tile--pqq:hover .tile__name {
    color: var(--cyan);
}

/* ─── Call Center Buddy (pink) ─── */
.tile--callcenter .tile__icon {
    background: var(--pink-dim);
    color: var(--pink);
}
.tile--callcenter .tile__glow {
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(233, 30, 140, 0.1) 0%,
        transparent 70%
    );
}
.tile--callcenter:hover {
    border-color: rgba(233, 30, 140, 0.32);
    box-shadow:
        0 0 28px -6px var(--pink-glow),
        0 22px 48px -12px rgba(0, 0, 0, 0.45);
}
.tile--callcenter:hover .tile__name {
    color: var(--pink);
}

/* ─── Blackout Buddy (amber) ─── */
.tile--blackout .tile__icon {
    background: var(--amber-dim);
    color: var(--amber);
}
.tile--blackout .tile__glow {
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(245, 158, 11, 0.1) 0%,
        transparent 70%
    );
}
.tile--blackout:hover {
    border-color: rgba(245, 158, 11, 0.32);
    box-shadow:
        0 0 28px -6px var(--amber-glow),
        0 22px 48px -12px rgba(0, 0, 0, 0.45);
}
.tile--blackout:hover .tile__name {
    color: var(--amber);
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */
.footer {
    border-top: 1px solid var(--border);
    padding-block: 34px;
    position: relative;
    z-index: 1;
}

.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.footer__copy {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.footer__link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
    white-space: nowrap;
}

.footer__link:hover {
    color: var(--cyan);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero {
        padding-block: 70px 60px;
    }

    .hero__hex-deco {
        width: 160px;
        height: 160px;
        opacity: 0.18;
        top: 6%;
        right: 2%;
    }

    .tiles-grid {
        grid-template-columns: 1fr;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    /* Hide some deco on smaller screens */
    .hex-float--3,
    .hex-float--4 {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero__hex-deco {
        display: none;
    }

    .header__link {
        display: none;
    }

    .tile {
        padding: 22px 22px 32px;
    }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
