/* ============================================================
   TINOLI — жемчужный зал
   Светлая страница цвета жемчуга, чернила цвета баклажана, золото для действий.
   Бархат остался только внутри витрин и в подвале страницы: на нём лежит бисер.
   Светлая тема — единственная, решение владельца от 2026-11-11 (docs/redesign/DIRECTION.md).
   ============================================================ */

/* ---------- Fonts: self-hosted, Latin + Cyrillic, OFL ----------
   Jost: Copyright 2020 The Jost Project Authors. Noto Serif Display (here "TINOLI Display"):
   Copyright Google Inc. Marck Script: Copyright (c) 2011, Denis Masharov and Marck Fogel, with
   Reserved Font Name "Marck Script"; the file is the original font, only compressed. All three
   under the SIL Open Font License 1.1, https://openfontlicense.org */
@font-face {
  font-family: "Marck Script";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(../fonts/marck-script.woff2) format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(../fonts/jost-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(../fonts/jost-latin.woff2) format("woff2");
  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: "TINOLI Display";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/nsd-cond-300-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "TINOLI Display";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/nsd-cond-300-latin.woff2) format("woff2");
  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;
}
/* Metric-matched fallbacks, so the swap does not move the layout */
@font-face {
  font-family: "Jost Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Arimo"), local("Helvetica");
  size-adjust: 96.52%;
  ascent-override: 110.86%;
  descent-override: 39.37%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "TINOLI Display Fallback";
  src: local("Times New Roman"), local("Liberation Serif"), local("Tinos");
  size-adjust: 85.39%;
  ascent-override: 125.31%;
  descent-override: 33.96%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* Pearl paper and aubergine ink; gold for actions (a deep one for words, a lighter one
     for hairlines); champagne satin for the one tinted room of the page */
  --ground: #f6f3f7;
  --satin: #f3ead8;
  --line: rgba(36, 22, 44, .13);
  --line-2: rgba(36, 22, 44, .3);
  --ink: #24162c;
  --ink-2: #4d3d55;
  --ink-3: #6d5d75;
  --accent: #7d5c10;
  --accent-line: #a8842c;

  /* The velvet of the cases and of the footer, with the platinum and champagne that lie on it */
  --velvet: #231629;
  --on-velvet: #f2edf4;
  --on-velvet-2: #c3b8c6;
  --on-velvet-3: #9d90a1;
  --on-velvet-line: rgba(242, 237, 244, .12);
  --on-velvet-line-2: rgba(242, 237, 244, .24);
  --gold: #d9c595;

  --f-text: "Jost", "Jost Fallback", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --f-hand: "Marck Script", "TINOLI Display", "TINOLI Display Fallback", Georgia, serif;
  --f-display: "TINOLI Display", "TINOLI Display Fallback", Georgia, "Times New Roman", serif;

  --t-hero: clamp(2.5rem, min(4.6vw, 9vh), 4rem);
  --t-h1: clamp(2.5rem, 1.4rem + 3.6vw, 4.6rem);
  --t-h2: clamp(2.1rem, 1.4rem + 2.4vw, 3.4rem);
  --t-h3: 1.6rem;
  --t-lead: clamp(1.1rem, 1rem + .35vw, 1.3rem);
  --t-body: 1.0625rem;
  --t-small: .9375rem;
  --t-meta: .8125rem;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 40px; --s-7: 64px; --s-8: 104px; --s-9: 160px;

  --gutter: max(20px, 4vw);
  --col-gap: clamp(36px, 6vw, 96px);
  --section-y: clamp(48px, 5.5vw, 100px);
  --maxw: 1320px;
  /* Corners by rank: the big cases, the tiles of the grid, small boxes; actions are pills */
  --r: 10px;
  --r-room: 36px;
  --r-case: 22px;
  --r-tile: 16px;
  --r-pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --hdr-h: 72px;

  /* The case: a box of velvet standing on the pearl table. Light falls from above onto
     velvet with a faint pile; under the box lies its shadow, tinted with the ink */
  --case-drop: 0 1px 2px rgba(36, 22, 44, .16), 0 26px 44px -26px rgba(36, 22, 44, .5);
  --case-light: linear-gradient(180deg, #35233d 0%, #231629 62%);
  --case-velvet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .055 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23v)'/%3E%3C/svg%3E");
  --case-edges: inset 0 1px 0 rgba(242, 237, 244, .24), inset 1px 0 0 rgba(242, 237, 244, .12),
    inset -1px 0 0 rgba(242, 237, 244, .12), inset 0 -1px 0 rgba(242, 237, 244, .12);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; scroll-padding-top: calc(var(--hdr-h) + 16px); }
