/* Off Silence — home.
   Rooms on one axis: white rooms for words and objects, wall-to-wall pictures between them,
   and one room in the house colour at the end. */

/* ---------- the opening: the mark in the dark, then the film opens like an eye ---------- */
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--ink); color: var(--white); pointer-events: none; transition: opacity 1s var(--ease), visibility 0s 1s; }
html:not(.js) .intro { display: none; }
.intro .wordmark { width: clamp(150px, 15vw, 230px); opacity: 0; transition: opacity 1.1s var(--ease); }
html.is-intro-on .intro .wordmark { opacity: 1; }
html.is-intro-open .intro { background: transparent; }   /* the black now comes from behind the film */
html.is-ready .intro { opacity: 0; visibility: hidden; }

/* ---------- the film ---------- */
.hero { position: relative; height: 200vh; background: var(--ink); }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: var(--white); }
.hero-film { position: absolute; inset: 0; will-change: clip-path; }
html.js body[data-intro] .hero-film { clip-path: inset(50% 50% 50% 50%); }
.hero-media { position: absolute; inset: -3%; transform: scale(1.06); will-change: transform; }
.hero-media img, .hero-media video { animation: breathe 20s ease-in-out infinite alternate; transform-origin: 52% 53%; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.06); } }
/* the grade: printed warm and a little dark, so type can sit on it */
.hero-media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: #6a2a26; mix-blend-mode: multiply; opacity: .5; }
.hero-media::after { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(110% 95% at 50% 50%, rgba(15, 8, 8, .1), rgba(12, 6, 6, .58)); }

.hero-title { position: absolute; inset: 0; z-index: 2; display: grid; align-content: center; justify-items: center; gap: clamp(16px, 3.2vh, 36px); padding: 0 var(--pad); text-align: center; pointer-events: none; will-change: transform, opacity; }
.hero-l1 { --d: .15s; font-family: var(--serif); text-transform: uppercase; font-size: clamp(12px, 1.5vw, 25px); letter-spacing: .34em; padding-left: .34em; }
.hero-l2 { --d: .75s; font-size: clamp(56px, 10vw, 196px); line-height: .9; padding-bottom: .12em; }
html[lang="zh"] .hero-l1 { letter-spacing: .5em; padding-left: .5em; font-size: clamp(12px, 1.3vw, 21px); }
html[lang="zh"] .hero-l2 { font-size: clamp(50px, 8.2vw, 160px); line-height: 1.1; letter-spacing: .08em; padding: 0 0 0 .08em; }
html.js .hero [data-split] .wi { transition-duration: 1.8s; }
html.js.is-ready .hero [data-split] .wi { opacity: 1; filter: none; transform: none; }

.hero-foot { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: 26px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; will-change: opacity; }
.hero-foot > :last-child { justify-self: end; text-align: right; }
html.js .hero-foot > * { transition: opacity 1.4s var(--ease) 1.6s; }
html.js:not(.is-ready) .hero-foot > * { opacity: 0; }
.scroll-cue { display: grid; justify-items: center; gap: 12px; }
.scroll-cue i { width: 1px; height: 36px; background: currentColor; transform-origin: top; animation: cue 2.6s var(--ease-io) infinite; }
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- manifesto: a white room that rises over the film; four passages, read with you ---------- */
.manifesto {
  position: relative; z-index: 2; margin-top: -100vh;
  min-height: calc(100vh + 2px);   /* never shorter than the film it has to cover */
  background: var(--white);
  display: grid; justify-items: center; align-content: start; gap: 11vh;
  padding: 25vh var(--pad) 36vh;
}
.manifesto > .lbl { color: var(--mute); }
.mf { display: grid; justify-items: center; gap: clamp(150px, 31vh, 340px); text-align: center; }

/* the statement: the serif at reading size for once, set large */
.mf-s { max-width: 19.4em; font-family: var(--serif); font-size: clamp(27px, 3.9vw, 74px); line-height: 1.2; letter-spacing: -.014em; text-wrap: balance; }
.mf-s em, .mf-s s { font-style: italic; }
html[lang="zh"] .mf-s { max-width: 19em; font-size: clamp(23px, 3.2vw, 60px); line-height: 1.62; letter-spacing: .05em; }
/* Chinese is set as verse: one clause to a line */
.mf-s .cl { display: block; }
html[lang="zh"] .mf-s em, html[lang="zh"] .mf-s s { font-style: normal; }
/* a word waits in pencil until the reading line reaches it (home.js sets the ink) */
html.js .mf-s .k { opacity: .13; }

