/* Shared elements and interactions. Page layout lives in experience.css. */
:root {
  color-scheme: dark;
  --bg: #171015;
  --ink: #f2e9dd;
  --muted: #b9a9b2;
  --pink: #e8a6c3;
  --line: #dbc6d02b;
  --ivory: #eee3d2;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", sans-serif;
  --display: "Bricolage Grotesque", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.5 var(--sans); }
body.gated, body.links-open { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, em { font-weight: 400; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--pink); outline-offset: 5px; }
[hidden] { display: none !important; }
.wrap { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.brand { font: 800 16px var(--display); letter-spacing: -.04em; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 15px 22px; min-height: 48px; border: 1px solid transparent; border-radius: 2px; font-size: 14px; font-weight: 600; line-height: 1.3; transition: background .2s; }
.primary, .ivory { background: var(--ivory); color: #281923; }
.primary:hover, .ivory:hover { background: #efbdd2; }
.secondary { background: transparent; border-color: #ae8fa080; }
.secondary:hover { background: #d4a4bb14; }
.text-button, .underlined { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; font-size: 13px; }
.text-button { background: none; border: 0; text-decoration: underline; text-underline-offset: 5px; }
.underlined { border-bottom: 1px solid #ad8f9e; }
.motion-button { border: 0; background: none; font-size: 12px; color: var(--muted); min-height: 44px; padding: 8px 0; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 110; background: var(--ivory); color: #20101d; padding: 16px; }
.skip-link:focus { top: 10px; }

/* Original portrait entrance and checkerboard. */
.atmosphere { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.checker-floor { position: absolute; left: -30%; right: -30%; bottom: -7vh; height: 29vh; background: repeating-conic-gradient(#b988ac50 0% 25%, transparent 0% 50%); background-size: 76px 76px; transform: perspective(500px) rotateX(60deg); transform-origin: center bottom; mask-image: linear-gradient(transparent, #000); animation: floorDrift 36s linear infinite; opacity: .22; }
@keyframes floorDrift { to { background-position: 0 152px; } }
#gate { position: fixed; inset: 0; z-index: 100; background: radial-gradient(ellipse at 50% 40%, #30142a, #0a070e 65%); display: grid; place-items: center; overflow: auto; }
.gate-content { position: relative; text-align: center; padding: 24px; width: min(95%, 540px); transition: opacity .3s, transform .65s; }
.gate-brand { font: 800 15px var(--display); letter-spacing: .2em; }
.gate-portrait { width: 150px; height: 150px; margin: 26px auto 28px; padding: 7px; border: 1px solid #b884a568; border-radius: 50%; box-shadow: 0 0 0 12px #bb69a309, 0 16px 60px #11081699; background: #1b0e1c; }
.gate-portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 1px solid #dfb8cf78; }
#gate-title { font: clamp(44px, 6vw, 78px)/.95 var(--serif); letter-spacing: -.025em; margin-bottom: 30px; }
#gate-title em { color: #eab8d0; }
#gate-notice { font-size: 12px; margin: 18px 0 2px; color: #c5b6c2; }
.gate-exit { font-size: 13px; display: inline-block; padding: 12px; color: #c5b6c2; text-decoration: underline; text-underline-offset: 4px; }
.gate-floor { position: absolute; left: -40%; right: -40%; bottom: -15vh; height: 50vh; background: repeating-conic-gradient(#ac81a442 0% 25%, transparent 0% 50%); background-size: 80px 80px; transform: perspective(500px) rotateX(65deg); transform-origin: center bottom; mask-image: linear-gradient(transparent, #000); opacity: .8; pointer-events: none; }
#gate.diving .gate-content { opacity: 0; transform: translateY(50px) scale(.6); }
#gate.diving .gate-portrait { transform: scale(.3); opacity: 0; transition: transform .8s, opacity .5s; }
#gate.diving .gate-floor { transform: perspective(500px) rotateX(25deg) scale(2); opacity: 0; transition: transform 1s, opacity .9s; }
#site.arriving { animation: arrive .9s ease-out both; }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }

/* Players only load after a deliberate play. */
.stream-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.stream-status i { width: 7px; height: 7px; border-radius: 50%; background: #887b91; }
.stream-status.live i { background: #53fc18; }
.stream-status.live { color: #bdf6a8; }
.watch-stage { min-width: 0; }
.screen { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #231723; }
.screen-poster { width: 100%; height: 100%; object-fit: cover; }
.screen-shade { position: absolute; inset: 0; background: linear-gradient(0deg, #0f091be6, transparent 65%); }
.screen-intro { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-end; flex-direction: column; padding: 24px; }
.watch-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.watch-actions .secondary { background: #180d22c9; border-color: #b69ab37a; }
.play { font-size: 12px; }
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding-block: 12px; color: var(--muted); font-size: 12px; }
.stage-foot p { min-width: 0; overflow-wrap: anywhere; }
.stage-foot a, .stage-foot button { flex-shrink: 0; }
.stage-foot a { color: var(--ink); }
#player-host { position: absolute; inset: 0; background: #000; }
#player-host iframe { width: 100%; height: 100%; border: 0; }
#player-host video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.clip-status { position: absolute; top: 10px; left: 14px; right: 14px; padding: 8px 12px; background: #100b18e6; font-size: 13px; color: #e6d7e5; pointer-events: none; z-index: 2; }
.clip-original { position: absolute; top: 8px; right: 10px; background: #160d21b5; padding: 5px 9px; font-size: 11px; border-radius: 3px; z-index: 3; }

/* Media keeps its natural portrait / landscape formats. */
.media-card { position: relative; display: inline-flex; flex-direction: column; width: 100%; min-width: 0; break-inside: avoid; vertical-align: top; }
.media-image { position: relative; width: 100%; background: #281829; aspect-ratio: 16/9; overflow: hidden; }
.media-image > img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.media-card.photo .media-image { aspect-ratio: 3/4; }
.media-card .duration { position: absolute; bottom: 10px; right: 10px; background: #110918d9; padding: 3px 7px; font-size: 11px; z-index: 1; }
.media-play { position: absolute; left: 12px; bottom: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #eee3d2e6; color: #321324; font-size: 11px; }
.media-body { width: 100%; padding-top: 12px; }
.media-body h3 { font: 500 14px/1.4 var(--sans); overflow-wrap: anywhere; }
.media-kind { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.photo-open { position: absolute; inset: 0; border: 0; background: none; width: 100%; height: 100%; z-index: 2; }
.photo-open:focus-visible { outline-offset: -4px; }
.media-image.failed { display: grid; place-items: center; }
.media-image.failed::after { content: "Watch on Kick"; color: var(--ink); font: 24px var(--serif); }
.media-card.photo .media-image.failed::after { content: "Photo unavailable"; }
#media-count { font-size: 12px; color: var(--muted); }

/* Shared dialogs, clip viewing and Rosie. */
dialog { background: #21151e; color: var(--ink); border: 1px solid #ac859e70; padding: 0; border-radius: 4px; max-height: 90dvh; max-width: calc(100% - 32px); box-shadow: 0 30px 100px #0009; }
dialog::backdrop { background: #08050ce8; }
.dialog-close { width: 44px; height: 44px; border: 0; background: transparent; font-size: 28px; display: grid; place-items: center; line-height: 1; padding: 0; z-index: 5; }
.dialog-close:focus-visible { outline-offset: 0; }
#burrow { width: 470px; padding: 36px; text-align: center; }
#burrow .dialog-close { position: absolute; right: 12px; top: 12px; }
#burrow h2 { font: 44px/1.05 var(--serif); margin: 14px 0 24px; }
#burrow em { color: #d9a7c5; }
#burrow > .underlined { margin-top: 16px; }
.rabbit-sprite { display: block; background: url("rosie-sprite.png") no-repeat 0 0; background-size: 200% 100%; pointer-events: none; }
.caught-rabbit { width: 160px; height: 160px; margin: auto; }
#rabbit { position: fixed; bottom: 6px; left: -150px; width: 135px; height: 135px; z-index: 20; background: none; border: 0; padding: 0; filter: drop-shadow(0 5px 8px #0009); }
#rabbit .rabbit-sprite { width: 100%; height: 100%; animation: rabbitPose .42s step-end infinite, rabbitBound .42s ease-in-out infinite; }
#rabbit.idling .rabbit-sprite { animation: none; background-position: 0 0; }
#rabbit:focus-visible { outline-offset: -5px; border-radius: 50%; }
@keyframes rabbitPose { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
@keyframes rabbitBound { 50% { transform: translateY(-9px); } }
.click-spark { position: fixed; z-index: 150; pointer-events: none; color: #ffc0df; line-height: 1; }
#photo-dialog { width: min(840px, calc(100% - 32px)); }
.photo-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; }
.photo-bar h2 { font: 23px var(--serif); }
#photo-full { width: 100%; max-height: 65dvh; object-fit: contain; background: #0d080f; }
#clip-full { width: 100%; max-height: 68dvh; background: #000; display: block; }
#photo-dialog > .clip-status { position: relative; left: auto; right: auto; top: auto; margin: 0 12px 10px; }
.photo-foot { padding: 8px 18px 18px; }
.noscript { padding: 10vw; }
.noscript a { display: inline-block; padding: 20px; color: var(--pink); }

@media (hover: hover) {
  .media-card:hover .media-image > img { transform: scale(1.025); }
}
@media (max-width: 900px) {
  .wrap { width: calc(100% - 56px); }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 76px; }
  .wrap { width: calc(100% - 36px); }
  .gate-content { padding: 20px; }
  .gate-brand { font-size: 13px; }
  .gate-portrait { width: 132px; height: 132px; margin: 22px auto 24px; }
  #gate-title { font-size: 58px; }
  #gate-notice { max-width: 240px; margin-inline: auto; }
  .screen-intro { padding: 16px; }
  .watch-actions { gap: 8px; }
  .watch-actions .button { font-size: 12px; padding: 12px 14px; min-height: 44px; }
  .stage-foot { gap: 12px; }
  .stage-foot p { max-width: 65%; }
  .media-body h3 { font-size: 13px; }
  .media-play { left: 8px; bottom: 8px; width: 28px; height: 28px; }
  .media-card .duration { bottom: 8px; right: 8px; font-size: 10px; }
  #rabbit { width: 120px; height: 120px; bottom: 0; }
  #burrow { padding: 28px 20px; }
  #burrow h2 { font-size: 36px; }
  .photo-bar h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