/* Smooth only once the page has settled: an animated jump to #works on load would
   outrun the catalogue and override the final landing */
@media (prefers-reduced-motion: no-preference) { html.is-settled { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-2);
  font: 400 var(--t-body)/1.65 var(--f-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 400; text-wrap: balance; overflow-wrap: break-word; }
body { font-synthesis: none; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .28em; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 50;
  background: var(--ink); color: var(--ground); padding: var(--s-2) var(--s-4);
  text-decoration: none; border-radius: var(--r-pill);
}
.skip:focus { top: var(--s-3); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Display type: the condensed hairline serif, like engraving on a plate */
.display {
  font-family: var(--f-display);
  font-weight: 300;
  font-stretch: 62.5%;
  letter-spacing: -.005em;
  color: var(--ink);
}

/* ---------- Buttons and links ---------- */
/* The one filled thing on the page: a pill of the ink. Under the pointer it turns to gold. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 12px 28px;
  border: 1px solid var(--ink); border-radius: var(--r-pill);
  color: var(--ground); background: var(--ink);
  font: 500 var(--t-small)/1.2 var(--f-text); letter-spacing: .04em;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
/* a touch leaves :hover stuck, so the gold comes only under a real pointer, or while pressed */
@media (hover: hover) {
  .btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
}
.btn:active { background: var(--gold); border-color: var(--gold); color: var(--ink); }
/* The second action beside it: the same pill, drawn in line */
.btn--line { background: transparent; color: var(--ink); }
.link {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2);
  transition: text-decoration-color .2s var(--ease), color .2s var(--ease);
}
.link:hover { text-decoration-color: var(--accent-line); color: var(--accent); }

/* ---------- Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(246, 243, 247, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.hdr.is-scrolled { border-bottom-color: var(--line); }
.hdr__in {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
  height: var(--hdr-h);
  max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.logo { display: inline-flex; color: var(--ink); padding-block: var(--s-3); }
.logo__svg { height: 19px; width: auto; }
.logo--sm .logo__svg { height: 15px; }
.nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav a {
  position: relative; padding-block: 12px; text-decoration: none;
  font-size: var(--t-small); letter-spacing: .02em; color: var(--ink-2);
  transition: color .2s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px;
  background: var(--accent-line); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Vitrine: the stage every work stands on ---------- */
.vitrine {
  position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--case-velvet), var(--case-light), var(--velvet);
  border-radius: var(--r-case);
  box-shadow: var(--case-drop);
  isolation: isolate;
}
/* A photo and the ground it stands on, placed by js/site.js: filling the case when the
   proportions are close, otherwise whole, its long edges feathered into its own colours */
.shot { position: absolute; inset: 0; }
/* the second half of the ground (the first is the wrapper's own colour); painted before the photo */
.shot::before { content: ""; position: absolute; inset: 0 0 0 50%; background: var(--ground-b, transparent); }
.shot.is-ground-y::before { inset: 50% 0 0 0; }
/* Tiles: each work fills its own small case to the rounded edge */
.tile .vitrine { border-radius: var(--r-tile); }
.shot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot > img.is-whole { object-fit: fill; }
.shot > img.is-feather-x {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.shot > img.is-feather-y {
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
}
.vitrine__shot { transition: opacity .8s var(--ease), filter .8s var(--ease), transform 1.2s var(--ease); }
.vitrine__shot--worn { opacity: 0; filter: blur(6px); transform: scale(1.03); }
.vitrine__glare {
  position: absolute; inset: -10%; z-index: 3; pointer-events: none; transform: translateX(-130%);
  background: linear-gradient(104deg, transparent 38%, rgba(255, 246, 236, .18) 47%, rgba(255, 246, 236, .05) 53%, transparent 62%);
}
.vitrine__shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  box-shadow: var(--case-edges), inset 0 -80px 80px -60px rgba(18, 11, 19, .5);
}
.is-alt .vitrine__shot--worn { opacity: 1; filter: none; transform: none; }
.is-alt .vitrine__shot--obj { opacity: 0; filter: blur(3px); }
/* The close-up of the crystal beside «Написать мастеру» */
.vitrine--macro { aspect-ratio: 4 / 3; }
.vitrine.glint .vitrine__glare { animation: glare 1s var(--ease); }
@keyframes glare { from { transform: translateX(-130%); } to { transform: translateX(130%); } }
/* The photo of the newest work waits unseen under the velvet until it is laid out in beads */
.shot.is-waiting { visibility: hidden; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(20px, min(5vw, 5vh), 72px) var(--section-y); }
.hero__grid {
  display: grid; gap: var(--col-gap);
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start;
}
.hero__copy { padding-top: clamp(0px, 6vh, 72px); }
.hero__stage { position: relative; }
/* The case fits the first screen; vh first, then svh where it is understood
   (a var() inside makes a plain fallback declaration useless) */
