/*
 * SMILCO homepage — youthful editorial layout.
 * Kept page-scoped so commerce, account and editorial templates are unaffected.
 */

.home-main {
  --home-black: #151515;
  --home-pink: #dfa7a5;
  --home-gold: #bfa06a;
  --home-blush: #fbf4f2;
  --home-space: clamp(76px, 7.5vw, 118px);
  overflow: hidden;
}

.home-main h1,
.home-main h2,
.home-main h3 { text-wrap: balance; }

html:lang(zh-CN) .home-main h1,
html:lang(zh-CN) .home-main h2,
html:lang(ja) .home-main h1,
html:lang(ja) .home-main h2,
html:lang(ko) .home-main h1,
html:lang(ko) .home-main h2 { font-family: var(--font-ui); line-height: 1.06; letter-spacing: -.045em; }

.home-hero {
  position: relative;
  display: grid;
  min-height: clamp(650px, calc(100svh - 82px), 760px);
  overflow: hidden;
  align-items: center;
  isolation: isolate;
}

.home-hero__media,
.home-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-hero__media { z-index: -1; background: #f5f2ef; }
.home-hero__media img { object-fit: cover; object-position: center; }

.home-hero__content {
  width: min(640px, 45vw);
  margin-left: max(4.5vw, calc((100vw - 1320px) / 2));
  padding-block: 72px;
}

.home-hero h1 {
  max-width: 640px;
  margin-bottom: 24px;
  font-size: clamp(4rem, 5.7vw, 5.7rem);
  line-height: .94;
}

.home-hero__content > p {
  max-width: 450px;
  margin-bottom: 34px;
  color: #4d4a48;
  font-size: 1.02rem;
}

.home-main .button--primary { color: var(--home-black); background: var(--home-pink); }
.home-main .button--primary:hover { color: #fff; background: var(--home-black); }
.home-main .button--outline { color: var(--home-black); border-color: var(--home-gold); background: rgba(255, 255, 255, .72); }
.home-main .button--outline:hover { color: #fff; border-color: var(--home-black); background: var(--home-black); }

.home-values {
  display: grid;
  min-height: 88px;
  padding: 0 max(4.5vw, calc((100vw - 1320px) / 2));
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  color: var(--home-black);
  background: var(--home-blush);
  border-block: 1px solid #f0e4df;
}

.home-values span {
  position: relative;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.home-values span + span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 24px;
  background: var(--sm-gold);
  content: "";
  transform: translateY(-50%);
}

.home-personalities,
.home-products,
.home-world { padding-block: var(--home-space); }

.home-section-header {
  display: flex;
  margin-bottom: clamp(32px, 4vw, 52px);
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.home-section-header > div { max-width: 650px; }
.home-section-header h2 { margin-bottom: 14px; font-size: clamp(2.8rem, 4.3vw, 4.4rem); }
.home-section-header p { margin: 0; color: var(--sm-muted); }
.home-section-header .text-link { flex: 0 0 auto; color: var(--home-black); }

.home-mood-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-mood-card { min-width: 0; }
.home-mood-card__media { position: relative; display: block; overflow: hidden; background: var(--sm-paper); }
.home-mood-card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.home-mood-card:hover .home-mood-card__media img { transform: scale(1.025); }
.home-mood-card__body { padding: 17px 4px 0; }
.home-mood-card h3 { margin-bottom: 7px; font-size: clamp(1.65rem, 2.2vw, 2.25rem); }
.home-mood-card p { margin: 0; color: var(--sm-muted); font-size: .76rem; letter-spacing: .055em; text-transform: uppercase; }

.home-products { background: #fff; border-top: 1px solid var(--sm-line); }
.home-products__head { margin-bottom: 24px; }
.home-products__head h2 { margin: 0; font-size: clamp(2.8rem, 4.3vw, 4.4rem); }
.home-collection-links {
  display: flex;
  margin-bottom: 36px;
  padding-bottom: 1px;
  gap: clamp(22px, 3.7vw, 54px);
  border-bottom: 1px solid var(--sm-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.home-collection-links::-webkit-scrollbar { display: none; }
.home-collection-links a {
  flex: 0 0 auto;
  padding: 11px 0 14px;
  border-bottom: 2px solid transparent;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.home-collection-links a:first-child,
.home-collection-links a:hover { color: var(--home-black); border-color: var(--home-pink); }

.home-product-grid,
.home-product-grid .products {
  display: grid !important;
  margin: 0 !important;
  padding: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 30px);
}
.home-product-grid .products { grid-column: 1 / -1; }
.home-product-grid .products::before,
.home-product-grid .products::after { display: none !important; }
.home-product-grid .product { float: none !important; width: auto !important; margin: 0 !important; }

.home-product-card { min-width: 0; }
.home-product-card__media { position: relative; display: block; overflow: hidden; background: var(--sm-paper); }
.home-product-card__media img { width: 100%; aspect-ratio: 4 / 4.7; object-fit: cover; transition: transform .65s ease; }
.home-product-card:hover img { transform: scale(1.02); }
.home-product-card__body { display: flex; padding-top: 15px; align-items: end; justify-content: space-between; gap: 14px; }
.home-product-card__body > div { min-width: 0; }
.home-product-card__label { display: block; margin-bottom: 4px; color: var(--home-black); font-size: .63rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.home-product-card h3 { margin: 0; font-size: clamp(1.5rem, 2vw, 2rem); }
.home-product-card .text-link { color: var(--home-black); }

.home-manifesto {
  display: grid;
  min-height: 650px;
  grid-template-columns: .92fr 1.08fr;
  background: var(--home-blush);
}
.home-manifesto__content { display: flex; padding: clamp(64px, 8vw, 132px); flex-direction: column; align-items: flex-start; justify-content: center; }
.home-manifesto h2 { max-width: 600px; margin-bottom: 28px; font-size: clamp(3rem, 4.8vw, 5.1rem); }
.home-manifesto p { max-width: 520px; margin-bottom: 30px; color: #5b5653; }
.home-manifesto .text-link { color: var(--home-black); }
.home-manifesto__media { min-height: 650px; overflow: hidden; }
.home-manifesto__media img { width: 100%; height: 100%; object-fit: cover; }

.home-finder {
  padding-block: clamp(72px, 7vw, 108px);
  color: #fff;
  background: var(--home-black);
}
.home-finder__header { max-width: 760px; margin: 0 auto 50px; text-align: center; }
.home-finder h2 { margin-bottom: 15px; font-size: clamp(3rem, 4.5vw, 4.5rem); }
.home-finder__header p { margin: 0; color: rgba(255,255,255,.74); }
.home-finder__steps { display: grid; margin: 0 0 44px; padding: 0; grid-template-columns: repeat(3, 1fr); list-style: none; }
.home-finder__steps li { position: relative; padding: 0 38px; text-align: center; }
.home-finder__steps li + li { border-left: 1px solid rgba(255,255,255,.28); }
.home-finder__steps span { display: block; margin-bottom: 12px; color: var(--home-gold); font-size: .7rem; font-weight: 700; letter-spacing: .12em; }
.home-finder__steps strong { display: block; margin-bottom: 8px; font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; }
.home-finder__steps small { display: block; max-width: 250px; margin: auto; color: rgba(255,255,255,.72); font-size: .78rem; }
.home-finder .button-row { justify-content: center; }
.home-finder .button--primary { min-width: 220px; }
.home-finder .text-link { color: #fff; }

.home-world { background: #fff; }
.home-world-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; border-top: 1px solid var(--sm-line); }
.home-story { display: flex; min-height: 300px; padding: clamp(28px, 3.5vw, 52px); flex-direction: column; justify-content: space-between; border-right: 1px solid var(--sm-line); }
.home-story:last-child { border-right: 0; }
.home-story--lead { color: #fff; background: var(--home-black); }
.home-story__meta { color: var(--home-pink); font-size: .63rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.home-story h3 { margin: 40px 0 18px; font-size: clamp(2rem, 3.1vw, 3.4rem); }
.home-story:not(.home-story--lead) h3 { font-size: clamp(1.8rem, 2.5vw, 2.8rem); }
.home-story p { margin: 0; color: var(--sm-muted); }
.home-story--lead p { color: rgba(255,255,255,.72); }
.home-story a::after { content: ""; position: absolute; inset: 0; }
.home-story { position: relative; }

.home-community { display: grid; min-height: 380px; grid-template-columns: 1.3fr .7fr; background: var(--home-blush); }
.home-community__rail { display: grid; overflow: hidden; grid-template-columns: repeat(4, 1fr); }
.home-community__rail img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.86); }
.home-community__content { display: flex; padding: clamp(52px, 6vw, 92px); flex-direction: column; align-items: flex-start; justify-content: center; }
.home-community h2 { margin-bottom: 18px; font-size: clamp(2.7rem, 4vw, 4.4rem); }
.home-community p { margin-bottom: 26px; color: var(--sm-muted); }
.home-community .text-link { color: var(--home-black); }

@media (max-width: 1180px) {
  .home-hero__content { width: min(590px, 53vw); }
  .home-hero h1 { font-size: clamp(3.7rem, 5.5vw, 4.8rem); }
  .home-mood-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 14px; }
  .home-manifesto__content { padding: 70px 52px; }
}

@media (max-width: 980px) {
  .home-main { --home-space: 84px; }
  .home-hero { min-height: 0; grid-template-rows: 390px auto; }
  .home-hero__media { position: relative; grid-row: 1; }
  .home-hero__media img { object-position: 66% 28%; }
  .home-hero__content { width: 100%; margin: 0; padding: 42px max(28px, calc((100vw - 760px) / 2)) 48px; grid-row: 2; background: #fff; }
  .home-hero h1 { max-width: 700px; font-size: clamp(3.3rem, 7.2vw, 4.1rem); }
  .home-personalities .home-section-header { align-items: start; }
  .home-product-grid,
  .home-product-grid .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-product-grid > :last-child,
  .home-product-grid .products > :last-child { display: none; }
  .home-manifesto { min-height: 0; grid-template-columns: 1fr; }
  .home-manifesto__content { padding: 84px max(28px, calc((100vw - 760px) / 2)); }
  .home-manifesto__media { min-height: 580px; }
  .home-finder__steps li { padding-inline: 20px; }
  .home-world-grid { grid-template-columns: 1.2fr 1fr; }
  .home-story:last-child { display: none; }
  .home-story:nth-child(2) { border-right: 0; }
  .home-community { grid-template-columns: 1fr; }
  .home-community__rail { min-height: 300px; }
}

@media (max-width: 640px) {
  .home-main { --home-space: 68px; }
  .home-hero { grid-template-rows: 300px auto; }
  .home-hero { min-height: 0; }
  .home-hero__media { position: relative; grid-row: 1; }
  .home-hero__media img { object-position: 66% 28%; }
  .home-hero__content { width: 100%; margin: 0; padding: 38px 20px 48px; grid-row: 2; background: #fff; }
  .home-hero h1 { margin-bottom: 18px; font-size: clamp(2.8rem, 12.2vw, 3.35rem); }
  .home-hero__content > p { margin-bottom: 26px; font-size: .94rem; }
  .home-hero .button-row { align-items: stretch; flex-direction: column; }
  .home-hero .button { width: 100%; }
  .home-values { min-height: 70px; padding-inline: 8px; }
  .home-values span { font-size: .72rem; letter-spacing: .07em; }
  .home-values span + span::before { height: 18px; }
  .home-section-header { margin-bottom: 28px; align-items: start; flex-direction: column; gap: 16px; }
  .home-section-header h2,
  .home-products__head h2 { font-size: clamp(2.55rem, 11vw, 3.15rem); }
  .home-mood-grid {
    width: calc(100vw - 16px);
    margin-right: -16px;
    grid-template-columns: none;
    grid-auto-columns: 82vw;
    grid-auto-flow: column;
    gap: 12px;
    overflow-x: auto;
    scroll-padding-left: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .home-mood-grid::-webkit-scrollbar { display: none; }
  .home-mood-card { scroll-snap-align: start; }
  .home-mood-card__media img { aspect-ratio: 4 / 4.8; }
  .home-collection-links { margin-right: -16px; margin-bottom: 26px; }
  .home-product-grid,
  .home-product-grid .products {
    width: calc(100vw - 16px);
    margin-right: -16px !important;
    grid-template-columns: none;
    grid-auto-columns: 82vw;
    grid-auto-flow: column;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .home-product-grid::-webkit-scrollbar,
  .home-product-grid .products::-webkit-scrollbar { display: none; }
  .home-product-grid > *,
  .home-product-grid .products > * { display: block !important; scroll-snap-align: start; }
  .home-product-card__media img { aspect-ratio: 4 / 4.6; }
  .home-manifesto { display: flex; flex-direction: column; }
  .home-manifesto__content { padding: 66px 20px; }
  .home-manifesto h2 { font-size: clamp(2.7rem, 12vw, 3.35rem); }
  .home-manifesto__media { min-height: 430px; order: -1; }
  .home-finder { padding-block: 68px; }
  .home-finder__header { margin-bottom: 38px; text-align: left; }
  .home-finder h2 { font-size: clamp(2.7rem, 12vw, 3.35rem); }
  .home-finder__steps { margin-bottom: 34px; grid-template-columns: 1fr; }
  .home-finder__steps li { padding: 22px 0; text-align: left; }
  .home-finder__steps li + li { border-top: 1px solid rgba(255,255,255,.26); border-left: 0; }
  .home-finder__steps strong,
  .home-finder__steps small { margin-left: 0; }
  .home-finder .button-row { align-items: stretch; flex-direction: column; }
  .home-finder .button { width: 100%; }
  .home-world-grid {
    width: calc(100vw - 16px);
    margin-right: -16px;
    grid-template-columns: none;
    grid-auto-columns: 82vw;
    grid-auto-flow: column;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .home-world-grid::-webkit-scrollbar { display: none; }
  .home-story,
  .home-story:last-child { display: flex; min-height: 290px; border-right: 1px solid var(--sm-line); scroll-snap-align: start; }
  .home-community__rail { min-height: 230px; grid-template-columns: repeat(3, 1fr); }
  .home-community__rail img:last-child { display: none; }
  .home-community__content { padding: 58px 20px 66px; }
  .home-community h2 { font-size: clamp(2.7rem, 12vw, 3.35rem); }
}

@media (prefers-reduced-motion: reduce) {
  .home-main img { transition: none !important; }
}
