/* Layout: a darkened gallery where the paintings are the light in the room.
   The artist's photo opens the site like a film's first frame; after that,
   one painting per row, shown large on charcoal with a small label beneath.
   The site is deliberately dark only. */
:root {
  /* colour */
  --bg: #121211;
  --bg-lift: #191917;
  --spot: #24231F;
  --text: #E8E3D9;
  --text-soft: #AFAAA0;
  --line: #2C2B28;
  --on-text: #121211;
  --dot: #E24B3B;
  --warn: #F09A8C;
  --scrim: rgb(0 0 0 / 0.66);
  --viewer-bg: #0B0B0A;
  --shadow: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 40px -12px rgb(0 0 0 / 0.70);


  /* type: one family, Futura-like, used light */
  --font: "Jost", "Futura", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem);
  --step-5: clamp(2.75rem, 1.1rem + 6.4vw, 6.5rem);

  /* space */
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --section: clamp(88px, 12vw, 168px);
  --header-h: 72px;
  color-scheme: dark;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 350;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 300; line-height: 1.1; letter-spacing: -0.005em; text-wrap: balance; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
p { text-wrap: pretty; }
strong { font-weight: 500; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
::selection { background: var(--text); color: var(--on-text); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: 16px; top: -120px; z-index: 100;
  background: var(--text); color: var(--on-text); padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

.eyebrow {
  font-size: var(--step--2); font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-soft);
}
.link-arrow {
  font-size: var(--step--1); letter-spacing: 0.04em; text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
.link-arrow::after { content: "  →"; }
.link-arrow:hover { color: var(--text-soft); }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--text-soft);
  text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px;
}
.link-btn:hover { color: var(--text); }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 50px; padding: 0 1.75rem; border-radius: 0; cursor: pointer;
  border: 1px solid var(--text); background: var(--text); color: var(--on-text);
  font-size: var(--step--1); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; text-align: center;
  transition: background-color 0.2s, color 0.2s;
}
.btn:hover { background: transparent; color: var(--text); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.icon-btn {
  flex: none; width: 42px; height: 42px; padding: 0; cursor: pointer;
  display: inline-grid; place-items: center; border: 1px solid var(--line); background: transparent;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.25s;
}
.site-header.is-scrolled, .site-header.menu-open { border-bottom-color: var(--line); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none;
  font-size: var(--step--1); font-weight: 400; letter-spacing: 0.26em; text-transform: uppercase;
}
.nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav a { text-decoration: none; font-size: var(--step--1); letter-spacing: 0.06em; color: var(--text-soft); padding-block: 6px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 currentColor; }
.nav__social { display: inline-flex; align-items: center; gap: 6px; margin-right: -6px; }
.nav .nav__icon { display: inline-grid; place-items: center; padding: 6px; }
.nav__icon svg { width: 17px; height: 17px; }
.menu-btn {
  display: none; min-height: 40px; padding: 0 14px; cursor: pointer;
  border: 1px solid var(--line); background: transparent;
  font-size: var(--step--2); letter-spacing: 0.18em; text-transform: uppercase;
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 12px var(--gutter) 32px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .site-header.menu-open .nav { display: flex; }
  .nav a { font-size: 2rem; font-weight: 300; letter-spacing: 0; color: var(--text); padding-block: 8px; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--text-soft); }
  .nav__social { margin: 12px 0 0 -6px; gap: 14px; }
  .nav__icon svg { width: 22px; height: 22px; }
}

/* ------------------------------------------------------------ home */
.hero { position: relative; }
.hero__photo { position: relative; margin: 0; overflow: hidden; background: var(--bg-lift); }
.hero__photo img { width: 100%; height: auto; max-height: 84vh; aspect-ratio: 1978 / 1312; object-fit: cover; object-position: 50% 42%; }
.hero__photo::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 70%, transparent) 60%, var(--bg));
}
.hero__text {
  position: relative; z-index: 1; display: grid; gap: 18px; justify-items: start;
  margin-top: clamp(-150px, -9vw, -40px); padding-bottom: var(--section);
}
.hero__name { font-size: var(--step-5); font-weight: 300; line-height: 0.98; letter-spacing: -0.015em; }
.hero__line { max-width: 44ch; font-size: var(--step-1); color: #D2CCC1; }
.hero__links { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 10px; }

.section { padding-bottom: var(--section); }
.sec-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px;
  padding-top: 20px; margin-bottom: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line);
}
.sec-head h2 { font-size: var(--step-2); font-weight: 300; }

