/* =========================================================================
   KHDS Design Playground — gallery chrome
   Matched to the live khdigitalstudio.com: warm stone ground (#e9e3dc),
   near-white cards, near-black ink, black pill CTAs, tight grotesque type.
   The eight designs keep their own palettes; this is only the studio frame.
   ========================================================================= */

@font-face {
  font-family: "Instrument Sans";
  src: url("/designplayground/app/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  color-scheme: light;

  --bg: #e9e3dc;
  --bg-deep: #e1dad1;
  --paper: #fdfbf7;
  --surface: #f6f2ec;
  --surface-soft: #f1ece4;
  --ink: #191713;
  --ink-soft: #3b3730;
  --muted: #615c54;
  --muted-2: #8a8378;

  --line: rgba(25, 23, 19, 0.13);
  --line-strong: rgba(25, 23, 19, 0.26);
  --shadow: 0 18px 44px rgba(62, 48, 34, 0.1);
  --shadow-lift: 0 26px 60px rgba(62, 48, 34, 0.16);

  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --max: 1220px;

  --font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --fast: 180ms;
  --slow: 420ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, #f3eee7, transparent 55%),
    linear-gradient(180deg, #eae4dd 0%, #e9e3dc 40%, #e4ddd4 100%);
  background-attachment: fixed;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img, iframe { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(25, 23, 19, 0.06);
  border: 1px solid var(--line);
  padding: 0.08em 0.35em;
  border-radius: 6px;
  color: var(--ink-soft);
}

h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

::selection { background: rgba(25, 23, 19, 0.14); color: var(--ink); }

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

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: var(--radius-pill);
  transform: translateY(-180%);
  transition: transform var(--fast) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------------------------------------------------------------- masthead */

.masthead {
  position: sticky;
  top: 0.75rem;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 0.5rem 0.6rem 0.5rem 0.85rem;
  background: rgba(253, 251, 247, 0.94);
  border: 1px solid rgba(25, 23, 19, 0.08);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(70, 55, 40, 0.07);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  padding: 0.62rem 0.72rem;
  background: var(--ink);
  border-radius: 11px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1;
  transition: background var(--fast) var(--ease);
}
.brand:hover .brand__mark { background: #000; }

.brand__text { display: grid; gap: 0.15rem; }
.brand__name {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.brand__sub {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 1.5vw, 1.25rem);
}

.navlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.2rem;
  background: none;
  border: 0;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--fast) var(--ease);
}
.navlink:hover { color: var(--ink); }
.navlink--button { padding-inline: 0.2rem; }

.navlink__count {
  font-size: 0.68rem;
  line-height: 1;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--ink-soft);
}
.navlink[aria-pressed="true"] { color: var(--ink); }
.navlink[aria-pressed="true"] .navlink__count {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.navlink--cta {
  padding: 0.68rem 1.05rem;
  min-height: 2.7rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.navlink--cta:hover { background: #000; color: #fff; transform: translateY(-1px); }

@media (max-width: 800px) {
  .masthead { top: 0.5rem; padding: 0.45rem 0.5rem 0.45rem 0.6rem; border-radius: 16px; }
  .brand__text { display: none; }
  .masthead__nav { gap: clamp(0.25rem, 1.6vw, 0.7rem); }
  .navlink { font-size: 0.82rem; min-height: 2.75rem; }
  .navlink--cta { padding-inline: 0.75rem; min-height: 2.6rem; }
}

@media (max-width: 560px) {
  .masthead__nav { gap: 0.1rem; }
  .masthead .navlink[href="#collection"] { display: none; }
  .navlink { font-size: 0.78rem; }
  .navlink--compare { font-size: 0; gap: 0; padding-inline: 0.55rem; }
  .navlink--compare::before { content: "⇄"; font-size: 0.95rem; line-height: 1; }
  .brand__mark { padding: 0.58rem 0.66rem; font-size: 0.72rem; }
}

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

.hero {
  position: relative;
  width: min(calc(100% - 2rem), var(--max));
  margin: clamp(1.4rem, 3vw, 2.2rem) auto 0;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.6rem, 4vw, 3.4rem) clamp(1.8rem, 4vw, 3rem);
  display: grid;
  gap: clamp(1.6rem, 3vw, 2.6rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero .eyebrow { margin: 0; }

.hero > * { animation: hero-rise 700ms var(--ease) both; }
.hero > *:nth-child(2) { animation-delay: 80ms; }
.hero > *:nth-child(3) { animation-delay: 170ms; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 8.4vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
  max-width: 15ch;
  color: var(--ink);
  text-wrap: balance;
}

.hero__title-sub {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--muted);
  max-width: 26ch;
}

.hero__foot {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.4rem 3rem;
  align-items: end;
  padding-top: clamp(1.2rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
}

.hero__body {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero__meta-line {
  justify-self: end;
  text-align: right;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted-2);
  max-width: 26ch;
}
.hero__meta-line span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 820px) {
  .hero__foot { grid-template-columns: minmax(0, 1fr); }
  .hero__meta-line { justify-self: start; text-align: left; }
}

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

#collection { scroll-margin-top: 6.5rem; }

.collection {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 3.6rem) 0 clamp(2.6rem, 6vw, 4.4rem);
}

.collection__bar {
  display: flex;
  align-items: baseline;
  gap: 0.85rem 1.2rem;
  padding: 0 0 0.95rem;
  border-bottom: 1px solid var(--line);
}

.collection__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.035em;
}
.collection__status {
  font-size: 0.8rem;
  color: var(--muted-2);
}
.collection__tools { margin-left: auto; }

.chip {
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.chip:hover { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.chip[data-state="off"] { color: var(--muted-2); border-style: dashed; }

/* --------------------------------------------------------------- exhibits */

.exhibits {
  display: grid;
  gap: clamp(3.2rem, 6vw, 5.4rem);
  padding-top: clamp(1.6rem, 3vw, 2.4rem);
}

.exhibit {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr);
  gap: clamp(1.3rem, 3.4vw, 3rem);
  align-items: stretch;
  padding-top: clamp(1.6rem, 3vw, 2.4rem);
  border-top: 1px solid var(--line);
}

.exhibit:nth-child(even) { grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr); }
.exhibit:nth-child(even) .exhibit__preview { order: 2; }
.exhibit:nth-child(even) .exhibit__info { order: 1; }
.exhibit[hidden] { display: none; }

.exhibit__preview {
  --accent: var(--ink);
  position: relative;
  display: block;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(62, 48, 34, 0.08);
  transition: transform var(--slow) var(--ease), box-shadow var(--slow) var(--ease), border-color var(--slow) var(--ease);
}
.exhibit:not(.is-flying) .exhibit__preview:hover,
.exhibit:not(.is-flying) .exhibit__preview:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.exhibit__window {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(25, 23, 19, 0.1);
  border-radius: 18px;
  background: #fff;
}

.exhibit__cover,
.exhibit__live {
  position: absolute;
  inset: 0;
  width: 1440px;
  height: 900px;
  max-width: none;
  border: 0;
  transform-origin: top left;
  pointer-events: none;
  background: #fff;
}
.exhibit__live { opacity: 0; transition: opacity 240ms var(--ease); }
.exhibit.is-hovered .exhibit__live[data-ready="true"],
.exhibit:focus-within .exhibit__live[data-ready="true"] { opacity: 1; }

.exhibit__open {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  color: transparent;
}
.exhibit__open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.exhibit__index {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 4;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(25, 23, 19, 0.1);
  border-radius: var(--radius-pill);
  background: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(10px);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  pointer-events: none;
}

.exhibit__hint {
  position: absolute;
  right: 17px;
  bottom: 15px;
  z-index: 4;
  padding: 0.34rem 0.7rem;
  border: 1px solid rgba(25, 23, 19, 0.1);
  border-radius: var(--radius-pill);
  background: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(10px);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.exhibit__preview:hover .exhibit__hint,
.exhibit__preview:focus-within .exhibit__hint { opacity: 1; transform: translateY(0); }

.exhibit__info {
  container-type: inline-size;
  display: grid;
  gap: 0.6rem;
  align-content: center;
  padding: 0.3rem 0.1rem;
}

.exhibit__field {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.exhibit__num {
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.exhibit__style { color: var(--muted); }
.exhibit__style::before {
  content: "—";
  margin-right: 0.55rem;
  color: rgba(25, 23, 19, 0.26);
}

.exhibit__name {
  font-size: min(var(--name-size, 3rem), 12cqi);
  color: var(--ink);
  margin-block: 0.15rem 0.1rem;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.exhibit__line {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 34ch;
}

.exhibit__sig {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted-2);
  max-width: 36ch;
}
.exhibit__sig::before {
  content: "";
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--accent, var(--ink));
  flex: 0 0 auto;
  transform: translateY(-0.12em);
}

.exhibit__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding-top: 0.6rem;
}

.exhibit__enter { padding-inline: 1rem; }
.exhibit__arrow { transition: transform var(--fast) var(--ease); }
.exhibit__enter:hover .exhibit__arrow { transform: translate(2px, -2px); }

.exhibit__details {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border: 0;
  background: none;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.exhibit__details:hover { color: var(--ink); }

.exhibit__save {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.exhibit__save:hover { background: rgba(25, 23, 19, 0.06); color: var(--ink); }
.exhibit__save[aria-pressed="true"] { color: var(--ink); }
.exhibit__save.save[aria-pressed="true"] {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
}

/* per-design type treatments for the exhibit name */
.type--lowtide { text-transform: uppercase; font-weight: 800; letter-spacing: -0.055em; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; line-height: 0.82; }
.type--solstice { font-family: "Times New Roman", Times, serif; font-style: italic; letter-spacing: -0.02em; line-height: 0.86; }
.type--softer { font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif; text-transform: lowercase; letter-spacing: -0.03em; line-height: 0.82; }
.type--whitlock { text-transform: uppercase; font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif; font-weight: 700; letter-spacing: 0.01em; line-height: 0.84; }
.type--minch { font-family: "Segoe UI", system-ui, sans-serif; font-weight: 200; letter-spacing: 0.01em; line-height: 0.92; }
.type--lattice { font-family: system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-weight: 600; letter-spacing: -0.02em; line-height: 0.9; }
.type--harlow { text-transform: uppercase; font-family: Rockwell, "Roboto Slab", "Courier New", Georgia, serif; font-weight: 700; letter-spacing: 0.015em; line-height: 0.9; }
.type--inverlair { text-transform: uppercase; font-family: Baskerville, "Baskerville Old Face", Georgia, serif; font-weight: 400; letter-spacing: 0.06em; line-height: 1; }
.type--fenwick { text-transform: uppercase; font-family: Archivo, "Inter", system-ui, "Segoe UI", Arial, sans-serif; font-weight: 700; letter-spacing: -0.02em; line-height: 0.9; }
.type--corbet { text-transform: uppercase; font-family: "Bodoni Moda", Didot, "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, serif; font-weight: 400; letter-spacing: 0.055em; line-height: 0.94; }

/* ------------------------------------------------------------------ buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button--ink,
.button--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 24px rgba(25, 23, 19, 0.16);
}
.button--ink:hover,
.button--primary:hover { background: #000; border-color: #000; }

.button--outline {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink);
}
.button--outline:hover { background: #ece6dd; border-color: var(--line-strong); }

.button--quiet {
  border-color: transparent;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.button--quiet:hover { color: var(--ink); }

.button--small {
  min-height: 44px;
  padding: 0.6rem 0.95rem;
  font-size: 0.82rem;
}

.iconbutton {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.iconbutton:hover { background: var(--surface-soft); border-color: var(--line-strong); }

.save[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* ---------------------------------------------------------------- closing */

.closing {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto clamp(2.4rem, 5vw, 4rem);
  padding: clamp(2rem, 4vw, 3.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.1rem;
  justify-items: start;
}
.closing__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  max-width: 22ch;
}
.closing__title .accent { color: var(--ink); }
.closing__body { max-width: 56ch; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.closing__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; padding-top: 0.6rem; }

/* ------------------------------------------------------------------- foot */

.foot {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 1.8rem 0 3rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.foot__brand {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.foot__line { color: var(--muted); }
.foot__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  font-size: 0.76rem;
  color: var(--muted-2);
}

.fallback {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
}

/* ==================================================================
   LEVEL 2 — the stage
   ================================================================== */

.stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(1.6rem, 4vh, 2.4rem) clamp(0.7rem, 2.5vw, 2rem) clamp(5.4rem, 11vh, 6.4rem);
  background:
    radial-gradient(circle at 50% -12%, #f4efe8, transparent 58%),
    linear-gradient(180deg, #eae4dd, #e3dcd3);
  color: var(--ink);
  animation: stage-in 380ms var(--ease) both;
}
.stage[hidden] { display: none; }

@keyframes stage-in {
  from { opacity: 0; transform: scale(0.994); }
  to { opacity: 1; transform: scale(1); }
}

.stage__framearea {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
}

.stage__device {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 34px 80px -28px rgba(55, 42, 30, 0.42), 0 0 0 6px rgba(253, 251, 247, 0.5);
  overflow: hidden;
}

.stage__iframe {
  border: 0;
  background: #fff;
  transform-origin: top left;
  width: 1440px;
  height: 900px;
  max-width: none;
}

.stage__toolbar {
  position: fixed;
  z-index: 64;
  left: 50%;
  bottom: clamp(0.7rem, 2.2vh, 1.3rem);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.1rem;
  max-width: calc(100vw - 1.4rem);
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(253, 251, 247, 0.96);
  box-shadow: 0 18px 44px rgba(55, 42, 30, 0.18);
  backdrop-filter: blur(16px);
  color: var(--ink);
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 18px;
  background: none;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.tool:hover { color: var(--ink); background: rgba(25, 23, 19, 0.06); }
.tool:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.tool__icon { font-size: 0.95rem; line-height: 1; }
.tool__label { line-height: 1; }

.tool--build {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 500;
  padding-inline: 0.95rem;
}
.tool--build:hover { background: #000; color: #fff; }

.tool[aria-pressed="true"] {
  background: rgba(25, 23, 19, 0.08);
  border-color: rgba(25, 23, 19, 0.1);
  color: var(--ink);
}

.tool__divider {
  width: 1px;
  align-self: stretch;
  margin: 0.4rem 0.22rem;
  background: var(--line);
}

.stage__title {
  display: grid;
  gap: 0.06rem;
  padding: 0 0.55rem;
  min-width: 8.5rem;
}
.stage__name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  white-space: nowrap;
}
.stage__style {
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

.segmented { display: inline-flex; gap: 0.1rem; }
.seg {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 2.6rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 16px;
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.seg:hover { color: var(--ink); background: rgba(25, 23, 19, 0.05); }
.seg[aria-pressed="true"] {
  background: rgba(25, 23, 19, 0.08);
  border-color: rgba(25, 23, 19, 0.1);
  color: var(--ink);
}
.seg:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.seg__glyph { font-size: 0.7rem; line-height: 1; }

.stage__hint {
  position: fixed;
  top: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 62;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: rgba(97, 92, 84, 0.8);
  white-space: nowrap;
  pointer-events: none;
}
.stage__hint kbd {
  font-family: var(--mono);
  font-size: 0.66rem;
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink-soft);
  background: rgba(253, 251, 247, 0.7);
}

@media (max-width: 1080px) {
  .stage__hint { display: none; }
  .stage__title { min-width: 0; }
  .stage__style { display: none; }
  .tool--build .tool__label { display: none; }
  .tool--build::after { content: "Enquire"; font-size: 0.82rem; font-weight: 500; }
}

@media (max-width: 860px) {
  .stage {
    padding: 0.5rem 0.5rem 7.6rem;
  }
  .stage__toolbar {
    left: 0.4rem;
    right: 0.4rem;
    bottom: 0.4rem;
    transform: none;
    max-width: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.06rem;
    padding: 0.3rem;
    border-radius: var(--radius-lg);
  }
  .tool__label { display: none; }
  .tool--back .tool__label { display: inline; }
  .stage__title { padding: 0 0.4rem; }
  .stage__name { font-size: 0.82rem; }
  .tool__divider { display: none; }
  .seg { min-width: 2.5rem; justify-content: center; }
  .seg__text { display: none; }
  .stage__device { border-radius: 12px; }
}

/* ==================================================================
   COMPARE
   ================================================================== */

.compare {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 50% -10%, #f4efe8, transparent 55%),
    linear-gradient(180deg, #eae4dd, #e3dcd3);
  color: var(--ink);
  animation: stage-in 340ms var(--ease) both;
}
.compare[hidden] { display: none; }
.compare > * { min-width: 0; }

.compare__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem clamp(0.6rem, 2vw, 1.4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(253, 251, 247, 0.86);
  backdrop-filter: blur(14px);
}
.compare__titles { display: grid; gap: 0.1rem; }
.compare__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}
.compare__note { font-size: 0.76rem; color: var(--muted); }
.compare__picks { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.compare__x { color: var(--muted-2); font-size: 0.9rem; }

.select {
  appearance: none;
  min-height: 2.5rem;
  padding: 0.45rem 2rem 0.45rem 0.8rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%) calc(100% - 1.1rem) 55% / 4px 4px no-repeat,
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%) calc(100% - 0.8rem) 55% / 4px 4px no-repeat,
    var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.84rem;
  cursor: pointer;
}
.select option { background: var(--paper); color: var(--ink); }

.compare__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  min-height: 0;
  min-width: 0;
  background: var(--line);
}

.compare__pane {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  min-width: 0;
  background: #ece6de;
}

.compare__panehead {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
  background: rgba(253, 251, 247, 0.72);
}
.compare__panename {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  padding-right: 0.25rem;
}
.compare__panestyle {
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-right: auto;
}

.compare__stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 0;
  padding: 0.6rem;
}
.compare__device {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 20px 40px -24px rgba(55, 42, 30, 0.4);
}
.compare__iframe {
  border: 0;
  background: #fff;
  transform-origin: top left;
  width: 1440px;
  height: 900px;
  max-width: none;
}

.compare__limit {
  padding: 0.7rem clamp(0.7rem, 2vw, 1.4rem);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 100ch;
  background: rgba(253, 251, 247, 0.6);
}

@media (max-width: 960px) {
  .compare { grid-template-rows: auto auto 1fr auto; }
  .compare__head { padding: 0.5rem 0.6rem; gap: 0.4rem; }
  .compare__note { display: none; }
  .compare__picks { margin-left: 0; width: 100%; }
  .compare__picks .select { flex: 1; min-width: 0; }
  .compare__title { font-size: 0.95rem; }
  .compare__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .compare__stage { padding: 0.35rem; }
  .compare__limit { font-size: 0.68rem; padding: 0.5rem 0.6rem; }
  .compare__panehead { padding: 0.3rem 0.4rem; }
}

/* ==================================================================
   DRAWERS
   ================================================================== */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(38, 31, 24, 0.38);
  backdrop-filter: blur(3px);
  animation: fade-in 240ms var(--ease) both;
}
.scrim[hidden] { display: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-in { from { transform: translateX(2rem); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  width: min(40rem, 100%);
  display: grid;
  min-height: 0;
  border-left: 1px solid var(--line);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  background: var(--paper);
  box-shadow: -30px 0 80px -30px rgba(55, 40, 28, 0.35);
  animation: drawer-in 320ms var(--ease) both;
}
.drawer[hidden] { display: none; }

.drawer__scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.2rem, 3vw, 2.4rem);
  display: grid;
  gap: 1.15rem;
  align-content: start;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.drawer__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.0;
  letter-spacing: -0.045em;
}
.drawer__title .accent { color: var(--ink); }

.drawer__lede {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 48ch;
}

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.2rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}
.specs div {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.specs dt {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.specs dd { font-size: 0.88rem; line-height: 1.5; color: var(--ink-soft); }

.swatches { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.swatch {
  display: grid;
  gap: 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.swatch i {
  display: block;
  width: 3.4rem;
  height: 1.55rem;
  border-radius: 9px;
  border: 1px solid rgba(25, 23, 19, 0.18);
}

.drawer__sections { display: grid; gap: 1.35rem; }
.drawer__section { display: grid; gap: 0.45rem; }
.drawer__section h3 {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}
.drawer__section ul { display: grid; gap: 0.5rem; }
.drawer__section li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}
.drawer__section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: #b7afa3;
}
.drawer__section--tags ul { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.drawer__section--tags li {
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.drawer__section--tags li::before { display: none; }

.drawer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.drawer__fine {
  font-size: 0.7rem;
  line-height: 1.65;
  color: var(--muted-2);
}

/* ------------------------------------------------------------------ form */

.form { display: grid; gap: 0.95rem; }

.field { display: grid; gap: 0.35rem; }
.field label {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field__optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--muted-2);
}
.field__help { font-size: 0.74rem; color: var(--muted-2); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.78rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background var(--fast) var(--ease);
}
.field textarea { resize: vertical; min-height: 6.5rem; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(97, 92, 84, 0.55); }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--line-strong); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(25, 23, 19, 0.12);
}
.field [aria-invalid="true"] {
  border-color: #a8452f;
  background: #fbf1ed;
}
.field__error { font-size: 0.76rem; color: #93351f; }
.field__error[hidden] { display: none; }

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.check input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.15rem 0 0;
  accent-color: var(--ink);
  flex: 0 0 auto;
}

.privacy {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(25, 23, 19, 0.1);
  border-left: 2px solid #a9987f;
  border-radius: 11px;
  background: #f3eee5;
  font-size: 0.76rem;
  line-height: 1.65;
  color: var(--muted);
}
.privacy strong { color: var(--ink); }

.form__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.3rem; }

.receipt { display: grid; gap: 0.8rem; }
.receipt[hidden] { display: none; }
.receipt__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.receipt__note { font-size: 0.88rem; line-height: 1.6; color: var(--muted); }
.receipt__body {
  margin: 0;
  padding: 0.9rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.65;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 22rem;
  overflow: auto;
}
.receipt__status { font-size: 0.78rem; color: #4c5a3f; min-height: 1rem; }
.receipt__mailnote { font-size: 0.74rem; line-height: 1.65; color: var(--muted); }

@media (max-width: 620px) {
  .drawer { width: 100%; border-left: 0; border-radius: 0; }
  .drawer__scroll { padding-bottom: 2.5rem; }
  .specs { grid-template-columns: 1fr; }
  .receipt__body { font-size: 0.66rem; }
}

/* --------------------------------------------------------- exhibits, phone */

@media (max-width: 900px) {
  .exhibit { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; align-items: start; }
  .exhibit:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .exhibit:nth-child(even) .exhibit__preview { order: 0; }
  .exhibit:nth-child(even) .exhibit__info { order: 1; }
  .exhibits { gap: 2.6rem; }
  .exhibit__hint { display: none; }
  .exhibit__info { padding: 0.2rem 0.1rem; }
  .exhibit__line { max-width: none; }
}

@media (max-width: 480px) {
  .hero__meta { gap: 0.35rem 0.9rem; }
  .closing { padding: 1.4rem; }
  .button { width: 100%; }
  .exhibit__actions .button { width: auto; }
}

/* -------------------------------------------------------------- motion safety */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .exhibit__preview:hover,
  .exhibit__preview:focus-within { transform: none; }
  .exhibit__hint { display: none; }
  .button:hover { transform: none; }
}

/* Windows high-contrast mode */
@media (forced-colors: active) {
  .brand__mark,
  .button,
  .chip,
  .tool,
  .seg,
  .iconbutton,
  .exhibit__preview,
  .exhibit__info,
  .hero,
  .closing { border: 1px solid CanvasText; }
  .brand__mark,
  .tool--build,
  .seg[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}
/* ----------------------------------------------------------------- eyebrow */

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow span { display: inline-flex; align-items: center; gap: 0.55rem; }
.eyebrow span + span::before {
  content: "";
  width: 1.1rem;
  height: 1px;
  background: rgba(25, 23, 19, 0.24);
}
@media (max-width: 560px) {
  .eyebrow span + span::before { display: none; }
}

/* ------------------------------------------------- shared flight + reveal */

.stage__device { transition: opacity 180ms var(--ease); }
.stage.is-shared { animation: none; opacity: 0; transition: opacity 240ms var(--ease); }
.stage.is-shared.is-ready { opacity: 1; }
.stage.is-leaving { animation: none; opacity: 0; transition: opacity 180ms var(--ease); }

.exhibit__window.is-flying {
  position: fixed;
  margin: 0;
  z-index: 120;
  pointer-events: none;
  transform-origin: top left;
  border-radius: 18px;
  will-change: transform;
  box-shadow: 0 40px 90px -30px rgba(55, 42, 30, 0.5);
}
.exhibit.is-flying .exhibit__preview { transform: none; }
.exhibit.is-flying .exhibit__index,
.exhibit.is-flying .exhibit__hint { opacity: 0; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .hero > * { animation: none; }
}