.hero__frame { position: relative; width: min(100%, calc((100vh - var(--hdr-h) - 150px) * .8)); min-width: min(100%, 320px); margin-inline: auto; }
@supports (height: 100svh) {
  .hero__frame { width: min(100%, calc((100svh - var(--hdr-h) - 150px) * .8)); }
}
/* On the home page the monogram form stands under the case, and fits the first screen with it */
.hero__frame--home { width: min(100%, calc((100vh - var(--hdr-h) - 290px) * .8)); }
@supports (height: 100svh) {
  .hero__frame--home { width: min(100%, calc((100svh - var(--hdr-h) - 290px) * .8)); }
}
.hero__frame .vitrine { aspect-ratio: 4 / 5; }
.hero__vit { position: relative; }
.hero__caption {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5); font-size: var(--t-meta); color: var(--ink-3); letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.hero__caption b { font-weight: 500; color: var(--ink-2); }
.hero__title { font-size: var(--t-hero); line-height: .98; }
.hero__lead { margin-top: var(--s-5); font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); max-width: 30ch; }
.hero__note { margin-top: var(--s-4); max-width: 34ch; font-size: var(--t-small); line-height: 1.6; color: var(--ink-3); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-6); }
.hero__privacy { margin-top: var(--s-4); max-width: 40ch; font-size: var(--t-small); line-height: 1.6; color: var(--ink-3); }

.embroidery { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; transition: opacity .9s var(--ease); pointer-events: none; }
.embroidery.is-done { opacity: 0; }
/* The static mark stands in only where the embroidery cannot run: no scripts, or a failed canvas */
.mark-fallback { position: absolute; inset: 20%; color: var(--gold); opacity: 0; transition: opacity .6s var(--ease); }
.mark-fallback svg { width: 100%; height: 100%; }
@media (scripting: none) { .mark-fallback { opacity: 1; } }
.vitrine.is-fallback .mark-fallback { opacity: 1; }

/* ---------- Passport: the technical sheet of a work ---------- */
.passport { display: grid; font-variant-numeric: tabular-nums; }
.passport__row {
  display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: var(--s-4);
  padding-block: 10px; border-bottom: 1px solid var(--line);
  font-size: var(--t-small); line-height: 1.5;
}
.passport__row:first-child { border-top: 1px solid var(--line); }
.passport dt { color: var(--ink-3); }
.passport dd { color: var(--ink); overflow-wrap: break-word; }

/* ---------- Sections: separated by air, not by rules ---------- */
.section { padding-block: var(--section-y); }
.section__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--s-4) var(--s-6); margin-bottom: clamp(32px, 4vw, 56px);
}
.section__title { font-size: var(--t-h2); line-height: 1; }

/* Filter of kinds */
.kinds { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.kinds button {
  min-height: 40px; padding: 8px 0; border: 0; background: none; cursor: pointer;
  font-size: var(--t-small); color: var(--ink-3); letter-spacing: .02em;
  border-bottom: 1px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease);
}
.kinds button:hover { color: var(--ink); }
.kinds button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent-line); }

