/* Coming-soon page in the same language as the main site (web/src/index.css):
   concrete palette, graphite ink, Instrument Sans + EB Garamond italic, glass controls, small architectural corners. */

@font-face {
  font-family: "Instrument Sans Variable"; font-style: normal; font-display: swap; font-weight: 400 700; font-stretch: 75% 100%;
  src: url("/assets/instrument-sans-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans Variable"; font-style: normal; font-display: swap; font-weight: 400 700; font-stretch: 75% 100%;
  src: url("/assets/instrument-sans-latin-ext-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "EB Garamond Variable"; font-style: italic; font-display: swap; font-weight: 400 800;
  src: url("/assets/eb-garamond-latin-wght-italic.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --paper: #ecebe7; --paper-2: #e1e0db; --paper-3: #f7f6f3;
  --ink: #1c1d1b; --ink-2: #63645f; --line: #d2d1cb; --error: #a3222b;
  --sans: "Instrument Sans Variable", ui-sans-serif, system-ui, sans-serif;
  --serif: "EB Garamond Variable", Georgia, serif;
  --r-ctl: 8px; --r-bar: 12px; --r-media: 12px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-wipe: cubic-bezier(0.77, 0, 0.175, 1);
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.5; letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
::selection { background: var(--ink); color: var(--paper-3); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
em { font-family: var(--serif); font-style: italic; font-weight: 430; letter-spacing: -0.005em; }

/* ---------- glass (same recipe as the site) */
.glass {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.62), rgb(255 255 255 / 0.32));
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 1px 0.5px rgb(255 255 255 / 0.95), inset 0 -1px 1px rgb(255 255 255 / 0.35),
    inset 0 0 0 0.5px rgb(255 255 255 / 0.55), 0 0 0 0.5px rgb(0 0 0 / 0.06),
    0 8px 24px -8px rgb(0 0 0 / 0.22), 0 2px 6px -2px rgb(0 0 0 / 0.10);
}
.glass-ink {
  background: linear-gradient(180deg, rgb(52 53 50 / 0.9), rgb(26 27 25 / 0.94)); color: #f7f6f3;
  box-shadow: inset 0 1px 0.5px rgb(255 255 255 / 0.22), inset 0 -1px 1px rgb(0 0 0 / 0.3),
    inset 0 0 0 0.5px rgb(255 255 255 / 0.12), 0 10px 24px -12px rgb(0 0 0 / 0.45), 0 2px 5px -2px rgb(0 0 0 / 0.18);
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0;
  background: radial-gradient(110px circle at var(--mx, 50%) var(--my, 0%), rgb(255 255 255 / 0.18), transparent 60%);
  transition: opacity 300ms var(--ease-out);
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--paper-3); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass-ink { background: var(--ink); }
}

/* ---------- top bar */
.bar { position: fixed; z-index: 10; top: 12px; left: 12px; right: 12px; max-width: 1264px; margin: 0 auto; height: 52px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 20px; border-radius: var(--r-bar); }
.brand { font-size: 15px; font-weight: 560; letter-spacing: -0.015em; }

/* EN / FR segmented switch with a sliding thumb */
.lang { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border-radius: 6px; background: rgb(28 29 27 / 0.05); }
.lang__thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 5px; background: var(--paper-3);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.10), 0 0 0 0.5px rgb(0 0 0 / 0.04);
  transition: transform 550ms cubic-bezier(0.32, 0.72, 0, 1); }
html[lang="fr"] .lang__thumb { transform: translateX(100%); }
.lang button { position: relative; z-index: 1; border: 0; background: none; cursor: pointer; padding: 4px 10px; font: inherit;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2);
  transition: color 500ms var(--ease-out), transform 160ms var(--ease-out); }
.lang button[aria-pressed="true"] { color: var(--ink); }
.lang button:active { transform: scale(0.96); }

/* ---------- layout */
.page { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 128px 16px 40px;
  display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .page { padding: 140px 32px 48px; min-height: calc(100dvh - 72px); }
  .intro { max-width: 560px; }
}
.page, .foot, .bar, .label { position: relative; z-index: 3; }
.bar { position: fixed; }

