/* ── The once-ever surfaces (intro_view.js), copied from the old site's intro_pages.css: the
   carousel (an illustration, one line, dots, Next or Start, Skip) and the stacked outro and
   first-review cards, whose lines rise in one under the next. On the card's paper panel. Changed
   for the player's bars: both buttons at least 44px high, Skip in its old hover ink (3:1 on the
   paper; the old #A8A6B8 measured about 2.4:1). Palette: teal #3D8B7A (known), coral #f07a54
   (the new word), stone #627B9A, ink #484668. ── */
#intro { width: 100%; max-width: 640px; margin-left: auto; margin-right: auto; }
body.is-intro #notice { display: none; }

.dk-intro {
  text-align: center;
  padding: 16px 0 6px;
  font-family: 'Nunito', 'Helvetica Neue', system-ui, sans-serif;
}

/* ── Carousel page: illustration + one line + controls ───────────────────── */
.dk-intro__vis {
  width: 200px;
  height: 156px;
  margin: 0 auto 18px;
  display: block;
}

.dk-intro__text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  color: #484668;
  max-width: 340px;
  margin: 0 auto 26px;
}

.dk-intro__btn {
  display: inline-block;
  min-height: 44px;
  padding: 13px 34px;
  background: linear-gradient(135deg, #5A588A, #4A4878);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.dk-intro__skip {
  display: block;
  min-height: 44px;
  margin: 4px auto 0;
  padding: 0 16px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #7E7C94;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.dk-intro__skip:hover { color: #5E5C74; }

.dk-intro__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 18px;
}
.dk-intro__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(98, 123, 154, 0.25);
}
.dk-intro__dot--on { background: #627B9A; }

/* ── Stacked card: lines rise + fade in one under the next ───────────────── */
.dk-intro__stack {
  list-style: none;
  margin: 0 auto 30px;
  padding: 0;
  max-width: 360px;
}

.dk-intro__line {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  color: #484668;
  margin: 0 0 20px;
  opacity: 0;
  transform: translateY(10px);
  /* animation-delay is set inline per line (intro_view.js) so the cadence
     holds for any line count. `forwards` keeps the settled frame. */
  animation: ivLineRise 0.62s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.dk-intro__line:last-child { margin-bottom: 0; }

@keyframes ivLineRise {
  0%   { opacity: 0; transform: translateY(10px); }
  55%  { text-shadow: 0 0 9px rgba(72, 70, 104, 0.30); }
  100% { opacity: 1; transform: translateY(0); text-shadow: none; }
}

/* ── Shared SVG stroke language ───────────────────────────────────────────── */
.dk-intro__vis * {
  vector-effect: non-scaling-stroke;
}

/* ── i0: known slots fill teal one by one, the new one pulses coral ──────── */
.iv-i0 rect {
  stroke: #627B9A;
  stroke-width: 2;
  fill: #3D8B7A;
  fill-opacity: 0.8;
  animation: ivSlotFill 6.5s ease-in-out infinite;
}
.iv-i0 rect:nth-child(1) { animation-delay: 0s; }
.iv-i0 rect:nth-child(2) { animation-delay: 0.55s; }
.iv-i0 rect:nth-child(3) { animation-delay: 1.1s; }
.iv-i0 rect:nth-child(4) { animation-delay: 1.65s; }
@keyframes ivSlotFill {
  0%, 12%  { fill-opacity: 0; }
  22%, 84% { fill-opacity: 0.8; }
  96%, 100% { fill-opacity: 0; }
}
.iv-i0 .iv-i0__new {
  stroke: #f07a54;
  fill: #f07a54;
  fill-opacity: 0.7;
  animation: ivSlotNew 6.5s ease-in-out infinite;
}
@keyframes ivSlotNew {
  0%, 38%  { fill-opacity: 0; }
  48%      { fill-opacity: 0.85; }
  58%      { fill-opacity: 0.4; }
  68%      { fill-opacity: 0.85; }
  78%, 84% { fill-opacity: 0.6; }
  96%, 100% { fill-opacity: 0; }
}

/* ── glue: particle chips drop into the gaps between word-blocks ─────────── */
.iv-glue rect {
  fill: none;
  stroke: #627B9A;
  stroke-width: 2;
}
.iv-glue text {
  font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
  font-size: 17px;
  font-weight: 700;
  fill: #f07a54;
  text-anchor: middle;
  animation: ivChipDrop 5.5s ease-out infinite;
}
.iv-glue text:nth-of-type(1) { animation-delay: 0s; }
.iv-glue text:nth-of-type(2) { animation-delay: 0.8s; }
.iv-glue text:nth-of-type(3) { animation-delay: 1.6s; }
@keyframes ivChipDrop {
  0%       { transform: translateY(-48px); opacity: 0; }
  10%      { opacity: 1; }
  22%      { transform: translateY(3px); }
  30%, 90% { transform: translateY(0); opacity: 1; }
  100%     { transform: translateY(0); opacity: 0; }
}

/* ── guess: a "?" floats over a tile, the tile flips to a check ──────────── */
.iv-guess .iv-guess__tilt {
  transform-origin: 110px 100px;
  animation: ivGuessTilt 6s ease-in-out infinite;
}
@keyframes ivGuessTilt {
  0%, 100% { transform: rotate(-2.5deg); }
  50%      { transform: rotate(2.5deg); }
}
.iv-guess .iv-guess__flip {
  transform-origin: 110px 100px;
  animation: ivGuessFlip 6s ease-in-out infinite;
}
@keyframes ivGuessFlip {
  0%, 46%  { transform: scaleX(1); }
  52%      { transform: scaleX(0.06); }
  58%, 88% { transform: scaleX(1); }
  92%      { transform: scaleX(0.06); }
  98%, 100% { transform: scaleX(1); }
}
.iv-guess rect {
  fill: #fff;
  stroke: #627B9A;
  stroke-width: 2;
}
.iv-guess .iv-guess__q {
  font-family: 'Nunito', sans-serif;
  font-size: 26px;
  font-weight: 700;
  fill: #627B9A;
  text-anchor: middle;
  animation: ivGuessQ 6s ease-in-out infinite;
}
@keyframes ivGuessQ {
  0%, 20%  { transform: translateY(0); opacity: 1; }
  35%      { transform: translateY(-5px); }
  46%      { opacity: 1; transform: translateY(0); }
  52%, 92% { opacity: 0; }
  98%, 100% { opacity: 1; }
}
.iv-guess .iv-guess__check {
  fill: none;
  stroke: #3D8B7A;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: ivGuessCheck 6s ease-in-out infinite;
}
@keyframes ivGuessCheck {
  0%, 52%  { opacity: 0; }
  58%, 88% { opacity: 1; }
  92%, 100% { opacity: 0; }
}

/* ── outro: dots land on a timeline (the spaced-repetition schedule) ─────── */
.iv-outro line {
  stroke: #627B9A;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.55;
}
.iv-outro circle {
  fill: #3D8B7A;
  animation: ivOutroLand 7s ease-out infinite;
}
.iv-outro circle:nth-of-type(1) { animation-delay: 0.3s; }
.iv-outro circle:nth-of-type(2) { animation-delay: 1.0s; }
.iv-outro circle:nth-of-type(3) { animation-delay: 1.9s; }
.iv-outro circle:nth-of-type(4) { animation-delay: 3.0s; }
.iv-outro circle:nth-of-type(5) { animation-delay: 4.4s; }
@keyframes ivOutroLand {
  0%       { transform: translateY(-58px); opacity: 0; }
  8%       { opacity: 1; }
  16%      { transform: translateY(2px); }
  22%, 90% { transform: translateY(0); opacity: 1; }
  100%     { transform: translateY(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dk-intro * { animation: none !important; }
  /* stacked lines: settle visible (no rise) so the card is never blank */
  .dk-intro__line { opacity: 1; transform: none; text-shadow: none; }
  /* guess visual: with animations off both the "?" and the check would show
     at once; hide the "?" so the resting frame is the revealed check */
  .iv-guess .iv-guess__q { opacity: 0; }
}