/* Grid of works */
.grid {
  display: grid; gap: clamp(40px, 5vw, 64px) clamp(20px, 2.6vw, 36px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tile { position: relative; min-width: 0; }
.tile__link { display: block; text-decoration: none; color: inherit; }
.tile__link:focus-visible { outline: none; }
.tile__link:focus-visible .vitrine { outline: 2px solid var(--accent); outline-offset: 6px; }
.tile__title { margin-top: var(--s-4); font-size: var(--t-h3); line-height: 1.1; transition: color .2s var(--ease); }
.tile__meta { margin-top: var(--s-1); font-size: var(--t-meta); color: var(--ink-3); letter-spacing: .02em; }
.tile__link:hover .tile__title { color: var(--accent); }
/* The switch lies on the photo, so it keeps the colours of the velvet */
.tile__shot {
  position: absolute; right: 12px; top: 12px; z-index: 4;
  min-height: 40px; padding: 8px 16px; border: 1px solid var(--on-velvet-line-2); border-radius: var(--r-pill);
  background: rgba(26, 17, 28, .82);
  color: var(--on-velvet-2); font-size: var(--t-meta); letter-spacing: .02em; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.tile__shot:hover, .tile__shot[aria-pressed="true"] { color: var(--on-velvet); border-color: var(--gold); }
/* on a photo the deep gold of the page would be lost: the ring is champagne, close to the pill */
.tile__shot:focus-visible { outline-color: var(--gold); outline-offset: 2px; }

.sentinel { height: 1px; }
.grid__note { grid-column: 1 / -1; max-width: 46ch; color: var(--ink-2); }

/* The 404 page */
.empty {
  display: grid; justify-items: center; text-align: center; gap: var(--s-4);
  padding: clamp(56px, 8vw, 104px) var(--s-5);
  border: 1px solid var(--line); border-radius: var(--r-case);
}
/* the emblem: the ring and the crystal in the ink, the handwritten T in gold */
.empty__mark { width: 72px; color: var(--ink); }
.empty__mark .mark__t { fill: var(--accent-line); }
.empty__text { max-width: 40ch; color: var(--ink-2); }

/* The master's room and textual pages: the text column lines up with the words of the first block */
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--col-gap); }
.quote {
  font-family: var(--f-display); font-weight: 300; font-stretch: 62.5%;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); line-height: 1.12; letter-spacing: -.012em; color: var(--ink);
}
.prose { max-width: 62ch; font-size: 1.125rem; line-height: 1.75; color: var(--ink-2); }
.prose p + p { margin-top: 1.1em; }
.prose h2 { margin-top: var(--s-7); margin-bottom: var(--s-4); font-family: var(--f-display); font-weight: 300; font-stretch: 62.5%; font-size: 2rem; line-height: 1.1; }
.prose a:not(.btn) { color: var(--ink); }
.split .prose { margin-top: var(--s-5); }
.split__more { margin-top: var(--s-6); }
/* On the home page the master's words sit under a clearly larger heading, beside the text */
#master .quote { font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem); line-height: 1.12; max-width: 17em; }
/* «Написать мастеру» on the home page: the heading, and under it the close-up of the crystal */
.split__aside { display: grid; gap: var(--s-6); align-content: start; }
.split__case { justify-self: start; width: min(100%, 560px); }

/* Contacts as a sheet */
.channels { display: grid; max-width: 640px; font-variant-numeric: tabular-nums; }
.channels__row {
  display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: var(--s-4); align-items: baseline;
  padding-block: 16px; border-bottom: 1px solid var(--line);
}
.channels__row:first-child { border-top: 1px solid var(--line); }
.channels__name { font-size: var(--t-small); color: var(--ink-3); }
.channels__value { font-size: 1.125rem; color: var(--ink); overflow-wrap: anywhere; }
.channels__value a { text-decoration: none; border-bottom: 1px solid var(--line-2); transition: border-color .2s var(--ease), color .2s var(--ease); }
.channels__value a:hover { color: var(--accent); border-bottom-color: var(--accent-line); }
.note { margin-top: var(--s-5); color: var(--ink-3); font-size: var(--t-small); }
.contact__primary { margin-bottom: var(--s-6); }

/* Contact page: the sheet on the left, the stitched mark on the right */
.contact { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--col-gap); align-items: start; }
.contact__stage { position: relative; }

