/* =========================================================================
   LIME EFFECTS — site-wide patches, patterns and glow effects
   Colour: #E2F163  (RGB 226, 241, 99)

   HOW TO USE
   Link this file LAST on every page (after style.css / styles.css /
   pricing.css, or after your <style> block):
       <link rel="stylesheet" href="lime-effects.css">

   PART 1  — automatic: a soft aurora glow BEHIND the content (calm by default)
   PART 2  — optional utility classes you can add to any section/card
   Dial everything down or up with --fx-intensity (0 = off, 1 = default).
   ========================================================================= */

:root {
    --accent: #E2F163;
    --accent-rgb: 226, 241, 99;
    --accent-hi: #f4fba6;
    --accent-lo: #b6ca36;
    --accent-ink: #080806;
    --accent-grad: linear-gradient(120deg, var(--accent-hi) 0%, var(--accent) 45%, var(--accent-lo) 100%);
    --accent-text-grad: linear-gradient(110deg, var(--accent-hi), var(--accent) 50%, #a9bf2a);

    --fx-intensity: 1;

    accent-color: var(--accent);
    caret-color: var(--accent);
}

/* =========================================================================
   PART 1 — AUTOMATIC SITE-WIDE EFFECTS
   ========================================================================= */

/* ---- 1a. Aurora patches: soft lime light that slowly drifts ------------- */
html::before {
    content: "";
    position: fixed;
    inset: -12%;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: calc(.45 * var(--fx-intensity));
    background:
        radial-gradient(38vmax 28vmax at 10% 16%, rgba(var(--accent-rgb), .20), transparent 70%),
        radial-gradient(32vmax 26vmax at 92% 30%, rgba(var(--accent-rgb), .13), transparent 70%),
        radial-gradient(40vmax 30vmax at 68% 96%, rgba(var(--accent-rgb), .16), transparent 70%),
        radial-gradient(22vmax 18vmax at 30% 62%, rgba(var(--accent-rgb), .08), transparent 70%);
    will-change: transform;
    animation: limeDriftA 26s ease-in-out infinite alternate;
}


/* ---- 1z. CONTENT ABOVE THE EFFECT LAYERS -------------------------------
   The aurora layer above is fixed at z-index 0 (behind content).
   This puts the page's own sections on top (z-index 1) so the pattern can
   never wash out text, cards or the demo video.
   :where() = zero specificity, so anything you've positioned yourself wins. */
:where(main, section, .section, footer) {
    position: relative;
    z-index: 1;
}

/* ---- 1b. Optional faint dot + plus pattern (OFF by default) ------------
   Turn it on for a page with:  <html data-pattern="dots">
   Sits behind the content, strongest at the screen edges, clear in the middle. */
html[data-pattern="dots"]::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: calc(.14 * var(--fx-intensity));
    background-image:
        radial-gradient(rgba(var(--accent-rgb), .7) 1px, transparent 1.5px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130'%3E%3Cpath d='M65 59v12M59 65h12' stroke='%23E2F163' stroke-width='1' stroke-linecap='round' opacity='.8'/%3E%3C/svg%3E");
    background-size: 26px 26px, 130px 130px;
    -webkit-mask-image: radial-gradient(ellipse 72% 66% at 50% 50%, transparent 28%, #000 100%);
    mask-image: radial-gradient(ellipse 72% 66% at 50% 50%, transparent 28%, #000 100%);
}

/* ---- 1c. Scroll-driven aurora parallax (browsers that support it) ------- */
@supports (animation-timeline: scroll()) {
    html::before {
        animation-name: limeDriftA, limeParallax;
        animation-duration: 26s, auto;
        animation-timing-function: ease-in-out, linear;
        animation-iteration-count: infinite, 1;
        animation-direction: alternate, normal;
        animation-fill-mode: none, both;
        animation-timeline: auto, scroll(root block);
    }
}

/* ---- 1d. Automatic patches on sections that have no background of their own.
        :where() = zero specificity, so any section you've already styled
        keeps its look; only plain sections get a patch. ------------------- */
:where(section:nth-of-type(3n+1), .section:nth-of-type(3n+1)) {
    background-image: radial-gradient(42vmax 28vmax at 100% 0%, rgba(var(--accent-rgb), .09), transparent 70%);
    background-repeat: no-repeat;
}

:where(section:nth-of-type(3n+2), .section:nth-of-type(3n+2)) {
    background-image: radial-gradient(42vmax 28vmax at 0% 50%, rgba(var(--accent-rgb), .08), transparent 70%);
    background-repeat: no-repeat;
}

:where(section:nth-of-type(3n), .section:nth-of-type(3n)) {
    background-image: radial-gradient(46vmax 26vmax at 80% 100%, rgba(var(--accent-rgb), .09), transparent 70%);
    background-repeat: no-repeat;
}

/* ---- 1e. Small polish that applies everywhere --------------------------- */
hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), .55);
    opacity: .6;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .15);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #080806; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-lo), var(--accent));
    border-radius: 10px;
    border: 2px solid #080806;
}

