/* iApps Software — landing site (dark theme, lime accent) */

:root {
    --c-bg:        #0a0915;     /* near-black violet */
    --c-bg-card:   #131129;     /* card surface */
    --c-bg-card-2: #181530;     /* alt card */
    --c-border:    #221f3e;
    --c-text:      #fafafa;
    --c-text-mute: #c4c4c4;
    --c-text-dim:  #8a8aa3;
    --c-accent:    #d9fe54;     /* lime */
    --c-accent-deep:#bce434;
    --c-on-accent: #060703;

    --radius:      18px;
    --radius-sm:   12px;
    --radius-pill: 999px;
    --shadow-md:   0 24px 60px rgba(0,0,0,.45);
    --container:   1200px;

    --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --space-1: .5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-6: 3rem;
    --space-8: 5rem;
    --space-10: 7rem;
}

* { box-sizing: border-box; }
html {
    scroll-padding-top: 96px;          /* clear sticky header for any native focus jumps */
    scroll-behavior: auto;             /* JS handles eased scrolling explicitly */
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
    margin: 0;
    position: relative;          /* anchor for the page-wide gradient ::before */
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-sans);
    font-weight: 500;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* ── Page-wide blue gradient blobs (from Figma "BG Pattern") ──
   Four LOCALIZED radial-gradient blobs scattered down the page, mirroring
   Ellipse 4/5/6/7 from Figma nodes 8:2017 + 14:219. Each blob is a #010950
   deep-navy core that fades to transparent within ~25% of the body width.
   The pseudo-element covers the entire body so the blobs scroll with the
   page content. z-index -2 puts it underneath the dotted surface. */
body::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        /* Behind the hero section ("Unlock your business potential…") */
        radial-gradient(circle 550px at 50% 5%,  rgba(1, 9, 80, .9) 0%, rgba(1, 9, 80, 0) 70%),
        /* Behind the About Us / hero-person section */
        radial-gradient(circle 500px at 50% 28%, rgba(1, 9, 80, .85) 0%, rgba(1, 9, 80, 0) 70%),
        /* Behind the "Why Choose Us?" section */
        radial-gradient(circle 500px at 50% 72%, rgba(1, 9, 80, .85) 0%, rgba(1, 9, 80, 0) 70%);
    background-repeat: no-repeat;
}

img { max-width: 100%; height: auto; display: block; }

/* ── Dotted-surface WebGL background ──
   Vanilla-JS port of the React DottedSurface component. The container is
   fixed to the viewport, three.js attaches a <canvas> child via JS at
   runtime. z-index -1 puts it ABOVE the body::before blue gradient blobs
   but BEHIND every page element (default z-index 0). pointer-events:none
   so it never intercepts clicks even though it covers the whole viewport. */
.dotted-surface {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    /* The grid is decorative, never interactive — make it invisible to ATs. */
    contain: strict;
}
.dotted-surface canvas {
    display: block;
}

/* ── Tooltip (vanilla CSS, data-attribute driven) ─────────
   Shows on hover/focus for any element with .has-tooltip +
   data-tip-title / data-tip-text attributes. The tooltip is
   a JS-created floating <div> positioned next to the trigger.
   Styled to match the Figma dark theme — dark card with lime
   accent title. Replaces the React/Radix tooltip component
   from the originui/shadcn template, which can't run in this
   ASP.NET MVC project. */