/* Page heads for inner pages */
.page { padding-block: clamp(40px, 7vw, 104px) clamp(72px, 9vw, 140px); }
.page__title { font-size: var(--t-h1); line-height: 1; }
.page__lead { margin-top: var(--s-5); font-size: var(--t-lead); max-width: 46ch; }
.page__body { margin-top: clamp(40px, 5vw, 72px); }

/* ---------- Work page ---------- */
.work { padding-block: clamp(24px, 4vw, 48px) clamp(72px, 9vw, 140px); }
.work__in { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.back {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px;
  font-size: var(--t-small); color: var(--ink-3); text-decoration: none; transition: color .2s var(--ease);
}
.back::before { content: ""; width: 7px; height: 7px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.back:hover { color: var(--ink); }
.work__grid {
  /* the viewer keeps 4:5 and fits the screen height, so the shot tabs stay in view;
     vh first, svh where it is understood: a var() inside rules out a plain fallback */
  --viewer-w: clamp(320px, calc((100vh - var(--hdr-h) - 190px) * .8), 55%);
  display: grid; grid-template-columns: var(--viewer-w) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px); margin-top: var(--s-5); align-items: start;
}
@supports (height: 100svh) {
  .work__grid { --viewer-w: clamp(320px, calc((100svh - var(--hdr-h) - 190px) * .8), 55%); }
}
.viewer { position: relative; width: 100%; }
.viewer__stage {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-case);
  background: var(--case-velvet), var(--case-light), var(--velvet);
  box-shadow: var(--case-drop);
}
/* the edges of the case stay above the photos */
.viewer__stage::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  border-radius: inherit; box-shadow: var(--case-edges);
}
.viewer__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; filter: blur(4px); transition: opacity .7s var(--ease), filter .7s var(--ease);
}
.viewer__img.is-on { opacity: 1; filter: none; }
/* With scripts each shot is wrapped with its ground, and the wrapper fades instead */
.viewer__shot { opacity: 0; filter: blur(4px); transition: opacity .7s var(--ease), filter .7s var(--ease); }
.viewer__shot.is-on { opacity: 1; filter: none; }
.viewer__shot > .viewer__img { opacity: 1; filter: none; transition: none; }
.viewer__tabs { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin-top: var(--s-4); }
.viewer__tabs button {
  min-height: 40px; padding: 8px 0; border: 0; background: none; cursor: pointer;
  font-size: var(--t-small); color: var(--ink-3); border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.viewer__tabs button:hover { color: var(--ink); }
.viewer__tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent-line); }
/* Without scripts all shots stand one under another, whole */
@media (scripting: none) {
  .viewer__stage { aspect-ratio: auto; display: grid; gap: var(--s-3); background: none; box-shadow: none; border-radius: 0; }
  .viewer__stage::after { content: none; }
  .viewer__img { position: static; opacity: 1; filter: none; aspect-ratio: 4 / 5; background: var(--velvet); border-radius: var(--r-case); }
  .viewer__tabs { display: none; }
}
.viewer .vitrine__glare { z-index: 3; }
.viewer__stage.glint .vitrine__glare { animation: glare 1s var(--ease); }
.loupe {
  position: absolute; z-index: 5; width: 200px; height: 200px; border-radius: 50%;
  pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.92);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  box-shadow: 0 0 0 1px rgba(242, 237, 244, .6), 0 18px 44px rgba(26, 17, 28, .45);
  background-repeat: no-repeat; background-color: var(--velvet);
}
.loupe.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.viewer__hint { margin-top: var(--s-2); font-size: var(--t-meta); color: var(--ink-3); }
.work__info { position: sticky; top: calc(var(--hdr-h) + 24px); }
.work__title { font-family: var(--f-display); font-weight: 300; font-stretch: 62.5%; font-size: var(--t-h1); line-height: 1; letter-spacing: -.005em; }
.work__info .passport { margin-top: var(--s-6); }
.work__story { margin-top: var(--s-6); font-size: 1.0625rem; line-height: 1.75; max-width: 56ch; }
.work__story p + p { margin-top: 1em; }
.work__ask { margin-top: var(--s-6); }
.siblings {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5);
  margin-top: clamp(64px, 8vw, 112px); padding-top: var(--s-5); border-top: 1px solid var(--line);
}
.sibling { display: grid; gap: var(--s-1); text-decoration: none; padding-block: var(--s-3); }
.sibling--next { grid-column: 2; text-align: right; }
.sibling__dir { font-size: var(--t-meta); color: var(--ink-3); letter-spacing: .02em; }
.sibling__title { font-family: var(--f-display); font-weight: 300; font-stretch: 62.5%; font-size: 1.75rem; line-height: 1.1; color: var(--ink); overflow-wrap: break-word; transition: color .2s var(--ease); }
.sibling:hover .sibling__title { color: var(--accent); }