/* One painting per row */
.plates { display: grid; gap: clamp(88px, 13vh, 168px); }
.see-all { display: flex; justify-content: center; margin-top: clamp(64px, 10vh, 120px); }
/* Home page: one card per collection */
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: clamp(28px, 3vw, 44px); }
.ccard { display: grid; gap: 6px; align-content: start; color: inherit; text-decoration: none; }
.ccard__img { display: block; aspect-ratio: 4 / 3; margin-bottom: 12px; overflow: hidden; background: var(--bg-lift); box-shadow: var(--shadow); }
.ccard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s, filter 0.4s; }
.ccard:hover .ccard__img img { transform: scale(1.03); filter: brightness(1.06); }
/* Video-shaped; also crops the black bars of YouTube's own preview pictures */
.ccard--course .ccard__img { aspect-ratio: 16 / 9; }
.ccard__title { font-size: var(--step-1); font-weight: 350; }
.ccard:hover .ccard__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.ccard__meta { font-size: var(--step--1); color: var(--text-soft); }
.plate {
  --fit: min(100%, calc(76vh * var(--a, 1.33)), 1120px);
  justify-self: center; width: var(--fit);
  display: grid; gap: 18px; color: inherit; text-decoration: none;
}
.plate img { width: 100%; height: auto; background: var(--bg-lift); box-shadow: var(--shadow); transition: filter 0.4s; }
.plate:hover img { filter: brightness(1.06); }
/* Work page: paintings in proportion to their real sizes. A 36 × 48 in (121.92 cm wide) painting
   keeps the full size; others get the same scale, never under 220px. Bigger ones (48 × 48) may be
   taller than the screen, so they really look bigger. */
.plates--true .plate {
  --fit: min(100%, calc(102vh * var(--a, 1.33)), 1120px);
  --scale: calc(min(100%, 76vh * 1.3333, 1120px) / 121.92);
  width: max(min(calc(var(--w, 121.92) * var(--scale)), var(--fit)), min(var(--fit), 220px));
}
.plate__label { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; align-items: baseline; }
.plate__title { font-size: var(--step-1); font-weight: 350; }
.plate:hover .plate__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.plate__price { font-size: var(--step-0); font-variant-numeric: tabular-nums; }
.plate__meta { grid-column: 1 / -1; font-size: var(--step--1); color: var(--text-soft); }
.plate:focus-visible { outline-offset: 10px; }
.tag { display: inline-flex; align-items: center; gap: 0.55em; }
.tag--muted { color: var(--text-soft); }
.dot { flex: none; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--dot); }
.dot--ring { background: transparent; box-shadow: inset 0 0 0 1.5px var(--dot); }
.price { font-variant-numeric: tabular-nums; }

.note-block { display: grid; gap: 18px; justify-items: start; max-width: 40rem; }
.note-block p { font-size: var(--step-1); color: var(--text-soft); line-height: 1.7; }

/* ------------------------------------------------------------ page heads */
.page-head { display: grid; gap: 14px; justify-items: start; padding-block: clamp(48px, 7vw, 104px) clamp(36px, 5vw, 64px); }
.page-title { font-size: var(--step-4); font-weight: 300; }
.page-lede { max-width: 56ch; font-size: var(--step-1); color: var(--text-soft); }
.page-note { margin-top: -6px; font-size: var(--step--1); color: var(--text-soft); }

