/* ==========================================================================
   Homepage · Where to buy (2026-09-29). Prefix .yhs-
   Replaces the HEAT / RAIN / WIND story. Section pins while the heading lights up word by word
   and the showroom cards fly in from tilted, scattered positions into a 2 × 2 grid.
   JS writes --p (heading progress) on the section and --t (0–1) on each card.
   Card look below is copied 1:1 from where-to-buy.css ("Showroom cards v2") so both pages match.
   ========================================================================== */
@font-face{font-family:YAFustat;src:url(../fonts/fustat-latin-wght-normal.woff2) format("woff2");font-style:normal;font-weight:100 900;font-display:swap}
@font-face{font-family:YASchibsted;src:url(../fonts/schibsted-grotesk-latin-wght-normal.woff2) format("woff2");font-style:normal;font-weight:100 900;font-display:swap}

.yhs { --ya-cream:#FBF7E9; --ya-orange:#F5A20E; --ya-ink:#0E1733; --ya-body:#323D5D; --ya-muted:#66708D; --ya-line:#D9D2B8;
  --ywb-ink:#0E1733; --ywb-orange:#F5A20E; --ywb-line:#D9D2B8;
  position: relative; box-sizing: border-box; margin-block: 0 !important; padding: 0 !important; color: var(--ya-ink); font-family: YAFustat, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.yhs *, .yhs *::before, .yhs *::after { box-sizing: border-box; }
.yhs h2, .yhs h3, .yhs p { margin: 0; }
.yhs h2, .yhs h3 { font-family: YASchibsted, YAFustat, Arial, sans-serif; font-weight: 500; letter-spacing: -.055em; }
.yhs a { text-decoration: none; }
.yhs p { line-height: 1.55; }

/* Pinned stage ------------------------------------------------------------- */
.yhs__scroll { position: relative; height: 230svh; }
.yhs__sticky { position: sticky; top: 0; height: 100svh; min-height: 700px; display: grid; grid-template-rows: auto 1fr; align-content: center; gap: clamp(26px, 4vh, 48px);
  padding: calc(88px + 2vh) clamp(24px, 5.5vw, 88px) 5vh; overflow: hidden; perspective: 1600px; }

.yhs__head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 40px; max-width: 1240px; width: 100%; margin-inline: auto; }
.yhs__eyebrow { grid-column: 1 / -1; color: #7B6B3A; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.yhs__title { max-width: 22ch; font-size: clamp(34px, 3.7vw, 60px); line-height: 1; }
/* 2026-10-14: opacity + rise are written by JS straight onto each word (no blur filter, no custom property) */
.yhs__w { display: inline-block; }
.yhs__all { justify-self: start; display: inline-flex; gap: 8px; padding: 8px 0 5px; border-bottom: 1px solid currentColor; color: var(--ya-ink); font-size: 13px; font-weight: 650; white-space: nowrap; }
.yhs__all:hover { color: #7B6B3A; }

.yhs__grid { list-style: none; margin: 0 auto; padding: 0; width: 100%; max-width: 1240px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-content: start; transform-style: preserve-3d; }

/* fly-in: --t 0 = scattered & tilted, 1 = in place (JS). Default 1 so no-JS shows the grid. */
.yhs__card { --t: 1; --u: calc(1 - var(--t));
  transform: translate3d(calc(var(--dx) * var(--u)), calc(var(--dy) * var(--u)), calc(var(--u) * -260px))
             rotateX(calc(var(--rx) * var(--u))) rotateY(calc(var(--ry) * var(--u))) rotateZ(calc(var(--rz) * var(--u)));
  opacity: clamp(0, calc(var(--t) * 2.2), 1); contain: layout paint; }
.yhs .yhs__card { transition: translate .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s, border-color .5s; }
.yhs .yhs__card.is-active { translate: 0 -4px; }

/* ---------- Showroom card (copied from where-to-buy.css) ---------- */
.ywb-room__no { color: var(--ywb-orange); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.ywb-room h3 { margin-top: 10px; font-size: clamp(28px, 2.6vw, 40px); line-height: 1; }
.ywb-room h3 span { color: var(--ya-muted); font-size: .55em; letter-spacing: -.02em; }
.ywb-room address { margin-top: 12px; color: var(--ya-body); font-size: 15px; font-style: normal; line-height: 1.55; max-width: 46ch; }
.ywb-room__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 22px; }
.ywb-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 16px; border: 1px solid var(--ywb-ink); border-radius: 999px; background: transparent; color: var(--ywb-ink); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background .25s, color .25s, transform .25s; }
.ywb-btn:hover { transform: translateY(-2px); background: var(--ywb-ink); color: var(--ya-cream); }
.ywb-btn--solid { border-color: var(--ywb-orange); background: var(--ywb-orange); }
.ywb-btn--solid:hover { background: #F6AE31; color: var(--ywb-ink); }

.ywb-room { --px: .6; --py: .8; --lift: 0; position: relative; isolation: isolate; overflow: hidden; min-height: clamp(240px, 30svh, 330px); display: flex; flex-direction: column; padding: 30px 30px 26px; border: 1px solid rgba(14, 23, 51, .08); border-radius: 22px; background: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 24px 48px -36px rgba(14, 23, 51, .35); transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s, border-color .5s; }
.ywb-room > :not(.ywb-room__fx) { position: relative; z-index: 1; }
.ywb-room.is-active { --lift: 1; border-color: rgba(245, 162, 14, .45); box-shadow: 0 30px 60px -34px rgba(14, 23, 51, .45); }

.ywb-room__fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: inherit;
  background: radial-gradient(120% 70% at 55% 105%, rgba(245, 162, 14, .55), rgba(255, 215, 106, .25) 55%, transparent 80%); }
.ywb-room__fx i { position: absolute; border-radius: 50%; opacity: .9; will-change: transform; animation: yhs-drift 14s ease-in-out infinite alternate; animation-play-state: paused; }
.ywb-room__fx i:nth-child(1) { width: 80%; height: 80%; left: 34%; bottom: -24%; background: radial-gradient(circle, #F5A20E 0%, rgba(245, 162, 14, .55) 45%, transparent 70%); --fx: -8%; --fy: -6%; }
.ywb-room__fx i:nth-child(2) { width: 62%; height: 70%; left: 4%; bottom: -14%; background: radial-gradient(circle, #FFD76A 0%, rgba(255, 215, 106, .5) 45%, transparent 70%); --fx: 10%; --fy: -8%; animation-duration: 17s; animation-delay: -4s; }
.ywb-room__fx i:nth-child(3) { width: 48%; height: 56%; left: -10%; bottom: -22%; background: radial-gradient(circle, #8EC9D8 0%, rgba(142, 201, 216, .45) 45%, transparent 70%); --fx: 12%; --fy: -4%; animation-duration: 19s; animation-delay: -9s; }
.ywb-room__fx i:nth-child(4) { width: 46%; height: 50%; left: 62%; bottom: 8%; background: radial-gradient(circle, #F7B38A 0%, rgba(247, 179, 138, .45) 45%, transparent 70%); --fx: -10%; --fy: 6%; animation-duration: 16s; animation-delay: -6s; }
.ywb-room:nth-child(2) .ywb-room__fx i:nth-child(1) { left: 8%; }
.ywb-room:nth-child(2) .ywb-room__fx i:nth-child(2) { left: 48%; }
.ywb-room:nth-child(3) .ywb-room__fx i:nth-child(3) { left: 58%; bottom: -14%; }
.ywb-room:nth-child(3) .ywb-room__fx i:nth-child(4) { left: 4%; }
@keyframes yhs-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(var(--fx), var(--fy)) scale(1.12); } }
.ywb-room__fx::before { content: ""; position: absolute; left: 0; top: 0; width: 72%; height: 66%; background: radial-gradient(closest-side, rgba(255, 190, 70, .55), transparent 100%); transform: translate3d(calc(var(--px) * 138.9% - 50%), calc(var(--py) * 151.5% - 50%), 0); transition: transform .25s ease-out; will-change: transform; }
.ywb-room__rays { position: absolute; inset: -40% -30% -10%; opacity: .75;
  background: repeating-conic-gradient(from 270deg at 50% 118%, rgba(255, 255, 255, .62) 0deg .2deg, transparent .2deg 2.1deg);
  -webkit-mask-image: radial-gradient(120% 95% at 50% 112%, #000 35%, transparent 78%);
          mask-image: radial-gradient(120% 95% at 50% 112%, #000 35%, transparent 78%);
  transition: opacity .6s, transform .4s ease-out; transform: translate3d(calc((var(--px) - .5) * 14%), 0, 0); will-change: transform; }
.ywb-room.is-active .ywb-room__rays { opacity: 1; }
.ywb-room .ywb-btn:not(.ywb-btn--solid) { background: rgba(255, 255, 255, .86); border-color: rgba(14, 23, 51, .55); color: var(--ywb-ink); }
.ywb-room .ywb-btn:not(.ywb-btn--solid):hover { background: var(--ywb-ink); color: #FBF7E9; }
.ywb-room .ywb-btn--solid { box-shadow: 0 8px 20px -10px rgba(180, 100, 0, .7); }

.ywb-room--factory { background: var(--ywb-ink); border-color: rgba(255, 255, 255, .06); color: var(--ya-cream); }
.ywb-room--factory h3 { color: var(--ya-cream); }
.ywb-room--factory h3 span { color: rgba(251, 247, 233, .65); }
.ywb-room--factory address { color: rgba(251, 247, 233, .85); }
.ywb-room--factory.is-active, .ywb-room--factory:hover { border-color: rgba(245, 162, 14, .4); }
.ywb-room--factory .ywb-room__fx i { opacity: .7; }
.ywb-room--factory .ywb-room__fx i:nth-child(2) { background: radial-gradient(circle, #C97A0A 0%, rgba(201, 122, 10, .45) 45%, transparent 70%); }
.ywb-room--factory .ywb-room__fx i:nth-child(3) { background: radial-gradient(circle, #3D5A8C 0%, rgba(61, 90, 140, .45) 45%, transparent 70%); }
.ywb-room--factory .ywb-room__rays { opacity: .16; }
.ywb-room--factory .ywb-room__fx { background: radial-gradient(120% 70% at 55% 110%, rgba(245, 162, 14, .35), transparent 70%); }
.ywb-room--factory .ywb-room__fx::before { background: radial-gradient(closest-side, rgba(245, 162, 14, .45), transparent 100%); }

/* Short / narrow screens: no pinning, cards simply rise in as they enter (JS adds .is-static) -- */
.yhs.is-static .yhs__scroll { height: auto; }
.yhs.is-static .yhs__sticky { position: relative; height: auto; min-height: 0; padding-block: clamp(76px, 10vw, 130px); overflow: visible; perspective: none; }
.yhs.is-static .yhs__w { --o: 1; }
.yhs.is-static .yhs__card { transform: translateY(calc(var(--u) * 40px)); opacity: var(--t); transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .8s, translate .5s, box-shadow .5s, border-color .5s; }
.yhs.is-static .yhs__card:nth-child(even) { transition-delay: .12s; }
@media (max-width: 900px) {
  .yhs__head { grid-template-columns: 1fr; }
  .yhs__grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .ywb-room { min-height: 300px; padding: 24px 20px 22px; border-radius: 18px; }
  .ywb-room__fx i:nth-child(n+3) { display: none; }
  .yhs__title { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .ywb-room__fx i { animation: none; }
  .yhs__card, .ywb-room { transition: none; }
}

/* 2026-09-29 r2 · warm cream again after the navy Applications stage (flow-bg blends the edge);
   shorter heading + compact cards so the 2×2 grid fits one screen while pinned. */
.yhs{background:#FBF7E9}
.yhs__head{grid-template-columns:1fr}
.yhs__title{max-width:none;font-size:clamp(30px,3.1vw,50px)}
.yhs__sticky{gap:clamp(18px,3vh,36px);padding-top:calc(76px + 2vh);padding-bottom:4vh}
.yhs .ywb-room{min-height:clamp(190px,25svh,280px);padding:clamp(20px,2.6svh,28px) 26px clamp(18px,2.2svh,24px)}
.yhs .ywb-room h3{font-size:clamp(26px,2.3vw,36px)}
.yhs .ywb-room address{margin-top:8px;font-size:14px;line-height:1.5}
.yhs .ywb-room__actions{padding-top:16px}
.yhs__grid{gap:14px}


/* ==========================================================================
   2026-10-14 r3 · Philippines showroom (5 cards) + smoother scrolling
   - 3-column grid on wide + tall screens (same thresholds as home-showrooms.js "pinned"), factory card fills the last row.
   - Opening-hours line on showroom cards.
   - Performance: no blur filters / backdrop-filter / masks on the animated light layers; the top fade is a plain
     overlay in the card colour; light blobs only run while their card is on screen and pause while cards fly in.
   ========================================================================== */
.ywb-room { --room-bg: #fff; }
.ywb-room--factory { --room-bg: var(--ywb-ink); }
.ywb-room__fx::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--room-bg) 0, var(--room-bg) calc(20% - var(--lift) * 10%), transparent calc(64% - var(--lift) * 10%), transparent 100%); }

.yhs .ywb-room__fx i { animation-play-state: paused; }
.yhs .ywb-room.is-on-screen .ywb-room__fx i { animation-play-state: running; }
.yhs.is-flying .ywb-room .ywb-room__fx i { animation-play-state: paused; }
.yhs:not(.is-static) .yhs__card { will-change: transform, opacity; }

.ywb-room__hours { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: var(--ya-body); font-size: 13px; font-weight: 600; line-height: 1.3; }
.ywb-room__hours svg { flex: none; color: var(--ywb-orange); }
.ywb-room--factory .ywb-room__hours { color: rgba(251, 247, 233, .85); }

.yhs__card--factory { grid-column: 1 / -1; }
.yhs__scroll { height: 240svh; }

@media (min-width: 1100px) and (min-height: 700px) {
  .yhs__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yhs__card--factory { grid-column: span var(--yhs-span, 2); }
  .yhs .ywb-room { min-height: clamp(176px, 23svh, 260px); padding: clamp(16px, 2.2svh, 24px) 24px clamp(14px, 1.9svh, 20px); }
  .yhs .ywb-room address { font-size: 13.5px; line-height: 1.48; }
  .yhs .ywb-room__actions { gap: 8px; padding-top: 14px; }
  .yhs .ywb-btn { min-height: 40px; padding: 8px 14px; font-size: 12.5px; }
  .yhs__sticky { gap: clamp(14px, 2.4vh, 30px); }
}
@media (min-width: 1100px) and (min-height: 700px) and (max-height: 820px) {
  .yhs__sticky { padding-top: calc(66px + 1vh); padding-bottom: 2.5vh; }
  .yhs .ywb-room { padding-block: 14px 12px; }
  .yhs .ywb-room h3 { font-size: clamp(24px, 2vw, 30px); }
  .yhs .ywb-room address { margin-top: 6px; font-size: 13px; line-height: 1.42; }
  .ywb-room__hours { margin-top: 7px; }
}
@media (max-width: 700px) {
  .ywb-room { min-height: 0; }
  .ywb-room__hours { margin-top: 10px; }
}

/* 2026-10-15 飞入过程中按钮也能点:卡片飞行时 translateZ 为负,位于网格平面"后面",
   浏览器把点击判给了网格本身(ol),导致要等卡片落定才能点。让网格不接收点击、卡片接收即可。 */
.yhs__grid { pointer-events: none; }
.yhs__grid > .yhs__card { pointer-events: auto; }

/* 2026-10-16 只在电脑端"飞入"模式下让网格不接收点击;手机横滑模式下网格要能接收手势,否则滑不动 */
.yhs.is-static .yhs__grid { pointer-events: auto; }

/* 2026-10-16：按用户要求取消展厅板块动效，固定展示（无飞入、无滚入上浮、无光斑漂动；悬停高亮保留） */
.yhs.is-static .yhs__card { transform: none; opacity: 1; transition: translate .5s, box-shadow .5s, border-color .5s; }
.yhs .ywb-room__fx i,
.yhs .ywb-room.is-on-screen .ywb-room__fx i { animation: none; }
.yhs.is-static .yhs__w { opacity: 1 !important; transform: none !important; }