.eyebrow { margin: 0; font-size: 12px; font-weight: 560; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.display { margin: 20px 0 0; font-weight: 470; font-stretch: 94%; letter-spacing: -0.034em; line-height: 1;
  font-size: clamp(2.6rem, 5.4vw, 5rem); max-width: 11ch; }
.lede { margin: 24px 0 0; max-width: 40ch; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.lede em { color: var(--ink); font-size: 1.1em; }

/* ---------- subscribe: capsule field with the graphite glass button inside */
.subscribe { margin-top: 36px; max-width: 460px; }
.field { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: var(--r-ctl); background: var(--paper-3);
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow 200ms ease; }
.field:focus-within { box-shadow: 0 0 0 2px var(--ink); }
.subscribe.is-error .field { box-shadow: 0 0 0 2px var(--error); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.field input::placeholder { color: rgb(99 100 95 / 0.8); }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; white-space: nowrap; border-radius: var(--r-ctl);
  padding: 9px 14px; font: inherit; font-size: 13.5px; font-weight: 550; transition: transform 260ms var(--ease-out); }
.btn .btn-arrow { transition: transform 320ms var(--ease-out); }
.btn:disabled { opacity: 0.55; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:hover::after { opacity: 1; }
  .btn:hover .btn-arrow { transform: translateX(3px); }
}
.btn:active { transform: scale(0.97); transition-duration: 90ms; }
/* the label keeps the width of its longest language, so switching never resizes the button */
.stable { display: inline-grid; justify-items: center; }
.stable > * { grid-area: 1 / 1; }
.ghost { visibility: hidden; }
.note { margin: 10px 0 0; min-height: 1.5em; font-size: 13px; color: var(--ink-2); }
.subscribe.is-error .note { color: var(--error); }
.subscribe.is-done .note { color: var(--ink); }

.instagram { margin-top: 28px; margin-left: -8px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: var(--r-ctl); color: var(--ink); text-decoration: none; font-size: 15px; transition: background-color 200ms ease, transform 160ms var(--ease-out); }
.instagram:hover { background: rgb(28 29 27 / 0.05); }
.instagram:active { transform: scale(0.97); }

.foot { width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px 16px 28px; display: flex; flex-direction: column; align-items: center;
  gap: 6px; text-align: center; font-size: 12px; color: var(--ink-2); }
/* desktop: copyright on the left, the credit centred under the page (clear of the painting on the right) */
@media (min-width: 900px) {
  .foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; text-align: left; }
  .foot > :first-child { justify-self: start; }
  .foot > :nth-child(2) { justify-self: center; text-align: center; }
}
@media (min-width: 900px) { .foot { padding: 20px 32px 28px; } }

/* ---------- entrance: text rises out of a slight blur, the photo wipes up and settles */
.rise { opacity: 0; transform: translateY(16px); filter: blur(6px);
  transition: opacity 900ms var(--ease-out) var(--d, 0s), transform 900ms var(--ease-out) var(--d, 0s), filter 900ms var(--ease-out) var(--d, 0s); }
.is-ready .rise { opacity: 1; transform: none; filter: none; }

/* ---------- language cross-dissolve (same timing as the site) */
html.lang-swap [data-i18n], html.lang-swap [data-i18n-html] {
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1), filter 900ms cubic-bezier(0.22, 1, 0.36, 1) !important; }
html.lang-out [data-i18n], html.lang-out [data-i18n-html] {
  opacity: 0 !important; filter: blur(7px) !important;
  transition: opacity 560ms cubic-bezier(0.45, 0, 0.55, 1), filter 560ms cubic-bezier(0.45, 0, 0.55, 1) !important; }

@media (prefers-reduced-motion: reduce) {
  .rise { transition: opacity 200ms ease !important; transform: none !important; filter: none !important; opacity: 1; }
  .slide__reveal, .warmth { display: none; }
  .slide__base { opacity: 0.07; }
  .wall, .art { transform: none !important; }
  .slide.is-panning .pan { animation: none; transform: none; }
  .lang__thumb { transition: none; }
}

/* ---------------------------------------------------------------- the wall and the painting in it
   At rest Chien Peyi is a faint memory in the concrete. On desktop, moving over the right half of the page
   uncovers it under a large soft light that trails the pointer (script.js eases --rx/--ry/--reveal). */