/* a window in the shape of the stone, set in the line like a word: an outline until it is read, a picture after */
.pw { --z: 2.8; position: relative; display: inline-block; width: 1.86em; height: .8em; margin: 0 .2em 0 .03em; vertical-align: -.075em; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(15, 13, 12, .2); transition: box-shadow .6s var(--ease); }
html[lang="zh"] .pw { width: 1.9em; height: .82em; margin: 0 .24em 0 .1em; vertical-align: -.1em; }
html:not(.js) .pw { display: none; }
html.js .mf-s .pw.k { opacity: 1; }
/* the picture is laid out at its open size and held small, so it stays sharp when it opens */
.pw-in { position: absolute; left: 50%; top: 50%; width: calc(var(--z) * 100%); height: calc(var(--z) * 100%); translate: -50% -50%; scale: calc(1 / var(--z)); clip-path: inset(0 50% 0 50% round 999px); transition: clip-path 1.25s var(--ease-io), scale .95s var(--ease-out), translate .95s var(--ease-out); }
.pw-in img { transform: scale(1.3); transition: transform 2.4s var(--ease-out); }
.pw.on { box-shadow: inset 0 0 0 1px rgba(15, 13, 12, 0); cursor: zoom-in; }
.pw.on .pw-in { clip-path: inset(0 0 0 0 round 999px); }
.pw.on .pw-in img { transform: none; }
/* while the room is on screen the pictures breathe, as the film does */
@keyframes pw-breathe { from { scale: 1; } to { scale: 1.14; } }
.manifesto.is-live .pw.on img { animation: pw-breathe 5.5s ease-in-out infinite alternate; }
.pw[data-pw="glow"] img { animation-delay: -1.4s; }
.pw[data-pw="three"] img { animation-delay: -2.8s; }
.pw[data-pw="rage"] img { animation-delay: -4.2s; }
.pw.is-open { z-index: 3; cursor: zoom-out; }
.pw.is-open .pw-in { scale: 1; translate: calc(-50% + var(--sx, 0px)) -50%; }
@media (hover: hover) and (pointer: fine) {
  .pw.on:hover { z-index: 3; }
  .pw.on:hover .pw-in { scale: 1; translate: calc(-50% + var(--sx, 0px)) -50%; }
}

/* what she was taught to say is struck out as it is read; the line stays when the words have gone quiet */
/* each thing we were taught takes its own line, like steps going down */
.mf-s > [data-q] { display: block; }
.mf-s s { position: relative; display: inline-block; white-space: nowrap; text-decoration: none; }
.mf-s s::after { content: ""; position: absolute; left: -.05em; right: -.03em; top: 55%; height: max(1px, .04em); background: var(--red); transform: scaleX(var(--x, 0)); transform-origin: left; }
html:not(.js) .mf-s s::after { transform: none; }
html[lang="zh"] .mf-s s::after { top: 52%; left: .3em; right: .3em; }

/* the answer, set the way the film's own line is: a small line of capitals, then one word, spoken */
.mf-big { display: grid; justify-items: center; gap: clamp(14px, 3vh, 34px); }
.mf-big1 { font-family: var(--serif); text-transform: uppercase; font-size: clamp(12px, 1.5vw, 25px); letter-spacing: .34em; padding-left: .34em; }
.mf-big2 { --d: .4s; font-size: clamp(72px, 13vw, 250px); line-height: .9; padding-bottom: .1em; }
html[lang="zh"] .mf-big1 { letter-spacing: .5em; padding-left: .5em; font-size: clamp(13px, 1.55vw, 26px); }
html[lang="zh"] .mf-big2 { font-size: clamp(50px, 9.4vw, 180px); line-height: 1.1; letter-spacing: .08em; padding: 0 0 0 .08em; }
html.js .mf-big [data-split] .wi { transition-duration: 1.8s; }

/* the name signs the last passage in its own hand */
.mf-mark { display: inline-block; width: 3.74em; margin-right: .04em; vertical-align: -.1em; }
html[lang="zh"] .mf-mark { width: 3.6em; margin-right: .2em; vertical-align: -.1em; }