/* ---------- Legal document ---------- */
.doc { max-width: 60ch; font-size: 1.0625rem; line-height: 1.75; }
.doc h2 { margin-top: var(--s-7); margin-bottom: var(--s-3); font-family: var(--f-display); font-weight: 300; font-stretch: 62.5%; font-size: 1.9rem; line-height: 1.1; }
.doc h3 { margin-top: var(--s-5); margin-bottom: var(--s-2); font-size: 1.0625rem; font-weight: 500; color: var(--ink); }
.doc p + p { margin-top: .9em; }
.doc dl { display: grid; gap: var(--s-2); margin-block: var(--s-4); }
.doc dt { color: var(--ink); font-weight: 500; }
.doc dd { margin: 0 0 var(--s-3); }
.doc strong { color: var(--ink); font-weight: 500; }
.doc .doc__meta { color: var(--ink-3); font-size: var(--t-small); margin-top: var(--s-3); }
.doc .doc__box { margin-top: var(--s-6); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r); }
.doc a { color: var(--ink); }

/* ---------- Footer: the page ends on a box of velvet, in platinum and champagne ---------- */
.ftr {
  max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto;
  padding-top: clamp(24px, 3vw, 48px);
  padding-bottom: calc(max(20px, 2vw) + env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.ftr__in {
  --ink: var(--on-velvet); --ink-2: var(--on-velvet-2); --ink-3: var(--on-velvet-3);
  --line: var(--on-velvet-line); --line-2: var(--on-velvet-line-2);
  --accent: var(--gold); --accent-line: var(--gold);
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 5fr); gap: var(--s-6);
  padding: clamp(28px, 5.2vw, 76px);
  background: var(--case-velvet), var(--case-light), var(--velvet); color: var(--ink-2);
  border-radius: var(--r-room);
}
.ftr__motto { margin-top: var(--s-3); font-size: var(--t-meta); color: var(--ink-3); letter-spacing: .04em; }
.ftr__nav { display: grid; align-content: start; }
.ftr__nav a { font-size: var(--t-small); color: var(--ink-2); text-decoration: none; justify-self: start; padding-block: 8px; }
.ftr__nav a:hover { color: var(--accent); }
.ftr__legal { display: grid; gap: var(--s-3); font-size: var(--t-small); line-height: 1.6; color: var(--ink-3); }
.ftr__legal a { color: var(--ink-2); }

/* ---------- The motto spells the name ---------- */
.motto b { font-weight: 500; color: var(--ink); }

/* ---------- Text buttons, passing a page on ---------- */
.textbtn {
  min-height: 40px; padding: 8px 0; border: 0; background: none; cursor: pointer;
  font-size: var(--t-small); letter-spacing: .02em; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-2);
  text-decoration-thickness: 1px; text-underline-offset: .28em;
  transition: text-decoration-color .2s var(--ease), color .2s var(--ease);
}
.textbtn:hover { color: var(--accent); text-decoration-color: var(--accent-line); }
.textbtn:disabled { color: var(--ink-3); text-decoration-color: transparent; cursor: default; }
.share { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-4); }
.share__status { font-size: var(--t-meta); color: var(--ink-3); }
.work__ask, .split__more, .mono__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.work__ask + .note { margin-top: var(--s-3); }

/* ---------- A photo brought closer by touch ---------- */
.viewer__stage.is-touch { touch-action: pan-y pinch-zoom; }
.viewer__stage.is-zoomed { touch-action: pinch-zoom; }
.viewer__stage.is-touch .viewer__shot {
  transform-origin: 0 0;
  transition: opacity .7s var(--ease), filter .7s var(--ease), transform .35s var(--ease);
}
.viewer__stage.is-panning .viewer__shot { transition: none; }

