517 lines
12 KiB
CSS
517 lines
12 KiB
CSS
/**
|
|
* Home hero carousel — scoped to #section-1.home-hero-carousel
|
|
* Source: Serena/Figma HeroCarousel.tsx (autoplay 5s, fade, pill dots)
|
|
*
|
|
* Layout extension (see js/home-hero-carousel.js):
|
|
* data-hero-layout-reference — slide that sets carousel height
|
|
* data-hero-layout-anchor — bottom edge used for dots (gap: --hero-coach-dots-gap)
|
|
* JS sets --hero-reference-* on #homepage or carousel root; CSS fallbacks apply before measure
|
|
* Mobile: .is-banner-active pins dots to viewport bottom while banner is in view
|
|
*/
|
|
#homepage #section-1.home-hero-carousel {
|
|
position: relative;
|
|
overflow: visible;
|
|
padding: 0;
|
|
margin: 0;
|
|
background: transparent;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__inner {
|
|
position: relative;
|
|
z-index: 1;
|
|
max-width: var(--hero-inner-max-width, 1280px);
|
|
margin: 0 auto;
|
|
padding: 48px 20px 56px;
|
|
overflow: visible;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
#homepage .home-hero-carousel__inner {
|
|
padding: 76px 32px 64px;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
#homepage .home-hero-carousel__inner {
|
|
padding: var(--hero-nav-gap) 32px
|
|
calc(var(--hero-coach-dots-gap) + var(--hero-dots-height) + var(--hero-inner-padding-bottom));
|
|
min-height: calc(
|
|
var(--hero-reference-dots-top, var(--hero-reference-dots-top-fallback))
|
|
+ var(--hero-dots-height)
|
|
+ var(--hero-inner-padding-bottom)
|
|
);
|
|
}
|
|
}
|
|
|
|
#homepage .home-hero-carousel__viewport {
|
|
position: relative;
|
|
overflow: visible;
|
|
height: var(--hero-reference-viewport-height, 720px);
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
#homepage .home-hero-carousel__viewport {
|
|
height: var(
|
|
--hero-reference-viewport-height,
|
|
var(--hero-reference-viewport-height-fallback)
|
|
);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 991.98px) {
|
|
#homepage .home-hero-carousel__viewport {
|
|
touch-action: pan-y;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__inner {
|
|
padding-bottom: calc(
|
|
var(--hero-mobile-dots-reserve, 26px) + var(--hero-inner-padding-bottom, 40px)
|
|
);
|
|
}
|
|
|
|
#homepage .home-hero-carousel__dots {
|
|
top: auto;
|
|
bottom: calc(
|
|
var(--hero-mobile-fixed-dots-bottom, 16px) + var(--hero-inner-padding-bottom, 40px)
|
|
);
|
|
justify-content: center;
|
|
}
|
|
|
|
#homepage .home-hero-carousel.is-banner-active .home-hero-carousel__dots {
|
|
position: fixed;
|
|
left: 20px;
|
|
right: 20px;
|
|
top: auto;
|
|
bottom: calc(
|
|
var(--hero-mobile-fixed-dots-bottom, 16px) + env(safe-area-inset-bottom, 0px)
|
|
);
|
|
z-index: 20;
|
|
justify-content: center;
|
|
}
|
|
|
|
#homepage .home-hero-carousel.is-banner-active .home-hero-carousel__dots::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: -20px;
|
|
right: -20px;
|
|
bottom: calc(-1 * var(--hero-mobile-fixed-dots-bottom, 16px) - env(safe-area-inset-bottom, 0px));
|
|
height: 72px;
|
|
background: linear-gradient(to top, rgba(5, 3, 2, 0.75), transparent);
|
|
pointer-events: none;
|
|
z-index: -1;
|
|
}
|
|
}
|
|
|
|
#homepage .home-hero-carousel__slide {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
inset: 0;
|
|
transition: opacity 0.7s ease;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__slide.is-active {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__slide-grid {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 40px;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
#homepage .home-hero-carousel__slide-grid {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, var(--hero-content-max-width, 680px)) minmax(0, 1fr);
|
|
column-gap: 48px;
|
|
align-items: start;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
#homepage .home-hero-carousel__content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 48px;
|
|
width: 100%;
|
|
max-width: 560px;
|
|
text-align: center;
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
#homepage .home-hero-carousel__content {
|
|
text-align: left;
|
|
align-items: flex-start;
|
|
max-width: none;
|
|
width: 100%;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__title {
|
|
font-size: 54px;
|
|
line-height: 1.1;
|
|
max-width: var(--hero-content-max-width, 680px);
|
|
text-wrap: balance;
|
|
}
|
|
}
|
|
|
|
#homepage .home-hero-carousel__copy {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 24px;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__heading-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
#homepage .home-hero-carousel__heading-group {
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
|
|
#homepage .home-hero-carousel__badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 14px;
|
|
border-radius: 20px;
|
|
background: rgba(249, 135, 21, 0.4);
|
|
color: #f98715;
|
|
font-size: 16px;
|
|
line-height: 18px;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__badge-icon {
|
|
flex-shrink: 0;
|
|
display: block;
|
|
width: 20px;
|
|
height: 20px;
|
|
object-fit: contain;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__title {
|
|
margin: 0;
|
|
font-size: clamp(36px, 5vw, 54px);
|
|
line-height: 1.1;
|
|
letter-spacing: -0.01em;
|
|
font-weight: 800;
|
|
color: #fff;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__desc {
|
|
margin: 0;
|
|
font-size: clamp(18px, 2.2vw, 20px);
|
|
line-height: 1.4;
|
|
color: #fff;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 12px;
|
|
width: auto;
|
|
max-width: 100%;
|
|
}
|
|
|
|
@media (max-width: 991.98px) {
|
|
#homepage .home-hero-carousel__actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
width: max-content;
|
|
max-width: 100%;
|
|
align-self: center;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn {
|
|
width: 100%;
|
|
min-width: 0;
|
|
box-sizing: border-box;
|
|
justify-content: center;
|
|
padding-left: 32px;
|
|
padding-right: 32px;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 576px) and (max-width: 991.98px) {
|
|
#homepage .home-hero-carousel__actions {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
grid-template-rows: auto auto;
|
|
column-gap: 12px;
|
|
row-gap: 14px;
|
|
justify-content: center;
|
|
width: 100%;
|
|
max-width: 480px;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__actions .home-hero-carousel__btn--primary {
|
|
grid-column: 1;
|
|
grid-row: 1;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__actions .home-hero-carousel__btn--ghost,
|
|
#homepage .home-hero-carousel__actions .home-hero-carousel__btn--ai-coach {
|
|
grid-column: 2;
|
|
grid-row: 1;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__actions .home-hero-carousel__ai-coach {
|
|
grid-column: 1;
|
|
grid-row: 2;
|
|
justify-self: center;
|
|
}
|
|
}
|
|
|
|
#homepage .home-hero-carousel__ai-coach {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: #fff;
|
|
font-size: 20px;
|
|
line-height: 20px;
|
|
text-decoration: underline;
|
|
text-underline-offset: 4px;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__ai-coach:hover {
|
|
color: #fff;
|
|
text-decoration: underline;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__ai-coach img {
|
|
display: block;
|
|
width: 48px;
|
|
height: 48px;
|
|
flex-shrink: 0;
|
|
object-fit: contain;
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
#homepage .home-hero-carousel__actions {
|
|
display: grid;
|
|
grid-template-columns: auto auto;
|
|
grid-template-rows: auto auto;
|
|
column-gap: 12px;
|
|
row-gap: 14px;
|
|
justify-content: flex-start;
|
|
align-items: start;
|
|
width: auto;
|
|
max-width: none;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__actions .home-hero-carousel__btn--primary {
|
|
grid-column: 1;
|
|
grid-row: 1;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__actions .home-hero-carousel__btn--ghost,
|
|
#homepage .home-hero-carousel__actions .home-hero-carousel__btn--ai-coach {
|
|
grid-column: 2;
|
|
grid-row: 1;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__actions .home-hero-carousel__ai-coach {
|
|
grid-column: 1;
|
|
grid-row: 2;
|
|
justify-self: start;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn {
|
|
width: auto;
|
|
padding-left: 40px;
|
|
padding-right: 40px;
|
|
}
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
min-height: 56px;
|
|
padding: 16px 40px;
|
|
border-radius: 10px;
|
|
font-size: clamp(18px, 2vw, 20px);
|
|
font-weight: 500;
|
|
letter-spacing: -0.01em;
|
|
line-height: 1;
|
|
text-decoration: none;
|
|
transition: opacity 0.2s ease, background 0.2s ease;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn--primary {
|
|
color: #fff;
|
|
background: #f98715;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn--primary:hover {
|
|
/* opacity: 0.9; */
|
|
color: #fff;
|
|
text-decoration: none;
|
|
background-color: #F9A215 !important;
|
|
color: #fff !important;
|
|
box-shadow: inset 0 5px 10px 0 rgba(249, 135, 21, 0.6), 0 5px 10px 0 rgba(249, 135, 21, 0.6);
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn--ghost {
|
|
color: #fff;
|
|
background: rgba(15, 15, 15, 0.5);
|
|
border: 1px solid #666;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn--ghost:hover {
|
|
background: rgba(15, 15, 15, 0.8);
|
|
color: #fff;
|
|
text-decoration: none;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn--ai-coach {
|
|
gap: 6px;
|
|
padding: 5px 20px 5px 8px;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn--ai-coach img {
|
|
display: block;
|
|
width: 45px;
|
|
height: 45px;
|
|
flex-shrink: 0;
|
|
object-fit: contain;
|
|
object-position: left center;
|
|
margin-right: -6px;
|
|
}
|
|
|
|
/* Inline stroke icons — override theme.css svg { overflow: hidden } clipping */
|
|
#homepage .home-hero-carousel__btn svg {
|
|
flex-shrink: 0;
|
|
display: block;
|
|
width: 16px;
|
|
height: 16px;
|
|
overflow: visible;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__btn svg path {
|
|
fill: none;
|
|
stroke: currentColor;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__visual {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 100%;
|
|
max-width: 520px;
|
|
overflow: visible;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__visual img {
|
|
display: block;
|
|
width: 100%;
|
|
max-width: 440px;
|
|
height: auto;
|
|
object-fit: contain;
|
|
object-position: center center;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__slide:nth-child(1) .home-hero-carousel__visual img,
|
|
#homepage .home-hero-carousel__slide:nth-child(2) .home-hero-carousel__visual img {
|
|
transform: scale(var(--hero-visual-image-scale, 1.06));
|
|
transform-origin: center center;
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
#homepage .home-hero-carousel__visual {
|
|
max-width: none;
|
|
width: 100%;
|
|
height: var(--hero-visual-zone-height);
|
|
align-self: start;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__slide:nth-child(1) .home-hero-carousel__visual img,
|
|
#homepage .home-hero-carousel__slide:nth-child(2) .home-hero-carousel__visual img {
|
|
width: auto;
|
|
height: 100%;
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__slide:nth-child(3) .home-hero-carousel__visual img {
|
|
max-width: none;
|
|
width: 100%;
|
|
height: auto;
|
|
max-height: var(--hero-visual-zone-height);
|
|
object-fit: contain;
|
|
}
|
|
}
|
|
|
|
#homepage .home-hero-carousel__dots {
|
|
position: absolute;
|
|
z-index: 2;
|
|
left: 20px;
|
|
right: 20px;
|
|
bottom: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
#homepage .home-hero-carousel__dots {
|
|
left: 32px;
|
|
right: 32px;
|
|
bottom: 40px;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
#homepage .home-hero-carousel__dots {
|
|
top: var(
|
|
--hero-reference-dots-top,
|
|
var(--hero-reference-dots-top-fallback)
|
|
);
|
|
bottom: auto;
|
|
justify-content: flex-start;
|
|
}
|
|
}
|
|
|
|
#homepage .home-hero-carousel__dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 999px;
|
|
background: rgba(250, 250, 250, 0.4);
|
|
cursor: pointer;
|
|
transition: width 0.3s ease, background 0.3s ease;
|
|
}
|
|
|
|
#homepage .home-hero-carousel__dot:hover {
|
|
background: rgba(250, 250, 250, 0.6);
|
|
}
|
|
|
|
#homepage .home-hero-carousel__dot.is-active {
|
|
width: 40px;
|
|
background: #f98715;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
#homepage .home-hero-carousel__slide,
|
|
#homepage .home-hero-carousel__dot {
|
|
transition: none;
|
|
}
|
|
}
|