/* The Experience: an editorial page opened from the cover's top nav
   (#hausExp in stack3d.sg.html). Own fixed, scrolling layer above the
   story; ivory / terracotta, neutral so it reads in every day phase.
   Every picture is a real capture of the app (experience/).

   Motion (Joseph's brief, 4 Dec 2026): one curve, cubic-bezier(.22,1,.36,1);
   micro 160-220 ms, UI 260-350 ms; transform and opacity only; no loops.
   - Opening: the page fades in 300 ms; the headline rises 14 px with it,
     the line under it follows 70 ms later.
   - Sections: each block rises 14 px and fades in as it enters, tied to
     the scroll by a CSS view timeline (no script per frame). Browsers
     without scroll timelines get the same rise once, from an
     IntersectionObserver (experience.js), 340 ms.
   - Hero picture drifts down slowly as you scroll (CSS scroll timeline).
   - Light section: pictures crossfade 700 ms; tabs change in 200 ms.
   - Reduced motion: no drift, rises shrink to 4 px, fades stay. */
#hausExp {
  --exIv: #f3eee4; --exIv2: #e9e2d3; --exInk: #221f1a; --exDim: #645e53; --exAcc: #b4562f;
  --exE: cubic-bezier(.22, 1, .36, 1); --exRise: 14px;
  position: fixed; inset: 0; z-index: 225; overflow-y: auto; overflow-x: hidden;
  background: var(--exIv); color: var(--exInk); overscroll-behavior: contain;
  scroll-timeline: --expS block;
  opacity: 0; transition: opacity .3s var(--exE);
}
#hausExp[hidden] { display: none; }
#hausExp.open { opacity: 1; }
#hausExp:focus { outline: none; }
#hausExp ::selection { background: rgba(180, 86, 47, .22); color: inherit; }
body.hausExpOn { overflow: hidden !important; }
html:has(body.hausExpOn) { scroll-snap-type: none; }
#hausExp * { box-sizing: border-box; }
:where(#hausExp) h1, :where(#hausExp) h2 { font-family: var(--haus-serif); font-weight: 500; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
#hausExp h2 { font-size: clamp(2.1rem, 4.8vw, 4rem); line-height: 1.04; }
#hausExp h2 em, #hausExp h1 em { font-style: italic; }
:where(#hausExp) p { margin: 0; text-wrap: pretty; }

/* Top bar. Transparent over the hero photo; turns ivory as soon as the
   headline would reach it (experience.js watches a marker at the top of
   the headline), so the logo never sits on the headline. The ivory is a
   layer that fades (opacity), the text colour switches with it. */
.expBar { position: fixed; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1rem, 3vw, 2.2rem); color: #fff; isolation: isolate; }
.expBar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(243, 238, 228, .97); box-shadow: 0 1px 0 rgba(34, 31, 26, .08); opacity: 0; transition: opacity .28s var(--exE); }
.expBar.solid { color: var(--exInk); }
.expBar.solid::before { opacity: 1; }
.expBar button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: .35rem 0; font-size: .86rem; font-weight: 600; white-space: nowrap; min-height: 2.5rem; }
.expBar button.expWord { font-size: 1.45rem; font-weight: 800; letter-spacing: .045em; line-height: 1; text-shadow: 0 1px 14px rgba(9, 16, 26, .45); padding: .2rem 0; }
.expBar.solid button.expWord { text-shadow: none; }
.expBarR { display: flex; align-items: center; gap: 1.2rem; }
.expBar .expGo { border: 1px solid currentColor; border-radius: 999px; padding: .42rem .95rem; min-height: 0; }
.expBar button:focus-visible, #hausExp .expBtn:focus-visible, .expPhases button:focus-visible { outline: 2px solid var(--exAcc); outline-offset: 3px; }

