/**
==========================================================================
@fileOverview
Shared hero visuals (pattern, scrim, overlays) and hero card primitives
used across non-home pages (News, Careers, Contact, Developers). This file
now standardizes the hero search card to match the shared card style
defined for standard pages.
@author
 * QueryKey Cases Web Team
@maintainer
 * Cases Engineering Lead
@usage
Applies to sections with the `.hero` and `.hero-landing` classes.
@notes
Cards: 24px radius, 2px border, shared surface & shadow tokens.
@license
QueryKey™ is a trademark of Farrel Wilson. All rights reserved.
@timestamp
2025-11-05 16:45:00 UTC
========================================================================== */

/* /assets/css/pages/hero-shared.css */

/* Universal hero background (applies to .hero and .hero-landing)
   Uses the subtle plus-sign SVG pattern with a dark gradient and
   radial highlights to match the site hero shown in the attachment.
*/
.hero {
    position: relative;

    /* keep per-page padding intact; only set background and color */
    background-image:
        linear-gradient(145deg, #0f1d38 0%, #0b162b 50%, #111f3f 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

    /* smaller tiles so pattern is subtle and not checkerboard-like */

    /* make the tile pattern less visible when video is present */
    background-size: cover, 48px 48px;
    background-repeat: no-repeat, repeat;
    background-position: center, top left;

    /* avoid aggressive color-dodge which produced checkerboard artifacts */
    background-blend-mode: normal;
    overflow: hidden;
    color: rgb(224 233 255 / 98%);

    /* ensure the hero is visually large on desktop so video/poster fills behind content */
    min-height: 66vh;
    display: flex;
    align-items: center;

        /* create a local stacking context so z-index ordering is predictable */
        isolation: isolate;
}

/* Vignette + radial highlights overlay stack
   ::before provides a soft vignette so text stays readable over video.
   ::after then paints the orange/blue highlights above the vignette. */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;

    /* stronger vignette with slight blue tint for brand feel */
    background: radial-gradient(circle at 50% 38%, rgb(0 0 0 / 20%), rgb(2 6 23 / 48%) 56%, rgb(3 8 28 / 68%) 100%),
                linear-gradient(180deg, rgb(8 18 36 / 0%) 0%, rgb(7 12 28 / 6%) 40%, rgb(3 6 18 / 38%) 75%, rgb(2 4 10 / 68%) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;

    /* keep accent highlights but make them slightly subtler */
    background: radial-gradient(circle at 20% -8%, rgb(247 127 0 / 22%), transparent 54%),
                radial-gradient(circle at 82% 0%, rgb(62 99 238 / 18%), transparent 58%);
    pointer-events: none;
    z-index: 2;
}

/* Light mode variant */
:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero:not(.vendorless-ui-framework-hero-fixed) {
    background-image:
        linear-gradient(145deg, #e8ecf6 0%, #f5f8ff 45%, #fff 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-blend-mode: normal;
    color: var(--hero-heading-color);
}

/* Ensure .hero-landing still benefits from shared rules */

/* .hero-landing intentionally uses the shared .hero rules above */

/* Removed duplicate .hero-landing::after — the shared .hero::after overlay above
   provides the radial highlights. Keeping a single overlay avoids intensifying
   the highlight and keeps the pattern subtle as in the reference (picture 2).
*/

.hero-landing .container {
    position: relative;
        z-index: 1000;
    width: min(90%, 1040px);
    margin: 0 auto;
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    text-align: center;
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) {
    background-image:
        linear-gradient(145deg, #e8ecf6 0%, #f5f8ff 45%, #fff 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-blend-mode: normal;
    color: var(--hero-heading-color);
}

/* Ensure light-mode applies to generic .hero as well */
:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero:not(.vendorless-ui-framework-hero-fixed),
:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) {
    background-image:
        linear-gradient(145deg, #eef3fb 0%, #f7f9ff 40%, #fff 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: #0f172a;
}

.hero-landing .page-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1.2rem;
    margin: 0 auto;
    border-radius: 999px;
    background: rgb(15 25 48 / 65%);
    border: 1px solid rgb(255 255 255 / 16%);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgb(236 244 255 / 90%);
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .page-eyebrow {
    background: rgb(241 246 254 / 85%);
    border-color: rgb(15 23 42 / 12%);
    color: #1f2937;
}

.hero-landing h1 {
    font-size: clamp(3rem, 6.8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--hero-heading-color);
    margin: 0;
}

.hero-title {
    line-height: 1.02;
    text-align: center;
    margin-bottom: 1rem;
}

/* stronger two-line headline styling to match the reference */
.hero-title {
    font-size: clamp(2.5rem, 6.6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

@supports (text-wrap: balance) {
    .hero-title {
      text-wrap: balance;
    }
}

.hero-title .accent-line {
    display: block;
    color: var(--accent-orange, #f47a00);
    text-shadow: 0 6px 20px rgb(244 122 0 / 12%);
}

.text-accent-orange {
    color: #f47a00; /* bold orange accent */
    display: inline-block;
}

/* Theme variables for light/dark mode */
:root{
        --hero-bg-1: #0f1d38;
        --hero-bg-2: #0b162b;
        --accent-orange: #f47a00;
        --accent-blue: #3e63ee;
        --hero-foreground: rgb(224 233 255 / 98%);
        --hero-heading-color: #ffffff;
        --hero-copy-color: rgb(226 234 255 / 85%);
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body){
    --hero-bg-1:#eef3fb;
    --hero-bg-2:#fff;
    --hero-foreground: #0f172a;
    --hero-heading-color: var(--hero-heading-light, #0f172a);
    --hero-copy-color: var(--hero-copy-light, #334a73);
}

.hero{color:var(--hero-foreground)}

.hero-landing .page-hero-description,
.hero-landing .hero-subtitle {
    font-size: clamp(1rem, 2.2vw, 1.18rem);
    line-height: 1.7;
    color: var(--hero-copy-color);
    margin: 0 auto;
    max-width: 720px;
}

/*
    Hero search card
    Standardize this to the shared card look used on Contact/Developers:
    - 24px radius
    - 2px border using --std-border
    - Surface uses --std-surface for consistent dark translucency
    - Shadow uses --std-card-shadow
    Pages can still layer page-specific tweaks on top (e.g., news.css remaps
    tokens to news variants while retaining structure).
*/
.hero-landing .hero-search-card {
        margin: clamp(1.25rem, 4vw, 2.5rem) auto 0;
        width: min(100%, 780px);
        padding: clamp(2rem, 4vw, 2.75rem);
        border-radius: 24px;
        border: 2px solid var(--std-border);
        background: var(--std-surface);
        box-shadow: var(--std-card-shadow);
        position: relative;
        z-index: 1001;
}

/* Subtle accent ring to lift the card without forcing an orange bias */
.hero-landing .hero-search-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 1.5px solid var(--std-border-strong);
    pointer-events: none;
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-search-card {
    background: linear-gradient(135deg, rgb(233 243 255 / 96%), rgb(255 255 255 / 95%));
    border: 1px solid rgb(15 23 42 / 12%);
    box-shadow: 0 26px 48px rgb(15 23 42 / 12%), 0 0 0 1px rgb(15 23 42 / 8%) inset;
}

.hero-landing .hero-search-card .main-search-kicker,
.hero-landing .hero-search-card .main-search-tagline {
    font-size: 1rem;
    color: rgb(226 234 255 / 82%);
    margin: 0 0 clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.6;
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-search-card .main-search-kicker,
:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-search-card .main-search-tagline {
    color: #4b5563;
}

.hero-landing .hero-search-card .search-meta {
    margin-top: clamp(1.4rem, 2.6vw, 1.85rem);
}

.hero-landing .hero-search-card .filter-section {
    border-top: 1px solid rgb(255 255 255 / 12%);
    padding-top: clamp(1rem, 2vw, 1.5rem);
}

.hero-landing .hero-search-card .filter-label {
    color: rgb(226 234 255 / 90%);
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-search-card .filter-section {
    border-top-color: rgb(15 23 42 / 12%);
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-search-card .filter-label {
    color: #1f2937;
}

.hero-landing .hero-actions,
.hero-landing .hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-landing .hero-actions a,
.hero-landing .hero-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    gap: 0.5rem;
    border: 1px solid rgb(255 255 255 / 18%);
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-landing .btn-primary,
.hero .btn-primary {
    background: linear-gradient(180deg,var(--accent-orange,#ff8a00),#e66a00);
    border: none;
    padding: 1rem 2.8rem;
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 16px 40px rgb(230 106 0 / 20%), 0 2px 0 rgb(255 255 255 / 2%) inset;
}

.hero-landing .btn-secondary,
.hero .btn-secondary {
    background: transparent;
    border: 1.8px solid rgb(255 255 255 / 14%);
    color: #fff;
    padding: 0.85rem 1.8rem;
}

.hero-landing .hero-actions a:hover,
.hero-landing .hero-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgb(6 12 24 / 35%);
}

.hero-landing .hero-buttons a.btn-primary:hover,
.hero-landing .hero-actions a.btn-primary:hover,
.hero .hero-buttons a.btn-primary:hover,
.hero .hero-actions a.btn-primary:hover {
    color: #fff;
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-actions a:not(.btn),
:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-buttons a:not(.btn) {
    color: #1f2937;
    border-color: rgb(15 23 42 / 14%);
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .btn-primary,
:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero:not(.vendorless-ui-framework-hero-fixed) .btn-primary {
    background: linear-gradient(180deg,#ff9b3b,#ff8a00);
    color: #fff;
    box-shadow: 0 10px 22px rgb(15 23 42 / 8%);
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .btn-primary:is(:hover, :focus-visible),
:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero:not(.vendorless-ui-framework-hero-fixed) .btn-primary:is(:hover, :focus-visible) {
    color: #fff;
}

:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero-landing:not(.vendorless-ui-framework-hero-fixed) .btn-secondary,
:is(body.light-mode, html.light-mode body, body[data-theme='light'], html[data-theme='light'] body) .hero:not(.vendorless-ui-framework-hero-fixed) .btn-secondary {
    background: transparent;
    border: 1.5px solid rgb(15 23 42 / 8%);
    color: #0f172a;
}

.hero-landing .hero-glance {
    margin: clamp(1.75rem, 3.5vw, 2.5rem) auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    max-width: 960px;
}

/* alternating orange/blue borders for glance/highlight cards */
.hero-landing .hero-glance .glance-card,
.highlight-grid .highlight-card,
.culture-grid .culture-card{
    background: rgb(255 255 255 / 2%);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 8px 24px rgb(6 12 24 / 35%);
    border: 2px solid transparent;
}

.hero-landing .hero-glance .glance-card:nth-child(odd),
.highlight-grid .highlight-card:nth-child(odd),
.culture-grid .culture-card:nth-child(odd){
    border-image: linear-gradient(90deg,var(--accent-orange) 0%, rgb(244 122 0 / 85%) 100%) 1;
}

.hero-landing .hero-glance .glance-card:nth-child(even),
.highlight-grid .highlight-card:nth-child(even),
.culture-grid .culture-card:nth-child(even){
    border-image: linear-gradient(90deg,var(--accent-blue) 0%, rgb(62 99 238 / 92%) 100%) 1;
}

body.light-mode .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-glance .glance-card,
body.light-mode .highlight-grid .highlight-card,
body.light-mode .culture-grid .culture-card{
    background: #fff;
    box-shadow: 0 6px 18px rgb(15 23 42 / 6%);
}

body.light-mode .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-glance .glance-card:nth-child(odd),
body.light-mode .highlight-grid .highlight-card:nth-child(odd),
body.light-mode .culture-grid .culture-card:nth-child(odd){
    border-image: linear-gradient(90deg,var(--accent-orange) 0%, rgb(244 122 0 / 95%) 100%) 1;
}

body.light-mode .hero-landing:not(.vendorless-ui-framework-hero-fixed) .hero-glance .glance-card:nth-child(even),
body.light-mode .highlight-grid .highlight-card:nth-child(even),
body.light-mode .culture-grid .culture-card:nth-child(even){
    border-image: linear-gradient(90deg,var(--accent-blue) 0%, rgb(62 99 238 / 95%) 100%) 1;
}

/* Ensure generic .hero sections get centered layout and subtitle alignment */
.hero .hero-content,
.hero-landing .hero-content{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:0.9rem;

    /* slightly taller hero to match screenshot composition */
    padding: clamp(5rem, 14vw, 9rem) 0;
    z-index: 3; /* ensure content sits above overlays and video */
}

/* Apply same description/subtitle rules to plain .hero elements */
.hero .page-hero-description,
.hero .hero-subtitle{
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    line-height: 1.65;
    color: var(--hero-copy-color);
    margin: 0 auto;
    max-width: 760px;
    text-align: center;
}

/* Make second-line accent a block so it lines up as a separate line under the headline */
.hero-title .text-accent-orange,
.hero-title .accent-line{
  display:block;
}


@media (width <= 720px) {
    .hero-landing {
        padding: clamp(4.25rem, 12vw, 5.5rem) 1.25rem clamp(2.5rem, 8vw, 3.5rem);
    }

    .hero-landing .hero-search-card {
        padding: 1.75rem;
    }

    .hero-landing .hero-actions,
    .hero-landing .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        width: 100%;
    }

    .hero-landing .hero-actions a,
    .hero-landing .hero-buttons a,
    .hero-landing .hero-actions .btn,
    .hero-landing .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-inline: 1.25rem;
    }

    .hero-landing .btn-primary,
    .hero .btn-primary,
    .hero-landing .btn-secondary,
    .hero .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (width <= 480px) {
    .hero-landing .container {
        width: min(92%, 32rem);
    }

    .hero-landing h1,
    .hero-title {
        font-size: clamp(2rem, 12vw, 3rem);
        line-height: 0.98;
    }

    .hero-landing .page-hero-description,
    .hero-landing .hero-subtitle,
    .hero .page-hero-description,
    .hero .hero-subtitle {
        max-width: 26rem;
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-landing .hero-actions a,
    .hero-landing .hero-buttons a,
    .hero-landing .hero-actions .btn,
    .hero-landing .hero-buttons .btn {
        min-height: 54px;
        font-size: 1rem;
    }
}

/* Hero video background rules */
.hero-video{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
        object-position: 60% 34%;
        z-index: 0;
        pointer-events: none;
        opacity: 0.66; /* slightly dimmer so text pops */

        /* avoid transform on the video element itself to prevent stacking context oddities */
        transform: none;
    filter: brightness(0.92) contrast(1.04) saturate(1.04) blur(0.9px);
}

.hero .hero-content{position:relative}

/* JS adds this when autoplay fails so the gradient sim is visible instead of a frozen frame */
.hero-video-wrap.hero-video-wrap--fallback .hero-video{
    display:none;
}

@media (prefers-reduced-motion: reduce){
    .hero-video{display:none}
}

/* subtle slow pan for motion-capable environments to give the background life */
@media (prefers-reduced-motion: no-preference){
    /* The wrapper performs the pan; the video element itself remains untransformed */
    .hero-video-wrap{
        position:absolute;
        inset:0;
        z-index:0;
        overflow:hidden;
        will-change: transform;
    }

    .hero-video-wrap.hero-video-ready{
        animation: hero-pan 22s ease-in-out infinite;
    }

    @keyframes hero-pan {
        0%{ transform: scale(1.12) translate3d(6%,0,0) }
        50%{ transform: scale(1.12) translate3d(-6%,0,0) }
        100%{ transform: scale(1.12) translate3d(6%,0,0) }
    }
}

/* Simulated animated background used when video is not available (for preview) */
.hero-video-sim{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    z-index:0;
    pointer-events:none;
    background: linear-gradient(90deg, rgb(60 90 200 / 8%), rgb(244 122 0 / 6%));
    overflow:hidden;
}

.hero-video-sim::before{
    content:'';
    position:absolute;
    inset:-20% -10%;
    background:radial-gradient(circle at 30% 10%, rgb(255 160 50 / 12%), transparent 14%), radial-gradient(circle at 80% 40%, rgb(60 90 230 / 12%), transparent 18%);
    animation: hero-sim-move 12s linear infinite;
    filter: blur(18px) saturate(110%);
}

@keyframes hero-sim-move{
    0%{transform:translate3d(-4%,0,0) scale(1)}
    50%{transform:translate3d(4%,0,0) scale(1.05)}
    100%{transform:translate3d(-4%,0,0) scale(1)}
}
