/* ==========================================================================
   MAFI — shared foundation
   Desktop (>= 901px): every page is built on a 1440px design grid and scales
   fluidly with the page width through --u (1 design px). That keeps each
   page a 1:1 match of the approved comps at any desktop width.
   Mobile/tablet (<= 900px): flow layouts with fixed px type.
   ========================================================================== */

@font-face {
  font-family: "MAFI Jost";
  src: url("../fonts/jost-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MAFI Playfair";
  src: url("../fonts/playfair-display-var.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 1 design px. Inside .page this resolves against the page width. */
  --u: calc(min(100cqi, 1920px) / 1440);

  --serif: "MAFI Playfair", "Playfair Display", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "MAFI Jost", "Jost", "Futura", "Avenir Next", "Century Gothic", "Helvetica Neue", Arial, sans-serif;

  --cream: #f7f2ea;        /* page paper */
  --cream-2: #f1ece3;      /* inset panels */
  --paper: #f4ead6;        /* filled buttons */
  --bone: #fbf6ec;         /* display type on photos */
  --bone-2: #ebe5d9;       /* small type on photos */
  --ink: #141311;          /* display type on paper */
  --ink-2: #2a2825;        /* small type on paper */
  --ink-3: #6b665e;        /* muted */
  --night: #0a0c0c;        /* concept 1 ground */
  --night-2: #0d1008;      /* concept 3 ground */
  --rule: #bdb8ae;         /* hairlines on paper */
  --tan: #cdbb9b;          /* frames on photos */

  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}
html.is-locked { overflow: hidden; }
[id] { scroll-margin-top: 72px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #c9a46a; outline-offset: 3px; }

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

/* The page is the size container every --u length resolves against. */
.page {
  container-type: inline-size;
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  overflow-x: clip;
}

.icon { display: block; flex: none; fill: none; stroke: currentColor; }
.icon--fill { fill: currentColor; stroke: none; }

/* Photos fill their frames. */
.media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  color: var(--hdr-fg);
}
.site-header--bar { position: relative; background: var(--hdr-bg); }

.site-header__row {
  position: absolute;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.site-nav { display: flex; align-items: center; }
.site-header__logo { display: block; color: var(--hdr-logo); }
.site-header__logo svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.site-header__actions { display: flex; align-items: center; justify-content: flex-end; }

.hdr-link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity .2s var(--ease);
}
.hdr-link:hover { opacity: .65; }

.hdr-cart { position: relative; display: inline-flex; }
.hdr-cart .icon { width: 100%; height: 100%; }
.cart-count {
  position: absolute;
  top: -.35em;
  right: -.55em;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 .35em;
  border-radius: 1em;
  background: var(--hdr-badge-bg, #f4ead6);
  color: var(--hdr-badge-fg, #141311);
  font: 600 11px/1.6em var(--sans);
  text-align: center;
  letter-spacing: 0;
}
.cart-count:empty, .cart-count[data-count="0"] { display: none; }

.menu-btn { display: none; }

@media (min-width: 901px) {
  .site-header { height: calc(142 * var(--u)); }
  .site-header__row {
    left: calc(63 * var(--u));
    right: calc(63 * var(--u));
    top: calc(74.6 * var(--u));
    transform: translateY(-50%);
  }
  .site-nav { gap: calc(47 * var(--u)); }
  .hdr-link { font-size: calc(19 * var(--u)); }
  .site-header__logo { width: calc(207.5 * var(--u)); height: calc(87.3 * var(--u)); }
  .hdr-search { gap: calc(12.3 * var(--u)); }
  .hdr-search .icon { width: calc(23 * var(--u)); height: calc(23 * var(--u)); stroke-width: 2.7; }
  .hdr-account { margin-left: calc(47.5 * var(--u)); }
  .hdr-cart { margin-left: calc(74.5 * var(--u)); width: calc(36 * var(--u)); height: calc(36 * var(--u)); }
  .hdr-cart .icon { stroke-width: 2.6; }
}

@media (max-width: 900px) {
  .site-header { height: 64px; }
  .site-header__row { left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); top: 32px; transform: translateY(-50%); }
  .site-nav, .hdr-account, .hdr-search span { display: none; }
  .menu-btn { display: inline-flex; width: 28px; height: 28px; align-items: center; }
  .menu-btn .icon { width: 24px; height: 24px; stroke-width: 1.8; }
  .site-header__logo { width: 104px; height: 44px; }
  .hdr-search .icon { width: 21px; height: 21px; stroke-width: 2.2; }
  .hdr-cart { margin-left: 20px; width: 28px; height: 28px; }
  .hdr-cart .icon { stroke-width: 2.2; }
}

/* Compact bar that follows the reader once the header has scrolled away. */
.sticky-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: calc(64px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(28px, env(safe-area-inset-left, 0px));
  padding-right: max(28px, env(safe-area-inset-right, 0px));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--bar-bg);
  color: var(--bar-fg);
  border-bottom: 1px solid var(--bar-line);
  transform: translateY(-101%);
  transition: transform .35s var(--ease);
}
.sticky-bar.is-visible { transform: none; }
.sticky-bar .site-nav { gap: 30px; }
.sticky-bar .hdr-link { font-size: 13px; letter-spacing: .08em; }
.sticky-bar .site-header__logo { width: 92px; height: 39px; color: var(--bar-fg); }
.sticky-bar .hdr-search { gap: 8px; }
.sticky-bar .hdr-search .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.sticky-bar .hdr-account { margin-left: 30px; }
.sticky-bar .hdr-cart { margin-left: 34px; width: 24px; height: 24px; }
.sticky-bar .hdr-cart .icon { stroke-width: 2.2; }
@media (max-width: 900px) {
  .sticky-bar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .sticky-bar .site-nav, .sticky-bar .hdr-account, .sticky-bar .hdr-search span { display: none; }
  .sticky-bar .menu-btn { display: inline-flex; }
  .sticky-bar .hdr-search .icon { width: 20px; height: 20px; }
  .sticky-bar .hdr-cart { margin-left: 20px; width: 26px; height: 26px; }
}

/* ---------------------------------------------------------------------------
   Buttons and arrows
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--paper);
  color: var(--ink);
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { background: #fffaf0; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--outline {
  background: transparent;
  color: var(--bone-2);
  box-shadow: inset 0 0 0 1.5px rgba(240, 233, 221, .95);
}
.btn--outline:hover { background: rgba(244, 234, 214, .1); box-shadow: inset 0 0 0 1px #f4ead6; }

.arrow { display: block; flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 901px) {
  .btn { height: calc(89.4 * var(--u)); gap: calc(15 * var(--u)); font-size: calc(20 * var(--u)); }
  .btn .arrow { width: calc(23 * var(--u)); height: calc(13 * var(--u)); stroke-width: 1.7; }
}
@media (max-width: 900px) {
  .btn { height: 52px; padding-inline: 26px; gap: 12px; font-size: 13px; }
  .btn .arrow { width: 18px; height: 10px; stroke-width: 1.6; }
}

/* ---------------------------------------------------------------------------
   Section heading row: title, hairline, view all
   --------------------------------------------------------------------------- */
.sec-head { position: relative; display: flex; align-items: center; }
.sec-head__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.sec-head__rule { flex: 1 1 auto; height: 1px; background: var(--rule); }
.view-all {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.view-all:hover { color: var(--ink); }
.view-all .arrow { transition: transform .25s var(--ease); }
.view-all:hover .arrow { transform: translateX(3px); }

@media (min-width: 901px) {
  .view-all { font-size: calc(18.8 * var(--u)); gap: calc(13.5 * var(--u)); }
  .view-all .arrow { width: calc(20 * var(--u)); height: calc(11 * var(--u)); stroke-width: 1.5; }
}
@media (max-width: 900px) {
  .sec-head { gap: 14px; }
  .sec-head__title { font-size: 26px; letter-spacing: -.02em; }
  .view-all { font-size: 12px; gap: 8px; }
  .view-all .arrow { width: 15px; height: 9px; stroke-width: 1.5; }
}

/* ---------------------------------------------------------------------------
   Product cards
   --------------------------------------------------------------------------- */
.product { position: relative; min-width: 0; }
.product__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #efeae2;
}
.product__media img { transition: transform .6s var(--ease); }
.product__media:hover img { transform: scale(1.035); }
.product__name {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .004em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.product__name button { text-transform: inherit; letter-spacing: inherit; text-align: left; }
.product__name button:hover { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.product__price {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .03em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.swatches { display: flex; align-items: center; }
.swatch {
  position: relative;
  flex: none;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
  transition: transform .2s var(--ease);
}
.swatch::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.swatch:hover { transform: scale(1.08); }
/* The selected ring appears once a shopper picks a color, so the cards open exactly as designed. */
.swatches.is-touched .swatch[aria-checked="true"]::after,
.qv .swatch[aria-checked="true"]::after { border-color: rgba(20, 19, 17, .55); }

@media (min-width: 901px) {
  .product__name, .product__price { font-size: calc(20 * var(--u)); }
  .swatches { gap: calc(8.7 * var(--u)); }
  .swatch { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
  .swatch::after { inset: calc(-4 * var(--u)); }
}
@media (max-width: 900px) {
  .product__name { font-size: 12.5px; margin-top: 12px; }
  .product__price { font-size: 12.5px; margin-top: 4px; }
  .swatches { gap: 7px; margin-top: 10px; }
  .swatch { width: 15px; height: 15px; }
  .swatch::after { inset: -3px; }
}

/* ---------------------------------------------------------------------------
   Category tiles
   --------------------------------------------------------------------------- */
.cat {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  color: var(--bone-2);
}
.cat .media { z-index: -1; transition: transform .7s var(--ease); }
.cat:hover .media { transform: scale(1.04); }
.cat__label {
  display: block;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cat__shop {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.cat__shop .arrow { transition: transform .25s var(--ease); }
.cat:hover .cat__shop .arrow { transform: translateX(4px); }

/* ---------------------------------------------------------------------------
   Overlays: scrim, drawer, dialogs, search, film, toast
   (px based on purpose: they sit above the scaled page)
   --------------------------------------------------------------------------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 9, 8, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.layer { color: var(--ink); font-family: var(--sans); }
.layer[hidden] { display: none !important; }

/* Cart drawer */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--cream);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .5);
  transform: translateX(102%);
  transition: transform .4s var(--ease);
}
.drawer.is-open { transform: none; }
.layer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid #e2dcd1;
}
.layer__title { margin: 0; font: 400 26px/1.1 var(--serif); text-transform: uppercase; letter-spacing: -.01em; }
.layer__close {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color .2s;
}
.layer__close:hover { background: rgba(0, 0, 0, .06); }
.layer__close .icon { width: 18px; height: 18px; stroke-width: 1.6; }

.cart-lines { flex: 1 1 auto; overflow-y: auto; margin: 0; padding: 8px 24px; list-style: none; }
.cart-line { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid #e7e1d6; }
.cart-line img { width: 76px; height: 93px; object-fit: cover; background: #efeae2; }
.cart-line__name { margin: 0 0 4px; font: 500 13px/1.3 var(--sans); letter-spacing: .03em; text-transform: uppercase; }
.cart-line__meta { margin: 0; font: 400 12.5px/1.4 var(--sans); color: var(--ink-3); }
.cart-line__price { font: 500 13px/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; margin-top: 12px; border: 1px solid #d8d1c4; }
.qty button { width: 30px; height: 30px; font-size: 15px; }
.qty button:hover { background: rgba(0, 0, 0, .05); }
.qty output { min-width: 26px; text-align: center; font: 500 13px/30px var(--sans); font-variant-numeric: tabular-nums; }
.cart-line__remove { margin-top: 10px; font: 400 12px/1 var(--sans); color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.cart-empty { padding: 48px 24px; text-align: center; }
.cart-empty p { margin: 0 0 22px; font: 400 15px/1.5 var(--sans); color: var(--ink-3); }
.cart-foot { padding: 20px 24px 24px; border-top: 1px solid #e2dcd1; }
.cart-total { display: flex; justify-content: space-between; margin: 0 0 6px; font: 500 15px/1.3 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.cart-note { margin: 0 0 18px; font: 400 12.5px/1.5 var(--sans); color: var(--ink-3); }
.btn--block { width: 100%; height: 54px; font-size: 13px; gap: 12px; background: var(--ink); color: var(--cream); }
.btn--block:hover { background: #2a2722; color: #fff; }
.btn--block .arrow { width: 18px; height: 10px; stroke-width: 1.6; }

/* Dialogs */
.dialog {
  position: fixed;
  z-index: 70;
  top: 50%;
  left: 50%;
  width: min(920px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  overflow: auto;
  background: var(--cream);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .65);
  opacity: 0;
  transform: translate(-50%, -46%);
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.dialog.is-open { opacity: 1; transform: translate(-50%, -50%); }
.dialog--narrow { width: min(460px, calc(100% - 32px)); }
.dialog__body { padding: 28px 28px 30px; }
.dialog__lede { margin: 0 0 22px; font: 400 15px/1.55 var(--sans); color: var(--ink-3); }

.field { display: grid; gap: 8px; margin-bottom: 14px; }
.field label { font: 500 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: 400 15px/1.3 var(--sans);
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid #d6cfc2;
  border-radius: 0;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: #9b2c1f; }
.form-status { min-height: 1.4em; margin: 12px 0 0; font: 400 13.5px/1.45 var(--sans); color: var(--ink-3); }
.form-status.is-error { color: #9b2c1f; }
.form-status.is-ok { color: #2f5a35; }

/* Quick view */
.qv { display: grid; grid-template-columns: 1fr 1fr; }
.qv__media { position: relative; aspect-ratio: 4 / 5; background: #efeae2; }
.qv__info { display: flex; flex-direction: column; padding: 30px 32px; }
.qv__close { align-self: flex-end; margin: -10px -12px 4px 0; }
.qv__name { margin: 0 0 8px; font: 400 34px/1.05 var(--serif); text-transform: uppercase; letter-spacing: -.02em; }
.qv__price { margin: 0 0 24px; font: 500 16px/1 var(--sans); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.qv__label { margin: 0 0 10px; font: 500 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.qv__label span { color: var(--ink-3); font-weight: 400; letter-spacing: .04em; text-transform: none; margin-left: 6px; }
.qv .swatches { gap: 10px; margin-bottom: 22px; }
.qv .swatch { width: 26px; height: 26px; }
.qv .swatch::after { inset: -5px; }
.sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 26px; }
.size {
  height: 42px;
  border: 1px solid #d6cfc2;
  font: 500 13px/1 var(--sans);
  letter-spacing: .06em;
  transition: background-color .2s, color .2s, border-color .2s;
}
.size:hover { border-color: var(--ink); }
.size[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.qv__note { margin: 14px 0 0; font: 400 13px/1.5 var(--sans); color: var(--ink-3); }

/* Search and shop overlay */
.search {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  max-height: 100%;
  overflow-y: auto;
  background: var(--cream);
  padding-top: env(safe-area-inset-top, 0px);
  transform: translateY(-102%);
  transition: transform .4s var(--ease);
}
.search.is-open { transform: none; }
.search__inner { width: min(1200px, 100%); margin: 0 auto; padding: 26px max(24px, env(safe-area-inset-right, 0px)) 40px max(24px, env(safe-area-inset-left, 0px)); }
.search__bar { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--ink); }
.search__bar .icon { width: 22px; height: 22px; stroke-width: 2; }
.search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 64px;
  border: 0;
  background: transparent;
  font: 400 30px/1 var(--serif);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: -.01em;
}
.search__input::placeholder { color: #a8a196; }
.search__input::-webkit-search-cancel-button,
.search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search__input:focus { outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 26px; }
.chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d6cfc2;
  font: 500 11.5px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.result { text-align: left; }
.result__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #efeae2; }
.result__media img { transition: transform .6s var(--ease); }
.result:hover .result__media img { transform: scale(1.04); }
.result__name { margin: 12px 0 4px; font: 500 12.5px/1.3 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.result__price { margin: 0; font: 500 12.5px/1.3 var(--sans); letter-spacing: .04em; color: var(--ink-3); }
.results-empty { grid-column: 1 / -1; padding: 28px 0 8px; font: 400 15px/1.5 var(--sans); color: var(--ink-3); }
.results-count { margin: 0 0 14px; font: 500 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* Mobile menu */
.menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 70;
  width: min(360px, 88%);
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--bone);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  transform: translateX(-102%);
  transition: transform .4s var(--ease);
}
.menu.is-open { transform: none; }
.menu .layer__head { border-color: rgba(255, 255, 255, .12); }
.menu .layer__close:hover { background: rgba(255, 255, 255, .08); }
.menu__logo { width: 92px; height: 39px; color: var(--bone); }
.menu__logo svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.menu__links { margin: 0; padding: 18px 24px; list-style: none; }
.menu__links a, .menu__links button {
  display: block;
  width: 100%;
  padding: 14px 0;
  font: 400 30px/1.05 var(--serif);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: -.01em;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

/* Film player */
.film {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #050505;
  color: var(--bone);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.film.is-open { opacity: 1; pointer-events: auto; }
.film__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px));
}
.film__logo { width: 92px; height: 39px; color: var(--bone); }
.film__logo svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.film .layer__close { color: var(--bone); }
.film .layer__close:hover { background: rgba(255, 255, 255, .1); }
.film__stage { position: relative; overflow: hidden; }
.film__frame { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.film__frame.is-active { opacity: 1; }
.film__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.film__frame.is-active img { animation: kenburns 6.5s linear both; }
.film__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0) 55%); }
.film__caption {
  position: absolute;
  z-index: 1;
  left: max(24px, 5vw);
  right: max(24px, 5vw);
  bottom: max(26px, 6vh);
  margin: 0;
  font: 400 clamp(38px, 7vw, 104px)/.95 var(--serif);
  text-transform: uppercase;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.film__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px max(20px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
}
.film__toggle { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.film__toggle .icon { width: 14px; height: 14px; }
.film__progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; flex: 1 1 auto; }
.film__seg { height: 2px; background: rgba(255, 255, 255, .22); overflow: hidden; border: 0; padding: 0; }
.film__seg i { display: block; height: 100%; width: 0; background: var(--bone); }
.film__count { font: 500 12px/1 var(--sans); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
@keyframes kenburns { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }

/* Toast */
.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  background: var(--ink);
  color: var(--cream);
  font: 500 13px/1.4 var(--sans);
  letter-spacing: .03em;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Way back to the three-concept board when a page was opened from it. */
.board-link {
  position: fixed;
  z-index: 50;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 12px;
  border-radius: 18px;
  background: rgba(16, 16, 15, .78);
  color: #f4ede1;
  font: 500 11.5px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}
.board-link .arrow { width: 14px; height: 8px; stroke-width: 1.6; transform: scaleX(-1); }
.board-link:hover { background: rgba(16, 16, 15, .92); }

@media (max-width: 700px) {
  .qv { grid-template-columns: 1fr; }
  .qv__media { aspect-ratio: 1 / 1; }
  .qv__info { padding: 22px 20px 24px; }
  .qv__name { font-size: 28px; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .search__input { font-size: 22px; height: 56px; }
}

/* Embedded in the concept board: no chrome. */
html.is-embedded { scrollbar-gutter: auto; overflow: hidden; }
html.is-embedded body { overflow: hidden; }
html.is-embedded .sticky-bar,
html.is-embedded .board-link { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