/* ------------------------------------------------------------ work page */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px;
  padding-block: 14px; margin-bottom: clamp(56px, 8vw, 112px); border-block: 1px solid var(--line);
}
.toolbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.seg { position: relative; display: inline-flex; gap: 22px; min-width: 0; margin: 0; padding: 0; border: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg label {
  cursor: pointer; white-space: nowrap; padding-block: 6px;
  font-size: var(--step--2); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft);
}
.seg label:hover { color: var(--text); }
.seg input:checked + label { color: var(--text); box-shadow: inset 0 -1px 0 currentColor; }
.seg input:focus-visible + label { outline: 1px solid var(--text); outline-offset: 4px; }
.seg .count { margin-left: 6px; font-variant-numeric: tabular-nums; }
.select { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: var(--step--2); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft); }
.select select, .field select {
  appearance: none; -webkit-appearance: none; border-radius: 0; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text);
}
.select select { padding: 7px 34px 7px 12px; font-size: var(--step--1); letter-spacing: 0.02em; text-transform: none; }
.select::after, .select-wrap::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; pointer-events: none;
  border-right: 1px solid var(--text); border-bottom: 1px solid var(--text);
  transform: translateY(-70%) rotate(45deg);
}
.select select option, .field select option { background: var(--bg-lift); color: var(--text); }
.empty { display: grid; justify-items: start; gap: 16px; padding-block: 24px 64px; color: var(--text-soft); }
.seg--collections { flex-basis: 100%; flex-wrap: wrap; gap: 4px 26px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.seg--collections label { font-size: var(--step--1); letter-spacing: 0.04em; text-transform: none; }

/* One section per collection */
.group + .group { margin-top: var(--section); }
.group__head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 10px 24px;
  padding-top: 20px; margin-bottom: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line);
}
.group__title { font-size: var(--step-3); font-weight: 300; }
.group__count { font-size: var(--step--1); color: var(--text-soft); white-space: nowrap; }
.group__note { grid-column: 1 / -1; max-width: 56ch; color: var(--text-soft); }
.group__note--alone { margin: calc(-1 * clamp(24px, 4vw, 56px)) 0 clamp(48px, 7vw, 96px); font-size: var(--step-1); }

.table-wrap { overflow-x: auto; }
.pricelist { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.pricelist th {
  text-align: left; padding: 0 16px 12px 0; border-bottom: 1px solid var(--line); font-weight: 400;
  font-size: var(--step--2); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft);
}
.pricelist td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pricelist tbody tr { cursor: pointer; transition: background-color 0.15s; }
.pricelist tbody tr:hover { background: var(--bg-lift); }
.pricelist .num { text-align: right; padding-right: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-thumb { width: 112px; padding-left: 8px !important; }
.pl-thumb img { width: auto; height: auto; max-width: 88px; max-height: 64px; }
.pl-title a { text-decoration: none; font-size: var(--step-1); font-weight: 350; }
.pl-title a:hover { text-decoration: underline; }
.pl-sub { display: block; font-size: var(--step--1); color: var(--text-soft); }
.pl-title .pl-sub { display: none; }
@media (max-width: 680px) {
  .col-medium { display: none; }
  .pl-title .pl-sub { display: block; }
  .pl-size .pl-sub { display: none; }
  .pl-thumb { width: 76px; }
  .pl-thumb img { max-width: 56px; max-height: 48px; }
}

/* ------------------------------------------------------------ painting page */
.piece { padding-bottom: var(--section); }
.piece__top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding-block: clamp(14px, 2vw, 22px) 0;
}
/* The painting's name and price, right above the preview; on wide screens it stays under the menu
   while the preview and its options are scrolled, so a swapped painting is always named */
