/* Erfas 3D — dark, calm, minimal. Palette measured from the logo and product photos. */

@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

:root {
  color-scheme: dark;

  /* palette */
  --grafit: #13161b;
  --plaka: #1a1e24;
  --plaka-acik: #20252c;
  --dikis: #2a3038;
  --dikis-acik: #3a424c;
  --celik: #9aa3ae;
  --kemik: #e3dfd6;
  --camgobegi: #1a9cb9;
  --camgobegi-parlak: #25adcb;
  --camgobegi-acik: #5bbfd8;
  --lacivert: #1c4b79;
  --on-camgobegi: #071418;

  /* roles */
  --bg: var(--grafit);
  --surface: var(--plaka);
  --surface-raised: var(--plaka-acik);
  --line: var(--dikis);
  --line-strong: var(--dikis-acik);
  --text: var(--kemik);
  --text-muted: var(--celik);
  --accent: var(--camgobegi);
  --accent-hover: var(--camgobegi-parlak);
  --accent-text: var(--camgobegi-acik);
  --on-accent: var(--on-camgobegi);
  --focus: var(--camgobegi-acik);

  /* type */
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --text-label: 0.75rem;
  --text-small: 0.9375rem;
  --text-body: 1.0625rem;
  --text-lede: clamp(1.0625rem, 0.96rem + 0.45vw, 1.25rem);
  --text-h3: 1.25rem;
  --text-h2: clamp(1.9rem, 1.25rem + 2.5vw, 3rem);
  --text-h1: clamp(2.35rem, 1.1rem + 4.9vw, 5.25rem);

  /* space & shape */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-space: clamp(80px, 11vw, 144px);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  --header-h: 64px;

  /* motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 140ms;
  --dur: 220ms;
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

html:has(dialog[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-stretch: 100%;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-sans);
  color: var(--text);
  text-wrap: balance;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

svg {
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--lacivert);
  color: var(--kemik);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: var(--gutter);
  top: -80px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-s);
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-stretch: 87.5%;
  font-weight: 450;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- buttons & links ---------- */

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  background: none;
  font-size: 1rem;
  font-stretch: 108%;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--dur-fast) var(--ease-out);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Elongated hexagon — the outline of the Erfas logo mark. Drawn on a pseudo-element so focus rings stay visible. */