/* ---- Keyframes ---------------------------------------------------------- */
@keyframes limeDriftA {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(3.5%, -3%, 0) scale(1.07); }
    100% { transform: translate3d(-3%, 3.5%, 0) scale(1.03); }
}

@keyframes limeParallax {
    from { translate: 0 0; }
    to   { translate: 0 -14vh; }
}

@keyframes limeProgress { to { transform: scaleX(1); } }

/* =========================================================================
   PART 2 — OPTIONAL UTILITY CLASSES (add to any section, card or panel)

   <section class="lime-fx lime-dots lime-patch-tr lime-patch-bl"> … </section>

   .lime-fx          base class (required for patterns/patches/blobs)
   PATTERNS          .lime-dots  .lime-grid  .lime-stripes  .lime-rings
   PATCHES           .lime-patch-tl  -tr  -bl  -br  -c      (combine freely)
   STRENGTH          .lime-soft (lighter)   .lime-strong (bolder)
   BLOBS             <span class="lime-blob"></span>    (+ .sm / .lg)
   OTHER             .lime-border  .lime-text  .lime-mark  .lime-divider  .lime-progress
                     .lime-badge  .lime-glow
   ========================================================================= */

.lime-fx {
    position: relative;
    isolation: isolate;
    overflow: clip;
    --fx-pattern: none;
    --fx-size: 28px;
    --p-tl: none; --p-tr: none; --p-bl: none; --p-br: none; --p-c: none;
}

/* keep real content above the effect layers (zero specificity: never overrides
   an element that already sets its own position / z-index) */
:where(.lime-fx > *) { position: relative; z-index: 1; }

/* pattern layer */
.lime-fx::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: var(--fx-pattern);
    background-size: var(--fx-size) var(--fx-size);
    opacity: calc(.32 * var(--fx-intensity));
    -webkit-mask-image: radial-gradient(ellipse at center, transparent 22%, #000 100%);
    mask-image: radial-gradient(ellipse at center, transparent 22%, #000 100%);
}

/* patch layer */
.lime-fx::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: var(--p-tl), var(--p-tr), var(--p-bl), var(--p-br), var(--p-c);
    background-repeat: no-repeat;
    opacity: calc(var(--fx-opacity, 1) * var(--fx-intensity));
}

.lime-soft   { --fx-opacity: .55; }
.lime-strong { --fx-opacity: 1.5; }

/* patterns */
.lime-dots    { --fx-pattern: radial-gradient(rgba(var(--accent-rgb), .8) 1px, transparent 1.6px); --fx-size: 26px; }
.lime-grid    { --fx-pattern: linear-gradient(rgba(var(--accent-rgb), .4) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--accent-rgb), .4) 1px, transparent 1px); --fx-size: 56px; }
.lime-stripes { --fx-pattern: repeating-linear-gradient(135deg, rgba(var(--accent-rgb), .6) 0 1px, transparent 1px 15px); --fx-size: auto; }
.lime-rings   { --fx-pattern: repeating-radial-gradient(circle at 82% 18%, rgba(var(--accent-rgb), .55) 0 1px, transparent 1px 36px); --fx-size: auto; }

