/*
Component: HERO Cards
Version: 1.0.0
Author: Live Design
*/

.lvd-hero-cards                                  {position:relative; --lvd-hc-pad:48px; --lvd-hc-media:.5;}

/* --- Grid: two equal-height cards. The media column is a share of the row (lvd-media-w-*);
   the row height is max(text, lvd-height-*), and the image covers whatever that is. --- */
.lvd-hero-cards .lvd-hero-cards-grid             {display:grid; grid-template-columns:calc((100% - var(--lvd-gap, 0px)) * var(--lvd-hc-media)) minmax(0, 1fr); align-items:stretch;}
.lvd-hero-cards .lvd-hero-cards-grid.lvd-media-end {grid-template-columns:minmax(0, 1fr) calc((100% - var(--lvd-gap, 0px)) * var(--lvd-hc-media));}
.lvd-hero-cards .lvd-hero-cards-solo             {grid-template-columns:minmax(0, 1fr);}
.lvd-hero-cards .lvd-media-w-1-3                 {--lvd-hc-media:.3333;}
.lvd-hero-cards .lvd-media-w-2-5                 {--lvd-hc-media:.4;}
.lvd-hero-cards .lvd-media-w-1-2                 {--lvd-hc-media:.5;}
.lvd-hero-cards .lvd-media-w-3-5                 {--lvd-hc-media:.6;}
.lvd-hero-cards .lvd-media-w-2-3                 {--lvd-hc-media:.6667;}
.lvd-hero-cards .lvd-height-sm                   {min-height:400px;}
.lvd-hero-cards .lvd-height-md                   {min-height:560px;}
.lvd-hero-cards .lvd-height-lg                   {min-height:720px;}

.lvd-hero-cards .lvd-card                        {border-radius:var(--lvd-rounded-md); min-width:0;}

/* --- Media card: image and video cover it; focal point via object-position --- */
.lvd-hero-cards .lvd-hero-cards-media            {position:relative; overflow:hidden; isolation:isolate;}
.lvd-hero-cards .lvd-hero-cards-media picture    {display:contents;}
.lvd-hero-cards .lvd-cover-img,
.lvd-hero-cards .lvd-cover-video                 {position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:var(--lvd-cover-focus, 50% 50%); transition:transform .8s cubic-bezier(.2, .7, .2, 1);}
.lvd-hero-cards .lvd-cover-video                 {opacity:0; transition:opacity .6s ease, transform .8s cubic-bezier(.2, .7, .2, 1);}
.lvd-hero-cards .lvd-cover-video.lvd-is-playing  {opacity:1;}
.lvd-hero-cards .lvd-hero-cards-media .lvd-badge {position:absolute; top:24px; left:24px; z-index:3; pointer-events:none;} /* the card under it stays clickable */

.lvd-hero-cards .lvd-focus-center                {--lvd-cover-focus:50% 50%;}
.lvd-hero-cards .lvd-focus-top                   {--lvd-cover-focus:50% 0%;}
.lvd-hero-cards .lvd-focus-bottom                {--lvd-cover-focus:50% 100%;}
.lvd-hero-cards .lvd-focus-left                  {--lvd-cover-focus:0% 50%;}
.lvd-hero-cards .lvd-focus-right                 {--lvd-cover-focus:100% 50%;}

/* --- Play: one <button> over the whole media card (one tab stop). Hover and keyboard focus
   look the same; the zoom is a transform, so the grid never moves. Hover only on devices that
   hover: after a tap, :hover sticks and the image would stay zoomed once the modal closes. --- */
.lvd-hero-cards .lvd-hero-cards-play             {position:absolute; inset:0; z-index:2; display:block; width:100%; height:100%; padding:0; margin:0; border:0; background:none; color:inherit; font:inherit; cursor:pointer;}
.lvd-hero-cards .lvd-hero-cards-play:focus-visible {outline:none;}
.lvd-hero-cards .lvd-hero-cards-play .lvd-video-actions {bottom:24px; right:24px;} /* symmetric with the badge */
.lvd-hero-cards .lvd-hero-cards-play:focus-visible .lvd-play-button     {background:var(--lvd-glass-bg-hover);}
.lvd-hero-cards .lvd-hero-cards-play:focus-visible .lvd-play-button svg {fill:var(--lvd-glass-ink-hover);}
.lvd-hero-cards .lvd-hero-cards-play:focus-visible .lvd-video-actions:not(.lvd-video-actions-center) .lvd-play-button {transform:scale(1.08);}
.lvd-hero-cards .lvd-hero-cards-play:focus-visible .lvd-video-actions-center .lvd-play-button {transform:translate(-50%, -50%) scale(1.1) translateZ(0);}
.lvd-hero-cards .lvd-hero-cards-play:focus-visible .lvd-play-button {outline:2px solid var(--lvd-color-primary); outline-offset:3px;}
.lvd-hero-cards .lvd-has-play:has(.lvd-hero-cards-play:focus-visible) :is(.lvd-cover-img, .lvd-cover-video) {transform:scale(1.04);}
@media (hover:hover) {
.lvd-hero-cards .lvd-hero-cards-play:hover .lvd-play-button     {background:var(--lvd-glass-bg-hover);}
.lvd-hero-cards .lvd-hero-cards-play:hover .lvd-play-button svg {fill:var(--lvd-glass-ink-hover);}
.lvd-hero-cards .lvd-hero-cards-play:hover .lvd-video-actions:not(.lvd-video-actions-center) .lvd-play-button {transform:scale(1.08);}
.lvd-hero-cards .lvd-hero-cards-play:hover .lvd-video-actions-center .lvd-play-button {transform:translate(-50%, -50%) scale(1.1) translateZ(0);}
.lvd-hero-cards .lvd-has-play:has(.lvd-hero-cards-play:hover) :is(.lvd-cover-img, .lvd-cover-video) {transform:scale(1.04);}
}