.site-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 420px;
    padding: var(--space-4) var(--space-4);
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px) scale(.97);
    transition: opacity .15s ease, transform .15s ease;
}
.site-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.site-tooltip__title {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-accent);
    margin: 0 0 .5rem;
    line-height: 1.3;
}
.site-tooltip__text {
    font-family: var(--font-sans);
    font-size: .95rem;
    font-weight: 500;
    color: var(--c-text-mute);
    margin: 0;
    line-height: 1.6;
}
/* Cursor hint for cards with tooltips */
.has-tooltip { cursor: default; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

h1, h2, h3, h4 {
    margin: 0 0 var(--space-3);
    font-family: var(--font-sans);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--c-text);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 var(--space-2); color: var(--c-text-mute); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-3); }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--c-accent); color: var(--c-on-accent);
    padding: .6rem 1rem; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; border-radius: 8px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .95rem 1.6rem;
    border-radius: var(--radius-pill);
    font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1;
    border: 2px solid transparent; cursor: pointer;
    transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn--primary {
    background: var(--c-accent);
    color: var(--c-on-accent);
}
.btn--primary:hover { background: var(--c-accent-deep); box-shadow: 0 10px 30px rgba(217,254,84,.25); }
.btn--ghost {
    background: transparent;
    color: var(--c-text);
    border-color: rgba(255,255,255,.18);
}
.btn--ghost:hover { border-color: var(--c-accent); color: var(--c-accent); }
.btn--dark {
    background: var(--c-bg);
    color: var(--c-accent);
}
.btn--dark:hover { background: #000; }

.btn .arrow { font-size: 1.05em; transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 9, 21, .82);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-3); padding: var(--space-2) var(--space-3);
}
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 800; color: var(--c-text); font-size: 1.1rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand__mark {
    /* Real Figma logo (lime stacked-cube mark, ~52x46 source).
       Constrain to a comfortable header height; preserve aspect ratio. */
    display: inline-block;
    width: auto;
    height: 38px;
    object-fit: contain;
}
.site-nav ul { display: flex; gap: var(--space-4); list-style: none; padding: 0; margin: 0; }
.site-nav a {
    position: relative;
    color: var(--c-text-mute);
    font-weight: 600;
    font-size: .95rem;
    padding: .35rem 0;
    transition: color .18s ease;
}
.site-nav a:hover { color: var(--c-accent); text-decoration: none; }
.site-nav a.is-active { color: var(--c-accent); }
.site-nav a.is-active::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -2px;
    height: 2px; border-radius: 2px;
    background: var(--c-accent);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid rgba(255,255,255,.18);
    color: var(--c-text);
    width: 44px; height: 44px;
    border-radius: 12px;
    cursor: pointer;
    align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle[aria-expanded="true"] { border-color: var(--c-accent); color: var(--c-accent); }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .site-header__cta { display: none; }
    .site-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: rgba(10, 9, 21, .98);
        backdrop-filter: saturate(140%) blur(12px);
        border-bottom: 1px solid var(--c-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
    }
    .site-nav[data-open="true"] { max-height: 70vh; }
    .site-nav ul {
        flex-direction: column;
        gap: 0;
        padding: var(--space-2) var(--space-3);
    }
    .site-nav li { border-bottom: 1px solid var(--c-border); }
    .site-nav li:last-child { border-bottom: none; }
    .site-nav a { display: block; padding: var(--space-2) 0; font-size: 1rem; }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: var(--space-10) 0 var(--space-8);
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
    background:
        radial-gradient(900px 480px at 50% -10%, rgba(217,254,84,.10), transparent 60%),
        radial-gradient(700px 480px at 90% 100%, rgba(217,254,84,.06), transparent 60%);
}
.hero__inner { max-width: 880px; margin: 0 auto; }
.eyebrow {
    display: inline-block;
    text-transform: none;
    font-size: .9rem;
    color: var(--c-text-mute);
    font-weight: 600;
    margin-bottom: var(--space-3);
}
.hero h1 .accent { color: var(--c-accent); font-style: italic; font-weight: 800; }
.hero .lede {
    font-size: 1.05rem;
    max-width: 60ch;
    margin: var(--space-3) auto var(--space-4);
    color: var(--c-text-mute);
}
.hero__actions {
    display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap;
    margin-top: var(--space-3);
}

/* ── Section heading ─────────────────────────────────────── */
.section-head { margin-bottom: var(--space-6); }
.section-head--center { text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }
.section-head p { color: var(--c-text-mute); }

/* ── Services (4 cards row) ──────────────────────────────── */
.services { padding: var(--space-8) 0; }
.services .section-head__row { display: flex; align-items: end; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-6); }
.services .section-head__row p { max-width: 56ch; margin: 0; }
.services .see-more { color: var(--c-accent); font-weight: 700; }

.card-grid { display: grid; gap: var(--space-3); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1024px) { .card-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .card-grid--4, .card-grid--2 { grid-template-columns: 1fr; } }

.card {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(217,254,84,.35); }
.card__icon {
    display: inline-grid; place-items: center;
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--c-accent);
    color: var(--c-on-accent);
    margin-bottom: var(--space-3);
}
.card__icon svg, .card__icon img { width: 32px; height: 32px; display: block; }
.card h3 { margin-bottom: .5rem; }
.card p  { color: var(--c-text-dim); font-size: .95rem; }