/* patches (corner / centre glows) */
.lime-patch-tl { --p-tl: radial-gradient(46% 56% at 0% 0%,     rgba(var(--accent-rgb), .22), transparent 70%); }
.lime-patch-tr { --p-tr: radial-gradient(46% 56% at 100% 0%,   rgba(var(--accent-rgb), .22), transparent 70%); }
.lime-patch-bl { --p-bl: radial-gradient(46% 56% at 0% 100%,   rgba(var(--accent-rgb), .22), transparent 70%); }
.lime-patch-br { --p-br: radial-gradient(46% 56% at 100% 100%, rgba(var(--accent-rgb), .22), transparent 70%); }
.lime-patch-c  { --p-c:  radial-gradient(50% 55% at 50% 50%,   rgba(var(--accent-rgb), .16), transparent 70%); }

/* floating blob (place inside a .lime-fx, set position with inline style) */
.lime-blob {
    --size: 420px;
    position: absolute;
    z-index: -1;
    width: var(--size);
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 35% 35%, rgba(var(--accent-rgb), .45), rgba(var(--accent-rgb), .12) 45%, transparent 70%);
    filter: blur(32px);
    opacity: calc(.7 * var(--fx-intensity));
    animation: limeBlob 14s ease-in-out infinite alternate;
}
.lime-blob.sm { --size: 240px; }
.lime-blob.lg { --size: 680px; }

@keyframes limeBlob {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, -30px) scale(1.12); }
}

/* animated glowing border (don't combine with .lime-fx on the same element) */
@property --lime-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.lime-border {
    --lime-fill: #0d0d0a;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--lime-fill), var(--lime-fill)) padding-box,
        conic-gradient(from var(--lime-angle), rgba(var(--accent-rgb), .08) 0%, var(--accent) 12%, rgba(var(--accent-rgb), .08) 30%, rgba(var(--accent-rgb), .08) 100%) border-box;
    box-shadow: 0 0 44px rgba(var(--accent-rgb), .12);
    animation: limeSpin 6s linear infinite;
}

@keyframes limeSpin { to { --lime-angle: 360deg; } }


/* optional scroll progress bar: <div class="lime-progress"></div> right after <body> */
.lime-progress { display: none; }

@supports (animation-timeline: scroll()) {
    .lime-progress {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        z-index: 60;
        pointer-events: none;
        background: linear-gradient(90deg, var(--accent-lo), var(--accent), var(--accent-hi));
        box-shadow: 0 0 14px rgba(var(--accent-rgb), .8), 0 0 32px rgba(var(--accent-rgb), .4);
        transform-origin: 0 50%;
        transform: scaleX(0);
        animation: limeProgress linear both;
        animation-timeline: scroll(root block);
    }
}

/* text + small bits */
.lime-text {
    background: var(--accent-text-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 22px rgba(var(--accent-rgb), .25));
}

.lime-mark {
    background: linear-gradient(transparent 58%, rgba(var(--accent-rgb), .42) 58% 92%, transparent 92%) no-repeat;
    background-size: 0% 100%;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    animation: limeMark 1.1s .3s cubic-bezier(.2, .7, .2, 1) forwards;
}

@keyframes limeMark { to { background-size: 100% 100%; } }

.lime-divider {
    height: 1px;
    border: 0;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), .6);
    opacity: .7;
}

.lime-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(var(--accent-rgb), .3);
    border-radius: 100px;
    background: rgba(var(--accent-rgb), .08);
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    box-shadow: 0 0 24px rgba(var(--accent-rgb), .12);
}

.lime-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.lime-glow { box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .25), 0 20px 60px rgba(var(--accent-rgb), .18); }

/* =========================================================================
   Responsiveness + accessibility
   ========================================================================= */
@media (max-width: 700px) {
    html::before { opacity: calc(.35 * var(--fx-intensity)); }
    .lime-blob.lg { --size: 420px; }
}

@media (prefers-reduced-motion: reduce) {
    html::before,
    .lime-blob,
    .lime-border,
    .lime-mark { animation: none !important; }
    .lime-mark { background-size: 100% 100%; }
}

@media (prefers-contrast: more) {
    html[data-pattern="dots"]::after { display: none; }
}

