/* ─── Glance kit: fewer words, more pictures (site-visual-1121) ───
   Pair with /js/glance.js. Classes:
   .g-reveal        fades up once in view (JS adds .g-on to <html>; no JS or reduced motion = always visible)
   .g-stagger       its children reveal one after another
   .g-lift          card hover lift (fine pointers only) + focus ring + press
   .g-icons         list -> row of icon tiles   (<li><span class="g-ico">svg</span><b>Label</b> short line</li>)
   .g-steps         ordered list -> numbered step diagram
   .g-tiles         numbers as big tiles         (<div><b>47 min</b><span>label</span></div>)
   .g-ex-btn        "See an example" button      (data-example="07-customers" or a <template id="g-ex-KEY">)
   .g-pop           the example dialog (built by glance.js)
   Spec lines (frontend-motion):
   .g-reveal · in-view · fade + 12px rise · --g-dur-lg --g-ease · stays · RM: no rise, plain show
   .g-lift   · hover/focus/press · lift 3px + shadow · --g-dur-sm · RM: shadow only; touch: none, press scale .97
   .g-pop    · click · fade + scale .96->1 from center · --g-dur-lg · Esc/backdrop/close returns focus · RM: fade only */
:root {
    --g-dur-xs: 100ms;
    --g-dur-sm: 160ms;
    --g-dur-lg: 320ms;
    --g-stagger: 60ms;
    --g-ease: cubic-bezier(0.23, 1, 0.32, 1);
    --g-radius: 18px;
    --g-shadow: 0 10px 30px rgba(16, 16, 20, .10);
}

/* reveal */
.g-on .g-reveal, .g-on .g-stagger > * {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--g-dur-lg) var(--g-ease), transform var(--g-dur-lg) var(--g-ease);
    transition-delay: calc(var(--g-i, 0) * var(--g-stagger));
}
.g-on .g-reveal.g-in, .g-on .g-stagger.g-in > * { opacity: 1; transform: none; }

