/* Amber Runway motion gallery preview.
   Palette B · Olive & Moss. Geist self-hosted (OFL). */

@font-face{
  font-family:"Geist";
  src:url("/fonts-geist/Geist-Regular-latin.woff2") format("woff2");
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Geist";
  src:url("/fonts-geist/Geist-Medium-latin.woff2") format("woff2");
  font-weight:500; font-style:normal; font-display:swap;
}

:root {
  --ar-ground: #F3EEE2;
  --ar-card: #E6E3CE;
  --ar-card2: #EBE8D7;
  --ar-ink: #1E1F15;
  --ar-deep: #0F100A;
  --ar-lift: #3D4128;
  --ar-muted: #5A5E3B;
  --ar-soft: #C9C8A6;
  --ar-accent: #86914C;
  --ar-amber: #FFA51F;

  --ar-font: "Geist", system-ui, -apple-system, sans-serif;
  --ar-font-display: var(--ar-font);
  --ar-font-serif: var(--ar-font);
  --ar-font-ui: var(--ar-font);

  --ar-paper: var(--ar-ground);
  --ar-blush: var(--ar-card);
  --ar-oxblood: var(--ar-ink);
  --ar-oxblood-deep: var(--ar-deep);
  --ar-oxblood-lift: var(--ar-lift);
  --ar-rose: var(--ar-soft);
  --ar-rose-deep: var(--ar-muted);
  --ar-display: var(--ar-ink);
  --ar-focus: var(--ar-ink);
  --ar-ground-warm: var(--ar-card2);

  --ar-ui-ink: var(--ar-ink);
  --ar-ui-frost: rgb(243 238 226 / 0.72);
  --ar-ui-frost-hover: rgb(243 238 226 / 0.92);
  --ar-frost-bar: rgb(243 238 226 / 0.94);
  --ar-glass-blur: blur(18px) saturate(1.6);
  --ar-glass-edge: inset 0 0 0 1px rgb(255 255 255 / 0.55);
  --ar-glass-line: 0 0 0 1px rgb(30 31 21 / 0.06);
  --ar-glass-line-hover: 0 0 0 1px rgb(30 31 21 / 0.1);

  --ar-line: color-mix(in srgb, var(--ar-soft) 80%, transparent);
  --ar-tile-line: color-mix(in srgb, var(--ar-soft) 90%, transparent);
  --ar-gutter: clamp(16px, 2.5vw, 32px);
  --ar-text-body: 1rem;
  --ar-leading-body: 1.5;
  --ar-caps-size: 11px;
  --ar-caps-size-sm: 9px;
  --ar-caps-tracking: 0.22em;
  --ar-headline-tracking: -0.03em;
}

html { background: var(--ar-ground); }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ar-font);
  font-weight: 400;
  font-size: var(--ar-text-body);
  line-height: var(--ar-leading-body);
  letter-spacing: -0.011em;
  color: var(--ar-ink);
  background: var(--ar-ground);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ar-lift); }
img, video { display: block; max-width: 100%; height: auto; }
pre[hidden], [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ar-ink); outline-offset: 3px; }

/* ---- header ---- */
.site-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  padding: 18px var(--ar-gutter);
  background: var(--ar-frost-bar);
  -webkit-backdrop-filter: var(--ar-glass-blur);
  backdrop-filter: var(--ar-glass-blur);
}
.logo { display: flex; align-items: center; flex: 0 0 auto; }
.logo:hover { color: inherit; }
.logo-img { width: 220px; height: auto; }
.bar-note {
  margin: 0;
  font-size: var(--ar-caps-size-sm);
  font-weight: 500;
  letter-spacing: var(--ar-caps-tracking);
  text-transform: uppercase;
  color: var(--ar-muted);
  text-align: right;
  max-width: 18em;
  white-space: nowrap;
}
a.bar-note:hover { color: var(--ar-ink); }
@media (max-width: 719px) {
  .site-bar { min-height: 72px; padding: 12px var(--ar-gutter); }
  .logo-img { width: 176px; }
  .bar-note { display: none; }
}