.btn-primary {
  color: var(--on-accent);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.btn-primary:hover::before {
  background: var(--accent-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:focus-visible {
  outline-offset: 4px;
  border-radius: 6px;
}

.btn-compact {
  min-height: 44px;
  padding: 0 22px;
  font-size: 0.9375rem;
}

.btn-compact::before {
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
}

.btn-large {
  min-height: 56px;
  padding: 0 34px;
  font-size: 1.0625rem;
}

.btn-large::before {
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  transition: text-decoration-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.text-link svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.text-link:hover {
  text-decoration-color: var(--accent-text);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.site-header.is-scrolled {
  background: var(--bg);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 44px;
  min-height: 44px;
  margin-right: auto;
  text-decoration: none;
  border-radius: var(--radius-s);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-s);
}

.brand-word {
  font-size: 0.9375rem;
  font-stretch: 125%;
  font-weight: 650;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.site-nav {
  display: none;
  gap: 4px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: var(--radius-s);
  color: var(--text-muted);
  font-size: var(--text-small);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.site-nav a:hover {
  color: var(--text);
}

@media (min-width: 720px) {
  .site-nav {
    display: flex;
  }
}

/* On narrow phones the wordmark steps aside visually but still names the home link. */
@media (max-width: 400px) {
  .brand .brand-word {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- hero ---------- */

.hero {
  padding-block: calc(var(--header-h) + clamp(36px, 7vw, 96px)) clamp(72px, 9vw, 120px);
}

.hero-grid {
  display: grid;
  gap: clamp(44px, 6vw, 72px);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

.hero h1 {
  margin-top: 20px;
  font-size: var(--text-h1);
  font-stretch: 118%;
  font-weight: 680;
  line-height: 0.98;
  letter-spacing: -0.028em;
}

.lede {
  max-width: 40ch;
  margin-top: 26px;
  color: var(--text-muted);
  font-size: var(--text-lede);
  line-height: 1.6;
}

.lede,
.section-lede,
.studio-copy p,
.step p,
.dialog-desc {
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 38px;
}

/* ---------- signature: print preview ---------- */

.printer {
  --p: 1;
  display: grid;
  gap: 14px;
  width: min(100%, 440px);
  justify-self: center;
}

@media (min-width: 960px) {
  .printer {
    justify-self: end;
  }
}

/* Before the script takes over, keep the piece "unprinted"; the fallback animation reveals it if JS never arrives. */
.js .printer:not(.is-ready) {
  --p: 0;
  animation: printer-fallback 0s 3s forwards;
}

@keyframes printer-fallback {
  to {
    --p: 1;
  }
}

.printer-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
}

.printer-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The slicer preview: the whole piece, faint and colorless, above the printed layers. */
.printer-ghost {
  opacity: 0.2;
  filter: grayscale(1) brightness(0.6);
}

.printer-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, rgb(227 223 214 / 0.045) 5px 6px);
  clip-path: inset(0 0 calc(var(--p) * 100%) 0);
  pointer-events: none;
}

.printer-print {
  clip-path: inset(calc((1 - var(--p)) * 100%) 0 0 0);
}

.printer-nozzle {
  position: absolute;
  inset-inline: 0;
  top: calc((1 - var(--p)) * 100%);
  height: 1px;
  background: var(--accent-text);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.printer.is-printing .printer-nozzle {
  opacity: 0.85;
}

.printer-head {
  position: absolute;
  inset-inline: 0;
  bottom: 1px;
  height: 9px;
}

.printer.is-printing .printer-head {
  animation: printer-head 1.2s ease-in-out infinite alternate;
}

.printer-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 12px;
  height: 9px;
  background: var(--accent-text);
  clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%);
}

@keyframes printer-head {
  from {
    transform: translateX(14%);
  }
  to {
    transform: translateX(82%);
  }
}

.printer-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-muted);
  font-size: var(--text-small);
  line-height: 1.4;
}

.printer-status {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  white-space: nowrap;
}

.printer-scrub {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.printer-scrub-label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-stretch: 87.5%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.printer-scrub input {
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.printer-scrub input::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--accent-text) calc(var(--p) * 100%), var(--line-strong) 0);
}

.printer-scrub input::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -6px;
  border: 0;
  border-radius: 3px;
  background: var(--kemik);
  -webkit-appearance: none;
}

.printer-scrub input::-moz-range-track {
  height: 2px;
  background: var(--line-strong);
}

.printer-scrub input::-moz-range-progress {
  height: 2px;
  background: var(--accent-text);
}

.printer-scrub input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 3px;
  background: var(--kemik);
}

.printer-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-item {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.queue-item:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.queue-item[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--accent);
  background: rgb(26 156 185 / 0.12);
}

/* ---------- sections ---------- */

.section {
  padding-block: var(--section-space);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 14px;
  max-width: 62ch;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head h2,
.studio-copy h2 {
  font-size: var(--text-h2);
  font-stretch: 112%;
  font-weight: 640;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.section-lede {
  color: var(--text-muted);
}

/* ---------- collection ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-small);
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.chip-count {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.chip[aria-pressed="true"] {
  color: var(--text);
  border-color: #2c6aa3;
  background: var(--lacivert);
}

.chip[aria-pressed="true"]::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: -2px;
  background: var(--accent-text);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.chip[aria-pressed="true"] .chip-count {
  color: var(--kemik);
}

.pieces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .pieces {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 44px 24px;
  }
}

@media (min-width: 1100px) {
  .pieces {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.piece[hidden] {
  display: none;
}

.piece-link {
  display: grid;
  gap: 4px;
  border-radius: var(--radius-m);
  text-decoration: none;
}

.piece-media {
  position: relative;
  display: block;
  margin-bottom: 10px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: var(--surface);
}

/* Product photos are shot on bright marble; a slight dim keeps the dark page calm until a piece is pointed at. */
.piece-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9);
  transition: filter var(--dur) var(--ease-out), transform 600ms var(--ease-out);
}

.piece-link:hover .piece-media img,
.piece-link:focus-visible .piece-media img {
  filter: brightness(1);
  transform: scale(1.025);
}