/* ---------- her ---------- */
.her { padding-bottom: 26vh; }
.her .head { padding-bottom: 13vh; }
.tri { display: flex; gap: 2px; height: 100vh; min-height: 540px; }
.tri-p { flex: 1 1 0; min-width: 0; color: var(--white); transition: flex-grow 1.25s var(--ease-io); }
.tri-p .cur-in { position: absolute; inset: 0; }
.tri-p img { position: absolute; left: 0; top: -6%; height: 112%; }
.tri-p .cur-in::after { content: ""; position: absolute; inset: 55% 0 0 0; background: linear-gradient(rgba(15, 13, 12, 0), rgba(15, 13, 12, .5)); pointer-events: none; }
.tri-p figcaption { position: absolute; z-index: 1; left: clamp(16px, 1.9vw, 30px); bottom: clamp(16px, 1.9vw, 28px); display: grid; gap: 10px; }
html.js .tri-p figcaption { opacity: 0; transition: opacity 1.2s var(--ease) calc(var(--d, 0s) + 1s); }
html.js .tri-p.in figcaption { opacity: 1; }
.tri-p .speech { font-size: clamp(24px, 2.6vw, 46px); line-height: 1; }
html[lang="zh"] .tri-p .speech { font-size: clamp(20px, 2vw, 34px); }
@media (hover: hover) {
  .tri:hover .tri-p { flex-grow: .84; }
  .tri .tri-p:hover { flex-grow: 1.62; }
}
.her-p { max-width: 25em; margin: 22vh auto 0; padding: 0 var(--pad); text-align: center; }

/* ---------- the object ---------- */
.object { display: grid; justify-items: center; gap: clamp(50px, 10vh, 110px); padding: 2vh var(--pad) 28vh; }
.object .head { padding: 0; }

/* ---------- the statement, set in the ceramic ---------- */
.stmt { position: relative; height: 112vh; display: grid; place-items: center; overflow: hidden; padding: 0 var(--pad); text-align: center; color: #1b1613; }
.stmt-bg { position: absolute; inset: 0; }
.stmt-bg img { position: absolute; left: 0; top: -10%; height: 120%; }
.stmt .t-mega { position: relative; }
.stmt b { color: var(--oxblood); }

/* ---------- the ribbon: six rooms of colour, each rising over the last ---------- */
.ribbon { position: relative; height: calc(100vh + 6 * 74vh); }
.rb-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--white); }
.rb-card { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: clamp(26px, 5vw, 96px); padding: 0 var(--pad); background: var(--c, var(--white)); will-change: transform; }
.rb-card[data-tone="light"] { color: var(--ink); }
.rb-card[data-tone="dark"] { color: var(--white); }
.rb-card.is-intro { grid-template-columns: 1fr; justify-items: center; }
html.js .rb-card:not(.is-intro) { transform: translate3d(0, 100%, 0); }
.rb-name { justify-self: end; text-align: right; }
.rb-photo { height: min(68vh, 780px); aspect-ratio: 2 / 3; margin: 0; overflow: hidden; }
.rb-photo img { will-change: transform; }
.rb-desc { justify-self: start; display: grid; gap: 14px; font-size: clamp(15px, 1.15vw, 19px); line-height: 1.3; }
.rb-desc .lbl { opacity: .65; }
/* the six swatches; they take the ink of whichever room is behind them */
.rb-dots { position: absolute; z-index: 10; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; gap: 8px; color: var(--ink); transition: color .5s var(--ease); }
.rb-pin[data-tone="dark"] .rb-dots { color: var(--white); }
.rb-dots button { display: block; width: 28px; height: 9px; padding: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px currentColor; opacity: .55; transition: background-color .5s var(--ease), opacity .5s var(--ease); }
.rb-dots button.on { background: currentColor; opacity: 1; }
.rb-dots li { padding: 8px 0; }