.piece__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px;
  padding-block: 10px 14px;
}
@media (min-width: 960px) {
  .piece__head {
    position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 1px); z-index: 5;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
}
.piece__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; min-width: 0; }
.piece__sub { font-size: var(--step--1); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.piece__price { font-size: var(--step-2); font-weight: 300; line-height: 1.2; white-space: nowrap; }
.back { font-size: var(--step--1); letter-spacing: 0.04em; text-decoration: none; color: var(--text-soft); }
.back:hover { color: var(--text); }
.pager-mini { display: flex; gap: 24px; font-size: var(--step--1); letter-spacing: 0.04em; }
.pager-mini a { text-decoration: none; color: var(--text-soft); }
.pager-mini a:hover { color: var(--text); }

/* Previous / next arrows over the preview; the page stays put when they're used */
.stage-wrap { position: relative; touch-action: pan-y; }
.swap {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 46px; height: 46px; padding: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--text) 30%, transparent);
  background: color-mix(in srgb, var(--bg) 55%, transparent); color: var(--text);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color 0.2s, opacity 0.2s;
}
.swap:hover { background: color-mix(in srgb, var(--bg) 80%, transparent); }
.swap:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.swap svg { width: 16px; height: 16px; }
.swap--prev { left: 14px; }
.swap--next { right: 14px; }
@media (hover: hover) {
  .stage-wrap .swap { opacity: 0.75; }
  .stage-wrap:hover .swap, .swap:focus-visible { opacity: 1; }
}
@media (max-width: 560px) {
  .swap { width: 40px; height: 40px; }
  .swap--prev { left: 8px; }
  .swap--next { right: 8px; }
}
.media-bar__end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-left: auto; }
.media-count { font-size: var(--step--1); letter-spacing: 0.04em; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.stage {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden; max-height: max(420px, calc(100vh - 230px));
  background: radial-gradient(ellipse 70% 65% at 50% 46%, var(--spot), var(--bg-lift) 100%);
}
.stage__btn {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 0; border: 0; background: none; cursor: zoom-in;
}
.stage__btn:focus-visible { outline-offset: -6px; }
@media (max-width: 759px) {
  .stage--tall { aspect-ratio: 4 / 5; }
}
.scene, .room { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* The room photo: the tint layer repaints only the walls, the light map shades the painting */
.room .room-tint { fill: var(--room-tint, #fff); mix-blend-mode: multiply; transition: fill 0.25s; }
.room .room-light { mix-blend-mode: multiply; opacity: 0.85; }
.stage.stage--room { background: var(--bg-lift); }

/* "Your room": the visitor's own photo with the painting dragged into place */
@media (max-width: 759px) {
  .stage--mine { aspect-ratio: 4 / 5; } /* before a photo is chosen; a photo sets its own shape */
}
.room--mine { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mine-art { cursor: grab; touch-action: none; outline: none; }
.mine-art.is-dragging { cursor: grabbing; }
.mine-focus { fill: none; stroke: none; }
.mine-art:focus-visible .mine-focus { stroke: #fff; stroke-width: 1.5px; stroke-dasharray: 6 4; }
.dropzone {
  position: absolute; inset: clamp(10px, 2vw, 18px); display: grid; place-content: center; justify-items: center;
  gap: 12px; padding: 20px; text-align: center;
  border: 1px dashed color-mix(in srgb, var(--text) 32%, transparent);
}
.dropzone__title { font-size: var(--step-2); font-weight: 300; line-height: 1.2; }
.dropzone__text { max-width: 36ch; color: var(--text-soft); }
.dropzone .btn { margin-top: 6px; }
.dropzone__error { max-width: 36ch; color: var(--warn); font-size: var(--step--1); }
.dropzone__note { font-size: var(--step--1); color: var(--text-soft); }
.stage-wrap.is-dropping .stage::after {
  content: "Drop your photo here"; position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center; padding: 24px; text-align: center;
  font-size: var(--step-2); font-weight: 300; color: var(--text);
  background: rgb(18 18 17 / 0.8); outline: 1px dashed var(--text); outline-offset: -14px; pointer-events: none;
}

/* Room, wall and frame choices under the preview */
.viewctl { display: grid; gap: 14px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.viewctl__row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: center; gap: 8px 16px; }
.viewctl__label { font-size: var(--step--2); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft); }
.viewctl__note { grid-column: 2; font-size: var(--step--1); color: var(--text-soft); }
.chips, .swatches { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips input, .swatches input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chips label {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; cursor: pointer;
  border: 1px solid var(--line); font-size: var(--step--1); color: var(--text-soft);
}
.chips label:hover { color: var(--text); }
.chips input:checked + label { border-color: var(--text); color: var(--text); }
.chips input:focus-visible + label { outline: 1px solid var(--text); outline-offset: 3px; }
.chips label svg { flex: none; width: 13px; height: 13px; }
.chip-swatch { width: 12px; height: 12px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); }
.swatches label {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2);
}
.swatches input:checked + label { outline: 1px solid var(--text); outline-offset: 3px; }
.swatches .swatch-original { background: linear-gradient(135deg, #EFE9DF 0 50%, #CFC7BA 50% 100%); }
.swatches input:focus-visible + label { outline: 2px solid var(--text); outline-offset: 3px; }
.swatch-any {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: conic-gradient(#e45a5a, #e4c35a, #7fd06a, #5ac8e4, #6a6ae4, #d05ad0, #e45a5a);
}
.swatch-any.is-on { outline: 1px solid var(--text); outline-offset: 3px; }
.swatch-any input[type="color"] {
  width: 26px; height: 26px; padding: 0; border: 2px solid var(--bg); border-radius: 50%; cursor: pointer;
  background: none; -webkit-appearance: none; appearance: none;
}
.swatch-any input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch-any input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.swatch-any input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.swatch-any input[type="color"]:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.swatches__any-label { font-size: var(--step--1); color: var(--text-soft); margin-left: 2px; }
.mine-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.chip-btn {
  display: inline-flex; align-items: center; padding: 7px 12px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text-soft); font-size: var(--step--1);
}
.chip-btn:hover, .chip-btn[aria-pressed="true"] { border-color: var(--text); color: var(--text); }
.mine-tools input[type="range"] { width: min(260px, 100%); margin: 0 8px 0 0; accent-color: var(--text); cursor: pointer; }
@media (max-width: 560px) {
  .viewctl__row { grid-template-columns: minmax(0, 1fr); }
  .viewctl__note { grid-column: 1; }
}

.media-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-top: 14px; }
.media-note { font-size: var(--step--1); color: var(--text-soft); }

.piece__body {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 120px); align-items: start; padding-top: clamp(48px, 6vw, 88px);
}
.piece__main { display: grid; gap: 28px; min-width: 0; }
.piece__title { font-size: var(--step-3); font-weight: 300; line-height: 1.15; }
.specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 28px; font-size: var(--step-0); }
.specs dt { color: var(--text-soft); }
.specs dd { margin: 0; }
.specs small { display: block; font-size: var(--step--1); color: var(--text-soft); }
.buy { display: grid; gap: 18px; padding-top: 26px; border-top: 1px solid var(--line); }
.buy__price { font-size: var(--step-3); font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.buy__state { display: flex; align-items: center; gap: 12px; font-size: var(--step-3); font-weight: 300; line-height: 1; }
.buy__state .dot { width: 0.4em; height: 0.4em; }
.buy__status { margin-top: -6px; font-size: var(--step--1); color: var(--text-soft); }
.buy__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.promises { list-style: none; padding: 0; display: grid; gap: 7px; font-size: var(--step--1); color: var(--text-soft); }
.promises li { display: flex; align-items: baseline; gap: 10px; }
.promises svg { flex: none; width: 11px; height: 11px; color: var(--text); transform: translateY(1px); }
.piece__side { display: grid; gap: 36px; min-width: 0; }
.mini-head { font-size: var(--step--2); font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-soft); }
.prose { display: grid; gap: 1em; max-width: 62ch; }
.prose p { line-height: 1.75; }
.prose--lg p { font-size: var(--step-1); line-height: 1.7; }
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-block: 16px; cursor: pointer; list-style: none; letter-spacing: 0.02em;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 1.25rem; font-weight: 300; line-height: 1; color: var(--text-soft); }
.acc details[open] summary::after { content: "–"; }
.acc__body { display: grid; gap: 0.8em; max-width: 62ch; padding-bottom: 18px; color: var(--text-soft); }

.more-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(20px, 3vw, 44px); align-items: end;
}
.more-grid .plate { width: 100%; justify-self: stretch; }

/* ------------------------------------------------------------ about */
.about { padding-bottom: var(--section); }
.about__photo { margin-block: 0; padding-top: clamp(24px, 4vw, 48px); }
.about__photo img { width: min(100%, 540px); height: auto; aspect-ratio: 1; object-fit: cover; margin-inline: auto; }
.about__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 104px); align-items: start; padding-top: clamp(40px, 6vw, 88px);
}
.about__intro { display: grid; gap: 14px; justify-items: start; }
.about__place { font-size: var(--step-1); color: var(--text-soft); }
.about__text { display: grid; gap: 40px; min-width: 0; }
.about__closing { font-size: var(--step-2); font-weight: 300; line-height: 1.4; max-width: 30em; }
.links-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.links-list a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.links-list a:hover { border-color: var(--text); }