/* ---------- Monogram ---------- */
.mono { margin-top: var(--s-6); }
.mono__label { display: block; font-size: var(--t-meta); color: var(--ink-3); letter-spacing: .04em; }
.mono__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-4) var(--s-5); margin-top: var(--s-2); }
.mono__input {
  width: 4.6em; min-height: 48px; padding: 0 0 4px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  background: none; color: var(--ink);
  font: 400 1.75rem/1.2 var(--f-text); letter-spacing: .2em; text-transform: uppercase;
  transition: border-color .2s var(--ease);
}
.mono__input:hover, .mono__input:focus { border-bottom-color: var(--accent-line); }
.mono__tools { margin-top: var(--s-5); }
.mono__ask { margin-top: var(--s-5); }
/* On the home page the form stands right under the mark: its name, the field and the button;
   the letters are stitched in the case above, in place of the T */
.mono--home { margin-top: var(--s-5); }
.mono__name { display: block; font: 500 var(--t-small)/1.3 var(--f-text); letter-spacing: .04em; color: var(--ink); }
.mono__hint { display: block; margin-top: 2px; font-size: var(--t-meta); line-height: 1.4; letter-spacing: .02em; color: var(--ink-3); }
.mono--home .mono__row { margin-top: var(--s-3); }
/* two pale letters show where to type; they are an example, not a value */
.mono--home .mono__input::placeholder { color: var(--ink-3); opacity: .4; }
.mono--home .mono__tools { margin-top: var(--s-4); }
/* without scripts nothing can be stitched: the form steps aside */
@media (scripting: none) { .mono--home { display: none; } }

/* ---------- Bead portrait: the second mode of the monogram page ---------- */
.mono__mode { margin-bottom: var(--s-4); }
/* the case keeps its 4:5 at every width, where the hero case is otherwise square on a phone */
.hero__stage.is-portrait .hero__frame .vitrine { aspect-ratio: 4 / 5; }
/* the photo itself under the beads, shown while the case is pressed and held */
.photoview {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity .25s var(--ease); pointer-events: none;
}
.vitrine.is-framing { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.vitrine.is-framing .embroidery { transition-duration: .25s; }
.vitrine.is-peek .photoview { opacity: 1; }
.vitrine.is-peek .embroidery { opacity: 0; }
.vitrine.is-drop { outline: 2px solid var(--accent); outline-offset: 4px; }

.portrait { margin-top: var(--s-6); }
.portrait__pick { position: relative; }
.portrait__file:focus-visible + .btn { outline: 2px solid var(--accent); outline-offset: 4px; }
.portrait__privacy { margin-top: var(--s-3); max-width: 38ch; font-size: var(--t-small); line-height: 1.6; color: var(--ink-2); }
.portrait__error { margin-top: var(--s-3); font-size: var(--t-small); line-height: 1.5; color: var(--ink); }
.portrait__error:empty { margin-top: 0; }
.portrait__controls { margin-top: var(--s-5); }
.portrait__sliders { display: grid; gap: var(--s-3); margin-top: var(--s-4); max-width: 26rem; }
.slider { display: grid; gap: 2px; }
.slider__name { font-size: var(--t-meta); color: var(--ink-3); letter-spacing: .04em; }
.slider input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0;
  background: transparent; accent-color: var(--accent); cursor: pointer;
}
.slider input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--line-2); }
.slider input[type="range"]::-moz-range-track { height: 1px; background: var(--line-2); }
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -7px;
  border: 0; border-radius: 50%; background: var(--accent);
}
.slider input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--accent); }
.slider input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.portrait__tones, .portrait__stitch { margin-top: var(--s-2); }
.kinds button:disabled { opacity: .35; cursor: default; pointer-events: none; }
.portrait__hint { margin-top: var(--s-4); max-width: 38ch; font-size: var(--t-meta); line-height: 1.6; color: var(--ink-3); }