/* Hero */
.expHero { position: relative; height: 100svh; min-height: 34rem; overflow: hidden; color: #fff; background: #2a2823; }
.expHero img, .expFig img { display: block; width: 100%; height: 100%; object-fit: cover; }
.expHero img { position: absolute; inset: -6% 0; height: 112%; transform: scale(1.04); }
.expHero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 18, 15, .42) 0%, rgba(20, 18, 15, 0) 24%, rgba(20, 18, 15, 0) 40%, rgba(20, 18, 15, .8) 100%); }
.expHeroText { position: absolute; z-index: 2; left: clamp(1.25rem, 5vw, 5rem); right: clamp(1.25rem, 5vw, 5rem); bottom: clamp(2.5rem, 8vh, 5.5rem); max-width: 60rem; }
.expBarMark { display: block; height: 0; }
#hausExp .expHeroText h1 { font-size: clamp(2.6rem, 7.4vw, 6rem); line-height: 1; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.expHeroText p { margin-top: 1.4rem; max-width: 32rem; font-size: 1.05rem; line-height: 1.55; color: rgba(255, 255, 255, .9); }
.expCue { position: absolute; z-index: 2; right: clamp(1.25rem, 5vw, 5rem); bottom: clamp(2.5rem, 8vh, 5.5rem); width: 1px; height: 4.5rem; background: linear-gradient(#fff, rgba(255, 255, 255, 0)); opacity: .7; }

/* Opening: headline leads, the line under it overlaps 70 ms behind */
@keyframes expIn { from { opacity: 0; transform: translate3d(0, var(--exRise), 0); } }
#hausExp.open .expHeroText h1 { animation: expIn .34s var(--exE) both; }
#hausExp.open .expHeroText p { animation: expIn .3s var(--exE) .07s both; --exRise: 8px; }

/* Sections */
.expSec { padding: clamp(4.5rem, 10vw, 9rem) clamp(1.25rem, 5vw, 5rem); }
.expSec.alt { background: var(--exIv2); }
.expLead { max-width: 52rem; }
.expLead p { margin-top: 1.3rem; max-width: 34rem; font-size: 1.06rem; line-height: 1.6; color: var(--exDim); }
.expFig { margin: 0; position: relative; }
.expFig .expFrame { overflow: hidden; background: #d8d0bf; aspect-ratio: 16 / 9; box-shadow: 0 24px 60px -28px rgba(34, 31, 26, .55); }
.expFig figcaption { margin-top: .75rem; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--exDim); }
.expGrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.2rem, 3vw, 2.6rem); margin-top: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.expGrid .g-full { grid-column: 1 / -1; }
.expGrid .g-a { grid-column: 1 / 8; }
.expGrid .g-b { grid-column: 8 / -1; margin-top: clamp(2rem, 9vw, 8rem); }
.expGrid .g-b .expFrame { aspect-ratio: 4 / 5; }
.expDisc { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.expDisc .expLead { position: sticky; top: 6rem; }
.expDisc .stack { display: grid; gap: clamp(1.5rem, 3vw, 2.6rem); }
.expList { list-style: none; margin: 2rem 0 0; padding: 0; max-width: 28rem; }
.expList li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid rgba(34, 31, 26, .16); font-size: .95rem; }
.expList li:last-child { border-bottom: 1px solid rgba(34, 31, 26, .16); }
.expList li span:last-child { color: var(--exDim); text-align: right; }
.expNote { margin-top: 1.4rem; font-size: .88rem; line-height: 1.5; color: var(--exDim); max-width: 30rem; }

/* Phone captures: the app at phone width, shown at phone size */
.expPhones { display: flex; gap: clamp(1rem, 3vw, 2.4rem); align-items: flex-start; }
.expPhone { flex: 1 1 0; max-width: 19rem; }
.expPhone .expFrame { aspect-ratio: 390 / 780; border-radius: 1.4rem; background: #2a2d2c; }
.expPhone:nth-child(2) { margin-top: clamp(2rem, 6vw, 5rem); }

/* Light */
.expLight { position: relative; height: 480vh; background: #14120f; color: #fff; }
.expLightStage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.expLightStage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s var(--exE); }
.expLightStage img.on { opacity: 1; }
.expLightStage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 12, 10, .72) 0%, rgba(14, 12, 10, .3) 30%, rgba(14, 12, 10, 0) 52%, rgba(14, 12, 10, 0) 62%, rgba(14, 12, 10, .7) 100%); pointer-events: none; }
.expLightText { position: absolute; z-index: 2; top: clamp(5rem, 12vh, 8rem); left: clamp(1.25rem, 5vw, 5rem); right: clamp(1.25rem, 5vw, 5rem); }
.expLightText p { margin-top: 1rem; max-width: 28rem; line-height: 1.55; color: rgba(255, 255, 255, .88); }
/* five invisible bands down the tall section; experience.js switches
   the phase when a band crosses the middle of the screen */
.expBand { position: absolute; left: 0; width: 1px; pointer-events: none; visibility: hidden; top: calc(50vh + (100% - 100vh) * var(--i) / 5); height: calc((100% - 100vh) / 5); }
.expPhases { position: absolute; z-index: 2; left: clamp(1.25rem, 5vw, 5rem); right: clamp(1.25rem, 5vw, 5rem); bottom: clamp(1.5rem, 5vh, 3rem); display: flex; gap: clamp(.4rem, 2vw, 1.6rem); }
.expPhases button { position: relative; flex: 1; font: inherit; color: #fff; background: none; border: 0; border-top: 2px solid rgba(255, 255, 255, .3); padding: .8rem 0 0; min-height: 2.75rem; text-align: left; cursor: pointer; opacity: .6; transition: opacity .2s var(--exE); }
.expPhases button::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: #fff; opacity: 0; transition: opacity .2s var(--exE); }
.expPhases button.on { opacity: 1; }
.expPhases button.on::before { opacity: 1; }
.expPhases b { display: block; font-family: var(--haus-serif); font-style: italic; font-weight: 500; font-size: clamp(1rem, 2.2vw, 1.5rem); }
.expPhases small { font-size: .72rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }

.expPro { display: inline-block; margin-left: .7rem; vertical-align: .55em; font-family: var(--haus-sans); font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: .3rem .65rem; border: 1px solid #984624; color: #984624; border-radius: 999px; }
.expPair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2.6rem); margin-top: clamp(1.5rem, 3vw, 2.6rem); }

