/* One-shot product-page transformation used in the premium homepage hero. */

.hero-product-motion {
    --hpm-ink: #17191d;
    --hpm-muted: #777d85;
    --hpm-line: #dfe3e5;
    --hpm-green: #0aa36c;
    --hpm-green-soft: #def7eb;
    --hpm-blue: #2f6fe5;
    --hpm-shirt-image-height: 210px;
    --hpm-final-scale: 1;
    --hpm-final-height: 720px;
    --hpm-before-width: 267.12px;
    --hpm-phone-overlap: 40.068px; /* 15% of the rendered before phone. */
    --hpm-composition-left: 11px;
    --hpm-after-left: calc(var(--hpm-composition-left) + var(--hpm-before-width) - var(--hpm-phone-overlap));
    --hpm-after-top: 12px;
    --hpm-after-height: 629px;
    --hpm-chart-overlap: 63.6px; /* 20% of the after phone's width. */
    width: min(100%, 700px);
    height: 720px;
    margin-inline: auto;
    position: relative;
    overflow: visible;
    isolation: isolate;
    color: var(--hpm-ink);
    font-family: Inter, system-ui, sans-serif;
}

.hero-product-motion *,
.hero-product-motion *::before,
.hero-product-motion *::after { box-sizing: border-box; }

.hpm-transform,
.hpm-final {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.hpm-phone {
    overflow: hidden;
    position: relative;
    border: 5px solid var(--hpm-ink);
    background: #fff;
    box-shadow: 0 24px 65px rgba(23, 25, 29, 0.15);
}

.hpm-phone--live {
    width: min(calc(100% - 24px), 318px);
    height: 644px;
    border-radius: 34px;
}

.hpm-notch {
    width: 66px;
    height: 14px;
    position: absolute;
    z-index: 8;
    top: 7px;
    left: 50%;
    translate: -50% 0;
    border-radius: 999px;
    background: var(--hpm-ink);
}

.hpm-shopbar {
    height: 50px;
    padding: 18px 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hpm-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.hpm-brand-mark {
    width: 23px;
    height: 3px;
    border-radius: 3px;
    background: var(--hpm-green);
}

.hpm-menu { display: flex; gap: 3px; }
.hpm-menu i { width: 3px; height: 3px; border-radius: 50%; background: var(--hpm-muted); }

.hpm-product-image {
    height: 128px;
    margin: 7px 12px 0;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: radial-gradient(circle at 70% 18%, rgba(10,163,108,.1), transparent 30%), linear-gradient(145deg, #f0f2f1, #e4e8e6);
}

.hpm-bottle {
    width: 50px;
    height: 82px;
    position: absolute;
    bottom: 13px;
    left: 50%;
    translate: -50% 0;
    border-radius: 17px 17px 13px 13px;
    background: #b9c0bd;
}

.hpm-bottle::before {
    content: "";
    width: 21px;
    height: 15px;
    position: absolute;
    top: -12px;
    left: 15px;
    border-radius: 5px 5px 2px 2px;
    background: #8f9793;
}

.hpm-content { padding: 12px 14px 14px; }

.hpm-rating {
    height: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    color: #e4a51c;
    font-size: 9px;
    letter-spacing: .04em;
    opacity: 0;
    translate: 30px 0;
}

.hpm-rating span { color: var(--hpm-muted); font-size: 8px; letter-spacing: 0; }
.hpm-title { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.15; }
.hpm-price { margin-top: 4px; color: var(--hpm-muted); font-size: 10px; }

.hpm-description-stage {
    height: 86px;
    margin-top: 8px;
    position: relative;
}

.hpm-boring,
.hpm-checklist {
    position: absolute;
    inset: 0;
    margin: 0;
}

.hpm-boring { color: var(--hpm-muted); font-size: 8px; line-height: 1.45; }

.hpm-checklist,
.hpm-mini-checklist {
    display: grid;
    align-content: start;
    gap: 5px;
    padding: 0;
    list-style: none;
}

.hpm-checklist li,
.hpm-mini-checklist li {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--hpm-muted);
    font-size: 8px;
}

.hpm-checklist li { opacity: 0; translate: 30px 0; }

.hpm-check-icon {
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 15px;
    border-radius: 50%;
    background: var(--hpm-green-soft);
    color: var(--hpm-green);
    line-height: 0;
}

.hpm-check-icon svg {
    width: 9px;
    height: 9px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hpm-options-stage { height: 112px; position: relative; }
.hpm-old-options, .hpm-new-options { position: absolute; inset: 0; }
.hpm-new-options { opacity: 0; pointer-events: none; }

.hpm-label {
    display: block;
    margin: 0 0 4px;
    color: var(--hpm-muted);
    font-size: 7px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hpm-dropdown {
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 9px;
    border: 1px solid var(--hpm-line);
    border-radius: 7px;
    color: var(--hpm-muted);
    font-size: 8px;
}

.hpm-dropdown + .hpm-label { margin-top: 7px; }

.hpm-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.hpm-plan {
    height: 43px;
    padding: 8px 5px 5px;
    position: relative;
    border: 1px solid var(--hpm-line);
    border-radius: 8px;
    background: #fff;
    line-height: 1.1;
}

.hpm-plan strong { display: block; font-size: 8px; font-weight: 500; }
.hpm-plan span { display: block; margin-top: 3px; color: var(--hpm-muted); font-size: 6px; }
.hpm-plan--popular { border-color: var(--hpm-green); background: var(--hpm-green-soft); }
.hpm-plan--discount span { color: var(--hpm-green); font-weight: 500; }

.hpm-popular {
    position: absolute;
    top: -7px;
    right: 3px;
    padding: 2px 4px;
    border-radius: 999px;
    background: var(--hpm-green);
    color: #fff;
    font-size: 4.5px;
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.hpm-colors-wrap { margin-top: 14px; opacity: 0; translate: 30px 0; }
.hpm-colors { display: flex; align-items: center; gap: 7px; }
.hpm-color {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--hpm-line);
}
.hpm-color--selected { box-shadow: 0 0 0 2px var(--hpm-green); }

.hpm-cta {
    width: 100%;
    height: 40px;
    margin-top: 6px;
    overflow: hidden;
    position: relative;
    border: 0;
    border-radius: 9px;
    background: var(--hpm-blue);
    color: #fff;
    font: 500 10px/1 Inter, system-ui, sans-serif;
}

.hpm-cta span { position: absolute; inset: 0; display: grid; place-items: center; }
.hpm-cta-after { opacity: 0; translate: 0 18px; }

.hpm-wins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 8px; }
.hpm-win {
    display: grid;
    justify-items: center;
    gap: 3px;
    color: var(--hpm-muted);
    font-size: 6px;
    text-align: center;
    opacity: 0;
    translate: 0 16px;
}

.hpm-win i,
.hpm-mini-win i {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--hpm-green-soft);
    color: var(--hpm-green);
    font-style: normal;
    font-size: 8px;
}

.hpm-win i svg,
.hpm-mini-win i svg {
    width: 10px;
    height: 10px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hpm-scan {
    width: 100%;
    height: 2px;
    position: absolute;
    z-index: 7;
    top: 48px;
    left: 0;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, transparent, #61e2af 20%, #d9fff0 70%, transparent);
    box-shadow: 0 0 12px rgba(10,163,108,.65);
}

.hpm-process-status {
    width: 128px;
    position: absolute;
    z-index: 8;
    top: 50%;
    left: calc(50% - 295px);
    translate: 0 -50%;
}

.hpm-process-status__state {
    min-height: 34px;
    position: absolute;
    inset: 0 auto auto 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(10,163,108,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: var(--hpm-green);
    box-shadow: 0 10px 30px rgba(23,25,29,.1);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .02em;
    opacity: 0;
    white-space: nowrap;
}

.hpm-process-status__state i {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid rgba(10,163,108,.22);
    border-top-color: var(--hpm-green);
    border-radius: 50%;
    animation: hpm-loader-spin .72s linear infinite;
}

.hpm-final {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: scale(.92);
}

.hpm-final-layout {
    position: absolute;
    top: 0;
    left: 50%;
    width: 700px;
    height: 720px;
    transform: translateX(-50%) scale(var(--hpm-final-scale));
    transform-origin: top center;
}

.hpm-phone--mini { position: absolute; width: 318px; height: 644px; border-radius: 34px; }
.hpm-phone--before {
    top: 100px;
    left: var(--hpm-composition-left);
    z-index: 1;
    transform: scale(.84);
    transform-origin: top left;
}
.hpm-phone--after {
    top: var(--hpm-after-top);
    left: var(--hpm-after-left);
    z-index: 2;
    height: auto;
    transform: none;
}
.hpm-phone--mini .hpm-notch { width: 66px; height: 14px; top: 7px; }
.hpm-phone--mini .hpm-shopbar { height: 50px; padding: 18px 16px 0; }
.hpm-phone--mini .hpm-brand { gap: 7px; font-size: 9px; }
.hpm-phone--mini .hpm-brand-mark { width: 23px; }
.hpm-mini-image {
    height: 150px;
    margin: 7px 12px 0;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(145deg, #f0f2f1, #e4e8e6);
}
.hpm-phone--after .hpm-mini-image {
    height: 180px;
    background: radial-gradient(circle at 70% 18%, rgba(10,163,108,.12), transparent 31%), linear-gradient(145deg, #edf3f0, #dceae3);
}
.hpm-lifestyle-person {
    width: 134px;
    height: auto;
    display: block;
    position: absolute;
    z-index: 1;
    right: 2px;
    bottom: -28px;
    filter: drop-shadow(0 9px 12px rgba(23,25,29,.12));
}
.hpm-mini-image .hpm-bottle { width: 50px; height: 82px; bottom: 13px; }
.hpm-mini-image .hpm-bottle::before { width: 21px; height: 15px; left: 15px; top: -12px; }
.hpm-phone--after .hpm-bottle { width: 61px; height: 106px; bottom: 18px; left: 27%; z-index: 2; background: #89bca6; box-shadow: 0 10px 20px rgba(23,25,29,.12); }
.hpm-phone--after .hpm-bottle::before { width: 25px; left: 18px; background: #5f907b; }
.hpm-mini-content { padding: 12px 14px 14px; }
.hpm-mini-rating { margin-bottom: 5px; color: #e4a51c; font-size: 9px; }
.hpm-mini-rating span { margin-left: 5px; color: var(--hpm-muted); font-size: 8px; }
.hpm-mini-title { margin: 0; font-size: 16px; font-weight: 500; }
.hpm-mini-price { margin-top: 4px; color: var(--hpm-muted); font-size: 10px; }
.hpm-mini-copy { min-height: 160px; margin: 10px 0 12px; color: var(--hpm-muted); font-size: 8px; line-height: 1.45; }
.hpm-phone--before .hpm-mini-copy { min-height: 0; }
.hpm-phone--mini .hpm-dropdown { height: 31px; font-size: 8px; }
.hpm-mini-checklist { min-height: 96px; margin: 8px 0 10px; gap: 5px; }
.hpm-phone--after .hpm-mini-checklist { min-height: 77px; }
.hpm-mini-checklist li { gap: 6px; font-size: 8px; }
.hpm-mini-checklist .hpm-check-icon { width: 15px; height: 15px; flex-basis: 15px; }
.hpm-phone--mini .hpm-plans { gap: 5px; }
.hpm-phone--mini .hpm-plan { height: 43px; padding: 8px 5px 5px; }
.hpm-phone--mini .hpm-plan strong { font-size: 8px; }
.hpm-phone--mini .hpm-plan span { font-size: 6px; }
.hpm-mini-colors-wrap { margin-top: 14px; }
.hpm-phone--after .hpm-mini-colors-wrap { margin-top: 10px; }
.hpm-phone--mini .hpm-color { width: 22px; height: 22px; flex-basis: 22px; }
.hpm-mini-button {
    width: 100%;
    height: 40px;
    margin-top: 10px;
    border: 0;
    border-radius: 9px;
    background: var(--hpm-blue);
    color: #fff;
    font: 500 10px/1 Inter, system-ui, sans-serif;
}
.hpm-phone--after .hpm-mini-button { margin-top: 8px; background: var(--hpm-green); }
.hpm-mini-wins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 8px; }
.hpm-phone--after .hpm-mini-wins { margin-top: 6px; }
.hpm-mini-win { display: grid; justify-items: center; gap: 3px; color: var(--hpm-muted); font-size: 6px; text-align: center; }
.hpm-mini-win i { width: 19px; height: 19px; font-size: 8px; }
.hpm-mini-win i svg { width: 10px; height: 10px; }

.hpm-bridge {
    position: absolute;
    top: calc(var(--hpm-after-top) + var(--hpm-after-height) * .56);
    left: var(--hpm-after-left);
    z-index: 4;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    padding: 5px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(23, 25, 29, .18);
    transform: translate(-50%, -50%);
}
.hpm-prettifai { display: block; }
.hpm-prettifai img { width: 54px; height: 54px; display: block; border-radius: 13px; object-fit: cover; }

.hpm-sales-card {
    width: 196px;
    min-height: 90px;
    position: absolute;
    z-index: 5;
    top: calc(var(--hpm-after-top) + var(--hpm-after-height) - 72px);
    left: calc(var(--hpm-after-left) + 318px - var(--hpm-chart-overlap));
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 11px 10px 10px 12px;
    border: 1px solid rgba(10,163,108,.2);
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 42px rgba(23,25,29,.14);
    backdrop-filter: blur(10px);
}
.hpm-sales-card__summary { display: grid; align-content: center; }
.hpm-sales-card__summary span {
    color: var(--hpm-muted);
    font-size: 7px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.hpm-sales-card__summary strong {
    margin-top: 4px;
    color: var(--hpm-ink);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -.03em;
}
.hpm-sales-card__summary small {
    width: max-content;
    margin-top: 5px;
    padding: 3px 5px;
    border-radius: 999px;
    background: var(--hpm-green-soft);
    color: var(--hpm-green);
    font-size: 7px;
    font-weight: 600;
}
.hpm-sales-chart { width: 94px; height: 52px; overflow: visible; }
.hpm-sales-chart__grid { fill: none; stroke: var(--hpm-line); stroke-width: .7; }
.hpm-sales-chart__area { fill: url(#hpm-sales-area); }
.hpm-sales-chart__line {
    fill: none;
    stroke: var(--hpm-green);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hpm-sales-chart circle { fill: #fff; stroke: var(--hpm-green); stroke-width: 2; }

:root[data-theme="premium"] .hpm-transform { animation: hpm-transform-exit 11s ease 1 forwards; }
:root[data-theme="premium"] .hpm-product-image { animation: hpm-image-grow 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-phone--live .hpm-bottle { animation: hpm-bottle-upgrade 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-phone--live .hpm-bottle::before { animation: hpm-cap-upgrade 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-rating { animation: hpm-rating-in 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-boring { animation: hpm-old-copy-out 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-description-stage { animation: hpm-description-grow 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-checklist li { animation: hpm-check-in 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-checklist li:nth-child(2) { animation-delay: .12s; }
:root[data-theme="premium"] .hpm-checklist li:nth-child(3) { animation-delay: .24s; }
:root[data-theme="premium"] .hpm-checklist li:nth-child(4) { animation-delay: .36s; }
:root[data-theme="premium"] .hpm-old-options { animation: hpm-old-options-out 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-options-stage { animation: hpm-options-grow 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-new-options { animation: hpm-new-options-in 11s ease 1 forwards; }
:root[data-theme="premium"] .hpm-new-options .hpm-plan { opacity: 0; translate: 30px 0; animation: hpm-plan-in 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-new-options .hpm-plan:nth-child(2) { animation-delay: .12s; }
:root[data-theme="premium"] .hpm-new-options .hpm-plan:nth-child(3) { animation-delay: .24s; }
:root[data-theme="premium"] .hpm-colors-wrap { animation: hpm-colors-in 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-cta { animation: hpm-button-upgrade 11s ease 1 forwards; }
:root[data-theme="premium"] .hpm-cta-before { animation: hpm-button-before-out 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-cta-after { animation: hpm-button-after-in 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-win { animation: hpm-trust-in 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }
:root[data-theme="premium"] .hpm-win:nth-child(2) { animation-delay: .12s; }
:root[data-theme="premium"] .hpm-win:nth-child(3) { animation-delay: .24s; }
:root[data-theme="premium"] .hpm-scan { animation: hpm-scan 1.5s cubic-bezier(.25,.8,.3,1) 1 forwards; }
:root[data-theme="premium"] .hpm-process-status__state--scan { animation: hpm-status-scan 11s ease 1 forwards; }
:root[data-theme="premium"] .hpm-process-status__state--prettify { animation: hpm-status-prettify 11s ease 1 forwards; }
:root[data-theme="premium"] .hpm-final { animation: hpm-final-reveal 11s cubic-bezier(.22,.8,.25,1) 1 forwards; }

@keyframes hpm-loader-spin { to { rotate: 360deg; } }
@keyframes hpm-scan { 0% { top:48px; opacity:0; transform:scaleX(0); } 12% { opacity:1; transform:scaleX(1); } 78% { top:610px; opacity:.85; transform:scaleX(1); } 100% { top:628px; opacity:0; transform:scaleX(0); visibility:hidden; } }
@keyframes hpm-status-scan { 0%,2% { opacity:0; transform:translateX(-8px); } 4%,12% { opacity:1; transform:translateX(0); } 15%,100% { opacity:0; transform:translateX(8px); visibility:hidden; } }
@keyframes hpm-status-prettify { 0%,14% { opacity:0; transform:translateX(-8px); } 18%,82% { opacity:1; transform:translateX(0); } 88%,100% { opacity:0; transform:translateX(8px); visibility:hidden; } }
@keyframes hpm-image-grow { 0%,13% { height:128px; } 20%,100% { height:170px; } }
@keyframes hpm-bottle-upgrade { 0%,13% { width:50px; height:82px; bottom:13px; background:#b9c0bd; } 20%,100% { width:61px; height:106px; bottom:18px; background:#89bca6; } }
@keyframes hpm-cap-upgrade { 0%,13% { left:15px; width:21px; background:#8f9793; } 20%,100% { left:18px; width:25px; background:#5f907b; } }
@keyframes hpm-rating-in { 0%,21% { opacity:0; translate:30px 0; } 28%,100% { opacity:1; translate:0; } }
@keyframes hpm-old-copy-out { 0%,29% { opacity:1; translate:0; } 36%,100% { opacity:0; translate:-34px 0; } }
@keyframes hpm-description-grow { 0%,29% { height:86px; } 38%,100% { height:96px; } }
@keyframes hpm-check-in { 0%,32% { opacity:0; translate:30px 0; } 40%,100% { opacity:1; translate:0; } }
@keyframes hpm-old-options-out { 0%,43% { opacity:1; translate:0; } 50%,100% { opacity:0; translate:-38px 0; } }
@keyframes hpm-options-grow { 0%,43% { height:112px; } 53%,100% { height:131px; } }
@keyframes hpm-new-options-in { 0%,47% { opacity:0; } 52%,100% { opacity:1; } }
@keyframes hpm-plan-in { 0%,48% { opacity:0; translate:30px 0; } 56%,100% { opacity:1; translate:0; } }
@keyframes hpm-colors-in { 0%,57% { opacity:0; translate:30px 0; } 64%,100% { opacity:1; translate:0; } }
@keyframes hpm-button-upgrade { 0%,65% { background:var(--hpm-blue); } 72%,100% { background:var(--hpm-green); } }
@keyframes hpm-button-before-out { 0%,65% { opacity:1; translate:0; } 72%,100% { opacity:0; translate:0 -18px; } }
@keyframes hpm-button-after-in { 0%,65% { opacity:0; translate:0 18px; } 72%,100% { opacity:1; translate:0; } }
@keyframes hpm-trust-in { 0%,70% { opacity:0; translate:0 16px; } 77%,100% { opacity:1; translate:0; } }
@keyframes hpm-transform-exit { 0%,83% { opacity:1; transform:scale(1); visibility:visible; } 90%,100% { opacity:0; transform:scale(.86); visibility:hidden; } }
@keyframes hpm-final-reveal { 0%,85% { opacity:0; visibility:hidden; transform:scale(.92); } 94%,100% { opacity:1; visibility:visible; transform:scale(1); } }

@media (min-width: 1141px) {
    :root[data-theme="premium"] .homepage-vertical .hero-layout {
        grid-template-columns: minmax(0, 1fr) minmax(620px, 700px);
        gap: clamp(34px, 4vw, 58px);
    }
}

@media (max-width: 1140px) {
    :root[data-theme="premium"] .homepage-vertical .hero-layout { grid-template-columns: 1fr; }
    .hero-product-motion { margin-top: 26px; }
}

@media (max-width: 720px) {
    :root[data-theme="premium"] .hero-product-motion { animation: hpm-mobile-root 11s ease 1 forwards; }
    :root[data-theme="premium"] .hero-product-motion[data-hero-complete] { height: var(--hpm-final-height); animation: none; }
    .hpm-process-status { top: 0; left: 50%; translate: -50% 0; }
    @keyframes hpm-mobile-root { 0%,85% { height:720px; } 94%,100% { height:var(--hpm-final-height); } }
}

@media (prefers-reduced-motion: reduce) {
    .hero-product-motion { height: 720px; animation: none !important; }
    .hpm-transform { display: none; animation: none !important; }
    .hpm-final { opacity: 1; visibility: visible; transform: none; animation: none !important; }
}

@media (prefers-reduced-motion: reduce) and (max-width: 720px) {
    .hero-product-motion { height: var(--hpm-final-height); }
}

.hpm-shirt-photo {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
    transform-origin: 50% 38%;
    transform: translate(14px, -8px) scale(1.8);
}
.hpm-phone--before .hpm-mini-image { height: 128px; }
.hpm-phone--after .hpm-mini-image { height: var(--hpm-shirt-image-height); }
.hpm-phone--after .hpm-shirt-photo { transform: none; }
.hpm-phone--after .hpm-mini-content { padding-bottom: 10px; }
.hpm-title,
.hpm-mini-title { font-size: 15px; line-height: 1.3; }

.hpm-crop-guide {
    position: absolute;
    z-index: 3;
    inset: 9px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 4px;
    background: linear-gradient(90deg, transparent 33%, rgba(255,255,255,.5) 33%, rgba(255,255,255,.5) 33.4%, transparent 33.4%, transparent 66%, rgba(255,255,255,.5) 66%, rgba(255,255,255,.5) 66.4%, transparent 66.4%), linear-gradient(transparent 33%, rgba(255,255,255,.5) 33%, rgba(255,255,255,.5) 33.4%, transparent 33.4%, transparent 66%, rgba(255,255,255,.5) 66%, rgba(255,255,255,.5) 66.4%, transparent 66.4%);
    opacity: 0;
}
.hpm-crop-caption {
    position: absolute;
    z-index: 4;
    bottom: 14px;
    left: 50%;
    translate: -50% 0;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--hpm-ink);
    color: #fff;
    font-size: 8px;
    white-space: nowrap;
    opacity: 0;
}
.hpm-sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.hpm-size {
    display: grid;
    place-items: center;
    height: 32px;
    border: 1px solid var(--hpm-line);
    border-radius: 7px;
    background: #fff;
    color: var(--hpm-ink);
    font-size: 9px;
    font-weight: 500;
}
.hpm-size--selected { border-color: var(--hpm-green); color: var(--hpm-green); background: var(--hpm-green-soft); }
.hpm-color--ivory { background: #eee8dc; }
.hpm-color--sand { background: #c8b497; }
.hpm-color--sage { background: #8a9b85; }
.hpm-color--ink { background: #343b40; }
.hpm-sales-example { margin-top: 2px; color: var(--hpm-muted); font-size: 6px; font-style: normal; }

:root[data-theme="premium"] .hpm-product-image { animation-name: linen-image-grow; }
:root[data-theme="premium"] .hpm-phone--live .hpm-shirt-photo { animation: linen-crop 11s cubic-bezier(.22,.8,.25,1) forwards; }
:root[data-theme="premium"] .hpm-crop-guide,
:root[data-theme="premium"] .hpm-crop-caption { animation: linen-crop-guide 11s ease forwards; }
:root[data-theme="premium"] .hpm-description-stage { animation-name: linen-description-fit; }
:root[data-theme="premium"] .hpm-options-stage { animation-name: linen-options-fit; }
:root[data-theme="premium"] .hpm-new-options .hpm-size { animation: hpm-plan-in 11s cubic-bezier(.22,.8,.25,1) forwards; }
:root[data-theme="premium"] .hpm-new-options .hpm-size:nth-child(2) { animation-delay: .06s; }
:root[data-theme="premium"] .hpm-new-options .hpm-size:nth-child(3) { animation-delay: .12s; }
:root[data-theme="premium"] .hpm-new-options .hpm-size:nth-child(4) { animation-delay: .18s; }
:root[data-theme="premium"] .hpm-new-options .hpm-size:nth-child(5) { animation-delay: .24s; }

@keyframes linen-image-grow { 0%,13% { height: 128px; } 28%,100% { height: var(--hpm-shirt-image-height); } }
@keyframes linen-crop { 0%,13% { transform: translate(14px, -8px) scale(1.8); } 28%,100% { transform: none; } }
@keyframes linen-crop-guide { 0%,9% { opacity: 0; } 12%,26% { opacity: 1; } 31%,100% { opacity: 0; } }
@keyframes linen-description-fit { 0%,29% { height: 86px; } 38%,100% { height: 88px; } }
@keyframes linen-options-fit { 0%,43% { height: 112px; } 53%,100% { height: 108px; } }


/* The comparison settles first; the chart then rises into its own space. */
:root[data-theme="premium"] .hpm-sales-card { animation: hpm-sales-enter .65s cubic-bezier(.22,.8,.25,1) 10.55s both; }
:root[data-theme="premium"] .hpm-sales-chart__line { animation: hpm-sales-draw .65s ease 10.7s both; }
@keyframes hpm-sales-enter { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes hpm-sales-draw { from { stroke-dasharray: 100; stroke-dashoffset: 100; } to { stroke-dasharray: 100; stroke-dashoffset: 0; } }

.hero-product-motion[data-hero-loading],
.hero-product-motion[data-hero-loading] *,
.hero-product-motion[data-hero-loading] *::before { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
    .hero-product-motion *,
    .hero-product-motion *::before { animation: none !important; }
    .hpm-sales-card { opacity: 1; transform: none; }
    .hpm-sales-chart__line { stroke-dashoffset: 0; }
}
