parfum_agsd/parfum-shop/src/pages/LandingPage.css

730 lines
14 KiB
CSS

.page {
position: relative;
min-height: 100vh;
background:
radial-gradient(circle at 82% 12%, rgba(var(--theme-accent-rgb) / 0.13), transparent 28rem),
linear-gradient(180deg, var(--theme-bg), color-mix(in srgb, var(--theme-bg) 88%, #000 12%));
color: var(--theme-text);
}
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.page main {
padding-bottom: var(--section-y-sm);
}
/* HERO */
.hero {
position: relative;
width: 100%;
min-height: clamp(680px, 100svh, 980px);
overflow: hidden;
display: grid;
align-items: center;
isolation: isolate;
background: #111;
}
.hero::before {
content: "";
position: absolute;
inset: 0;
z-index: 2;
pointer-events: none;
}
.hero::before {
background:
radial-gradient(circle at 72% 42%, rgba(255, 255, 255, 0.1), transparent 24rem),
linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.42) 44%, rgba(0, 0, 0, 0.08) 100%),
linear-gradient(0deg, rgba(0, 0, 0, 0.44), transparent 46%);
}
.hero-media {
position: absolute;
inset: 0;
z-index: 1;
will-change: transform;
}
.hero-media__image {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
object-position: 60% center;
will-change: transform;
}
.hero .navbar--hero {
position: fixed;
top: clamp(0.75rem, 2.1vw, 1.4rem);
right: 0;
left: 0;
z-index: 998;
padding-top: 0;
}
.hero-content {
position: relative;
z-index: 6;
width: var(--container-wide);
margin: 0 auto;
padding: clamp(7rem, 14vh, 11rem) 0 clamp(3rem, 8vh, 6rem);
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
gap: var(--gap-md);
align-items: center;
}
.hero-title {
grid-column: 1 / span 7;
max-width: 10.8ch;
margin: 0;
font-size: clamp(3.2rem, 8.4vw, 8.8rem);
line-height: 0.9;
font-weight: 300;
letter-spacing: 0;
text-transform: uppercase;
color: #fff;
text-wrap: balance;
}
.hero-title-line {
display: block;
overflow: hidden;
padding-right: 0.12em;
padding-bottom: 0.08em;
margin-right: -0.12em;
margin-bottom: -0.08em;
}
.hero-title-line .reveal-line {
will-change: transform;
}
.hero-title-line + .hero-title-line {
margin-top: 0.02em;
}
.hero-text {
grid-column: 1 / span 5;
max-width: 31rem;
margin: 0;
font-size: var(--text-base);
line-height: 1.62;
color: rgba(255, 255, 255, 0.84);
will-change: transform, opacity;
}
.hero-actions {
grid-column: 1 / span 5;
display: flex;
flex-wrap: wrap;
gap: var(--gap-xs);
margin-top: clamp(0.2rem, 1vw, 0.7rem);
will-change: transform, opacity;
}
.btn,
.discovery-btn {
min-height: 48px;
border: none;
border-radius: 999px;
padding: 0 clamp(1rem, 2vw, 1.35rem);
font-size: var(--text-sm);
cursor: pointer;
transition:
transform var(--duration-med) var(--ease-out),
opacity var(--duration-med) var(--ease-out),
box-shadow var(--duration-med) var(--ease-out),
background-color var(--duration-med) var(--ease-out),
border-color var(--duration-med) var(--ease-out);
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
}
.btn:hover,
.discovery-btn:hover {
transform: translateY(-2px);
}
.btn:active,
.discovery-btn:active {
transform: translateY(0) scale(0.98);
}
.btn-primary {
background: var(--theme-accent);
color: #fff;
box-shadow: 0 18px 42px rgba(var(--theme-accent-rgb) / 0.26);
}
.btn-secondary {
background: rgba(255, 255, 255, 0.13);
color: #fff;
border: 1px solid rgba(255, 255, 255, 0.24);
backdrop-filter: blur(12px);
}
.intro-overlay {
position: absolute;
inset: 0;
z-index: 999;
background: var(--theme-paper);
display: grid;
place-items: center;
will-change: transform;
}
.intro-overlay__inner {
width: 100%;
height: 100%;
display: grid;
place-items: center;
padding: var(--page-x);
}
.intro-overlay__text-mask {
width: min(96vw, 1200px);
display: flex;
justify-content: center;
overflow: hidden;
}
.intro-overlay__logo {
width: clamp(100px, 20vw, 340px);
max-width: 92vw;
}
.intro-overlay__logo img {
width: 100%;
height: auto;
display: block;
}
/* SECTIONS */
.section {
width: var(--container-wide);
margin: 0 auto;
padding: var(--section-y-sm) 0 var(--section-y-xs);
}
.section-heading {
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
gap: var(--gap-md);
align-items: end;
margin-bottom: clamp(1.6rem, 4vw, 4.8rem);
}
.section-heading::after {
content: "01 / Kollektion";
grid-column: 9 / span 3;
align-self: start;
padding-top: 0.3rem;
border-top: 1px solid var(--theme-border);
color: var(--theme-text-muted);
font-size: var(--text-xs);
line-height: 1.4;
letter-spacing: 0.16em;
text-transform: uppercase;
}
.section-heading h2,
.discovery-copy h2 {
margin: 0;
font-size: clamp(2.6rem, 7vw, 7.4rem);
line-height: 0.92;
font-weight: 300;
letter-spacing: 0;
color: var(--theme-text);
text-wrap: balance;
}
.section-heading h2 {
grid-column: 1 / span 8;
}
/* GRID */
.product-grid {
container-type: inline-size;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: var(--gap-sm);
}
.product-card {
position: relative;
container-type: inline-size;
isolation: isolate;
overflow: hidden;
min-height: clamp(360px, 36vw, 560px);
display: grid;
grid-template-rows: auto minmax(14rem, 1fr) auto;
padding: clamp(1rem, 2vw, 1.55rem);
color: inherit;
text-decoration: none;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
var(--theme-surface);
border: 1px solid var(--theme-border);
border-radius: var(--radius-lg);
cursor: pointer;
transition:
transform var(--duration-med) var(--ease-out),
border-color var(--duration-med) var(--ease-out),
background-color var(--duration-med) var(--ease-out),
box-shadow var(--duration-med) var(--ease-out);
}
.product-card::before {
content: "";
position: absolute;
inset: 0;
z-index: 3;
pointer-events: none;
background:
linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 28%),
linear-gradient(0deg, rgba(0, 0, 0, 0.22), transparent 42%);
opacity: 0;
transition: opacity var(--duration-med) var(--ease-out);
}
.product-card:hover,
.product-card:focus-visible {
transform: translateY(-4px);
border-color: rgba(var(--theme-accent-rgb) / 0.48);
box-shadow: var(--theme-shadow-soft);
}
.product-card:hover::before,
.product-card:focus-visible::before {
opacity: 1;
}
.product-card:focus-visible {
outline: 2px solid var(--theme-accent);
outline-offset: 4px;
}
.product-hover-fill {
position: absolute;
inset: 0;
z-index: 2;
pointer-events: none;
}
.product-hover-image,
.product-hover-video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
z-index: 0;
}
.product-hover-image {
background-size: cover;
background-position: center;
}
.product-hover-video {
display: block;
object-fit: cover;
}
.product-hover-fill::after {
content: "";
position: absolute;
inset: 0;
z-index: 1;
background: linear-gradient(
to bottom,
rgba(255, 255, 255, 0.06),
rgba(0, 0, 0, 0.34)
);
}
.product-card:active {
transform: translateY(-1px) scale(0.985);
border-color: var(--theme-accent);
}
.product-top {
position: relative;
z-index: 4;
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: var(--gap-sm);
}
.product-id {
font-size: var(--text-sm);
color: var(--theme-text-muted);
}
.product-top h3 {
max-width: 12ch;
margin: 0;
font-size: var(--text-sm);
line-height: 1.15;
font-weight: 400;
text-align: right;
letter-spacing: 0.02em;
text-transform: uppercase;
}
.product-image-wrap {
position: relative;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
min-height: 0;
padding: clamp(1.2rem, 5vw, 4.8rem) 0;
overflow: hidden;
}
.product-image-wrap::before {
content: "";
position: absolute;
width: min(76%, 26rem);
aspect-ratio: 1;
border-radius: 50%;
background: rgba(var(--theme-accent-rgb) / 0.08);
filter: blur(28px);
transform: translateY(10%);
}
.product-image {
position: relative;
z-index: 1;
width: min(92%, 520px);
height: auto;
object-fit: contain;
border-radius: 0;
transition: transform var(--duration-slow) var(--ease-out);
}
.product-card:hover .product-image {
transform: scale(1.045) rotate(-0.6deg);
}
.product-bottom {
position: relative;
z-index: 4;
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: var(--gap-sm);
}
.product-bottom p {
max-width: 18rem;
margin: 0;
color: var(--theme-text-muted);
font-size: var(--text-sm);
line-height: 1.45;
}
.arrow {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 2rem;
width: 2rem;
height: 2rem;
color: var(--theme-accent);
font-size: 0;
line-height: 0;
}
.arrow::before {
content: "";
display: block;
width: clamp(1.35rem, 2.2vw, 1.75rem);
height: clamp(1.35rem, 2.2vw, 1.75rem);
background: currentColor;
transform: rotate(180deg);
-webkit-mask: url("/icon-arrow-left.svg") center / contain no-repeat;
mask: url("/icon-arrow-left.svg") center / contain no-repeat;
}
.product-id,
.product-top h3,
.product-bottom p,
.arrow {
transition:
color var(--duration-med) var(--ease-out),
transform var(--duration-med) var(--ease-out);
}
.product-card:hover .product-id,
.product-card:hover .product-top h3,
.product-card:hover .product-bottom p,
.product-card:hover .arrow,
.product-card:focus-within .product-id,
.product-card:focus-within .product-top h3,
.product-card:focus-within .product-bottom p,
.product-card:focus-within .arrow {
color: #fff;
}
.product-card:hover .arrow,
.product-card:focus-within .arrow {
transform: translateX(0.35rem);
}
/* DISCOVERY */
.discovery-section {
position: relative;
width: var(--container-wide);
min-height: clamp(520px, 62vw, 780px);
margin: var(--section-y-sm) auto 0;
padding: clamp(1.25rem, 4vw, 4rem);
display: grid;
grid-template-columns: minmax(17rem, 0.85fr) minmax(0, 1.35fr);
gap: var(--gap-lg);
align-items: center;
overflow: hidden;
background:
radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.22), transparent 16rem),
linear-gradient(135deg, #ff6a00, #d84f00);
border-radius: var(--radius-lg);
}
.discovery-section::after {
content: "";
position: absolute;
inset: 1px;
border: 1px solid rgba(255, 255, 255, 0.26);
border-radius: inherit;
pointer-events: none;
}
.discovery-copy {
position: relative;
z-index: 2;
max-width: 36rem;
}
.discovery-copy h2 {
color: #fff;
font-size: clamp(2.2rem, 5.8vw, 6rem);
}
.discovery-copy p {
max-width: 29rem;
margin: clamp(1rem, 2vw, 1.4rem) 0 0;
color: rgba(255, 255, 255, 0.86);
font-size: var(--text-base);
line-height: 1.62;
}
.discovery-btn {
margin-top: clamp(1.3rem, 3vw, 2.1rem);
background: #fff;
color: #d64f00;
box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}
.discovery-banner {
position: relative;
z-index: 1;
width: min(100%, 1080px);
aspect-ratio: 16 / 10;
min-height: 320px;
justify-self: end;
overflow: hidden;
border-radius: var(--radius-lg);
box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}
.discovery-banner::before {
content: "";
position: absolute;
inset: 0;
z-index: 1;
border: 1px solid rgba(255, 255, 255, 0.24);
border-radius: inherit;
pointer-events: none;
}
.discovery-banner img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
display: block;
will-change: transform;
}
/* RESPONSIVE */
@media (max-width: 1180px) {
.hero-content {
grid-template-columns: repeat(8, minmax(0, 1fr));
}
.hero-title {
grid-column: 1 / span 6;
}
.hero-text,
.hero-actions {
grid-column: 1 / span 4;
}
.section-heading {
grid-template-columns: 1fr;
}
.section-heading h2,
.section-heading::after {
grid-column: 1;
}
.section-heading::after {
max-width: 18rem;
}
.product-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.discovery-section {
grid-template-columns: 1fr;
}
.discovery-banner {
justify-self: stretch;
}
}
@media (max-width: 760px) {
.hero {
min-height: clamp(620px, 91svh, 760px);
}
.hero::before {
background:
linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.28)),
linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 48%);
}
.hero-media__image {
object-position: 64% center;
}
.hero-content {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-end;
gap: var(--gap-sm);
padding-top: clamp(6.5rem, 18svh, 8.5rem);
padding-bottom: clamp(2.4rem, 8svh, 4rem);
}
.hero-title {
max-width: 9.6ch;
font-size: clamp(3rem, 17.5vw, 5.1rem);
}
.hero-text {
max-width: 25rem;
font-size: var(--text-sm);
}
.hero-actions {
width: min(100%, 22rem);
}
.hero-actions .btn {
width: 100%;
}
.product-grid {
grid-template-columns: 1fr;
}
.product-card {
min-height: clamp(340px, 118vw, 520px);
}
.product-top h3 {
max-width: 11ch;
}
.discovery-section {
width: calc(100% - (var(--page-x) * 2));
min-height: 0;
padding: clamp(1rem, 5vw, 1.5rem);
}
.discovery-banner {
min-height: 0;
aspect-ratio: 1 / 1;
}
}
@media (max-width: 430px) {
.hero-title {
max-width: 9.2ch;
}
.section-heading h2,
.discovery-copy h2 {
font-size: clamp(2.25rem, 13vw, 3.45rem);
}
.product-card {
padding: 1rem;
}
.product-bottom {
align-items: flex-start;
}
}
@container (max-width: 360px) {
.product-bottom {
flex-direction: column;
align-items: flex-start;
}
.arrow {
align-self: flex-end;
}
}
@media (prefers-reduced-motion: reduce) {
.hero-media,
.hero-title-line,
.hero-text,
.hero-actions,
.hero-brand,
.intro-overlay,
.product-card,
.product-image,
.discovery-banner img {
transition: none;
animation: none;
will-change: auto;
}
}