:root { --rx: 50%; --ry: 50%; --reveal: 0; --radius: clamp(340px, 26vw, 440px); --cx: 50vw; --cy: 50vh; --warmth: 0; }
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.wall { position: absolute; inset: -24px; will-change: transform; }
.wall > div { position: absolute; inset: 0; }
.wall__tone {
  background:
    radial-gradient(120% 90% at 15% 5%, #f3f2ef 0%, rgb(243 242 239 / 0) 60%),
    radial-gradient(90% 80% at 95% 100%, rgb(205 203 196 / 0.55) 0%, rgb(205 203 196 / 0) 65%),
    linear-gradient(180deg, var(--paper) 0%, #e4e3de 100%);
}
.wall__texture {                     /* fine concrete grain + soft cloudy variation */
  opacity: 0.55; mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.40  0 0 0 0 0.40  0 0 0 0 0.38  0 0 0 0.15 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='900' height='900'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='0.006' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.45  0 0 0 0 0.43  0 0 0 0.10 0'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
  background-size: 240px 240px, 900px 900px;
}
.art {
  position: absolute; top: -3vh; bottom: -3vh; right: -2vw; width: 56vw; will-change: transform;
  /* feathered into the wall on every side: no frame, no edge */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 88%, rgb(0 0 0 / 0.6) 100%), linear-gradient(180deg, transparent 0%, #000 20%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 88%, rgb(0 0 0 / 0.6) 100%), linear-gradient(180deg, transparent 0%, #000 20%, #000 78%, transparent 100%);
  mask-composite: intersect;
}
/* slideshow: two slides cross-dissolve; inside each, the painting pans slowly left to right */
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 4s cubic-bezier(0.45, 0, 0.55, 1); }
.slide.is-on { opacity: 1; }
.slide__base, .slide__reveal { position: absolute; inset: 0; overflow: hidden; }
.pan { position: absolute; top: 0; bottom: 0; left: -10%; right: -10%;      /* 20% wider than the wall area: room to drift */
  background: var(--img) center / cover no-repeat; transform: translate3d(-8%, 0, 0); will-change: transform; }
.slide.is-panning .pan { animation: pan var(--pan-ms, 22000ms) linear forwards; }
@keyframes pan { from { transform: translate3d(-8%, 0, 0) scale(1.02); } to { transform: translate3d(8%, 0, 0) scale(1.02); } }
.slide__base { opacity: 0.055; filter: saturate(0.35) contrast(0.85); mix-blend-mode: multiply; }
.slide__reveal {
  opacity: calc(var(--reveal) * 0.62); filter: saturate(0.85);
  -webkit-mask-image: radial-gradient(circle var(--radius) at var(--rx) var(--ry), #000 0%, rgb(0 0 0 / 0.86) 22%, rgb(0 0 0 / 0.6) 44%, rgb(0 0 0 / 0.3) 66%, rgb(0 0 0 / 0.08) 86%, transparent 100%);
  mask-image: radial-gradient(circle var(--radius) at var(--rx) var(--ry), #000 0%, rgb(0 0 0 / 0.86) 22%, rgb(0 0 0 / 0.6) 44%, rgb(0 0 0 / 0.3) 66%, rgb(0 0 0 / 0.08) 86%, transparent 100%);
}
.warmth {                            /* a very soft warm light that follows the visitor */
  position: absolute; inset: 0; opacity: var(--warmth); mix-blend-mode: soft-light; transition: opacity 0.8s ease;
  background: radial-gradient(circle 520px at var(--cx) var(--cy), rgb(255 222 180 / 0.5) 0%, rgb(255 228 196 / 0.2) 40%, rgb(255 235 210 / 0) 100%);
}
/* museum label for the work in the wall */
.label { position: fixed; right: clamp(20px, 3vw, 40px); bottom: 76px; margin: 0; font-size: 11px; font-weight: 560; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-2); }
.label em { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }

@media (hover: none), (pointer: coarse) {
  .slide__reveal, .warmth { display: none; }
  .slide__base { opacity: 0.07; }
}
/* the label changes with the painting: a slow dissolve */
.label { transition: opacity 1.6s cubic-bezier(0.45, 0, 0.55, 1); }
.label.is-out { opacity: 0; }
@media (max-width: 899px) {
  .art { width: auto; left: 0; right: 0; top: 46vh; bottom: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 100%), linear-gradient(180deg, transparent 0%, #000 35%, #000 85%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 100%), linear-gradient(180deg, transparent 0%, #000 35%, #000 85%, transparent 100%); }
  .label { bottom: 88px; }
}

/* credit link: quiet, underlined on hover */
.credit-link { color: var(--ink); text-decoration: none; background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 320ms var(--ease-out); }
.credit-link:hover { background-size: 100% 1px; }

/* ---------------------------------------------------------------- v3: the name leads; header is just the language switch */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }   /* stop iPhone Safari inflating the text */
body { overflow-x: clip; }
.page > * { min-width: 0; }
.field input { width: 100%; }

.bar { left: auto; right: 16px; top: 16px; height: auto; max-width: none; margin: 0; padding: 0; background: none; box-shadow: none; }
@media (min-width: 900px) { .bar { right: 32px; top: 24px; } }
.lang.glass { padding: 3px; border-radius: 9px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.62), rgb(255 255 255 / 0.32)); }
.lang.glass .lang__thumb { top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 6px; }
.lang.glass button { padding: 6px 12px; font-size: 12px; }

.name { margin: 0; max-width: none; font-size: clamp(3.2rem, 8.4vw, 7rem); line-height: 0.95; }
.role { margin: 16px 0 0; font-size: 13px; font-weight: 560; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.soon { margin: 40px 0 0; font-weight: 470; font-stretch: 94%; letter-spacing: -0.025em; line-height: 1.05;
  font-size: clamp(1.6rem, 2.6vw, 2.25rem); }
.lede { margin-top: 16px; }

/* phones: everything in one calm column, the painting label in the flow instead of pinned over the form */
@media (max-width: 899px) {
  .page { padding: 104px 20px 24px; gap: 0; align-items: start; }
  .name { font-size: clamp(3rem, 15vw, 4.4rem); }
  .soon { margin-top: 32px; }
  .subscribe { margin-top: 28px; max-width: none; }
  .label { position: static; margin: 8px 20px 0; text-align: center; }
  .foot { padding: 16px 20px calc(24px + env(safe-area-inset-bottom)); }
}