/* Price */
.expPrice { background: #1f1c18; color: #f3eee4; }
.expPrice h2 { max-width: 46rem; }
.expCols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.expCols > div { border-top: 1px solid rgba(243, 238, 228, .25); padding-top: 1.4rem; }
.expCols h3 { margin: 0; font-family: var(--haus-serif); font-weight: 500; font-size: 1.6rem; }
.expCols .amt { margin-top: .4rem; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #e7a785; }
.expCols ul { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: .7rem; line-height: 1.45; color: rgba(243, 238, 228, .88); }
.expCols li::before { content: ""; display: inline-block; width: .8rem; height: 1px; margin-right: .7rem; vertical-align: .3em; background: #e7a785; }
.expCols li small { color: rgba(243, 238, 228, .62); font-size: .85em; }
.expFine { margin-top: 2.2rem; font-size: .9rem; color: rgba(243, 238, 228, .66); }

/* Close */
.expClose { position: relative; min-height: 80svh; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; overflow: hidden; background: #2a2823; padding: 6rem 1.25rem; }
.expClose img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.expClose::after { content: ""; position: absolute; inset: 0; background: rgba(20, 18, 15, .55); }
.expClose > div { position: relative; z-index: 2; }
#hausExp .expClose h2 { font-size: clamp(2.4rem, 6.4vw, 5.4rem); max-width: 18ch; margin: 0 auto; }
#hausExp .expBtn { margin-top: 2.2rem; cursor: pointer; display: inline-flex; align-items: center; gap: .55rem; font: inherit; font-size: .95rem; font-weight: 600; letter-spacing: .005em; padding: .95rem 1.7rem; border-radius: 999px; background: #fffdf8; color: #20261f; border: 1px solid rgba(255, 255, 255, .45); box-shadow: 0 14px 34px rgba(10, 16, 24, .30), 0 2px 8px rgba(10, 16, 24, .14); transition: transform .18s var(--exE); }
#hausExp .expBtn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { #hausExp .expBtn:hover { transform: translate3d(0, -2px, 0); } }
.expFoot { padding: 1.6rem clamp(1.25rem, 5vw, 5rem); background: #1f1c18; color: rgba(243, 238, 228, .66); font-size: .78rem; }

/* Reveal. Fallback first: rises once, from the observer (experience.js). */
.rv { opacity: 0; transform: translate3d(0, var(--exRise), 0); transition: opacity .34s var(--exE), transform .34s var(--exE); }
.rv.in { opacity: 1; transform: none; }
@keyframes expRise { from { opacity: 0; transform: translate3d(0, var(--exRise), 0); } to { opacity: 1; transform: none; } }
@keyframes expDrift { to { transform: translate3d(0, 22vh, 0) scale(1.04); } }
@supports (animation-timeline: view()) {
  /* scroll-linked: done once the block's top is ~240 px into the screen */
  #hausExp .rv, #hausExp .rv.in { opacity: 1; transform: none; transition: none; animation: expRise linear both; animation-timing-function: var(--exE); animation-timeline: view(); animation-range: entry 0% entry 240px; }
  .expHero img { animation: expDrift linear both; animation-timeline: --expS; animation-range: 0 100vh; }
}

@media (max-width: 52rem) {
  .expGrid .g-a, .expGrid .g-b { grid-column: 1 / -1; }
  .expGrid .g-b { margin-top: 0; }
  .expGrid .g-b .expFrame { aspect-ratio: 16 / 10; }
  .expDisc { grid-template-columns: 1fr; }
  .expDisc .expLead { position: static; }
  .expPair, .expCols { grid-template-columns: 1fr; }
  .expLight { height: 420vh; }
  .expPhases small { display: none; }
  .expBarR { gap: .8rem; } .expBar button { font-size: .8rem; } .expBar button.expWord { font-size: 1.25rem; }
  .expHero img { object-position: 50% 50%; }
  .expCue { display: none; }
  .expPhone { max-width: none; }
  .expPhone:nth-child(2) { margin-top: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  #hausExp { --exRise: 4px; }
  #hausExp.open .expHeroText p { --exRise: 4px; }
  .expHero img, #hausExp .expHero img { animation: none; transform: scale(1.04); }
  .expLightStage img { transition-duration: .3s; }
}