/* ---------- The way to the monogram: the ring of the mark with a letter in it ---------- */
.monolink { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
/* 64px: the ring itself then stands as tall as the button beside it */
.monolink__ring { position: relative; flex: none; width: 64px; height: 64px; }
.monolink__ring svg { width: 100%; height: 100%; }
.monolink__ring circle { fill: var(--ink-2); transform-box: fill-box; transform-origin: center; }
.monolink__ring path { fill: var(--ink); }
.monolink__ring b {
  position: absolute; left: 0; right: 0; top: 51.5%; transform: translateY(-50%); text-align: center;
  font: 400 1.7rem/1 var(--f-hand); color: var(--accent);
  opacity: 0; transition: opacity .6s var(--ease);
}
.monolink__ring b.is-on { opacity: 1; }
.monolink__words { display: grid; gap: 2px; }
.monolink__title {
  font: 500 var(--t-small)/1.3 var(--f-text); letter-spacing: .04em; color: var(--ink);
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 1px; text-underline-offset: .28em;
  transition: text-decoration-color .2s var(--ease);
}
.monolink__note { font-size: var(--t-meta); line-height: 1.4; letter-spacing: .02em; color: var(--ink-3); }
/* a touch leaves :hover stuck, so the ring is sewn again only under a real pointer or the keyboard */
@media (hover: hover) {
  .monolink:hover .monolink__title { text-decoration-color: var(--accent-line); }
  .monolink:hover circle { animation: sew .45s var(--ease) both; }
}
.monolink:focus-visible .monolink__title { text-decoration-color: var(--accent-line); }
.monolink:focus-visible circle { animation: sew .45s var(--ease) both; }
@keyframes sew { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@media (max-width: 479px) { .monolink__title, .monolink__note { overflow-wrap: anywhere; } }

/* ---------- The one tinted room of the page: champagne satin round the master's words ---------- */
.room { background: var(--satin); border-radius: var(--r-room); padding: clamp(24px, 5.2vw, 76px); }
.room__head { display: grid; gap: var(--s-5); align-content: start; }
.room .prose { margin-top: 0; }

/* ---------- From a tile to its page: the case travels, the header stays ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .hdr { view-transition-name: hdr; }
  .viewer__stage, .is-travelling { view-transition-name: work-case; }
  ::view-transition-group(work-case) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
  ::view-transition-old(work-case), ::view-transition-new(work-case) { height: 100%; object-fit: cover; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__grid, .split, .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ftr__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ftr__legal { grid-column: 1 / -1; }
  .work__title { font-size: 2.5rem; }
  .work__info .passport__row { grid-template-columns: 7em minmax(0, 1fr); }
}
@media (max-width: 839px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  /* one column: heading, text and actions first, the case last, as on the contact page */
  .split__aside { display: contents; }
  .split__case { order: 1; width: min(100%, 420px); }
}
@media (max-width: 699px) {
  .hero__grid, .contact, .work__grid { grid-template-columns: minmax(0, 1fr); }
  .contact__stage { width: min(100%, 420px); }
  .hero__frame { width: min(100%, 50vh); width: min(100%, 50svh); margin-inline: 0; }
  .hero__frame .vitrine { aspect-ratio: 1 / 1; }
  .hero__copy { padding-top: 0; }
  /* one column: the case never grows past 60% of the screen height, on the page's left edge */
  .viewer { width: min(100%, max(48vh, 320px)); width: min(100%, max(48svh, 320px)); }
  .work__info { position: static; }
}
@media (max-width: 599px) {
  :root { --hdr-h: 60px; }
  .logo__svg { height: 14px; }
  .nav { gap: 16px; }
  .nav a { font-size: .875rem; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .ftr__in { grid-template-columns: minmax(0, 1fr); }
  .passport__row, .channels__row { grid-template-columns: 7em minmax(0, 1fr); }
  .siblings { grid-template-columns: minmax(0, 1fr); }
  .sibling--next { grid-column: auto; text-align: left; }
}

/* ---------- Motion and forced colours ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .vitrine__shot--worn, .viewer__img, .viewer__shot { filter: none; transform: none; }
}
@media (forced-colors: active) {
  .btn, .tile__shot, .kinds button, .viewer__tabs button { border: 1px solid ButtonText; }
  .kinds button[aria-pressed="true"], .viewer__tabs button[aria-pressed="true"] { border-bottom: 3px solid Highlight; }
  .tile__shot[aria-pressed="true"] { border: 2px solid Highlight; }
  .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
  .logo__svg, .mark-fallback svg { forced-color-adjust: auto; }
}
