/* ==========================================================================
   MONEGAI — the diamond drawer
   The single way in: the same jewel mark as the browser shell. One file,
   linked by every page, including the self-contained landing page, so the
   menu is identical everywhere and never collides with page-level styles.
   ========================================================================== */

:root {
  --dm-ground: #050505;
  --dm-text: #e9e6df;
  --dm-muted: #999b9c;
  --dm-gold: #b7a47b;
  --dm-line: rgba(226, 230, 232, 0.16);
  --dm-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Set by nav.js so the jewel sits at exactly the logo's inset from the
     edge. These are only the fallback for when scripting is unavailable:
     index keeps the logo at 38px / 5.5vw, the inner pages centre it in a
     68px bar, which lands the mark at 23px. */
  --dm-x: 5.5vw;
  --dm-y: 38px;
}

/* ---------- the jewel ----------
   Mirrors the browser's .oyster-trigger exactly: same glyph, same 44px
   circle, same gold, same fill, same blur. */
.dm-trigger {
  position: fixed;
  z-index: 90;
  top: var(--dm-y);
  right: var(--dm-x);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #d4af37;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 250ms ease, background 250ms ease;
}

.dm-trigger:hover {
  border-color: rgba(212, 175, 55, 0.7);
  background: rgba(255, 255, 255, 0.11);
}

.dm-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(212, 175, 55, 0.7);
}

/* ---------- overlay ---------- */
.dm-scrim {
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.dm-scrim[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.dm-panel {
  position: fixed;
  z-index: 91;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  display: flex;
  flex-direction: column;
  padding: 34px clamp(24px, 6vw, 46px);
  background: var(--dm-ground);
  border-left: 1px solid var(--dm-line);
  transform: translateX(100%);
  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow-y: auto;
}

.dm-panel[data-open="true"] {
  transform: none;
}

.dm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--dm-line);
}

.dm-mark {
  color: var(--dm-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.dm-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--dm-line);
  border-radius: 999px;
  background: none;
  color: var(--dm-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color 250ms ease, border-color 250ms ease;
}

.dm-close:hover {
  color: var(--dm-gold);
  border-color: rgba(183, 164, 123, 0.5);
}

/* ---------- the list ---------- */
.dm-list {
  display: flex;
  flex-direction: column;
  padding: 8px 0 0;
}

.dm-copy {
  margin: 26px 0 0;
  color: rgba(233, 230, 223, 0.4);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.dm-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--dm-line);
  color: var(--dm-text);
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 250ms ease, padding-left 250ms ease;
}

.dm-item:hover,
.dm-item:focus-visible {
  color: var(--dm-gold);
  padding-left: 8px;
}

.dm-item[aria-current="page"] {
  color: var(--dm-gold);
}

.dm-item small {
  color: var(--dm-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- language ---------- */
.dm-lang {
  margin-top: auto;
  padding-top: 26px;
}

.dm-lang-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--dm-line);
  border-bottom: 1px solid var(--dm-line);
  background: none;
  color: var(--dm-muted);
  font: 500 11px var(--dm-sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 250ms ease;
}

.dm-lang-toggle:hover {
  color: var(--dm-gold);
}

.dm-lang-toggle .dm-globe {
  font-size: 15px;
  line-height: 1;
}

.dm-lang-toggle .dm-caret {
  margin-left: auto;
  transition: transform 250ms ease;
}

.dm-lang-toggle[aria-expanded="true"] .dm-caret {
  transform: rotate(180deg);
}

.dm-lang-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms cubic-bezier(0.2, 0.7, 0.2, 1), padding 320ms ease;
}

.dm-lang-list[data-open="true"] {
  max-height: 200px;
  padding: 18px 0 4px;
}

.dm-lang {
  padding: 9px 18px;
  border: 1px solid var(--dm-line);
  border-radius: 999px;
  background: none;
  color: var(--dm-muted);
  font: 500 11px var(--dm-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 250ms ease, border-color 250ms ease;
}

.dm-lang:hover {
  color: var(--dm-gold);
  border-color: rgba(183, 164, 123, 0.45);
}

.dm-lang[aria-pressed="true"] {
  color: var(--dm-gold);
  border-color: rgba(183, 164, 123, 0.7);
  background: rgba(183, 164, 123, 0.08);
}

/* the landing page hides overflow, so make sure the drawer can still scroll */
@media (max-width: 560px) {
  .dm-trigger {
    top: var(--dm-y);
    right: var(--dm-x);
  }

  .dm-panel {
    width: 100vw;
    padding: 24px 22px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dm-panel,
  .dm-scrim,
  .dm-lang-list,
  .dm-caret {
    transition-duration: 0.01ms !important;
  }
}