/* ---- filters ---- */
.filters {
  box-sizing: border-box;
  position: sticky;
  top: 88px;
  z-index: 30;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: color-mix(in srgb, var(--ar-ground) 96%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
}
@media (max-width: 719px) {
  .filters { top: 72px; }
}
.filters::after {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 48px;
  pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ar-ground) 0%, transparent), color-mix(in srgb, var(--ar-ground) 92%, transparent));
}
.filters-inner {
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  padding: 10px var(--ar-gutter);
  padding-right: calc(var(--ar-gutter) + 36px);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filters-inner::-webkit-scrollbar { display: none; }
.filter {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: var(--ar-caps-size-sm);
  font-weight: 500;
  letter-spacing: var(--ar-caps-tracking);
  text-transform: uppercase;
  color: var(--ar-muted);
  background: transparent;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.filter:hover { color: var(--ar-ink); }
.filter.is-on {
  color: var(--ar-ink);
  background: color-mix(in srgb, var(--ar-soft) 55%, var(--ar-ground));
}

/* ---- grid ---- */
.wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 12px var(--ar-gutter) 96px;
  max-width: 1440px;
  margin: 0 auto;
}
/* 2+3 rhythm fills 14 tiles (and 10) without a half-empty last row. */
.tile:nth-child(5n+1 of :not(.is-hidden)),
.tile:nth-child(5n+2 of :not(.is-hidden)) { grid-column: span 3; }
.tile:nth-child(5n+3 of :not(.is-hidden)),
.tile:nth-child(5n+4 of :not(.is-hidden)),
.tile:nth-child(5n+5 of :not(.is-hidden)) { grid-column: span 2; }
@media (max-width: 819px) {
  .wall { grid-template-columns: 1fr; }
  .tile { grid-column: 1 / -1; }
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ar-card2);
  color: var(--ar-ink);
  isolation: isolate;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--stagger, 0s);
}
.tile.is-in {
  opacity: 1;
  transform: none;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--ar-tile-line);
}
.tile:hover, .tile:focus-visible, .tile.is-on { color: var(--ar-ink); }
.tile-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ar-card2);
  border-radius: inherit;
}
.tile-stage * { pointer-events: none; }
.tile-poster,
.tile-clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}
.tile-clip {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tile.is-on .tile-clip { opacity: 1; }
.tile-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--ar-ground) 78%, transparent) 100%);
}
.tile-caption h2 {
  margin: 0;
  font-family: var(--ar-font);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: var(--ar-headline-tracking);
  color: var(--ar-ink);
  line-height: 1.2;
}
.tile-tags {
  margin: 0;
  font-size: var(--ar-caps-size-sm);
  font-weight: 500;
  letter-spacing: var(--ar-caps-tracking);
  text-transform: uppercase;
  color: var(--ar-muted);
  text-align: right;
  max-width: 45%;
}
.tile.is-hidden { display: none; }

@media (prefers-reduced-motion: reduce) {
  .tile {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .tile-clip { display: none; }
}

/* ---- item page ---- */
body.is-item {
  overflow: hidden;
  background: var(--ar-ground);
}
body.is-item .site-foot { display: none; }
.item-main { padding: 0; }
.item-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100%;
  background: var(--ar-ground-warm);
  overflow: hidden;
}
.item-stage iframe,
.item-stage .full,
.item-stage .mx {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--ar-ground-warm);
}

/* Floating frost pills. The glass itself fades, not an ancestor opacity. */
.ui-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin: 0;
  padding: 0.55em 0.95em;
  border: 0;
  border-radius: 999px;
  background: var(--ar-ui-frost);
  -webkit-backdrop-filter: var(--ar-glass-blur);
  backdrop-filter: var(--ar-glass-blur);
  box-shadow: var(--ar-glass-edge), var(--ar-glass-line);
  color: var(--ar-ui-ink);
  font-family: var(--ar-font);
  font-size: var(--ar-caps-size);
  font-weight: 400;
  letter-spacing: var(--ar-caps-tracking);
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease, -webkit-backdrop-filter 0.25s ease;
}
.ui-pill:hover {
  color: var(--ar-ui-ink);
  background: var(--ar-ui-frost-hover);
  box-shadow: var(--ar-glass-edge), var(--ar-glass-line-hover);
}
.ui-pill svg,
.ui-chevron {
  width: 12px;
  height: 12px;
  max-width: 12px;
  max-height: 12px;
  display: block;
  flex: 0 0 12px;
  overflow: visible;
  transition: transform 0.25s ease;
}
.ui-back:hover .ui-chevron { transform: translateX(-3px); }
.ui-back {
  position: fixed;
  top: 4.5vw;
  left: 4.5vw;
  z-index: 50;
}
.ui-actions {
  position: fixed;
  top: 4.5vw;
  right: 4.5vw;
  z-index: 50;
  display: flex;
  gap: 0.6rem;
}
body.is-item .btn-copy.is-copied {
  background: var(--ar-ui-frost-hover);
  color: var(--ar-ui-ink);
  border: 0;
}
@media (max-width: 719px) {
  .ui-back, .ui-actions { top: 5vw; }
  .ui-back { left: 5vw; }
  .ui-actions { right: 5vw; }
  .ui-pill { font-size: 10px; padding: 0.5em 0.85em; }
}

.site-foot {
  max-width: none;
  margin: 0;
  padding: 48px var(--ar-gutter) 56px;
  background: var(--ar-lift);
  border-top: 0;
  color: var(--ar-ground);
}
.site-foot p {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
  color: var(--ar-ground);
}
.site-foot p + p { margin-top: 6px; }