/* ------------------------------------------------------------ contact */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 104px); align-items: start; }
.contact-list { display: grid; gap: 32px; min-width: 0; }
.contact-list > div { display: grid; gap: 8px; }
.contact-big { font-size: var(--step-2); font-weight: 300; overflow-wrap: anywhere; }
.contact-big .link-btn { font-size: var(--step--1); }
.contact-note { color: var(--text-soft); max-width: 40ch; }

/* ------------------------------------------------------------ forms */
.form-shell { display: grid; gap: 20px; }
.form { display: grid; gap: 20px; }
.form-title { font-size: var(--step-3); font-weight: 300; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-size: var(--step--2); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 0;
  border: 1px solid var(--line); background: var(--bg-lift); color: var(--text);
}
.field select { padding-right: 36px; }
.field textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 1px solid var(--text); outline-offset: -1px; border-color: var(--text); }
.select-wrap { position: relative; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form__note { max-width: 44ch; font-size: var(--step--1); color: var(--text-soft); }
.form__status:empty { display: none; }
.form__status { font-size: var(--step--1); }
.form__status[data-state="error"] { color: var(--dot); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-done { display: grid; gap: 14px; justify-items: start; padding: 4px 0; }
.form-done h3 { font-size: var(--step-3); font-weight: 300; }
.form-done p { max-width: 52ch; color: var(--text-soft); }
.form-done .cta-row { margin-top: 6px; }
.email-chip { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.email-chip a { overflow-wrap: anywhere; text-decoration: none; }
.email-chip a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ dialogs */
.sheet {
  width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line); background: var(--bg-lift); color: var(--text); overflow: auto;
}
.sheet::backdrop { background: var(--scrim, rgb(0 0 0 / 0.66)); }
.sheet__inner { padding: clamp(22px, 4vw, 36px); }
.sheet__head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.sheet__head h2 { font-size: var(--step-3); font-weight: 300; }
.sheet__lede { color: var(--text-soft); }

.viewer {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden; background: var(--viewer-bg); color: var(--text);
}
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer::backdrop { background: var(--viewer-bg, #0B0B0A); }
.viewer__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
}
.viewer__caption { font-size: var(--step--1); color: var(--text-soft); }
.viewer__caption strong { font-weight: 400; color: var(--text); }
.viewer__stage { position: relative; overflow: hidden; }
.viewer__img {
  position: absolute; inset: 0; margin: auto;
  width: auto; height: auto; max-width: calc(100% - 32px); max-height: calc(100% - 16px);
  cursor: zoom-in; user-select: none; -webkit-user-drag: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.viewer.is-zoomed .viewer__img { transform: scale(2.4); cursor: zoom-out; touch-action: none; }
.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); background: color-mix(in srgb, var(--viewer-bg) 60%, transparent); }
.viewer__prev { left: 16px; }
.viewer__next { right: 16px; }
.viewer.is-zoomed .viewer__nav { display: none; }
.viewer__hint {
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 14px); text-align: center;
  font-size: var(--step--2); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft);
}

