/* Site-wide polish: motion, smoothness, focus and reading comfort. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
html { -webkit-tap-highlight-color: transparent; scroll-padding-top: 132px; }
body { text-rendering: optimizeLegibility; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img { max-width: 100%; }
::selection { background: #F4E8F8; color: #111111; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 999; padding: 12px 18px; border-radius: 12px; background: #111111; color: #FFFFFF !important; font-weight: 700; text-decoration: none; transition: top .2s ease; }
.skip:focus { top: 16px; }

header { transition: box-shadow .3s ease, background-color .3s ease; }
html.scrolled header { box-shadow: 0 10px 30px rgba(17, 17, 17, .07); }

a.btn-solid, a.btn-ghost, a.btn-light, button { -webkit-user-select: none; user-select: none; }
a.btn-solid:active, a.btn-ghost:active, a.btn-light:active, button:active, .lift:active { transform: scale(.98) !important; }

/* Scroll reveal: only when JS is running, never hides content otherwise. */
html.rv [data-rv] { opacity: 0; translate: 0 18px; transition: opacity .7s cubic-bezier(.2, .7, .3, 1), translate .7s cubic-bezier(.2, .7, .3, 1), scale .7s cubic-bezier(.2, .7, .3, 1); transition-delay: var(--rv-d, 0ms); }
html.rv [data-rv="img"] { scale: .97; }
html.rv [data-rv-in] { opacity: 1; translate: 0 0; scale: 1; }

/* Hero entrance */
@keyframes hero-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
#main .wrap > *, #main .wrap > div > * { animation: hero-in .8s cubic-bezier(.2, .7, .3, 1) both; }
#main .wrap > *:nth-child(2), #main .wrap > div > *:nth-child(2) { animation-delay: 70ms; }
#main .wrap > *:nth-child(3), #main .wrap > div > *:nth-child(3) { animation-delay: 140ms; }
#main .wrap > *:nth-child(4), #main .wrap > div > *:nth-child(4) { animation-delay: 210ms; }
#main .wrap > *:nth-child(5), #main .wrap > div > *:nth-child(5) { animation-delay: 280ms; }
#main .wrap > *:nth-child(n+6), #main .wrap > div > *:nth-child(n+6) { animation-delay: 340ms; }
#main:focus { outline: none; }


.share-toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 12px; background: #111111; color: #FFFFFF; font: 600 15px/1.2 'Inter', system-ui, sans-serif; box-shadow: 0 16px 40px rgba(17, 17, 17, .25); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.share-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Home photo arc: gentle travelling wave, lift on hover. */
@keyframes arc-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.collage .ph { pointer-events: auto; animation: arc-float 6.5s ease-in-out infinite; transition: scale .5s cubic-bezier(.2, .7, .3, 1), box-shadow .5s ease, filter .5s ease; will-change: translate, scale; }
.collage .ph:nth-of-type(1) { animation-delay: 0s; } .collage .ph:nth-of-type(2) { animation-delay: -.7s; }
.collage .ph:nth-of-type(3) { animation-delay: -1.4s; } .collage .ph:nth-of-type(4) { animation-delay: -2.1s; }
.collage .ph:nth-of-type(5) { animation-delay: -2.8s; } .collage .ph:nth-of-type(6) { animation-delay: -3.5s; }
.collage .ph:nth-of-type(7) { animation-delay: -4.2s; } .collage .ph:nth-of-type(8) { animation-delay: -4.9s; }
.collage .ph:nth-of-type(9) { animation-delay: -5.6s; }
.collage .ph:hover { scale: 1.09; z-index: 3; box-shadow: 0 28px 60px rgba(17, 17, 17, .28); filter: saturate(1.12) brightness(1.03); }
.collage:hover .ph:not(:hover) { filter: saturate(.85); }
@media (max-width: 760px) { .collage .ph { animation: none; } }

@media (prefers-reduced-motion: reduce) {
  .collage .ph { animation: none !important; }
  html.rv [data-rv] { opacity: 1 !important; translate: none !important; scale: none !important; transition: none !important; }
  #main .wrap > *, #main .wrap > div > * { animation: none !important; }
  @view-transition { navigation: none; }
}

/* ---------- Mobile clean-up ---------- */
@media (max-width: 760px) {
  /* Watch & listen tabs: one line, smaller, swipe if needed */
  .tabs { gap: 22px !important; height: 44px !important; font-size: 12px !important; letter-spacing: .03em !important; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; flex-shrink: 0; }

  /* RCCGKV TV: taller screen so the play button never covers the title */
  .tv { aspect-ratio: 4 / 5 !important; border-width: 6px !important; border-radius: 22px !important; margin-top: 24px !important; }
  .tv .play { width: 68px !important; height: 68px !important; margin: -34px 0 0 -34px !important; top: 38% !important; }
  .tv .play svg { width: 26px; height: 26px; }
  .tv .count { gap: 6px !important; }
  .tv .count > span { min-width: 44px !important; }
  .tv .count b { font-size: 26px !important; }
  .stage h1, .theme + h1 { font-size: 40px !important; }

  /* God's Footprint hero: compact, buttons side by side */
  .hero[aria-live] { min-height: 0 !important; padding: 32px 0 28px !important; }
  .hero[aria-live] h1 { font-size: 30px !important; line-height: 1.12 !important; }
  .hero[aria-live] p { font-size: 15px !important; }
  .hero[aria-live] .btn-solid, .hero[aria-live] .btn-ghost { flex: 1 1 0; justify-content: center; height: 48px !important; padding: 0 12px !important; font-size: 15px !important; white-space: nowrap; }
  .tile { width: 200px !important; }
  [role="dialog"] h2 { font-size: 22px !important; }

  /* WORDCAST: smaller cover, no overflow */
  .art { width: 230px !important; margin: 4px 0 8px !important; }
  .art [role="img"] { padding: 22px !important; border-radius: 18px !important; }
  .art [role="img"] svg { width: 96px; height: auto; }
  .art [style*="font-size: 96px"] { font-size: 52px !important; }
  .art [style*="letter-spacing: .24em"] { font-size: 11px !important; letter-spacing: .18em !important; }
  .art .disc { right: -12% !important; }
  .art ~ div h1 { font-size: 30px !important; }
  .playbtn { width: 52px !important; height: 52px !important; border-radius: 14px !important; }
  .row { padding: 12px 10px !important; gap: 12px !important; }
  .row .more { display: none !important; }

  .stage .wrap > p:first-child { font-size: 11px !important; letter-spacing: .1em !important; padding: 6px 12px !important; }

  /* Episode pop-up: full-width sheet, compact controls */
  [role="dialog"][aria-label] .btn-solid, [role="dialog"][aria-label] .btn-ghost { height: 42px !important; padding: 0 12px !important; font-size: 14px !important; }
  [role="dialog"][aria-label] [style*="padding: 28px 32px 32px"] { padding: 20px !important; gap: 12px !important; }
  [role="dialog"][aria-label] [style*="minmax(min(100%, 200px), 1fr)"] { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  [role="dialog"][aria-label] .tile { width: auto !important; padding: 8px !important; border-radius: 10px !important; }
  [role="dialog"][aria-label] .tile span:last-child { font-size: 11px !important; }
  div[style*="position: fixed; inset: 0; z-index: 100"] { padding: 0 !important; align-items: flex-end !important; }
  [role="dialog"][style*="max-width: 1040px"] { border-radius: 22px 22px 0 0 !important; max-height: 92vh !important; }
  [role="dialog"][style*="max-width: 1040px"] > div:first-child { border-radius: 22px 22px 0 0 !important; }
}
