/* Img.vision Home Sections: hero
 *
 * Colours and type come from the Spectra One child theme presets, with the
 * same values as fallbacks. Two columns from 900px up; the graphic drops under
 * the copy below that.
 */

.imgv-hero {
    --imgv-ink: var(--wp--preset--color--custom-dark, #023c40);
    --imgv-body: var(--wp--preset--color--body, #4b5563);
    --imgv-leaf: var(--wp--preset--color--custom-primary, #0bba68);
    --imgv-leaf-deep: var(--wp--preset--color--custom-secondary, #0b7c3e);
    --imgv-sprout: var(--wp--preset--color--custom-lighter-green, #daf6ca);
    --imgv-paper: var(--wp--preset--color--custom-lighest-green, #f5fbe3);
    --imgv-outline: var(--wp--preset--color--outline, #e7eeeb);
    --imgv-font: var(--wp--preset--font-family--poppins, Poppins, sans-serif);

    box-sizing: border-box;
    max-width: 1280px;
    margin-inline: auto;
    padding-block: clamp(2rem, 5vw, 4.5rem);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(2rem, 4vw, 4rem);
    row-gap: 2.5rem;
    font-family: var(--imgv-font);
    color: var(--imgv-body);
    text-align: left;
}

.imgv-hero *,
.imgv-hero *::before,
.imgv-hero *::after {
    box-sizing: inherit;
}

.imgv-hero--text-only {
    grid-template-columns: minmax(0, 1fr);
}

.imgv-hero--text-only .imgv-hero__copy {
    max-width: 44rem;
}

/* Copy column */

.imgv-hero__heading {
    margin: 0;
    font-family: var(--imgv-font);
    font-size: clamp(2.125rem, 1.35rem + 2.6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--imgv-ink);
    text-wrap: balance;
}

.imgv-hero__text {
    margin-top: 1.25rem;
    max-width: 38rem;
}

.imgv-hero__text p {
    margin: 0 0 0.875rem;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.imgv-hero__text p:last-child {
    margin-bottom: 0;
}

.imgv-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.imgv-hero__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.4rem;
    border-radius: 6px;
    border: 1.5px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.imgv-hero__btn--primary {
    background: var(--imgv-leaf);
    border-color: var(--imgv-leaf);
    color: #fff;
}

.imgv-hero__btn--primary:hover {
    background: var(--imgv-leaf-deep);
    border-color: var(--imgv-leaf-deep);
    color: #fff;
}

.imgv-hero__btn--secondary {
    background: transparent;
    border-color: var(--imgv-ink);
    color: var(--imgv-ink);
}

.imgv-hero__btn--secondary:hover {
    background: var(--imgv-paper);
    color: var(--imgv-ink);
}

.imgv-hero__btn:focus-visible,
.imgv-hero__pill:focus-visible {
    outline: 2px solid var(--imgv-leaf-deep);
    outline-offset: 2px;
}

/* Segment rows: "I sell on  eBay  Walmart …" */

.imgv-hero__paths {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--imgv-outline);
}

.imgv-hero__path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.3;
}

.imgv-hero__path:last-child {
    margin-bottom: 0;
}

.imgv-hero__lead {
    color: var(--imgv-ink);
    font-weight: 500;
    margin-right: 0.25rem;
}

.imgv-hero__pill {
    display: inline-block;
    padding: 0.375rem 0.8rem;
    border: 1px solid var(--imgv-leaf);
    border-radius: 999px;
    color: var(--imgv-ink);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.6);
}

.imgv-hero__pill:hover {
    background: var(--imgv-sprout);
    border-color: var(--imgv-leaf-deep);
    color: var(--imgv-ink);
    text-decoration: none;
}

/* Graphic column
 *
 * Two scenes on one 24 s loop: the listing form (0-12 s) then the bulk
 * spreadsheet (12-24 s). Every animation runs on the same 24 s clock so the
 * beats stay aligned; the marketplace names run on a 96 s clock so a
 * different one shows on each loop. Percentages below are seconds / 24.
 */

.imgv-hero__art {
    min-width: 0;
}

.imgv-hero__svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    font-family: var(--imgv-font);
}

.imgv-hero__card { fill: #fff; stroke: var(--imgv-outline); stroke-width: 1.5; }
.imgv-hero__paper { fill: var(--imgv-paper); }
.imgv-hero__head { fill: #fff; }
.imgv-hero__hair { fill: none; stroke: var(--imgv-outline); stroke-width: 1.5; }
.imgv-hero__dot { fill: var(--imgv-leaf); }
.imgv-hero__badge { fill: var(--imgv-sprout); }
.imgv-hero__chip { fill: var(--imgv-ink); }
.imgv-hero__chip-t { fill: #fff; font-size: 12px; font-weight: 500; }
.imgv-hero__field { fill: #fff; stroke: var(--imgv-outline); stroke-width: 1.5; }
.imgv-hero__btn { fill: var(--imgv-leaf); }
.imgv-hero__btn-t { fill: #fff; font-size: 14px; font-weight: 600; text-anchor: middle; }
.imgv-hero__btn-t--s { font-size: 13px; }
.imgv-hero__track { fill: var(--imgv-outline); }
.imgv-hero__upload-track { fill: var(--imgv-sprout); }
.imgv-hero__upload-bar { fill: var(--imgv-leaf); transform-origin: 20px 340px; transform: scaleX(0); }
.imgv-hero__progress { fill: var(--imgv-leaf); transform-origin: 254px 451px; transform: scaleX(0); }
.imgv-hero__ok { fill: var(--imgv-sprout); }
.imgv-hero__ok-tick { fill: none; stroke: var(--imgv-leaf-deep); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.imgv-hero__tee { fill: var(--imgv-leaf-deep); }
.imgv-hero__tee-collar { fill: var(--imgv-leaf); }
.imgv-hero__tee-print { fill: var(--imgv-sprout); }

.imgv-hero__mkt { fill: var(--imgv-ink); font-size: 16px; font-weight: 600; }
.imgv-hero__lbl { fill: var(--imgv-body); font-size: 12.5px; font-weight: 500; }
.imgv-hero__val { fill: var(--imgv-ink); font-size: 14px; font-weight: 500; }
.imgv-hero__url { fill: var(--imgv-ink); font-size: 13px; font-weight: 600; }
.imgv-hero__url--cell { font-size: 11.5px; }
.imgv-hero__cell { fill: var(--imgv-ink); font-size: 12px; }
.imgv-hero__col { fill: #9aa3ad; font-size: 11px; text-anchor: middle; }
.imgv-hero__small { fill: var(--imgv-body); font-size: 12px; }
.imgv-hero__accepted { fill: var(--imgv-leaf-deep); font-size: 13px; font-weight: 600; }

/* Start states. The animations move everything from here. */
.imgv-hero__scene--form { opacity: 1; }
.imgv-hero__scene--sheet { opacity: 0; }
.imgv-hero__name { opacity: 0; }
.imgv-hero__chip-up { opacity: 0; }
.imgv-hero__chip-hosted { opacity: 1; }
.imgv-hero__upload-track { opacity: 0; }
.imgv-hero__pop { opacity: 0; transform-box: fill-box; transform-origin: center; }
.imgv-hero__typed,
.imgv-hero__fill { clip-path: inset(-4px 100% -4px 0); }

@media (prefers-reduced-motion: no-preference) {
    .imgv-hero__scene--form { animation: imgv-scene-form 24s linear infinite; }
    .imgv-hero__scene--sheet { animation: imgv-scene-sheet 24s linear infinite; }
    .imgv-hero__name--form { animation: imgv-name-form 96s linear infinite; }
    .imgv-hero__name--sheet { animation: imgv-name-sheet 96s linear infinite; }
    .imgv-hero__photo { animation: imgv-photo 24s ease infinite; }
    .imgv-hero__chip-up { animation: imgv-chip-up 24s linear infinite; }
    .imgv-hero__chip-hosted { animation: imgv-chip-hosted 24s linear infinite; }
    .imgv-hero__upload-track { animation: imgv-upload-track 24s linear infinite; }
    .imgv-hero__upload-bar { animation: imgv-upload-bar 24s cubic-bezier(.4, 0, .2, 1) infinite; }
    .imgv-hero__typed { animation: imgv-typed 24s steps(28, end) infinite; }
    .imgv-hero__field { animation: imgv-field 24s linear infinite; }
    .imgv-hero__pop--a1,
    .imgv-hero__pop--a2,
    .imgv-hero__pop--a3 { animation: imgv-pop-a 24s cubic-bezier(.2, 1.4, .4, 1) infinite; }
    .imgv-hero__pop--a1 { animation-delay: 5.2s; }
    .imgv-hero__pop--a2 { animation-delay: 5.7s; }
    .imgv-hero__pop--a3 { animation-delay: 6.2s; }
    .imgv-hero__stack { animation: imgv-stack 24s ease infinite; }
    .imgv-hero__fill--0 { animation: imgv-fill-0 24s steps(30, end) infinite; }
    .imgv-hero__fill--1 { animation: imgv-fill-1 24s steps(30, end) infinite; }
    .imgv-hero__fill--2 { animation: imgv-fill-2 24s steps(30, end) infinite; }
    .imgv-hero__fill--3 { animation: imgv-fill-3 24s steps(30, end) infinite; }
    .imgv-hero__fill--4 { animation: imgv-fill-4 24s steps(30, end) infinite; }
    .imgv-hero__fill--5 { animation: imgv-fill-5 24s steps(30, end) infinite; }
    .imgv-hero__upload { animation: imgv-upload 24s linear infinite; }
    .imgv-hero__progress { animation: imgv-progress 24s cubic-bezier(.4, 0, .2, 1) infinite; }
    .imgv-hero__pop--b { animation: imgv-pop-b 24s cubic-bezier(.2, 1.4, .4, 1) infinite; }
    .imgv-hero__pop--banner { animation-delay: 17.4s; }

    /* scenes: form 0-11.5 s, sheet 12-23.5 s */
    @keyframes imgv-scene-form { 0% { opacity: 0; } 2.08%, 47.92% { opacity: 1; } 50%, 100% { opacity: 0; } }
    @keyframes imgv-scene-sheet { 0%, 50% { opacity: 0; } 52.08%, 97.92% { opacity: 1; } 100% { opacity: 0; } }
    /* names: one per loop, 96 s clock, delay = loop x 24 s */
    @keyframes imgv-name-form { 0% { opacity: 0; transform: translateY(4px); } 0.5%, 12% { opacity: 1; transform: none; } 12.5%, 100% { opacity: 0; } }
    @keyframes imgv-name-sheet { 0%, 12.5% { opacity: 0; transform: translateY(4px); } 13%, 24.5% { opacity: 1; transform: none; } 25%, 100% { opacity: 0; } }
    /* form: photo drops 0.3-0.9 s, upload 1.0-2.0 s, chip flips to "Hosted" at 2.2 s, typing 2.6-5.0 s, field green at 5.2 s */
    @keyframes imgv-chip-up { 0%, 3.75% { opacity: 0; } 4.5%, 8.75% { opacity: 1; } 9.2%, 100% { opacity: 0; } }
    @keyframes imgv-chip-hosted { 0%, 9.2% { opacity: 0; } 10%, 100% { opacity: 1; } }
    @keyframes imgv-upload-track { 0%, 3.75% { opacity: 0; } 4.17%, 8.75% { opacity: 1; } 9.2%, 100% { opacity: 0; } }
    @keyframes imgv-upload-bar { 0%, 4.17% { transform: scaleX(0); opacity: 1; } 8.33% { transform: scaleX(1); opacity: 1; } 8.75% { opacity: 1; } 9.2%, 100% { transform: scaleX(1); opacity: 0; } }
    @keyframes imgv-photo { 0%, 1.25% { opacity: 0; transform: translateY(-18px); } 3.75%, 100% { opacity: 1; transform: none; } }
    @keyframes imgv-typed { 0%, 10.83% { clip-path: inset(-4px 100% -4px 0); } 20.83%, 100% { clip-path: inset(-4px -4px -4px 0); } }
    @keyframes imgv-field { 0%, 10.8% { stroke: var(--imgv-outline); stroke-width: 1.5; } 10.9%, 21.2% { stroke: var(--imgv-ink); stroke-width: 1.5; } 21.67%, 100% { stroke: var(--imgv-leaf); stroke-width: 2; } }
    @keyframes imgv-pop-a { 0% { opacity: 0; transform: scale(.6); } 2%, 31% { opacity: 1; transform: scale(1); } 33%, 100% { opacity: 0; transform: scale(.6); } }
    /* sheet: stack in at 12.5 s, cells fill from 12.6 s (one timeline per row, no delays, so the column is empty until each fill), upload 16 s, progress 16.2-17.2 s, accepted 17.4 s */
    @keyframes imgv-fill-0 { 0%, 52.500% { clip-path: inset(-4px 100% -4px 0); } 54.375%, 100% { clip-path: inset(-4px -4px -4px 0); } }
    @keyframes imgv-fill-1 { 0%, 54.792% { clip-path: inset(-4px 100% -4px 0); } 56.667%, 100% { clip-path: inset(-4px -4px -4px 0); } }
    @keyframes imgv-fill-2 { 0%, 57.083% { clip-path: inset(-4px 100% -4px 0); } 58.958%, 100% { clip-path: inset(-4px -4px -4px 0); } }
    @keyframes imgv-fill-3 { 0%, 59.375% { clip-path: inset(-4px 100% -4px 0); } 61.250%, 100% { clip-path: inset(-4px -4px -4px 0); } }
    @keyframes imgv-fill-4 { 0%, 61.667% { clip-path: inset(-4px 100% -4px 0); } 63.542%, 100% { clip-path: inset(-4px -4px -4px 0); } }
    @keyframes imgv-fill-5 { 0%, 63.958% { clip-path: inset(-4px 100% -4px 0); } 65.833%, 100% { clip-path: inset(-4px -4px -4px 0); } }
    @keyframes imgv-stack { 0%, 52% { opacity: 0; transform: translateY(12px); } 54%, 100% { opacity: 1; transform: none; } }
    @keyframes imgv-upload { 0%, 66.6% { fill: var(--imgv-leaf); } 66.7%, 68.3% { fill: var(--imgv-leaf-deep); } 68.4%, 100% { fill: var(--imgv-leaf); } }
    @keyframes imgv-progress { 0%, 67.5% { transform: scaleX(0); } 71.67%, 100% { transform: scaleX(1); } }
    @keyframes imgv-pop-b { 0% { opacity: 0; transform: scale(.6); } 2%, 25.5% { opacity: 1; transform: scale(1); } 27%, 100% { opacity: 0; transform: scale(.6); } }
}

/* Reduced motion: the finished listing form, nothing moves. */
@media (prefers-reduced-motion: reduce) {
    .imgv-hero__name--form:first-child { opacity: 1; }
    .imgv-hero__pop--a1,
    .imgv-hero__pop--a2,
    .imgv-hero__pop--a3 { opacity: 1; }
    .imgv-hero__typed { clip-path: none; }
    .imgv-hero__field { stroke: var(--imgv-leaf); stroke-width: 2; }
}

/* Breakpoints */

@media (max-width: 900px) {
    .imgv-hero {
        grid-template-columns: minmax(0, 1fr);
        text-align: left;
    }

    .imgv-hero__art {
        max-width: 560px;
        width: 100%;
        margin-inline: auto;
    }
}

@media (max-width: 480px) {
    .imgv-hero__actions .imgv-hero__btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}
