/* ==========================================================================
   UP TECH — Base: design tokens, typography, layout primitives, motion
   ========================================================================== */

:root {
    /* Brand */
    --c-primary: #4361FF;
    --c-primary-600: #3049E6;
    --c-primary-50: #EEF1FF;
    --c-violet: #7B5CFF;
    --c-mint: #22D3A6;
    --c-mint-600: #12A882;
    --c-wa: #25D366;
    --c-wa-ink: #05361A;

    /* Neutrals (dark) */
    --c-ink-950: #070B18;
    --c-ink-900: #0B1124;
    --c-ink-800: #131A33;
    --c-ink-700: #1E2747;
    --c-ink-line: rgba(255, 255, 255, .09);
    --c-on-dark: #E7EAF6;
    --c-on-dark-muted: #A3ABC7;

    /* Neutrals (light) */
    --c-bg: #FFFFFF;
    --c-soft: #F5F7FC;
    --c-text: #0E1428;
    --c-muted: #535C7A;
    --c-line: #E3E7F2;

    --grad-brand: linear-gradient(120deg, #4361FF 0%, #7B5CFF 52%, #22D3A6 100%);
    --grad-text: linear-gradient(110deg, #7C93FF 0%, #A78BFF 45%, #3FE0B5 100%);

    /* Type */
    --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Shape & depth */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 30px;
    --shadow-sm: 0 1px 2px rgba(14, 20, 40, .06), 0 2px 8px rgba(14, 20, 40, .04);
    --shadow-md: 0 10px 30px -12px rgba(14, 20, 40, .18), 0 4px 10px -6px rgba(14, 20, 40, .08);
    --shadow-lg: 0 30px 60px -20px rgba(14, 20, 40, .28), 0 12px 24px -12px rgba(14, 20, 40, .12);
    --shadow-glow: 0 18px 40px -12px rgba(67, 97, 255, .55);

    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --header-h: 76px;

    /* Bootstrap overrides */
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--c-text);
    --bs-body-bg: var(--c-bg);
    --bs-link-color-rgb: 67, 97, 255;
    --bs-border-color: var(--c-line);
    --bs-focus-ring-color: rgba(67, 97, 255, .35);
}

/* -------------------------------------------------------------- Base ---- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: inherit;
}

p { margin-bottom: 1rem; }
img, svg { max-width: 100%; }
img { height: auto; }

a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-primary-600); }

::selection { background: rgba(67, 97, 255, .2); }

:focus-visible {
    outline: 3px solid var(--c-primary);
    outline-offset: 3px;
    border-radius: 6px;
}

.icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }

.skip-link {
    position: fixed;
    left: 16px;
    top: -60px;
    z-index: 2000;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--c-primary);
    color: #fff;
    font-weight: 600;
    transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }

/* -------------------------------------------------------- Containers ---- */
.container-xl { --bs-gutter-x: 2.5rem; max-width: 1280px; }
@media (max-width: 575.98px) { .container-xl { --bs-gutter-x: 2rem; } }

/* ---------------------------------------------------------- Sections ---- */
.section { position: relative; padding: clamp(72px, 9vw, 120px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.section--tight-top { padding-top: clamp(32px, 4vw, 56px); }
.section--soft { background: var(--c-soft); }
.section--dark {
    background: var(--c-ink-950);
    color: var(--c-on-dark);
    overflow: hidden;
    isolation: isolate;
}

.section-heading { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-heading--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading--start { text-align: left; }
.section-heading .section-lead { margin-bottom: 0; }

.section-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head-row .section-heading { margin-bottom: 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-primary);
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-brand);
}
.section-heading--center .eyebrow::after {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-brand);
}
.eyebrow--light { color: #93A6FF; }

.section-title {
    font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem);
    margin-bottom: 16px;
    text-wrap: balance;
}
.section-lead {
    font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
    color: var(--c-muted);
    text-wrap: pretty;
}
.section-heading--light .section-lead { color: var(--c-on-dark-muted); }

.text-gradient {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
/* On light backgrounds use the deeper brand gradient for contrast */
.section:not(.section--dark) .section-title .text-gradient,
.section-heading:not(.section-heading--light) .text-gradient {
    background-image: linear-gradient(110deg, #3653F0 0%, #6D4DF5 55%, #0E9F7B 100%);
}

.prose p { color: var(--c-muted); font-size: 1.05rem; }
.prose strong { color: var(--c-text); }

.h-sub { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); margin-bottom: 18px; }
.h-sub--sm { font-size: 1.2rem; margin-top: 36px; }

/* ----------------------------------------------------- Background art ---- */
.hero-bg, .section-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    will-change: transform;
}
.blob--1 {
    width: 46vw; height: 46vw; max-width: 640px; max-height: 640px;
    top: -18%; right: -8%;
    background: radial-gradient(circle, rgba(67, 97, 255, .85), rgba(67, 97, 255, 0) 70%);
    animation: drift 18s ease-in-out infinite alternate;
}
.blob--2 {
    width: 36vw; height: 36vw; max-width: 520px; max-height: 520px;
    bottom: -20%; left: -10%;
    background: radial-gradient(circle, rgba(34, 211, 166, .55), rgba(34, 211, 166, 0) 70%);
    animation: drift 22s ease-in-out infinite alternate-reverse;
}
.blob--3 {
    width: 50vw; height: 50vw; max-width: 700px; max-height: 700px;
    top: -25%; left: 30%;
    background: radial-gradient(circle, rgba(123, 92, 255, .45), rgba(123, 92, 255, 0) 70%);
    animation: drift 26s ease-in-out infinite alternate;
}
.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-6%, 8%, 0) scale(1.08); }
}

/* -------------------------------------------------- Scroll reveal ---- */
/* Only hide content when JS is running, so no-JS visitors see everything. */
.js [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
    transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* -------------------------------------------------- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        transition-delay: 0s !important;
    }
    .js [data-reveal] { opacity: 1; transform: none; }
}

/* Small screens: calmer background motion, cheaper blur */
@media (max-width: 767.98px) {
    .blob { animation: none; filter: blur(50px); opacity: .45; }
    .js [data-reveal] { transform: translate3d(0, 16px, 0); transition-duration: .6s; }
}