.piece-link:focus-visible {
  outline-offset: 6px;
}

.piece-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgb(19 22 27 / 0.8);
  color: var(--kemik);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.piece-badge svg {
  width: 10px;
  height: 10px;
}

.piece-title {
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.35;
}

.piece-cat {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- studio ---------- */

.studio-grid {
  display: grid;
  gap: 44px;
  align-items: center;
}

@media (min-width: 880px) {
  .studio-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 80px;
  }
}

.studio-video {
  display: grid;
  gap: 12px;
  width: min(100%, 360px);
  justify-self: center;
}

.studio-video video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
}

.media-note {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.studio-copy {
  display: grid;
  gap: 18px;
  max-width: 60ch;
}

.studio-copy > p:not(.eyebrow) {
  color: var(--text-muted);
}

.craft-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.craft-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- order ---------- */

.steps {
  display: grid;
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 880px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.step::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 12px;
  height: 11px;
  background: var(--accent);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.step-no {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-stretch: 87.5%;
  letter-spacing: 0.08em;
  color: var(--accent-text);
}

.step h3 {
  margin-top: 10px;
  font-size: var(--text-h3);
  font-stretch: 108%;
  font-weight: 600;
  line-height: 1.25;
}

.step p {
  max-width: 34ch;
  margin-top: 8px;
  color: var(--text-muted);
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: clamp(44px, 6vw, 72px);
}

/* ---------- footer ---------- */

.site-footer {
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: auto 1fr auto;
    gap: 40px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-tag {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: var(--text-small);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: var(--text-small);
}

@media (min-width: 760px) {
  .footer-contact {
    justify-content: center;
  }
}

.footer-contact a {
  display: inline-block;
  padding-block: 10px;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-contact a:hover {
  color: var(--text);
}

.footer-contact li:not(:has(a)) {
  padding-block: 10px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ---------- piece dialog ---------- */

.piece-dialog {
  width: min(100% - 24px, 960px);
  max-width: none;
  max-height: min(100dvh - 24px, 820px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  color: var(--text);
  overscroll-behavior: contain;
}

.piece-dialog::backdrop {
  background: rgb(8 10 13 / 0.74);
}

.piece-dialog[open] {
  animation: dialog-in 200ms var(--ease-out);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

.dialog-inner {
  position: relative;
  display: grid;
}

@media (min-width: 760px) {
  .dialog-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.dialog-media {
  display: grid;
  place-items: center;
  min-height: 240px;
  background: var(--bg);
}

.dialog-media img,
.dialog-media video {
  width: 100%;
  height: 100%;
  max-height: min(62dvh, 820px);
  object-fit: contain;
}

@media (min-width: 760px) {
  .dialog-media img,
  .dialog-media video {
    max-height: min(100dvh - 26px, 818px);
  }
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 4vw, 44px);
}

.dialog-body h2 {
  padding-right: 44px;
  font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.125rem);
  font-stretch: 112%;
  font-weight: 640;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.dialog-note {
  color: var(--text-muted);
  font-size: var(--text-small);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: auto;
  padding-top: 18px;
}

.dialog-ig-glyph {
  display: none;
}

/* Phones: the dialog scrolls, so keep the way to ask about the piece in reach, on one row. */
@media (max-width: 759px) {
  .dialog-actions {
    position: sticky;
    bottom: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
    margin: auto calc(-1 * clamp(24px, 4vw, 44px)) calc(-1 * clamp(24px, 4vw, 44px));
    padding: 14px clamp(24px, 4vw, 44px);
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .dialog-actions .btn {
    flex: 1 1 auto;
    padding-inline: 20px;
  }

  .dialog-ig {
    flex: none;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
  }

  .dialog-ig .dialog-ig-glyph {
    display: block;
    width: 20px;
    height: 20px;
    color: var(--text);
  }

  .dialog-ig-arrow {
    display: none;
  }

  .dialog-ig-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(19 22 27 / 0.86);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.dialog-close:hover {
  border-color: var(--line-strong);
}

.dialog-close svg {
  width: 20px;
  height: 20px;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .js .printer:not(.is-ready) {
    --p: 1;
  }

  .piece-link:hover .piece-media img,
  .piece-link:focus-visible .piece-media img {
    transform: none;
  }
}
