/* ============================================================
   WELCOME — six cards, moving sideways
   ============================================================
   Shares theme.css, so it wears whatever palette the page is in.
   ============================================================ */

.wel {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px 18px;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 260ms var(--ease);
}
.wel.is-in { opacity: 1; }

.wel__panel {
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-solid);
  box-shadow: 0 40px 100px -40px var(--shadow-deep), 0 0 70px -40px var(--glow);
  transform: translateY(12px) scale(.985);
  transition: transform 320ms var(--ease);
  overflow: hidden;
}
.wel.is-in .wel__panel { transform: none; }

/* ---------- head: the numbers are the navigation ---------- */

.wel__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.wel__mark {
  font: 700 9.5px/1 var(--mono);
  letter-spacing: .28em;
  color: var(--accent);
  white-space: nowrap;
}

.wel__nums {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.wel__num {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  padding: 6px 7px;
  cursor: pointer;
  font: 700 9px/1 var(--mono);
  letter-spacing: .08em;
  color: var(--ink-faint);
  transition: all 200ms var(--ease);
}
.wel__num:hover { color: var(--ink-dim); }
.wel__num.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--hover);
}
.wel__num:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wel__x {
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-size: 14px;
  line-height: 1;
  padding: 4px 2px;
  cursor: pointer;
  transition: color 200ms var(--ease);
}
.wel__x:hover { color: var(--ink); }
.wel__x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- the cards ---------- */

.wel__window {
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}
.wel__window:active { cursor: grabbing; }

.wel__track {
  display: flex;
  transition: transform 420ms var(--ease);
  will-change: transform;
}

.wel__card {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 34px 26px 30px;
  /* every card the height of the tallest, so the panel never jumps */
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  user-select: none;
}

.wel__h {
  margin: 0 0 12px;
  font-size: clamp(20px, 4.6vw, 26px);
  font-weight: 620;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
}

.wel__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.wel__note {
  margin: 16px 0 0;
  padding-left: 12px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  font: 500 12px/1.6 var(--mono);
  letter-spacing: .02em;
  color: var(--ink-faint);
}

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

.wel__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line-soft);
}

.wel__prev,
.wel__next {
  border-radius: 9px;
  padding: 10px 18px;
  cursor: pointer;
  font: 700 9.5px/1 var(--mono);
  letter-spacing: .16em;
  transition: all 200ms var(--ease);
}

.wel__prev {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-faint);
}
.wel__prev:hover:not(:disabled) { color: var(--ink-dim); border-color: var(--ink-faint); }
.wel__prev:disabled { opacity: .3; cursor: default; }

.wel__next {
  border: 1px solid var(--accent-deep);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 24px -8px var(--glow);
}
.wel__next:hover { transform: translateY(-1px); box-shadow: 0 0 30px -6px var(--glow); }
.wel__next.is-done { letter-spacing: .2em; }

.wel__prev:focus-visible,
.wel__next:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

body.is-welcoming { overflow: hidden; }

/* ---------- the way back in ---------- */

.howto {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-faint);
  padding: 7px 11px;
  cursor: pointer;
  font: 600 9px/1 var(--mono);
  letter-spacing: .13em;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.howto:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.howto:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 520px) {
  .wel__mark { display: none; }
  .wel__nums { margin-left: 0; }
  .wel__card { padding: 26px 18px 22px; min-height: 190px; }
}
