/* ============================================================
   Projektiesittelyt — case study -popupit
   Laajentaa app.css:n tummaa teemaa. Aksentti tulee [data-tone]:sta.
   ============================================================ */

[data-tone="joukkuehub"] { --pop: #e4b447; --pop-2: #fff1c2; --pop-rgb: 228, 180, 71; }
[data-tone="betbot"]     { --pop: #3dff6e; --pop-2: #d9ffe6; --pop-rgb: 61, 255, 110; }
[data-tone="maestro"]    { --pop: #7ecbff; --pop-2: #ff6b78; --pop-rgb: 126, 203, 255; }
[data-tone="jalpa"]      { --pop: #ffd100; --pop-2: #fff4b8; --pop-rgb: 255, 209, 0; }
[data-tone="aivot"]      { --pop: #c084fc; --pop-2: #22d3ee; --pop-rgb: 192, 132, 252; }
[data-tone="arkiflow"]   { --pop: #3ddc97; --pop-2: #c8ffe6; --pop-rgb: 61, 220, 151; }
[data-tone="laskuri"]    { --pop: #e23b57; --pop-2: #ffc1cc; --pop-rgb: 226, 59, 87; }
[data-tone="kauppa"]     { --pop: #6aa4ff; --pop-2: #ff6b6b; --pop-rgb: 106, 164, 255; }
[data-tone="autopeli"]   { --pop: #3ee7ff; --pop-2: #b8fbff; --pop-rgb: 62, 231, 255; }
[data-tone="visa"]       { --pop: #8eb6ff; --pop-2: #dce8ff; --pop-rgb: 142, 182, 255; }
[data-tone="readme"]     { --pop: #7eb6ff; --pop-2: #d7e6ff; --pop-rgb: 126, 182, 255; }

/* Etusivun README-painike. Sama sävy kuin popupilla. */
.btn.btn-readme {
  gap: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  background: rgba(7, 12, 22, 0.78) !important;
  border-color: rgba(126, 182, 255, 0.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 24px rgba(61, 141, 255, 0.2);
}

.btn.btn-readme:hover,
.btn.btn-readme:focus-visible {
  background: rgba(61, 141, 255, 0.2) !important;
  border-color: rgba(190, 220, 255, 0.9) !important;
  box-shadow: 0 0 0 4px rgba(126, 182, 255, 0.16), 0 12px 30px rgba(0, 0, 0, 0.28);
}

.btn-readme__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3dff9a;
  box-shadow: 0 0 10px rgba(61, 255, 154, 0.85);
}

.readme-file {
  margin: 0;
  padding: 0.9rem 1rem 1rem;
  border-radius: 16px;
  background: #070b14;
  border: 1px solid rgba(var(--pop-rgb), 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: auto;
}

.readme-file__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  color: var(--faint, #8aa0c2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.readme-file__bar i {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #ff5f57;
}

.readme-file__bar i:nth-child(2) { background: #febc2e; }
.readme-file__bar i:nth-child(3) { background: #28c840; }

.readme-file__bar strong {
  margin-left: 0.45rem;
  color: #d7e6ff;
  font-weight: 500;
}

.readme-file pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.75;
  color: #e7f0ff;
  white-space: pre-wrap;
}

.readme-file .is-comment { color: #8aa0c2; }

/* ---------- Kortin vihje ---------- */

.project-card__hint {
  margin: 0.85rem 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.project-card:hover .project-card__hint,
.project-card:focus-within .project-card__hint {
  opacity: 1;
  transform: none;
  color: var(--pop, var(--accent));
}

.project-card[data-tone]:hover {
  border-color: rgba(var(--pop-rgb), 0.5);
  box-shadow:
    0 26px 52px rgba(0, 0, 0, 0.52),
    0 0 42px rgba(var(--pop-rgb), 0.28);
}

@media (hover: none) {
  .project-card__hint {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Overlay ---------- */

.showcase-overlay {
  padding: 1.1rem 0.9rem 2rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--pop-rgb), 0.16), transparent 46%),
    rgba(2, 4, 10, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.showcase-overlay:target {
  display: grid;
  justify-items: center;
  align-items: start;
  animation: showcase-fade 0.28s ease;
}

html.popup-lock,
html.popup-lock body {
  overflow: hidden;
}

.showcase-overlay .overlay-content {
  width: min(1080px, 100%);
  max-height: none;
  overflow: visible;
  margin: 0 auto;
  padding: 0 0 0.4rem;
  background:
    radial-gradient(900px 320px at 10% -10%, rgba(var(--pop-rgb), 0.2), transparent 55%),
    linear-gradient(180deg, #121826 0%, #0b101b 28%, #090d16 100%);
  border: 1px solid rgba(var(--pop-rgb), 0.28);
  border-radius: 28px;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.showcase-overlay:target .overlay-content {
  animation: showcase-rise 0.48s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes showcase-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes showcase-rise {
  from { opacity: 0; transform: translateY(28px) scale(0.975); }
  to { opacity: 1; transform: none; }
}

@keyframes showcase-section {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.showcase-overlay:target .showcase-section {
  animation: showcase-section 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.showcase-overlay:target .showcase-section:nth-child(1) { animation-delay: 0.05s; }
.showcase-overlay:target .showcase-section:nth-child(2) { animation-delay: 0.1s; }
.showcase-overlay:target .showcase-section:nth-child(3) { animation-delay: 0.15s; }
.showcase-overlay:target .showcase-section:nth-child(4) { animation-delay: 0.2s; }
.showcase-overlay:target .showcase-section:nth-child(5) { animation-delay: 0.25s; }
.showcase-overlay:target .showcase-section:nth-child(6) { animation-delay: 0.3s; }
.showcase-overlay:target .showcase-section:nth-child(n + 7) { animation-delay: 0.34s; }

/* ---------- Sulje + osionavi ---------- */

.popup-toolbar {
  position: sticky;
  top: 0.65rem;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  padding: 0 0.7rem;
  margin-top: 0.7rem;
  margin-bottom: -52px;
  pointer-events: none;
}

.showcase-overlay .popup-close {
  position: relative;
  pointer-events: auto;
  width: 44px;
  height: 44px;
  margin: 0;
  float: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(6, 8, 14, 0.78);
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.showcase-overlay .popup-close:hover,
.showcase-overlay .popup-close:focus-visible {
  background: rgba(var(--pop-rgb), 0.9);
  color: #0b0d12;
  border-color: transparent;
  transform: none;
  box-shadow: 0 0 0 4px rgba(var(--pop-rgb), 0.25);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.showcase-sticky {
  position: sticky;
  top: 3.4rem;
  z-index: 40;
  margin: 0;
  padding: 0.45rem 4.2rem 0.45rem 0.85rem;
  background: rgba(8, 11, 18, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.showcase-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.showcase-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pop), var(--pop-2));
}

.showcase-minimap {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.35rem 0 0.15rem;
}

.showcase-minimap::-webkit-scrollbar { display: none; }

.showcase-minimap a {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.showcase-minimap a:hover,
.showcase-minimap a.is-active,
.showcase-minimap a:focus-visible {
  color: #fff;
  border-color: rgba(var(--pop-rgb), 0.45);
  background: rgba(var(--pop-rgb), 0.12);
}

/* ---------- Hero ---------- */

.showcase-hero {
  position: relative;
  isolation: isolate;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  padding: 4.5rem 2.2rem 1.8rem;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
}

.showcase-hero__bg {
  position: absolute;
  inset: -12%;
  z-index: -2;
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.25) brightness(0.55);
  transform: scale(1.08);
}

.showcase-hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 10, 16, 0.2) 0%, rgba(8, 10, 16, 0.55) 42%, #0c111c 100%),
    radial-gradient(ellipse at 80% 0%, rgba(var(--pop-rgb), 0.35), transparent 50%);
}

.showcase-kicker {
  margin: 0 0 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pop);
}

.status-row,
.showcase-cta,
.showcase-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--pop-rgb), 0.45);
  background: rgba(8, 10, 16, 0.55);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--pop);
  box-shadow: 0 0 10px var(--pop);
}

.showcase-hero h2 {
  margin: 0.7rem 0 0.45rem;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  background: linear-gradient(120deg, #fff 10%, var(--pop) 55%, var(--pop-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-tagline {
  max-width: 40rem;
  margin: 0 0 1.15rem;
  color: #e7ebf5;
  font-size: 1.12rem;
  line-height: 1.45;
}

.showcase-cta .store-badge {
  height: 52px;
  width: auto;
  display: block;
}

.showcase-cta .store-badge:hover,
.showcase-cta .store-badge:focus-visible {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

/* ---------- Sisältö ---------- */

.showcase-body {
  padding: 1.3rem 1.6rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.showcase-section {
  scroll-margin-top: 6.5rem;
}

.showcase-section h3 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}

.section-kicker {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pop);
}

.fact-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.fact,
.feature-card,
.story-card,
.note-card,
.arch__node {
  min-width: 0;
}

.fact {
  padding: 0.85rem 0.9rem 0.8rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fact__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.25;
}

.fact__note {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.fact .ico,
.feature-card .ico,
.note-card .ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.story-grid,
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.story-card,
.note-card,
.callout,
.arch-note {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.story-card--problem { border-top: 2px solid #ff6b7a; }
.story-card--solution { border-top: 2px solid var(--pop); }

.story-card h3,
.note-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.story-card p,
.note-card p,
.callout p,
.arch-note p,
.showcase-section > p {
  margin: 0;
  color: #c9d2e4;
}

.story-card p + p,
.note-card p + p { margin-top: 0.55rem; }

.callout {
  margin-top: 0.8rem;
  border-left: 3px solid var(--pop);
  background: rgba(var(--pop-rgb), 0.08);
}

.callout strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #fff;
  font-family: var(--font-display);
}

/* ---------- Ominaisuudet ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.feature-card {
  position: relative;
  display: flex;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(var(--pop-rgb), 0.85), transparent 42%, transparent 70%, rgba(var(--pop-rgb), 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.feature-card:hover,
.feature-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(var(--pop-rgb), 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), 0 0 28px rgba(var(--pop-rgb), 0.14);
}

.feature-card:hover::before,
.feature-card:focus-within::before { opacity: 1; }

.feature-card__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--pop);
  background: rgba(var(--pop-rgb), 0.12);
  border: 1px solid rgba(var(--pop-rgb), 0.22);
}

.feature-card__icon .ico { width: 20px; height: 20px; }

.feature-card h4 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* ---------- Galleria ---------- */

.shot-gallery { position: relative; }

.shot-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.shot-stage {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #070910;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.browser-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  background: #141a27;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.browser-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a4258;
}

.browser-top span:nth-child(1) { background: #ff5f57; }
.browser-top span:nth-child(2) { background: #febc2e; }
.browser-top span:nth-child(3) { background: #28c840; }

.browser-top em {
  margin-left: 0.45rem;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.shot-viewport {
  position: relative;
  display: block;
  min-height: 220px;
  padding: 1rem;
  perspective: 900px;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(var(--pop-rgb), 0.16), transparent 58%),
    #080b12;
}

.shot-stage--browser .shot-viewport { padding: 0; min-height: 180px; }

.slide {
  display: none;
  width: 100%;
  margin: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

.shot-gallery:has(input:nth-of-type(1):checked) .slide:nth-child(1),
.shot-gallery:has(input:nth-of-type(2):checked) .slide:nth-child(2),
.shot-gallery:has(input:nth-of-type(3):checked) .slide:nth-child(3),
.shot-gallery:has(input:nth-of-type(4):checked) .slide:nth-child(4),
.shot-gallery:has(input:nth-of-type(5):checked) .slide:nth-child(5),
.shot-gallery:has(input:nth-of-type(6):checked) .slide:nth-child(6),
.shot-gallery:has(input:nth-of-type(7):checked) .slide:nth-child(7) {
  display: flex;
}

.shot-zoom {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 14px;
  line-height: 0;
  max-width: 100%;
}

.shot-zoom:focus-visible {
  outline: 2px solid var(--pop);
  outline-offset: 3px;
}

.slide img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(62vh, 680px);
  object-fit: contain;
  border-radius: 12px;
}

.shot-stage--logo .slide img {
  max-height: 340px;
  filter: drop-shadow(0 18px 36px rgba(var(--pop-rgb), 0.35));
}

.shot-stage--portrait .slide img {
  height: min(62vh, 680px);
  width: auto;
  max-width: min(100%, 420px);
}

.shot-stage--browser .slide img {
  width: 100%;
  height: auto;
  max-height: min(58vh, 620px);
  border-radius: 0;
  object-fit: contain;
  object-position: top center;
  background: #fff;
}

.shot-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
  max-width: 42rem;
}

.shot-stage--browser .shot-caption {
  padding: 0.15rem 1rem 0.9rem;
}

.shot-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 8, 14, 0.72);
  color: #fff;
  cursor: pointer;
}

.shot-arrow--prev { left: 0.7rem; }
.shot-arrow--next { right: 0.7rem; }

.shot-arrow:hover,
.shot-arrow:focus-visible {
  background: var(--pop);
  color: #0b0d12;
  border-color: transparent;
}

.shot-gallery[data-slides="1"] .shot-arrow,
.shot-gallery[data-slides="1"] .shot-thumbs { display: none; }

.shot-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.shot-thumbs label {
  flex: 0 0 auto;
  width: 84px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.62;
  line-height: 0;
}

.shot-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-gallery input:nth-of-type(1):checked ~ .shot-thumbs label:nth-of-type(1),
.shot-gallery input:nth-of-type(2):checked ~ .shot-thumbs label:nth-of-type(2),
.shot-gallery input:nth-of-type(3):checked ~ .shot-thumbs label:nth-of-type(3),
.shot-gallery input:nth-of-type(4):checked ~ .shot-thumbs label:nth-of-type(4),
.shot-gallery input:nth-of-type(5):checked ~ .shot-thumbs label:nth-of-type(5),
.shot-gallery input:nth-of-type(6):checked ~ .shot-thumbs label:nth-of-type(6),
.shot-gallery input:nth-of-type(7):checked ~ .shot-thumbs label:nth-of-type(7),
.shot-thumbs label:hover,
.shot-radio:focus-visible + .shot-stage ~ .shot-thumbs label {
  opacity: 1;
}

.shot-gallery input:nth-of-type(1):checked ~ .shot-thumbs label:nth-of-type(1),
.shot-gallery input:nth-of-type(2):checked ~ .shot-thumbs label:nth-of-type(2),
.shot-gallery input:nth-of-type(3):checked ~ .shot-thumbs label:nth-of-type(3),
.shot-gallery input:nth-of-type(4):checked ~ .shot-thumbs label:nth-of-type(4),
.shot-gallery input:nth-of-type(5):checked ~ .shot-thumbs label:nth-of-type(5),
.shot-gallery input:nth-of-type(6):checked ~ .shot-thumbs label:nth-of-type(6),
.shot-gallery input:nth-of-type(7):checked ~ .shot-thumbs label:nth-of-type(7) {
  opacity: 1;
  border-color: var(--pop);
}

.shot-radio:focus-visible ~ .shot-thumbs label { outline: none; }

/* ---------- Arkkitehtuuri, opit, stack ---------- */

.arch {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.arch__node {
  flex: 1 1 0;
  padding: 0.85rem 0.7rem;
  border-radius: 14px;
  text-align: center;
  background: rgba(var(--pop-rgb), 0.08);
  border: 1px solid rgba(var(--pop-rgb), 0.28);
}

.arch__node span {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pop);
}

.arch__node strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.arch__arrow {
  align-self: center;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pop));
  position: relative;
  flex: 0 0 22px;
}

.arch__arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  border: 4px solid transparent;
  border-left-color: var(--pop);
}

.route-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.route-row code {
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d5def0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.note-card h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.4rem 0.85rem 0.4rem 0.5rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
}

.stack-chip img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.stack-chip:hover {
  border-color: rgba(var(--pop-rgb), 0.45);
  box-shadow: 0 0 24px rgba(var(--pop-rgb), 0.16);
}

/* ---------- Loppu ---------- */

.showcase-band {
  margin: 0.3rem 1.15rem 0.3rem;
  padding: 1.15rem 1.2rem;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background:
    linear-gradient(120deg, rgba(var(--pop-rgb), 0.16), rgba(255, 255, 255, 0.03) 55%);
  border: 1px solid rgba(var(--pop-rgb), 0.28);
}

.showcase-band h3 {
  margin: 0 0 0.2rem;
  font-size: 1.25rem;
}

.showcase-band p {
  margin: 0;
  color: var(--muted);
}

.showcase-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  padding: 0.9rem 1.15rem 1.15rem;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pager-link span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.pager-link strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.pager-link--next { text-align: right; align-items: flex-end; }

.pager-link:hover,
.pager-link:focus-visible {
  border-color: rgba(var(--pop-rgb), 0.5);
  color: #fff;
  background: rgba(var(--pop-rgb), 0.1);
}

/* ---------- Lightbox ---------- */

.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: grid;
  place-items: center;
  padding: 3.5rem 4.5rem;
  background: rgba(2, 4, 10, 0.88);
  backdrop-filter: blur(10px);
}

.shot-lightbox[hidden] { display: none; }

.shot-lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.shot-lightbox__close,
.shot-lightbox__nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 10, 16, 0.8);
  color: #fff;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.shot-lightbox__close { top: 1rem; right: 1rem; }
.shot-lightbox__nav--prev { left: 1rem; top: 50%; margin-top: -23px; }
.shot-lightbox__nav--next { right: 1rem; top: 50%; margin-top: -23px; }

.shot-lightbox__close:hover,
.shot-lightbox__nav:hover,
.shot-lightbox__close:focus-visible,
.shot-lightbox__nav:focus-visible {
  background: #fff;
  color: #111;
}

.shot-lightbox__caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.8rem;
  margin: 0;
  text-align: center;
  color: #d5dced;
  font-size: 0.92rem;
}

/* ---------- Focus ---------- */

.showcase-overlay a:focus-visible,
.showcase-overlay button:focus-visible,
.shot-lightbox button:focus-visible,
.project-card a:focus-visible {
  outline: 2px solid var(--pop, var(--accent));
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .fact-bar,
  .feature-grid,
  .story-grid,
  .split-2,
  .note-grid {
    grid-template-columns: 1fr 1fr;
  }

  .note-grid { grid-template-columns: 1fr; }

  .showcase-hero { padding: 4.2rem 1.2rem 1.4rem; min-height: 280px; }
  .showcase-body { padding: 1rem 1rem 0.2rem; }
  .showcase-band { margin-inline: 0.8rem; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .showcase-overlay { padding: 0; }
  .showcase-overlay .overlay-content { border-radius: 0; min-height: 100%; }
  .showcase-hero { border-radius: 0; }
  .fact-bar,
  .feature-grid,
  .story-grid,
  .split-2,
  .showcase-pager { grid-template-columns: 1fr; }
  .pager-link--next { text-align: left; align-items: flex-start; }
  .arch { flex-direction: column; }
  .arch__arrow { width: 2px; height: 16px; flex-basis: 16px; background: linear-gradient(180deg, transparent, var(--pop)); }
  .arch__arrow::after {
    right: auto;
    left: -3px;
    top: auto;
    bottom: 0;
    border: 4px solid transparent;
    border-top-color: var(--pop);
    border-left-color: transparent;
  }
  .browser-top em { display: none; }
  .shot-lightbox { padding: 3.2rem 0.6rem 4rem; }
  .shot-lightbox__nav--prev { left: 0.4rem; }
  .shot-lightbox__nav--next { right: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-overlay:target,
  .showcase-overlay:target .overlay-content,
  .showcase-overlay:target .showcase-section,
  .slide,
  .feature-card,
  .project-card__hint {
    animation: none !important;
    transition: none !important;
  }
}