@media print {
    html::before, html::after { display: none !important; }
}


/* =========================================================================
   FIX — gradient text clipping the last letter
   With tight (negative) letter-spacing, background-clip:text cuts off the
   right edge of the final glyph. A little right padding, cancelled with an
   equal negative margin, gives the gradient room without moving the layout.
   Covers every gradient-text selector used in style.css, styles.css,
   pricing.css, avx-accent.css and the .lime-text utility above.
   ========================================================================= */
.lime-text,
h1 em,
.footer-hero h2 em,
.quote span,
.astric-products .ap-intro h2 em,
.astric-products .ap-bottom h3 em,
.astric-about-hero-title em,
.astric-about-vision-title em,
.astric-about-intro-title span,
.astric-about-intelligence-title span,
.hero-title .soft,
.section-title em,
.intelligence-copy h2 em,
.big-statement span,
.showcase-intro h2 em,
.pricing-hero h1 span,
.enterprise-left h3 em,
.popular .card-price .amount,
.avx-hero-title em,
.avx-section-title em,
.avx-demo-copy h2 em,
.avx-use-intro h2 em,
.avx-final h2 em,
.avx-metric-value,
.metric,
.dash-number,
.team-metric strong {
    padding-right: .09em;
    margin-right: -.09em;
}

/* =========================================================================
   DASHBOARD VIDEO — plays inside the hero's dashboard window
   Load after styles.css:  <link rel="stylesheet" href="dashboard-video.css">

   The window takes the SHAPE OF YOUR VIDEO — nothing is cropped, and no layout
   box is forced on it. Optional variables (on .dashboard-video or :root):
     --dash-video-max-h   tallest the video may get   (default 78vh)
     --dash-video-ratio   force a shape, e.g. 16 / 9 — this crops to fill
   ========================================================================= */

.dashboard-video {
    position: relative;
    overflow: hidden;
    background: #0a0b07;
    line-height: 0;                     /* no stray gap under the <video> */
}

.dashboard-video video {
    display: block;
    width: 100%;
    height: auto;                       /* follows the video's own proportions */
    max-height: var(--dash-video-max-h, 78vh);
    aspect-ratio: auto 16 / 9;          /* placeholder shape until the file loads */
    object-fit: contain;                /* never crop — a tall video gets dark side bars */
    background: #0a0b07;
}

/* only if you ask for a fixed shape: crop to fill it */
.dashboard-video[style*="--dash-video-ratio"] video,
:root[style*="--dash-video-ratio"] .dashboard-video video {
    aspect-ratio: var(--dash-video-ratio);
    height: 100%;
    object-fit: cover;
}

/* thin edge so the video sits inside the window — the picture itself is untouched */
.dashboard-video::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(226, 241, 99, .10);
}

/* shown only if the video file can't be loaded (wrong path, offline, etc.) */
.dashboard-video.is-missing { min-height: clamp(220px, 34vw, 380px); }
.dashboard-video.is-missing video { display: none; }

.dashboard-video.is-missing::before {
    content: "✦  ASTRIC";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(226, 241, 99, .7);
    font-size: 20px;
    line-height: 1;
    letter-spacing: .2em;
    background: radial-gradient(60% 70% at 50% 40%, rgba(226, 241, 99, .14), transparent 70%), #0a0b07;
}

/* =========================================================================
   FLAT, WATCHABLE VIDEO WINDOW
   Your styles.css tilts the dashboard in 3D (perspective + rotateX 4deg),
   which skews a video. Turn the tilt off so it sits straight.
   (!important also beats any tilt a script may set inline.)
   ========================================================================= */
.hero-stage { perspective: none !important; }

.dashboard-window,
.dashboard-window:hover {
    transform: none !important;
}

/* On desktop the two floating cards sit over the video's corners: fade them out
   while someone is hovering to watch. (Phones keep your original layout, where
   the card sits just below the window instead of over it.) */
@media (hover: hover) and (min-width: 651px) {
    .dashboard-window ~ .float-card { transition: opacity .35s ease; }
    .dashboard-window:hover ~ .float-card { opacity: .08; pointer-events: none; }
}