/* Rainy Runtime — rainyruntime.com */
:root {
  --ink: #05060d;
  --ink-2: #0b0d1a;
  --panel: rgba(14, 16, 32, 0.72);
  --line: rgba(160, 170, 255, 0.14);
  --text: #d9dcf2;
  --muted: #8d92b8;
  --neon: #ff5fd2;      /* sign pink */
  --cyan: #5ee6ff;      /* window cyan */
  --lamp: #ffb35c;      /* desk lamp */
  --violet: #9b7bff;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 15px/1.7 var(--mono);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
::selection { background: var(--neon); color: var(--ink); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ---------- top bar (terminal title bar) ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  font-size: 12px; color: var(--muted);
  background: rgba(5, 6, 13, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar .dots { display: flex; gap: 6px; }
.bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a2d47; }
.bar .dots i:first-child { background: var(--neon); opacity: .8; }
.bar .brand { color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: .02em; }
.bar .brand span { color: var(--muted); font-weight: 400; }
.bar nav { margin-left: auto; display: flex; gap: 18px; }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--text); }
.bar nav a[aria-current]::before { content: "> "; color: var(--neon); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; align-items: end;
  isolation: isolate;
}
.hero picture, .hero picture img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 30% 40%; z-index: -3;
}
.hero::after { /* legibility gradient */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--ink) 2%, rgba(5, 6, 13, 0.82) 26%, rgba(5, 6, 13, 0.15) 60%, rgba(5, 6, 13, 0.35)),
    radial-gradient(ellipse at 80% 20%, rgba(155, 123, 255, 0.12), transparent 60%);
}
#rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }

.hero-copy { padding: 0 0 clamp(48px, 9vh, 96px); }
.prompt { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.prompt b { color: var(--neon); font-weight: 400; }
.prompt .cursor { display: inline-block; width: .6em; height: 1.05em; vertical-align: -0.15em; background: var(--cyan); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; margin: 0; }
.hero h1 {
  font-size: clamp(44px, 8.2vw, 104px);
  color: #f3f1ff;
  text-shadow: 0 0 40px rgba(94, 230, 255, 0.18);
}
.hero h1 em { font-style: italic; color: var(--neon); text-shadow: 0 0 26px rgba(255, 95, 210, 0.45); }
.hero .sub { max-width: 560px; margin: 22px 0 30px; color: #b9bddb; font-size: 15px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border: 1px solid var(--line); border-radius: 2px;
  font: 600 13px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--text); text-decoration: none; background: rgba(11, 13, 26, 0.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .2s, color .2s, box-shadow .2s, background .2s;
}
.btn:hover { color: #fff; border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 24px rgba(94, 230, 255, 0.25); }
.btn.primary { background: var(--neon); color: var(--ink); border-color: var(--neon); }
.btn.primary:hover { background: #ff86de; color: var(--ink); box-shadow: 0 0 30px rgba(255, 95, 210, 0.5); border-color: #ff86de; }

/* ---------- sections ---------- */
section { padding: clamp(64px, 11vw, 120px) 0; scroll-margin-top: 20px; }
.label { font-size: 12px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 18px; }
.label::before { content: "// "; color: var(--violet); }
h2 { font-size: clamp(34px, 5vw, 58px); color: #f3f1ff; }
h2 em { font-style: italic; color: var(--cyan); }
.lede { max-width: 620px; color: #b9bddb; }

/* now playing */
.now { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.screen {
  position: relative; display: block; border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 6px #0d0f1e, 0 0 60px rgba(155, 123, 255, 0.15);
}
.screen img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s ease, filter .3s; }
.screen:hover img { transform: scale(1.03); filter: brightness(1.08); }
.screen .play {
  position: absolute; left: 16px; bottom: 16px;
  padding: 8px 12px; background: rgba(5, 6, 13, 0.82); color: var(--text);
  font-size: 12px; border-left: 2px solid var(--neon);
}
.meta { font-size: 13px; color: var(--muted); margin: 16px 0 26px; }
.meta dt { color: var(--violet); }
.meta dd { margin: 0 0 8px; color: var(--text); }

/* forecast */
.forecast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.forecast figure { margin: 0; background: var(--ink-2); border: 1px solid var(--line); }
.forecast img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; filter: saturate(.9); }
.forecast figcaption { padding: 12px 14px 14px; font-size: 12px; color: var(--muted); }
.forecast figcaption b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

/* cast */
.cast { display: grid; grid-template-columns: 340px 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.cast img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); box-shadow: 0 0 0 10px #0b0d1a, 0 0 90px rgba(255, 179, 92, 0.18); }
.who { display: grid; gap: 22px; margin-top: 28px; }
.who div { border-left: 1px solid var(--line); padding-left: 18px; }
.who b { font-family: var(--serif); font-weight: 400; font-size: 26px; color: #f3f1ff; display: block; line-height: 1.2; }
.who span { color: var(--muted); font-size: 14px; }

/* artist callout */
.callout {
  position: relative; border: 1px solid var(--line); padding: clamp(28px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(255, 95, 210, 0.10), transparent 45%),
    linear-gradient(315deg, rgba(94, 230, 255, 0.08), transparent 45%),
    var(--ink-2);
}
.callout .big { font-family: var(--serif); font-size: clamp(80px, 14vw, 170px); line-height: .9; color: var(--neon); text-shadow: 0 0 40px rgba(255, 95, 210, 0.35); }
.callout .grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 60px); align-items: center; }

/* ---------- inner pages (submit / terms) ---------- */
.page-head { padding: 140px 0 40px; position: relative; overflow: hidden; }
.page-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .28;
  background: url(/img/hero-960.webp) 70% 30% / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
}
.page-head h1 { font-size: clamp(42px, 7vw, 84px); color: #f3f1ff; }
.page-head h1 em { font-style: italic; color: var(--neon); }
.page-head .lede { margin-top: 20px; font-size: 16px; }
.page-head .actions { margin-top: 30px; }

.prose { max-width: 720px; }
.prose h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 22px; }
.prose h3 { font-size: 24px; color: #f3f1ff; margin: 30px 0 6px; }
.prose p, .prose li { color: #c3c7e4; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--violet); }
.prose strong { color: #fff; }
.prose .note { font-size: 13px; color: var(--muted); border-left: 2px solid var(--lamp); padding: 4px 0 4px 14px; }
.inner section { padding: 48px 0; border-top: 1px solid var(--line); }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cards div { border: 1px solid var(--line); background: var(--ink-2); padding: 22px; }
.cards b { font-family: var(--serif); font-weight: 400; font-size: 25px; color: #f3f1ff; display: block; margin-bottom: 6px; line-height: 1.2; }
.cards p { margin: 0; font-size: 14px; }

.steps { list-style: none; padding: 0 !important; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; margin: 18px 0; }
.steps li::before { content: "0" counter(s); position: absolute; left: 0; top: 0; color: var(--neon); font-weight: 600; }

.mail {
  border: 1px solid var(--line); background: #070814; padding: 20px 22px; font-size: 13px; color: #b9bddb;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.mail .k { color: var(--violet); }

details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; list-style: none; color: #f3f1ff; font-family: var(--serif); font-size: 23px; line-height: 1.3; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; color: var(--neon); font-family: var(--mono); font-size: 16px; }
details[open] summary::before { content: "– "; }
details p { margin: 10px 0 0; }

.terms ol { counter-reset: t; list-style: none; padding-left: 0; }
.terms ol li { counter-increment: t; position: relative; padding-left: 44px; margin: 0 0 18px; }
.terms ol li::before { content: counter(t, decimal-leading-zero); position: absolute; left: 0; color: var(--violet); }

/* ---------- footer (vim status line) ---------- */
footer { border-top: 1px solid var(--line); margin-top: 40px; font-size: 13px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: 28px 48px; justify-content: space-between; padding: 44px 0 30px; }
.foot h4 { margin: 0 0 10px; font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--violet); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 4px 0; }
.foot a { color: var(--text); text-decoration: none; }
.foot a:hover { color: var(--cyan); }
.foot .sig { font-family: var(--serif); font-size: 28px; color: #f3f1ff; line-height: 1.1; }
.foot .sig em { color: var(--neon); }
.status {
  display: flex; flex-wrap: wrap; font-size: 11px; background: #0d0f1e; color: var(--muted);
}
.status span { padding: 5px 12px; }
.status .mode { background: var(--neon); color: var(--ink); font-weight: 700; }
.status .fill { flex: 1; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .now, .cast, .callout .grid { grid-template-columns: 1fr; }
  .cast img { max-width: 260px; }
  .forecast { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .bar { padding: 10px 14px; gap: 10px; }
  .bar .dots, .bar .brand span { display: none; }
  .bar nav { gap: 14px; }
  .hero picture img { object-position: 50% 30%; }
  .hero::after { background: linear-gradient(to top, var(--ink) 4%, rgba(5, 6, 13, 0.86) 38%, rgba(5, 6, 13, 0.2) 70%, rgba(5, 6, 13, 0.4)); }
  .actions .btn { flex: 1 1 100%; justify-content: center; }
  .forecast { gap: 10px; }
  .forecast figcaption { padding: 10px; font-size: 11px; }
  .steps li { padding-left: 40px; }
  .terms ol li { padding-left: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .prompt .cursor { animation: none; }
  .screen img { transition: none; }
}

/* ---------- in-page video player ---------- */
.now h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; }
button.screen { width: 100%; padding: 0; margin: 0; background: #000; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.screen.is-playing { aspect-ratio: 16 / 9; background: #000; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-btn {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: rgba(5, 6, 13, 0.7); border: 1px solid rgba(255, 95, 210, 0.7);
  box-shadow: 0 0 30px rgba(255, 95, 210, 0.35); transition: transform .2s, background .2s;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.play-btn::after { content: ""; position: absolute; left: 31px; top: 24px; border: 14px solid transparent; border-left: 22px solid var(--neon); border-right: 0; }
.screen:hover .play-btn, .screen:focus-visible .play-btn { transform: scale(1.08); background: rgba(255, 95, 210, 0.18); }

.episodes { margin-top: clamp(48px, 7vw, 80px); }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ep-card {
  display: block; padding: 0; text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: var(--ink-2); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.ep-card:hover, .ep-card[aria-current] { border-color: var(--neon); box-shadow: 0 0 22px rgba(255, 95, 210, 0.2); }
.ep-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ep-card span { display: block; padding: 12px 14px 14px; font-size: 13px; line-height: 1.5; }
.ep-card b { color: var(--neon); font-weight: 600; margin-right: 4px; }
.ep-card i { display: block; font-style: normal; color: var(--muted); font-size: 11px; margin-top: 4px; }
@media (max-width: 560px) { .play-btn { width: 60px; height: 60px; margin: -30px 0 0 -30px; } .play-btn::after { left: 24px; top: 18px; border-width: 12px; border-left-width: 18px; } }

/* ---------- Shorts strip ---------- */
.shorts { margin-top: clamp(48px, 7vw, 80px); }
.short-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 220px); gap: 14px;
  overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.short-card {
  position: relative; display: block; padding: 0; margin: 0; aspect-ratio: 9 / 16; overflow: hidden;
  background: #000; border: 1px solid var(--line); cursor: pointer; scroll-snap-align: start;
  font: inherit; color: var(--text); text-align: left; transition: border-color .2s, box-shadow .2s;
}
.short-card:hover, .short-card:focus-visible { border-color: var(--neon); box-shadow: 0 0 22px rgba(255, 95, 210, 0.2); }
.short-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.short-card:hover img { transform: scale(1.04); }
.short-card .play-btn { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.short-card .play-btn::after { left: 22px; top: 16px; border-width: 12px; border-left-width: 17px; }
.short-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 12px; font-size: 12px; line-height: 1.45;
  background: linear-gradient(to top, rgba(5, 6, 13, 0.92), transparent);
}
.short-card.is-playing { cursor: default; border-color: var(--neon); }
.short-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.short-more { margin: 16px 0 0; font-size: 13px; }
@media (max-width: 560px) { .short-row { grid-auto-columns: 62%; } }