/* ------------------------------------------------------------ mobile buy bar */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-lift); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform 0.25s ease;
}
.buybar.is-shown { transform: none; }
.buybar__info { display: grid; min-width: 0; line-height: 1.3; }
.buybar__info strong { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar__info span { font-size: var(--step--1); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.buybar .btn { min-height: 44px; padding: 0 1.1rem; flex: none; }
@media (max-width: 959px) { body.has-buybar .site-footer { padding-bottom: 76px; } }
@media (min-width: 960px) { .buybar { display: none; } }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); }
.footer__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px));
  font-size: var(--step--1); color: var(--text-soft);
}
.footer__links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--text); }

/* ------------------------------------------------------------ narrow screens */
@media (max-width: 959px) {
  .piece__body, .about__grid, .split { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ courses */
.courses { display: grid; gap: clamp(88px, 12vw, 160px); }
.course { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
@media (max-width: 900px) { .course { grid-template-columns: 1fr; } }
.course__media { position: sticky; top: calc(var(--header-h) + 24px); aspect-ratio: 16 / 9; background: var(--bg-lift); box-shadow: var(--shadow); overflow: hidden; }
@media (max-width: 900px) { .course__media { position: static; } }
.course__media:empty { display: none; }
.course__frame, .course__video, .course__cover, .video-facade { display: block; width: 100%; height: 100%; border: 0; }
.course__cover, .course__video { object-fit: cover; background: #000; }
.video-facade { position: relative; padding: 0; cursor: pointer; background: #000; color: #fff; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.3s, transform 0.6s; }
.video-facade:hover img { opacity: 1; transform: scale(1.02); }
.video-facade__play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%; background: rgb(0 0 0 / 0.55); border: 1px solid rgb(255 255 255 / 0.7);
  transition: background-color 0.2s;
}
.video-facade__play svg { width: 30px; height: 30px; margin-left: 4px; }
.video-facade:hover .video-facade__play { background: rgb(0 0 0 / 0.75); }
.video-facade__label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 18px 14px; text-align: left;
  font-size: var(--step--1); letter-spacing: 0.04em; background: linear-gradient(transparent, rgb(0 0 0 / 0.65));
}
.course__body { display: grid; gap: 16px; justify-items: start; }
.course__soon { color: var(--warn); }
.course__title { font-size: var(--step-3); font-weight: 300; }
.course__subtitle { font-size: var(--step-1); color: var(--text-soft); max-width: 46ch; }
.course__facts { font-size: var(--step--1); color: var(--text-soft); letter-spacing: 0.02em; }
.course__price { font-size: var(--step-2); font-weight: 300; font-variant-numeric: tabular-nums; margin-top: 6px; }
.course__note { font-size: var(--step--1); color: var(--text-soft); margin-top: -4px; }
.course__text { display: grid; gap: 14px; max-width: 60ch; margin-top: 12px; color: var(--text-soft); line-height: 1.7; }
.course__lessons { width: 100%; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }
.course__lessons summary { cursor: pointer; font-size: var(--step--2); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft); }
.course__lessons summary:hover { color: var(--text); }
.course__lessons ol { margin: 14px 0 0; padding-left: 1.4em; display: grid; gap: 8px; }
.course__lessons li::marker { color: var(--text-soft); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ sale prices */
.price--sale { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5em; }
.price__was { color: var(--text-soft); font-size: 0.82em; text-decoration-thickness: 1px; }
.price__off {
  align-self: center; padding: 1px 6px; border: 1px solid var(--warn); border-radius: 2px;
  color: var(--warn); font-size: 0.62em; font-weight: 400; letter-spacing: 0.06em; line-height: 1.4;
}
.buy__sale, .course__sale { font-size: var(--step--1); color: var(--warn); }
.course__code { font-size: var(--step--1); color: var(--text-soft); }
.course__code strong { color: var(--text); font-weight: 500; letter-spacing: 0.08em; }

/* ------------------------------------------------------------ videos */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(32px, 4vw, 56px) clamp(20px, 3vw, 40px); }
.vgrid--three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.vcard { display: grid; gap: 10px; align-content: start; }
.vcard__media { aspect-ratio: 16 / 9; background: var(--bg-lift); box-shadow: var(--shadow); overflow: hidden; }
.vcard__media .video-facade, .vcard__media .course__frame { width: 100%; height: 100%; }
.vcard__media .video-facade__play { width: 58px; height: 58px; }
.vcard__media .video-facade__play svg { width: 24px; height: 24px; }
.vcard__title { font-size: var(--step-0); font-weight: 400; line-height: 1.35; margin-top: 4px; }
.vcard__date { font-size: var(--step--1); color: var(--text-soft); }
.piece__video { display: grid; gap: 14px; margin-top: 28px; }
.page-head .btn { margin-top: 6px; }
