/* v5 solution hero (includes/v5SolutionHero.php)
   Left: chips, headline, tick points, buttons - from the hero in the v5 design
   mockups (index.html / index3.html). Right: a cluster of the new UI widgets
   (total, donut, gauge, inventory and a quick link), built from real HTML/SVG
   so it stays sharp, translates, and needs no screenshot.
   Everything is scoped under .v5-sh so it can't touch legacy pages.

   Colour schemes: every colour that changes between schemes is a custom
   property (--sh-*) set on .v5-sh (the default, 'blue') and overridden by the
   .v5-sh--<scheme> classes below. The option is 'scheme' => 'blue' | 'footer' |
   'deep' | 'midnight' | 'light' | 'orange'. Only colours already used in the v5
   mockups are used: brand blue #2491eb, the footer's deep blue #004bad and
   cyan, ink #232122, the tints #f5f9fd / #e9f4fd / #fef3e2, and orange
   #fbb03b (hover #ffc15e). Orange and its hover come from v5tokens.css. */

.v5-sh,
.v5-sh *,
.v5-sh *::before,
.v5-sh *::after { box-sizing: border-box; }

.v5-sh {
    /* default scheme: 'blue' - the hero from the mockups (index.html / index3.html) */
    --sh-bg: linear-gradient(180deg, #2491eb 0%, #1f7fd1 100%);
    --sh-fg: #ffffff;
    --sh-fg-soft: rgba(255, 255, 255, 0.92);
    --sh-fg-note: rgba(255, 255, 255, 0.95);
    --sh-hl: #fbb03b;
    --sh-chip-bg: rgba(255, 255, 255, 0.16);
    --sh-chip-fg: #ffffff;
    --sh-chip-line: transparent;
    --sh-tick-bg: rgba(255, 255, 255, 0.18);
    --sh-tick-fg: #ffffff;
    --sh-btn1-bg: var(--orange-cta, #fbb03b);
    --sh-btn1-fg: #232122;
    --sh-btn1-hover: var(--orange-hover, #ffc15e);
    --sh-btn2-fg: #ffffff;
    --sh-btn2-line: rgba(255, 255, 255, 0.6);
    --sh-btn2-hover: rgba(255, 255, 255, 0.15);
    --sh-focus: #ffffff;
    --sh-glow-a: rgba(255, 255, 255, 0.55);   /* the glow behind the cards: light top left, deeper blue bottom right (no orange) */
    --sh-glow-b: rgba(0, 75, 173, 0.45);
    --sh-card-shadow: 0 22px 54px rgba(10, 40, 70, 0.32);
    --sh-card-line: transparent;

    position: relative;
    overflow: hidden;
    color: var(--sh-fg);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--sh-bg);
}

/* 'footer': the v5 footer's gradient (v5custom.css), the same as 'deep'. */
.v5-sh--footer { --sh-bg: linear-gradient(135deg, #004bad 0%, #2491eb 100%); }

/* 'deep' (the default scheme): the footer's deep blue into brand blue - no teal. Also the quote bands (v5pagesections.css) and the legacy hero class. */
.v5-sh--deep { --sh-bg: linear-gradient(135deg, #004bad 0%, #2491eb 100%); }

/* 'midnight': the charcoal ink used for the dark blocks, into the footer's deep blue. */
.v5-sh--midnight {
    --sh-bg: linear-gradient(135deg, #232122 0%, #004bad 100%);
    --sh-glow-a: rgba(251, 176, 59, 0.32);
    --sh-glow-b: rgba(36, 145, 235, 0.45);
}

/* 'light': the pale page tints, with ink text and blue accents. */
.v5-sh--light {
    --sh-bg: linear-gradient(135deg, #f5f9fd 0%, #e9f4fd 100%);
    --sh-fg: #232122;
    --sh-fg-soft: #575556;
    --sh-fg-note: #575556;
    --sh-hl: #2491eb;
    --sh-chip-bg: #ffffff;
    --sh-chip-fg: #1a6fb8;
    --sh-chip-line: #cfe4f8;
    --sh-tick-bg: #dcecfb;
    --sh-tick-fg: #2491eb;
    --sh-btn2-fg: #232122;
    --sh-btn2-line: #b9dcf9;
    --sh-btn2-hover: #ffffff;
    --sh-focus: #2491eb;
    --sh-glow-a: rgba(36, 145, 235, 0.22);
    --sh-glow-b: rgba(251, 176, 59, 0.28);
    --sh-card-shadow: 0 18px 44px rgba(20, 60, 100, 0.14);
    --sh-card-line: #dbe8f5;
}

/* 'orange': the CTA orange as the hero colour, with ink text and blue accents. */
.v5-sh--orange {
    --sh-bg: linear-gradient(135deg, #fbb03b 0%, #e6a02a 100%);
    --sh-fg: #232122;
    --sh-fg-soft: #232122;
    --sh-fg-note: #232122;
    --sh-hl: #004bad;
    --sh-chip-bg: rgba(35, 33, 34, 0.10);
    --sh-chip-fg: #232122;
    --sh-tick-bg: rgba(35, 33, 34, 0.14);
    --sh-tick-fg: #232122;
    --sh-btn1-bg: #232122;
    --sh-btn1-fg: #ffffff;
    --sh-btn1-hover: #000000;
    --sh-btn2-fg: #232122;
    --sh-btn2-line: rgba(35, 33, 34, 0.55);
    --sh-btn2-hover: rgba(35, 33, 34, 0.08);
    --sh-focus: #232122;
    --sh-glow-a: rgba(255, 255, 255, 0.55);
    --sh-glow-b: rgba(0, 75, 173, 0.30);
    --sh-card-shadow: 0 22px 54px rgba(80, 45, 0, 0.30);
}

/* Legibility tint (schemes blue, footer and deep - the others are dark or
   light enough already). A soft dark-blue layer over the copy side lifts white
   text past 4.5:1 contrast and the orange phrase past 3:1. Use 'tint' => false,
   or delete these rules, to get the bare gradient. */
.v5-sh::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 35, 85, 0.40) 0%, rgba(0, 35, 85, 0.36) 42%, rgba(0, 35, 85, 0) 70%);
}
/* the centred, text-only hero: an even tint, the same strength as the left side of the split hero (it was a stronger vignette: radial-gradient(70% 90% at 50% 50%, .50, .36 at 55%, 0)) */
.v5-sh--solo::before {
    background: rgba(0, 35, 85, 0.36);
}
.v5-sh--midnight::before,
.v5-sh--light::before,
.v5-sh--orange::before,
.v5-sh--plain::before { display: none; }

.v5-sh-inner {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 96px 32px 104px;
    display: flex;
    align-items: center;
    gap: 56px;
    flex-wrap: wrap;
}

/* The v5 header floats over the page, so a hero that starts the page needs
   room for it (the page sets $overlayHeader = true so no white spacer shows). */
.v5-sh--overlay .v5-sh-inner { padding-top: 156px; }

/* No widgets: everything is centred - chips, headline, subtitle, points, buttons
   and note (text-align is set explicitly, since legacy page CSS can left-align p and li). */
.v5-sh--solo .v5-sh-inner { justify-content: center; text-align: center; }
.v5-sh--solo .v5-sh-copy { flex-basis: 760px; text-align: center; }
.v5-sh--solo .v5-sh-chips,
.v5-sh--solo .v5-sh-actions { justify-content: center; }
.v5-sh.v5-sh--solo p.v5-sh-sub { margin-left: auto; margin-right: auto; text-align: center; }
.v5-sh.v5-sh--solo ul.v5-sh-points { align-items: center; margin-left: auto; margin-right: auto; max-width: 680px; }
.v5-sh.v5-sh--solo .v5-sh-points li { justify-content: center; text-align: center; }
.v5-sh.v5-sh--solo p.v5-sh-note { text-align: center; }

/* ---------- copy ---------- */
.v5-sh-copy { flex: 1 1 500px; min-width: 300px; }

.v5-sh-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; }
.v5-sh-chips li {
    display: inline-flex;
    align-items: center;
    background: var(--sh-chip-bg);
    color: var(--sh-chip-fg);
    box-shadow: inset 0 0 0 1px var(--sh-chip-line);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    padding: 7px 14px;
    border-radius: 999px;
}
/* a little picture before the words (a flag, a maple leaf: v5_tagline() in _shared/taglines.php) */
.v5-sh-chips li .v5-tag-icon { flex: none; margin-right: 8px; }
.v5-sh-chips li .v5-tag-icon--flag { border-radius: 2px; }

.v5-sh .v5-sh-title {
    margin: 0 0 22px;
    padding: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(36px, 4.6vw, 58px);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.035em;
    text-transform: none;
    color: var(--sh-fg);
}
.v5-sh-title .v5-sh-hl { color: var(--sh-hl); }
.v5-sh-sub .v5-sh-hl { color: var(--sh-hl); font-weight: 700; }   /* a phrase highlighted in the subtitle (**like this**) */

.v5-sh p.v5-sh-sub {
    margin: 0 0 24px;
    max-width: 540px;
    font-size: 19px;
    line-height: 1.6;
    color: var(--sh-fg-soft);
}

.v5-sh ul.v5-sh-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 34px;
    padding: 0;
    max-width: 520px;
    list-style: none;
}
.v5-sh-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; line-height: 1.5; color: var(--sh-fg-soft); }
.v5-sh-points .v5-sh-tick {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--sh-tick-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.v5-sh-points .v5-sh-tick svg { width: 12px; height: 12px; fill: none; stroke: var(--sh-tick-fg); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.v5-sh-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; }
.v5-sh a.v5-sh-btn {
    display: inline-block;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-transform: none;
    padding: 16px 30px;
    border-radius: 10px;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.v5-sh a.v5-sh-btn-primary { background: var(--sh-btn1-bg); color: var(--sh-btn1-fg); border: 1.5px solid transparent; }
.v5-sh a.v5-sh-btn-primary:hover,
.v5-sh a.v5-sh-btn-primary:focus { background: var(--sh-btn1-hover); color: var(--sh-btn1-fg); transform: translateY(-1px); }
.v5-sh a.v5-sh-btn-secondary { background: transparent; color: var(--sh-btn2-fg); border: 1.5px solid var(--sh-btn2-line); }
.v5-sh a.v5-sh-btn-secondary:hover,
.v5-sh a.v5-sh-btn-secondary:focus { background: var(--sh-btn2-hover); color: var(--sh-btn2-fg); }
.v5-sh a.v5-sh-btn:focus-visible { outline: 3px solid var(--sh-focus); outline-offset: 3px; }

.v5-sh p.v5-sh-note { margin: 0; font-size: 14px; color: var(--sh-fg-note); }

/* ---------- visual: the right-hand picture ---------- */
.v5-sh-visual { flex: 1 1 560px; min-width: 320px; display: flex; justify-content: center; }

/* An animated visual from _shared/visuals/ in that column (v5_render_solution_hero 'visual' => 'barcode-scan'): the picture is a framed card, so it is
   centred and lifted off the gradient like the widgets. Its own sizes come from _shared/visuals/visuals.css. */
.v5-sh-visual--media { align-items: center; }
.v5-sh-visual--media .v5fv,
.v5-sh-visual--media .v5fv-fallback { width: 100%; max-width: 640px; }
.v5-sh-visual--media .v5fv,
.v5-sh-visual--media .v5fv-fallback img { border: 0; border-radius: 20px; box-shadow: 0 28px 60px rgba(0, 25, 70, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.5); }
.v5-sh-visual--media .v5fv-fallback img { display: block; width: 100%; height: auto; }

/* visual_ratio '1:1': a square picture is as tall as it is wide, so it is narrower than the 16:9 one. */
.v5-sh-visual--square .v5fv,
.v5-sh-visual--square .v5fv-fallback { max-width: 460px; }

/* visual_style 'clear': the picture has no background (_shared/visuals/visuals.css, v5fv--clear), so a glow sits behind it, and no card shadow or rounding is added
   (the picture's own cards carry their shadows). Its small caption takes the hero's note colour. */
.v5-sh-visual--clear { position: relative; --v5fv-clear-cap: var(--sh-fg-note); }
.v5-sh-visual--clear .v5fv,
.v5-sh-visual--clear .v5fv-fallback img { border-radius: 0; box-shadow: none; }
.v5-sh-visual--clear .v5fv { z-index: 1; }

/* The widget cluster ('hero-widgets', the default visual): its cards take the scheme's shadow and outline, and it is a little wider than the other pictures. On a narrow
   screen it lays itself out as a grid (_shared/visuals/visuals.css). */
.v5-sh-visual--widgets,
.v5-sh-visual--clear { --v5fv-card-shadow: var(--sh-card-shadow); --v5fv-card-line: var(--sh-card-line); }
.v5-sh-visual--widgets .v5fv,
.v5-sh-visual--widgets .v5fv-fallback { max-width: 660px; }

.v5-sh-glow {
    position: absolute;
    inset: -30px;
    z-index: 0;
    background:
        radial-gradient(circle at 25% 20%, var(--sh-glow-a), transparent 60%),
        radial-gradient(circle at 80% 80%, var(--sh-glow-b), transparent 55%);
    filter: blur(45px);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .v5-sh * { animation: none !important; }
}

/* ---------- the gutter ('gutter' option) ----------
   A band across the bottom of the hero with a question and a link, centred. It is a darker, see-through navy over the hero's own blue with a hairline of light above, white text and
   a bold white link with an arrow, so it reads as part of the hero. (The first version copied the Product menu's footer line, pale blue with blue text, and it merged with the pale
   customer logo strip that follows a hero.) */
.v5-sh-gutter {
    position: relative;
    z-index: 1;
    background: rgba(0, 35, 85, 0.34);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 15.5px;
    color: rgba(255, 255, 255, 0.92);
}
.v5-sh-gutter-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 6px 14px;
}
.v5-sh .v5-sh-gutter a {
    font-weight: 700;
    color: #ffffff;
    text-decoration: none !important;
}
.v5-sh .v5-sh-gutter a:hover,
.v5-sh .v5-sh-gutter a:focus { color: var(--sh-hl, #fbb03b); }
.v5-sh .v5-sh-gutter a i { margin-left: 4px; font-size: 13px; transition: transform .15s ease; }
.v5-sh .v5-sh-gutter a:hover i,
.v5-sh .v5-sh-gutter a:focus i { transform: translateX(3px); }
/* with a gutter the content needs less room under it, since the band closes the hero */
.v5-sh--gutter .v5-sh-inner { padding-bottom: 64px; }

/* ---------- narrower screens ---------- */
@media (max-width: 980px) {
    /* the copy now spans the full width, so tint the whole top part evenly */
    .v5-sh::before { background: linear-gradient(180deg, rgba(0, 35, 85, 0.30) 0%, rgba(0, 35, 85, 0.30) 55%, rgba(0, 35, 85, 0.10) 100%); }
    /* the centred, text-only hero is short and its text spans the width, so it keeps its even tint (it was a stronger 0.47 here) */
    .v5-sh.v5-sh--solo::before { background: rgba(0, 35, 85, 0.36); }
    .v5-sh-inner { gap: 44px; padding-bottom: 88px; }
    .v5-sh--gutter .v5-sh-inner { padding-bottom: 56px; }
    .v5-sh-visual { flex-basis: 100%; }
}

/* ---------- small screens ---------- */
@media (max-width: 680px) {
    .v5-sh-inner { padding-left: 20px; padding-right: 20px; }
    .v5-sh-gutter-inner { padding-left: 20px; padding-right: 20px; }
    .v5-sh--overlay .v5-sh-inner { padding-top: 124px; }
    .v5-sh p.v5-sh-sub { font-size: 17px; }
    .v5-sh-points li { font-size: 16px; }
    .v5-sh a.v5-sh-btn { flex: 1 1 100%; text-align: center; }

    .v5-sh-glow { inset: 0; }
}