/* --- Text card --- */
.lvd-hero-cards .lvd-hero-cards-text             {display:flex; flex-direction:column; justify-content:center; padding:var(--lvd-hc-pad);}
.lvd-hero-cards .lvd-content-top                 {justify-content:flex-start;}
.lvd-hero-cards .lvd-content-bottom              {justify-content:flex-end;}
    .lvd-hero-cards .lvd-breadcrumbs                 {margin-bottom:16px;}
    .lvd-hero-cards .lvd-hero-cards-text .lvd-badge  {margin-bottom:16px;} /* no media: the badge sits in the text flow */
    .lvd-hero-cards .lvd-keyword                     {margin-bottom:8px;}
    .lvd-hero-cards .lvd-title                       {margin-bottom:16px;}
    /* The core 16px is sized for card text. At hero sizes the title→text gap also carries both
       lines' leading, so 16px under the text read tighter than the gap above it. */
    .lvd-hero-cards .lvd-content .lvd-button-group   {margin-top:32px;}
    /* The core last-child reset is out-specified by the title margin above */
    .lvd-hero-cards .lvd-content > :last-child,
    .lvd-hero-cards .lvd-text > :last-child          {margin-bottom:0;}

/* Animation — text only: an image that starts invisible can't be the LCP candidate */
.lvd-hero-cards.lvd-animate-on-scroll .lvd-content {opacity:0; transform:translateY(16px); transition:opacity 1s cubic-bezier(0.65, 0, 0.35, 1), transform 1s cubic-bezier(0.65, 0, 0.35, 1);}
.lvd-hero-cards.lvd-is-visible .lvd-content        {opacity:1; transform:none;} /* none, not translateY(0): no lingering stacking context */

@media (prefers-reduced-motion: reduce) {
.lvd-hero-cards.lvd-animate-on-scroll .lvd-content {opacity:1; transform:none; transition:none;} /* the global reset only reaches the section itself */
.lvd-hero-cards .lvd-cover-img,
.lvd-hero-cards .lvd-cover-video                 {transition:none;}
.lvd-hero-cards .lvd-has-play:has(.lvd-hero-cards-play:is(:hover, :focus-visible)) :is(.lvd-cover-img, .lvd-cover-video) {transform:none;}
.lvd-hero-cards .lvd-hero-cards-play:is(:hover, :focus-visible) .lvd-video-actions:not(.lvd-video-actions-center) .lvd-play-button {transform:none;}
.lvd-hero-cards .lvd-hero-cards-play:is(:hover, :focus-visible) .lvd-video-actions-center .lvd-play-button {transform:translate(-50%, -50%) translateZ(0);}
}

/* --- Bm: stacked; the media card takes its ratio, heights are dropped --- */
@media (min-width:1px) and (max-width:767px)
{
.lvd-hero-cards                                  {--lvd-hc-pad:24px; padding-left:16px; padding-right:16px;}
.lvd-hero-cards .lvd-hero-cards-grid,
.lvd-hero-cards .lvd-hero-cards-grid.lvd-media-end {grid-template-columns:minmax(0, 1fr);}
.lvd-hero-cards .lvd-hero-cards-grid.lvd-mt      {margin-top:16px;} /* default gap under the header, as HERO Wings Card; an explicit choice stays */
.lvd-hero-cards .lvd-content .lvd-button-group   {margin-top:24px;}
.lvd-hero-cards :is(.lvd-height-sm, .lvd-height-md, .lvd-height-lg) {min-height:0;}
/* width is load-bearing: a stretched grid item with aspect-ratio and no width gets its width
   FROM the ratio in WebKit (see HERO Cover Card) */
.lvd-hero-cards .lvd-hero-cards-media            {width:100%;}
.lvd-hero-cards .lvd-cover-video-desktop         {display:none;}
.lvd-hero-cards .lvd-hero-cards-media .lvd-badge {top:16px; left:16px;}
.lvd-hero-cards .lvd-hero-cards-play .lvd-video-actions {bottom:16px; right:16px;}

.lvd-hero-cards .bm-lvd-focus-center             {--lvd-cover-focus:50% 50%;}
.lvd-hero-cards .bm-lvd-focus-top                {--lvd-cover-focus:50% 0%;}
.lvd-hero-cards .bm-lvd-focus-bottom             {--lvd-cover-focus:50% 100%;}
.lvd-hero-cards .bm-lvd-focus-left               {--lvd-cover-focus:0% 50%;}
.lvd-hero-cards .bm-lvd-focus-right              {--lvd-cover-focus:100% 50%;}
}

/* --- Bt: every split is 1/2 — at 2/3 the text card would be ~300px --- */
@media (min-width:768px) and (max-width:1024px)
{
.lvd-hero-cards                                  {--lvd-hc-pad:32px; padding-left:24px; padding-right:24px;}
.lvd-hero-cards .lvd-hero-cards-grid[class*="lvd-media-w-"] {--lvd-hc-media:.5;}
}

/* --- Full HD (above 1344px the container carries the global wide-screen gutter) --- */
@media (min-width:1025px) and (max-width:1344px)
{
.lvd-hero-cards                                  {padding-left:24px; padding-right:24px;}
}