/* ── About ───────────────────────────────────────────────── */
.about { padding: var(--space-8) 0; }
.about__inner {
    display: grid;
    grid-template-columns: minmax(280px, 460px) 1fr;
    gap: var(--space-8);
    align-items: center;
}
@media (max-width: 900px) {
    .about__inner { grid-template-columns: 1fr; gap: var(--space-6); }
}
.about__art {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: var(--radius);
    overflow: hidden;
}
.about__art::before {
    content: "";
    position: absolute; inset: 8% 8% 18% 8%;
    background: var(--c-accent);
    border-radius: 50%;
    z-index: 0;
}
/* <picture> defaults to display:inline, which makes percent height on the
   inner <img> unreliable. Promote it to a block-level fill of .about__art. */
.about__art picture {
    display: block;
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}
.about__art picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: var(--radius);
}
.about__copy h2 { margin-bottom: var(--space-3); }
.about__copy p  { color: var(--c-text-mute); margin-bottom: var(--space-4); }

/* ── Features (Best solutions) ───────────────────────────── */
.features { padding: var(--space-8) 0; }
.features .section-head h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}
@media (max-width: 800px) { .features-grid { grid-template-columns: 1fr; } }
.feature {
    background: transparent;
    padding: 0;
}
.feature h3 {
    color: #ffffff;
    margin-top: var(--space-3);
}
.feature .see-more {
    display: inline-flex; align-items: center; gap: .35rem;
    color: var(--c-accent);
    font-weight: 600;
    margin-top: var(--space-2);
    text-decoration: none;
}
.feature .see-more:hover { text-decoration: underline; }
.feature__art {
    /* Dark backdrop to match Figma node 14:992 — earlier turns experimented
       with a lime panel which made several feature icons (project mgmt,
       government, large-corp) lose their dark detail. Reverted. */
    width: 100%;
    aspect-ratio: 3/2;
    background: var(--c-bg);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-sm);
    display: grid; place-items: center;
    margin-bottom: var(--space-3);
    padding: var(--space-4);
}
.feature__art svg { width: 96px; height: 96px; color: var(--c-accent); }
.feature__art img {
    /* Force a fixed visual size regardless of source viewBox.
       SVGs scale cleanly so a 65x65 source will render at 200x200 just as
       crisply as a 285x285 source. Without this rule the lime ellipse on
       the small business/devops/software-eng icons rendered at their native
       65px and looked tiny next to the 285px partner-section icons. */
    width: 200px;
    height: 200px;
    max-width: 80%;
    max-height: 90%;
    object-fit: contain;
    display: block;
}
.feature h3 { font-size: 1.4rem; line-height: 1.25; margin-bottom: .65rem; }
.feature p  { color: var(--c-text-mute); }

.features__more { display: flex; justify-content: center; margin-top: var(--space-6); }

/* Second feature section (Best Solutions partners) — same grid, no header,
   tighter top padding so it visually flows from the first section. */
.features--alt { padding-top: var(--space-4); }

/* ── Why us ──────────────────────────────────────────────── */
.why { padding: var(--space-8) 0; }
.why__inner {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: var(--space-6);
    align-items: start;
}
@media (max-width: 900px) { .why__inner { grid-template-columns: 1fr; } }
.why__intro h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.why__intro p  { color: var(--c-text-mute); margin-bottom: var(--space-4); }
.why__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}
@media (max-width: 640px) { .why__grid { grid-template-columns: 1fr; } }
.why__item {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--space-4);
}
.why__icon {
    /* Why-Us SVGs from Figma already bake in the lime ellipse background,
       so we just constrain the box and let the icon paint itself. */
    display: inline-block;
    width: 49px; height: 49px;
    margin-bottom: var(--space-2);
    line-height: 0;
}
.why__icon svg, .why__icon img { width: 49px; height: 49px; display: block; }
.why__item h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.why__item p  { color: var(--c-text-dim); font-size: .9rem; margin: 0; }

/* ── CTA / contact ───────────────────────────────────────── */
.cta { padding: var(--space-8) 0 var(--space-6); }
.cta__card {
    background: var(--c-accent);
    color: var(--c-on-accent);
    border-radius: var(--radius);
    padding: var(--space-8) var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-md);
}
.cta__card h2 { color: var(--c-on-accent); font-size: clamp(2rem, 4vw, 3rem); }
.cta__card p  { color: var(--c-on-accent); opacity: .8; max-width: 60ch; margin-left: auto; margin-right: auto; }