/* lift */
.g-lift {
    display: block;
    border-radius: var(--g-radius);
    transition: transform var(--g-dur-sm) var(--g-ease), box-shadow var(--g-dur-sm) var(--g-ease);
}
@media (hover: hover) and (pointer: fine) {
    .g-lift:hover { transform: translateY(-3px); box-shadow: var(--g-shadow); }
}
.g-lift:focus-visible { outline: 3px solid var(--brand, #FE6B35); outline-offset: 3px; box-shadow: var(--g-shadow); }
.g-lift:active { transform: scale(.97); transition-duration: var(--g-dur-xs); }

/* icon row */
.g-icons {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 24px 0;
}
.g-icons > li {
    display: flex; flex-direction: column; gap: 6px;
    padding: 18px;
    border: 1px solid var(--border, #ECECF2);
    border-radius: var(--g-radius);
    background: #fff;
    font-size: .92rem; line-height: 1.4;
    color: var(--text-secondary, #71717A);
}
.g-icons > li b { color: var(--ink, #101014); font-size: 1rem; }
.g-ico {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: rgba(254, 107, 53, .10);
    color: var(--brand, #FE6B35);
}
.g-ico svg { width: 24px; height: 24px; }

/* step diagram */
.g-steps {
    list-style: none;
    counter-reset: g-step;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 12px;
    margin: 28px 0;
}
.g-steps > li {
    counter-increment: g-step;
    position: relative;
    padding-top: 54px;
    font-size: .95rem; line-height: 1.4;
    color: var(--text-secondary, #71717A);
}
.g-steps > li b { display: block; color: var(--ink, #101014); font-size: 1.02rem; }
.g-steps > li::before {
    content: counter(g-step);
    position: absolute; top: 0; left: 0;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--grad, #FE6B35);
    color: #fff; font-weight: 700;
    z-index: 1;
}
.g-steps > li:not(:last-child)::after {
    content: "";
    position: absolute; top: 19px; left: 48px; right: 4px;
    height: 2px;
    background: var(--border, #ECECF2);
}
@media (max-width: 640px) {
    .g-steps { grid-auto-flow: row; }
    .g-steps > li { padding: 4px 0 0 54px; min-height: 48px; }
    .g-steps > li:not(:last-child)::after { top: 46px; bottom: -10px; left: 19px; right: auto; width: 2px; height: auto; }
}

/* number tiles */
.g-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.g-tiles > * {
    padding: 18px;
    border-radius: var(--g-radius);
    background: #FAFAFC;
    border: 1px solid var(--border, #ECECF2);
}
.g-tiles b {
    display: block;
    font-family: var(--font-display, inherit);
    font-size: 1.9rem; line-height: 1.1;
    background: var(--grad, #FE6B35);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.g-tiles span { font-size: .88rem; color: var(--text-secondary, #71717A); }

/* "See an example" button */
.g-ex-btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--border, #ECECF2);
    border-radius: 999px;
    background: #fff;
    color: var(--ink, #101014);
    font: inherit; font-weight: 600; font-size: .95rem;
    cursor: pointer;
    transition: transform var(--g-dur-sm) var(--g-ease), border-color var(--g-dur-sm) var(--g-ease);
}
.g-ex-btn::before { content: "\25B6"; font-size: .7em; color: var(--brand, #FE6B35); }
@media (hover: hover) and (pointer: fine) { .g-ex-btn:hover { border-color: var(--brand, #FE6B35); } }
.g-ex-btn:focus-visible { outline: 3px solid var(--brand, #FE6B35); outline-offset: 2px; }
.g-ex-btn:active { transform: scale(.97); transition-duration: var(--g-dur-xs); }

/* example dialog */
.g-pop {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: var(--ink, #101014);
    box-shadow: 0 30px 80px rgba(16, 16, 20, .25);
    overflow: auto;
    position: fixed;
}
.g-pop[open] { animation: g-pop-in var(--g-dur-lg) var(--g-ease); }
.g-pop::backdrop { background: rgba(16, 16, 20, .55); }
@keyframes g-pop-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.g-pop img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.g-pop .g-pop-in { padding: 20px 22px 22px; }
.g-pop .g-pop-tag { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--brand, #FE6B35); }
.g-pop h3 { margin: 4px 0 14px; font-family: var(--font-display, inherit); font-size: 1.35rem; line-height: 1.2; }
.g-pop .g-ba { display: grid; gap: 8px; margin: 0 0 18px; }
.g-pop .g-ba p { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: baseline; font-size: .98rem; line-height: 1.4; }
.g-pop .g-ba p span { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--text-secondary, #71717A); }
.g-pop .g-ba p:last-child span { color: var(--brand, #FE6B35); }
.g-pop .g-pop-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.g-pop .g-pop-acts a { min-height: 44px; display: inline-flex; align-items: center; }
.g-pop .g-pop-go { padding: 10px 20px; border-radius: 999px; background: var(--ink, #101014); color: #fff; font-weight: 600; text-decoration: none; }
.g-pop .g-pop-more { color: var(--ink, #101014); font-weight: 600; }
.g-pop .g-pop-x {
    position: absolute; top: 10px; right: 10px;
    width: 44px; height: 44px;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.g-pop .g-pop-x:focus-visible { outline: 3px solid var(--brand, #FE6B35); }

/* Reduced motion: gentler, not zero. Content is always visible, no travel; short fades stay. */
@media (prefers-reduced-motion: reduce) {
    .g-on .g-reveal, .g-on .g-stagger > * { opacity: 1; transform: none; transition: none; }
    /* motion-audit: allow ungated-hover — reduced motion resets the lift to none, no motion added */
    .g-lift, .g-lift:hover, .g-lift:active, .g-ex-btn:active { transform: none; }
    @keyframes g-pop-in { from { opacity: 0; } to { opacity: 1; } }
}

/* Tap targets at 390 px: standalone text links get a 44 px hit row (UX read, T6). Inline links in sentences are exempt. */
a.cta ~ a:not(.cta), .ctabox a:not(.cta), a[href$="rss.xml"], #zoom-link, .foot-links a, .opt-link, .rec-all {
    display: inline-flex; align-items: center; min-height: 44px;
}