/* ---------- the stone: four on white ---------- */
.stones { padding-top: 26vh; }
.stones .head { padding-bottom: 14vh; }
.st-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.st + .st { border-left: 1px solid var(--line); }
.st-stage { position: relative; aspect-ratio: 1 / 1.12; overflow: hidden; perspective: 900px; cursor: pointer; }
.st-shot, .st-mat { position: absolute; inset: 0; }
.st-shot { transition: opacity .7s var(--ease), transform 1.6s var(--ease-out); }
.st-mat { opacity: 0; transform: scale(1.14); transition: opacity .8s var(--ease), transform 2s var(--ease-out); }
.st-cut { position: absolute; left: 11%; top: 47%; width: 78%; height: auto; object-fit: contain; opacity: 0; transform: translate3d(0, -50%, 0) rotate(7deg) scale(.84); filter: drop-shadow(0 22px 26px rgba(20, 12, 8, .32)); transition: opacity .5s var(--ease), transform 1.1s var(--ease-out); }
.st-note { position: absolute; left: clamp(14px, 1.6vw, 26px); right: clamp(14px, 1.6vw, 26px); bottom: clamp(14px, 1.5vw, 24px); font-size: clamp(17px, 1.6vw, 28px); line-height: 1.1; opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity .6s var(--ease), transform .9s var(--ease-out); }
.st[data-tone="dark"] .st-note { color: var(--white); }
.st.is-on .st-shot { opacity: 0; transform: scale(1.05); }
.st.is-on .st-mat { opacity: 1; transform: none; }
.st.is-on .st-cut { opacity: 1; transform: translate3d(var(--tx, 0px), calc(-50% + var(--ty, 0px)), 0) rotate(-4deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: opacity .5s var(--ease), transform .7s var(--ease-out); }
.st.is-on .st-note { opacity: 1; transform: none; transition-delay: .15s; }
.st-info { display: grid; justify-items: center; gap: 12px; padding: 28px 14px 38px; text-align: center; }
.st-info .lnk { margin-top: 8px; }

/* ---------- lookbook: facing pages, turning in opposite directions ---------- */
.lookbook { padding-top: 28vh; }
.lookbook .head { padding-bottom: 14vh; }
.lb { position: relative; height: 400vh; }
.lb-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; color: var(--white); }
.lb-col { display: flex; flex-direction: column; will-change: transform; }
.lb-col figure { position: relative; flex: none; height: 100vh; margin: 0; overflow: hidden; }
.lb-col img { position: absolute; inset: 0; }
.lb-col figure::after { content: ""; position: absolute; inset: 60% 0 0 0; background: linear-gradient(rgba(15, 13, 12, 0), rgba(15, 13, 12, .46)); pointer-events: none; }
.lb-col figcaption { position: absolute; z-index: 1; left: clamp(16px, 1.9vw, 30px); bottom: clamp(16px, 1.9vw, 28px); display: grid; gap: 10px; }
.lb-col.is-r figcaption { left: auto; right: clamp(16px, 1.9vw, 30px); justify-items: end; text-align: right; }
.lb-col .speech { font-size: clamp(22px, 2.4vw, 42px); line-height: 1; }
html[lang="zh"] .lb-col .speech { font-size: clamp(19px, 1.9vw, 32px); }
.lb-count { position: absolute; z-index: 3; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 10px 18px 10px calc(18px + .22em); border-radius: 999px; background: var(--white); color: var(--ink); white-space: nowrap; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero-l1 { letter-spacing: .26em; padding-left: .26em; }
  .hero-foot { grid-template-columns: 1fr 1fr; bottom: 20px; }
  .scroll-cue { display: none; }

  .manifesto { padding: 19vh var(--pad) 26vh; gap: 8vh; }
  .mf { gap: clamp(120px, 24vh, 230px); }
  .mf-s { font-size: clamp(25px, 7vw, 46px); }
  html[lang="zh"] .mf-s { font-size: clamp(20px, 5.6vw, 40px); }
  .mf-s .cm { display: block; }   /* on a narrow screen the English is verse too: one thing to a line */
  .pw { --z: 4.2; }
  .mf-big2 { font-size: clamp(72px, 23vw, 190px); }
  html[lang="zh"] .mf-big2 { font-size: clamp(46px, 13vw, 120px); }

  .her { padding-bottom: 18vh; }
  .her .head { padding-bottom: 9vh; }
  .tri { flex-direction: column; height: auto; min-height: 0; }
  .tri-p { flex: none; height: 124vw; }
  .her-p { margin-top: 14vh; }

  .object { padding-bottom: 20vh; }
  .stmt { height: 96vh; }

  .rb-card { grid-template-columns: 1fr; grid-template-rows: 1fr auto 1fr; justify-items: center; row-gap: 22px; padding: 70px var(--pad) 70px; }
  .rb-card.is-intro { grid-template-rows: 1fr; }
  .rb-name { justify-self: center; align-self: end; text-align: center; }
  .rb-photo { height: min(52vh, 110vw); }
  .rb-desc { justify-self: center; align-self: start; justify-items: center; text-align: center; grid-auto-flow: column; align-items: baseline; gap: 14px; }

  .stones { padding-top: 20vh; }
  .stones .head { padding-bottom: 9vh; }
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st:nth-child(3) { border-left: 0; }
  .st:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .st-info { padding: 20px 10px 28px; }

  .lookbook { padding-top: 20vh; }
  .lookbook .head { padding-bottom: 9vh; }
  .lb { height: auto; }
  .lb-pin { position: static; height: auto; overflow: visible; }
  .lb-col { transform: none !important; gap: 2px; }
  .lb-col.is-r { flex-direction: column-reverse; }
  .lb-col figure { height: 74vw; }
  .lb-col .speech { font-size: 17px; }
  .lb-col .lbl { display: none; }
  .lb-col figcaption, .lb-col.is-r figcaption { left: 10px; right: 10px; bottom: 10px; justify-items: start; text-align: left; }
  .lb-count { display: none; }

}

@media (prefers-reduced-motion: reduce) {
  .hero-media img, .scroll-cue i, .manifesto .pw img { animation: none !important; }
}