.cta__sent {
    background: rgba(0,0,0,.12);
    color: var(--c-on-accent);
    padding: .75rem 1rem; border-radius: var(--radius-sm);
    font-weight: 700;
    margin: var(--space-3) auto;
    max-width: 32rem;
}

.contact-form {
    display: grid; gap: var(--space-2);
    max-width: 520px;
    margin: var(--space-4) auto 0;
    text-align: left;
}
.form-row { display: grid; gap: .35rem; }
.form-row label { font-weight: 700; font-size: .85rem; color: var(--c-on-accent); text-transform: uppercase; letter-spacing: .05em; }
.form-row input, .form-row textarea {
    width: 100%;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(0,0,0,.18);
    background: rgba(0,0,0,.06);
    color: var(--c-on-accent);
    font: inherit;
}
.form-row input:focus, .form-row textarea:focus {
    outline: none;
    border-color: var(--c-on-accent);
    background: rgba(255,255,255,.6);
}
.form-row input[aria-invalid="true"],
.form-row textarea[aria-invalid="true"] {
    border-color: #8b0000;
    background: rgba(139, 0, 0, .08);
}
.form-row input[aria-invalid="true"]:focus,
.form-row textarea[aria-invalid="true"]:focus {
    border-color: #8b0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, .18);
}
.field-error { color: #5a0a0a; font-size: .85rem; font-weight: 700; min-height: 1.1em; }
.form-errors { color: #5a0a0a; font-weight: 700; }
.contact-form button { justify-self: start; margin-top: var(--space-2); }

/* ── Honeypot (hidden but reachable to bots) ─────────────── */
.hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ── Modal dialog ────────────────────────────────────────── */
dialog.modal {
    border: none;
    padding: 0;
    background: transparent;
    color: var(--c-text);
    max-width: 480px;
    width: calc(100% - 2rem);
    border-radius: var(--radius);
    overflow: visible;
}
dialog.modal::backdrop {
    background: rgba(6, 7, 3, .72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
dialog.modal[open] {
    animation: modal-pop .22s ease-out;
}
@keyframes modal-pop {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.modal__inner {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--space-6) var(--space-4) var(--space-4);
    text-align: center;
    box-shadow: var(--shadow-md);
}
.modal__icon {
    display: grid; place-items: center;
    width: 72px; height: 72px; border-radius: 50%;
    margin: 0 auto var(--space-3);
    background: var(--c-accent);
    color: var(--c-on-accent);
}
.modal__icon svg { width: 36px; height: 36px; }
.modal h2 { color: var(--c-text); margin-bottom: var(--space-2); }
.modal p  { color: var(--c-text-mute); margin-bottom: var(--space-4); }
.modal form { margin: 0; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--c-bg);
    color: var(--c-text-mute);
    padding: var(--space-6) 0 var(--space-4);
    border-top: 1px solid var(--c-border);
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-4);
}
@media (max-width: 700px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer__lede { color: var(--c-text); font-size: 1.4rem; font-weight: 700; max-width: 26ch; line-height: 1.3; }
.site-footer__heading { font-size: .85rem; color: var(--c-text); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--space-2); }
.site-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.site-footer__links a, .site-footer address a { color: var(--c-text-mute); }
.site-footer__links a:hover, .site-footer address a:hover { color: var(--c-accent); text-decoration: none; }
.site-footer address { font-style: normal; }
.site-footer address p { margin: 0 0 .25rem; }
.site-footer__bottom { border-top: 1px solid var(--c-border); margin-top: var(--space-4); padding-top: var(--space-3); color: var(--c-text-dim); font-size: .85rem; }

/* ── Technology marquee ───────────────────────────────── */
.marquee {
    padding: var(--space-6) 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 50s linear infinite;
}
.marquee__set {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    padding-right: var(--space-8);
}
.marquee__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    pointer-events: auto;
    /* Make all SVGs a uniform muted gray that works on the dark background.
       brightness(0) flattens to black, invert(1) flips to white,
       then we dial brightness + opacity back to a soft gray. */
    filter: brightness(0) invert(1);
    opacity: .55;
    transition: opacity .3s ease, filter .3s ease;
}
.marquee__icon:hover {
    opacity: .9;
    filter: brightness(0) invert(1);
}

@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee__track:hover {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .marquee__track {
        animation: none;
        width: auto;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-4);
    }
    .marquee__set { flex-wrap: wrap; justify-content: center; }
}
