/* =========================================================
   Components (mirror the Figma components)
   ========================================================= */

/* ---------- Button 016 (Osmo Supply), used for every button and text link ----------
   Resource CSS below is unchanged. EAST/CNTRL styling happens through its
   variables (documented way: scoped variables per variant), right after it. */
:root {
  --button-016-color: #121212;
  --button-016-color-background: #fff;
  --button-016-hover-color: #fff;
  --button-016-hover-color-background: #121212;
  --button-016-border: 0;
  --button-016-color-focus: #000;
  --button-016-padding: 0.75em 1em;
  --button-016-border-radius: 2.5em;
  --button-016-text-duplicate-distance: 2lh;
  --button-016-focus-inset: -0.125em;
  --button-016-ease-hover: cubic-bezier(0.785, 0.135, 0.15, 0.86);
  --button-016-ease-focus: cubic-bezier(0.32, 0.72, 0, 1);
}

.button-016 {
  -webkit-user-select: none;
  user-select: none;
  color: var(--button-016-color);
  background-color: #0000;
  outline-style: none;
  padding: 0;
  line-height: 1;
  text-decoration: none;
  display: inline-grid;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.325s var(--button-016-ease-hover);
}

.button-016::after {
  content: '';
  display: block;
  position: absolute;
  inset: var(--button-016-focus-inset);
  border-radius: var(--button-016-border-radius);
  transition: box-shadow 0.3s var(--button-016-ease-focus);
  pointer-events: none;
  z-index: 1;
}

.button-016:is(:focus-visible)::after {
  box-shadow: 0 0 0 0.125em var(--button-016-color-focus);
}

.button-016__inner {
  pointer-events: none;
  border-radius: var(--button-016-border-radius);
  border: var(--button-016-border);
  z-index: 1;
  padding: var(--button-016-padding);
  grid-area: 1 / 1;
  justify-content: center;
  align-items: center;
  display: flex;
  overflow: clip;
}

.button-016__text {
  text-shadow: 0 var(--button-016-text-duplicate-distance) 0 currentColor;
  transition: translate 0.3s var(--button-016-ease-hover);
}

.button-016__bg {
  pointer-events: none;
  border-radius: var(--button-016-border-radius);
  background-color: var(--button-016-color-background);
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  padding: 0;
  transition: background-color 0.325s var(--button-016-ease-hover);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .button-016:is(:hover, :focus-visible),
  [data-hover]:is(:hover, :focus-visible) .button-016 {
    color: var(--button-016-hover-color);
  }

  .button-016:is(:hover, :focus-visible) .button-016__text,
  [data-hover]:is(:hover, :focus-visible) .button-016 .button-016__text {
    translate: 0 calc(var(--button-016-text-duplicate-distance) * -1) 0;
  }

  .button-016:is(:hover, :focus-visible) .button-016__bg,
  [data-hover]:is(:hover, :focus-visible) .button-016 .button-016__bg {
    background-color: var(--button-016-hover-color-background);
  }
}

/* ---------- EAST/CNTRL theme for Button 016 ---------- */

/* house easing for every hover (on :root so the tweak drawer can still override it) */
:root { --button-016-ease-hover: var(--ease-snap); }

/* Default (primary CTA): orange with white text; hover turns black in light, white in dark */
.button-016 {
  --button-016-color: var(--color-accent-on);
  --button-016-color-background: var(--color-accent-surface);
  --button-016-hover-color: light-dark(var(--neutral-50), var(--neutral-950));
  --button-016-hover-color-background: var(--color-text-primary);
  --button-016-color-focus: var(--color-border-strong);
  --button-016-padding: 1.0625rem 1.25rem;          /* 50px high, as in Figma */
  --button-016-border-radius: var(--radius);
  white-space: nowrap;
}
.button-016:not([data-variant]) { font-size: var(--fs-body); font-weight: 500; }

/* Link: no surface, same text roll (menu, slider nav, footer) */
.button-016[data-variant='link'] {
  --button-016-color: var(--color-text-primary);
  --button-016-color-background: transparent;
  --button-016-hover-color: var(--color-link-hover);
  --button-016-hover-color-background: transparent;
  --button-016-padding: 0.12em 0;          /* room for descenders (g, p) inside the clip */
  --button-016-focus-inset: -0.25em;
  margin-block: -0.12em;                    /* ...without changing the layout */
  justify-self: start;                      /* keep its own width inside grid parents */
}

/* slider ends */
.button-016:disabled {
  --button-016-color: var(--color-text-secondary);
  cursor: default;
  pointer-events: none;
}

/* ---------- Tag (e.g. "Coming soon"): a rotated button-like sticker ---------- */
.tag {
  position: absolute;
  padding: 0.875rem 1.25rem;
  background: var(--color-accent-surface);
  color: var(--color-accent-on);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  white-space: nowrap;
  rotate: -11.5deg;
  pointer-events: none;
}

/* ---------- Media: photo with fixed ratio, grayscale like Figma (saturation -1) ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 4 / 3);
  background: var(--color-bg-media);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
/* pixel reveal (js/pixel-reveal.js): canvas over the photo while it builds up */
.pixel-reveal { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; filter: grayscale(1); pointer-events: none; }

/* parallax (js/parallax.js): the photo overhangs the mask so it can move without gaps.
   --parallax-overhang must cover the yPercent of data-parallax-start/end: o >= p / (1 - 2p) */
.media[data-parallax='trigger'] { --parallax-overhang: 10%; }
.media [data-parallax='target'] {
  position: absolute;
  inset: calc(var(--parallax-overhang) * -1) 0;
  height: calc(100% + 2 * var(--parallax-overhang));
}

/* ---------- Meta rows: key / value list ---------- */
.meta { display: grid; }
.meta__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-16);
  padding-block: var(--space-8);
  border-top: 1px solid var(--color-border-default);
}
.meta dt { color: var(--color-text-secondary); }
.meta dd { text-align: right; }

/* ---------- Heading with bracket label on the baseline: (01) Meetups ---------- */
.indexed {
  display: flex;
  align-items: baseline;
  gap: var(--space-16);
}
.indexed__label { flex-shrink: 0; color: var(--color-text-secondary); }

/* ---------- Slide card (Terugblik) ---------- */
.slide-card { display: grid; gap: var(--space-12); }
.slide-card .media { aspect-ratio: var(--ratio); }
.slide-card figcaption { display: grid; gap: 2px; }
.slide-card time { color: var(--color-text-secondary); }

/* ---------- Tweak drawer (js/tweak.js, Tweakpane), dev only ---------- */
.tweak {
  position: fixed;
  inset-block: 0;
  right: 0;
  z-index: 1000;
  width: min(22rem, 100vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-12);
  background: #28292e;                       /* Tweakpane's own surface */
  color: #bbbcc4;
  font: 500 0.75rem/1.4 var(--font);
  translate: 100% 0;
  transition: translate 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --tp-base-border-radius: 0;
  --tp-blade-border-radius: 0;
  --tp-base-font-family: var(--font);
}
.tweak-tab {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 1001;
  padding: var(--space-12) var(--space-8);
  background: var(--color-accent-surface);
  color: var(--color-accent-on);
  font: 500 var(--fs-label) / 1 var(--font);
  letter-spacing: 0.02em;
  writing-mode: vertical-rl;
  rotate: 180deg;
  translate: 0 -50%;
  cursor: pointer;
  transition: right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.is-tweak-open .tweak { translate: 0 0; }
.is-tweak-open .tweak-tab { right: min(22rem, 100vw - 2.5rem); }
@media (prefers-reduced-motion: reduce) {
  .tweak, .tweak-tab { transition: none; }
}
