/* Verb Rush — styles. The kit (../kit/game-kit.css) gives the paper, the type, the bar along the
   top, the cover and the buttons. Here: the falling outcomes with their triangle, the cards in the
   water, what Robert and Susan say, and the review at the end. Colour only for the three corners. */

/* ---------- the bar ---------- */

.vr-hud { opacity: 0; transition: opacity 0.5s; }
body.g-playing .vr-hud { opacity: 1; }
.vr-round { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-count b { font-weight: 600; color: var(--ink); font-size: 14px; }
.vr-buoys { display: inline-flex; gap: 6px; }
.vr-buoy { width: 18px; height: 18px; transition: opacity 0.4s, transform 0.5s var(--ease-back); }
.vr-buoy circle { fill: none; stroke-width: 4.2; }
.vr-buoy .ring { stroke: var(--card); }
.vr-buoy .bands { stroke: var(--danger); stroke-dasharray: 5.5 5.5; }
.vr-buoy .edge { stroke: var(--ink); stroke-width: 1; }
.vr-buoy.is-lost { opacity: 0.22; transform: translateY(4px) scale(0.85); }
.vr-buoy.is-lost .bands { stroke: var(--muted); }

/* ---------- the play ---------- */

.vr-play { position: absolute; inset: 0; z-index: 10; }
.vr-lane { position: absolute; top: 0; bottom: 0; }

.vr-out {
  position: absolute;
  left: 0; right: 0; top: 0;
  text-align: center;
  will-change: transform;
}
.vr-subject {
  margin: 0 0 8px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.vr-text {
  margin: 0 auto;
  max-width: 21em;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 450;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}
.vr-text .v { font-style: italic; font-weight: 600; color: var(--c-ilo); }

/* the triangle under the outcome: the outcome at the top, activity and assessment below */
.vr-tri { position: relative; width: 220px; height: 92px; margin: 8px auto 0; }
.vr-tri svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vr-edge { fill: none; stroke: var(--hair-strong); stroke-width: 1.3; stroke-dasharray: 4 5; transition: stroke 0.3s; }
.vr-fill { fill: var(--ink); opacity: 0; transition: opacity 0.6s; }
.vr-closed-edge { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 600; }
.vr-corner { stroke-width: 2; transition: fill 0.25s, transform 0.4s var(--ease-back); transform-box: fill-box; transform-origin: center; }
.vr-corner.is-ilo { fill: var(--c-ilo); stroke: var(--c-ilo); }
.vr-corner.is-tla { fill: var(--card); stroke: var(--c-tla); }
.vr-corner.is-assess { fill: var(--card); stroke: var(--c-assess); }
.vr-corner.is-tla.is-set { fill: var(--c-tla); transform: scale(1.25); }
.vr-corner.is-assess.is-set { fill: var(--c-assess); transform: scale(1.25); }
.vr-corner.is-wrong { animation: vr-wrong 0.55s ease; }
@keyframes vr-wrong { 0%, 100% { stroke: inherit; } 20%, 60% { stroke: var(--danger); fill: #f3d9cf; transform: scale(1.5); } }

.vr-chip {
  position: absolute;
  top: 100%;
  max-width: 170px;
  margin-top: 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.vr-chip.is-tla { left: 6.4%; color: var(--text-green); }
.vr-chip.is-assess { left: 93.6%; color: var(--text-brown); }
.vr-chip.is-on { opacity: 1; transform: translate(-50%, 0); }

/* saved: the edges close, the verbs light up, the outcome rises */
.vr-out.is-saved .vr-closed-edge { animation: vr-draw 0.6s var(--ease-out) forwards; }
.vr-out.is-saved .vr-fill { opacity: 0.06; }
.vr-out.is-saved .vr-edge { stroke: transparent; }
.vr-out.is-saved .vr-text .v { animation: vr-glow 1s ease; }
@keyframes vr-draw { to { stroke-dashoffset: 0; } }
@keyframes vr-glow { 30% { color: var(--card); background: var(--c-ilo); border-radius: 4px; box-shadow: 0 0 0 4px var(--c-ilo); } }
.vr-out.is-leaving { transition: transform 1.1s var(--ease-out), opacity 1.1s ease; opacity: 0; }

/* what a student says about a card that does not fit */
/* placed by the game beside the corner it missed, or over the outcome on a phone */
.vr-say {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px 10px;
  align-items: start;
  padding: 11px 14px 12px 12px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 10px 26px rgba(35, 38, 31, 0.16);
  text-align: left;
  transform: translateY(6px) scale(0.96);
  opacity: 0;
  transition: opacity 0.25s, transform 0.35s var(--ease-back);
  pointer-events: none;
}
.vr-say.is-on { opacity: 1; transform: none; }
.vr-say-face {
  grid-row: span 2;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
}
.vr-say-face.is-note { background: var(--danger); font-style: normal; font-family: var(--font-mono); font-size: 16px; }
.vr-say-who { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.vr-say-kind { display: block; margin: 2px 0 3px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.vr-say-line { font-family: var(--font-display); font-style: italic; font-size: 17.5px; line-height: 1.3; color: var(--ink); }

/* ---------- the cards in the water ---------- */

.vr-dock {
  position: absolute;
  left: 0; right: 0; top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  transition: opacity 0.4s;
}
.vr-col { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.vr-col-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 1px 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.vr-col-head::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; align-self: center; }
.vr-col.is-tla .vr-col-head::before { background: var(--c-tla); }
.vr-col.is-assess .vr-col-head::before { background: var(--c-assess); }
.vr-col-head span { font-family: var(--font-ui); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); }

.vr-card {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  padding: 11px 14px 12px 16px;
  border: 1px solid var(--hair-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.38;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(35, 38, 31, 0.04);
  animation: vr-bob 3.6s ease-in-out infinite;
  animation-delay: var(--bob, 0s);
  transition: border-color 0.15s, box-shadow 0.2s, opacity 0.3s;
}
.vr-card::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; }
.vr-col.is-tla .vr-card::before { background: var(--c-tla); }
.vr-col.is-assess .vr-card::before { background: var(--c-assess); }
.vr-card b { color: var(--ink); font-weight: 650; }
.vr-card:hover { border-color: var(--ink); box-shadow: 0 8px 20px rgba(35, 38, 31, 0.12); }
.vr-card:focus-visible { outline: 2px solid var(--c-ilo); outline-offset: 2px; }
.vr-card:disabled { cursor: default; }
.vr-card.is-gone { visibility: hidden; }
.vr-col.is-done .vr-card { opacity: 0.35; }
/* after a wrong pick the column waits while the student says why */
.vr-col.is-locked .vr-card { opacity: 0.45; cursor: wait; }
@keyframes vr-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.vr-pop {
  position: absolute;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 30px;
  color: var(--ink);
  pointer-events: none;
  transform: translate(-50%, 0);
  animation: vr-pop 1.2s var(--ease-out) forwards;
}
.vr-pop small { display: block; font-family: var(--font-mono); font-style: normal; font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-align: center; }
@keyframes vr-pop { from { opacity: 0; transform: translate(-50%, 10px); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -60px); } }

/* ---------- the cover ---------- */

.vr-cover-body { flex-direction: row; align-items: flex-start; justify-content: flex-start; gap: 40px; padding-top: 44px; }
.vr-cover-text { flex: 1; min-width: 0; }
.vr-cover .g-title { font-size: clamp(64px, 10vw, 150px); }
.vr-emblem { flex: none; width: 320px; height: auto; overflow: visible; margin-top: 46px; }
/* the three steps float in the water, like the cards in the game; the game keeps the sea just above them */
.vr-cover .g-steps { margin-top: 64px; }
.vr-cover .g-steps li {
  padding: 12px 16px 14px;
  border: 1px solid var(--hair-strong);
  border-radius: 10px;
  background: var(--card);
  animation: vr-bob 3.6s ease-in-out infinite;
}
.vr-cover .g-steps li:nth-child(2) { animation-delay: -1.2s; }
.vr-cover .g-steps li:nth-child(3) { animation-delay: -2.4s; }
.vr-cover .g-note { position: relative; }
.vr-emblem-edge { fill: rgba(35, 38, 31, 0.03); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 900; animation: vr-draw 2.2s 0.4s var(--ease-out) both; }
.vr-emblem-dot { stroke: var(--paper); stroke-width: 5; animation: vr-dot 0.6s var(--ease-back) both; transform-box: fill-box; transform-origin: center; }
.vr-emblem-dot.is-ilo { fill: var(--c-ilo); animation-delay: 0.6s; }
.vr-emblem-dot.is-tla { fill: var(--c-tla); animation-delay: 1.2s; }
.vr-emblem-dot.is-assess { fill: var(--c-assess); animation-delay: 1.8s; }
@keyframes vr-dot { from { transform: scale(0); } }
.vr-emblem-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; fill: var(--muted); }
.vr-emblem-verb { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 46px; fill: var(--ink); opacity: 0; animation: vr-verb 9s infinite; }
.vr-emblem-verb.is-2 { animation-delay: 3s; }
.vr-emblem-verb.is-3 { animation-delay: 6s; }
@keyframes vr-verb { 0% { opacity: 0; transform: translateY(8px); } 6%, 30% { opacity: 1; transform: none; } 36%, 100% { opacity: 0; transform: translateY(-8px); } }
.vr-cover .seaeu-statement { background: var(--paper); }

/* ---------- the end ---------- */

.vr-end { background: rgba(245, 242, 234, 0.9); }
.vr-end-body { justify-content: flex-start; padding-top: 64px; }
.vr-end-title { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(48px, 7vw, 96px); line-height: 0.98; letter-spacing: -0.02em; }
.vr-end-title em { color: var(--c-ilo); }
.vr-stats { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 24px 0 0 0; padding: 0; list-style: none; }
.vr-stats li { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.vr-stats b { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); }
.vr-end-line { margin: 26px 0 0 0; max-width: 36em; font-family: var(--font-display); font-style: italic; font-size: 22px; line-height: 1.4; color: var(--ink-soft); }
.vr-review-head { margin: 56px 0 14px 0; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.vr-review { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.vr-review li { padding: 16px 18px 16px; border: 1px solid var(--hair-strong); border-radius: 12px; background: var(--card); }
.vr-review-tag { display: inline-block; margin-bottom: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.vr-review-tag::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--hair-strong); }
.vr-review li.is-ok .vr-review-tag::before { background: var(--ink); }
.vr-review li.is-miss .vr-review-tag::before { background: none; box-shadow: inset 0 0 0 1.5px var(--ink); }   /* status in ink: colour is for the model */
.vr-review li.is-sunk .vr-review-tag::before { background: var(--danger); }
.vr-review-out { margin: 0 0 10px 0; font-family: var(--font-display); font-size: 20px; line-height: 1.25; }
.vr-review-out .v { font-style: italic; font-weight: 600; color: var(--c-ilo); }
.vr-review-row { margin: 6px 0 0 0; padding-left: 12px; border-left: 3px solid; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }
.vr-review-row.is-tla { border-color: var(--c-tla); }
.vr-review-row.is-assess { border-color: var(--c-assess); }
.vr-review-row.is-tla b { color: var(--text-green); }
.vr-review-row.is-wrong { border-color: var(--hair-strong); border-left-style: dashed; color: var(--muted); }
.vr-review-row.is-wrong i { font-family: var(--font-display); font-size: 15.5px; }
.vr-review-kind { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.vr-misses { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.vr-misses li { padding: 8px 12px; border: 1px dashed var(--ink-soft); border-radius: 10px; font-size: 15px; color: var(--ink); }
.vr-review-row.is-assess b { color: var(--text-brown); }
.vr-end-actions { margin-top: 30px; }

/* ---------- smaller screens ---------- */

@media (max-width: 1100px) { .vr-emblem { display: none; } }

@media (max-width: 720px) {
  .vr-text { font-size: 22px; }
  .vr-tri { width: 170px; height: 74px; }
  .vr-dock { gap: 10px; }
  .vr-card { padding: 9px 10px 10px 12px; font-size: 13.5px; }
  .vr-col-head span { display: none; }
  .vr-chip { font-size: 14px; max-width: 120px; }
  .vr-count #saved-label { display: none; }
  .vr-round { visibility: hidden; }   /* the round's wipe names it */
  .vr-buoys { gap: 3px; }
  .vr-review { grid-template-columns: 1fr; }
  .vr-end-body { padding-top: 40px; }
}

/* ---------- reduced motion: the outcomes still sink (that is the game), but nothing bobs ---------- */

@media (prefers-reduced-motion: reduce) {
  .vr-card, .vr-cover .g-steps li, .vr-emblem-edge, .vr-emblem-dot, .vr-corner.is-wrong { animation: none; }
  .vr-emblem-verb { animation: none; }
  .vr-emblem-verb.is-1 { opacity: 1; }
}
