/* /sakugabooru-alternative: a night-indigo clip board with motion tags, electric yellow and looping motion demos. */
:root {
  --bg: #14122b;
  --panel: #1d1a3c;
  --ink: #f3f1ff;
  --soft: #a9a4cc;
  --line: #2e2a57;
  --volt: #ffd60a;
  --volt-dark: #e6bf00;
  --rose: #ff5c8a;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 60px; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--font); font-stretch: 100%; }
a { color: var(--volt); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--volt); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; height: 54px; padding: 0 20px; background: rgba(13, 11, 31, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 900; font-size: 20px; color: var(--ink); text-decoration: none; font-stretch: 115%; }
.brand span { color: var(--volt); }
.top-nav { display: flex; gap: 2px; margin-left: auto; }
.top-nav a { color: var(--soft); text-decoration: none; font-weight: 700; font-size: 14px; padding: 6px 10px; border-radius: 4px; }
.top-nav a:hover { color: var(--bg); background: var(--volt); }

h1, h2, h3 { font-weight: 900; line-height: 1.02; font-stretch: 112%; letter-spacing: -.01em; }
h1 { font-size: clamp(40px, 7vw, 80px); margin: 0 0 22px; text-transform: uppercase; }
h1 span { display: block; color: var(--volt); }
h2 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 18px; text-transform: uppercase; }
h3 { font-size: 19px; margin: 0 0 6px; font-stretch: 100%; }

.intro { max-width: 1100px; margin: 0 auto; padding: 32px 20px 64px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.kicker { font-weight: 700; color: var(--rose); margin: 0 0 12px; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.lead { font-size: 19px; color: #d4d0ef; margin: 0 0 28px; }
.btn { display: inline-block; background: var(--volt); color: #17140a; font-weight: 900; text-decoration: none; padding: 15px 28px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; }
.btn:hover { background: var(--volt-dark); }

.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.play-key { grid-column: 1 / -1; aspect-ratio: auto !important; height: 220px; background: #fff8d6 !important; box-shadow: 0 0 0 3px var(--volt), 0 0 40px rgba(255, 214, 10, .25); }
.play-key svg { width: auto !important; height: 100%; }
.key { background: #f6f3e8; border-radius: 6px; padding: 10px; position: relative; aspect-ratio: 3 / 4; display: grid; place-items: center; }
.key b { position: absolute; top: 8px; left: 10px; font-size: 11px; color: #c0392b; letter-spacing: .1em; }
.key svg { width: 100%; height: auto; fill: none; stroke: #222; stroke-width: 3.5; stroke-linecap: round; }
.key svg circle { fill: none; }

.clips-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.clips-head h2 { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { font: 600 13.5px ui-monospace, Menlo, monospace; color: var(--volt); background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 4px 10px; cursor: pointer; }
.filters button:hover { border-color: var(--volt); }
.filters button[aria-pressed="true"] { background: var(--volt); color: #17140a; border-color: var(--volt); }
#clips .sub { margin: 12px 0 18px; }
.clips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; }
.clips li[hidden] { display: none; }
.clip { position: relative; border-radius: 6px; overflow: hidden; background: #0e0c22; box-shadow: 0 0 0 1px var(--line); }
.clip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.clip .play { position: absolute; right: 8px; bottom: 8px; font-size: 11px; color: #17140a; background: var(--volt); border-radius: 3px; padding: 2px 7px; font-weight: 900; }
.clips h3 { font-size: 15.5px; margin: 8px 0 4px; font-stretch: 100%; }
.tags { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font: 500 12.5px ui-monospace, Menlo, monospace; }
.tags span { color: var(--rose); }
.tags span:first-child { color: var(--volt); }

.sound { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: center; }
.wave { display: flex; align-items: center; gap: 5px; height: 120px; padding: 0 16px; background: var(--panel); border-radius: 10px; }
.wave i { flex: 1; background: var(--volt); border-radius: 3px; height: 30%; animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: .15s; background: var(--rose); }
.wave i:nth-child(3n+1) { animation-delay: .35s; }
.wave i:nth-child(4n) { animation-delay: .55s; }
@keyframes wave { 50% { height: 90%; } }

main { max-width: 1100px; margin: 0 auto; padding: 0 20px 40px; }
.block { padding: 60px 0; border-top: 1px solid var(--line); }
.sub { color: var(--soft); margin: -6px 0 24px; }
.wide { max-width: 46em; margin: 0; color: #d4d0ef; }
.after { margin: 20px 0 0; color: var(--soft); }

.glossary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.glossary article { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; }
.glossary p { margin: 0 0 12px; color: var(--soft); font-size: 15.5px; flex: 1; }
.glossary code { font: 500 14px/1.5 var(--font); color: var(--volt); }

.demo { height: 84px; border-radius: 8px; background: #0e0c22; margin-bottom: 14px; position: relative; overflow: hidden; }
.demo i { position: absolute; display: block; }
.smear i { width: 26px; height: 26px; border-radius: 50%; background: var(--volt); top: 29px; left: 10%; animation: smear 1.4s cubic-bezier(.7, 0, .3, 1) infinite; }
@keyframes smear { 0%, 20% { left: 10%; width: 26px; } 45% { width: 120px; } 60%, 100% { left: calc(90% - 26px); width: 26px; } }
.lines i { height: 3px; border-radius: 2px; background: var(--ink); opacity: .8; animation: streak .7s linear infinite; }
.lines i:nth-child(1) { top: 18px; width: 40%; animation-delay: 0s; }
.lines i:nth-child(2) { top: 34px; width: 52%; animation-delay: .2s; }
.lines i:nth-child(3) { top: 50px; width: 35%; animation-delay: .4s; }
.lines i:nth-child(4) { top: 66px; width: 50%; animation-delay: .1s; }
@keyframes streak { from { left: 45%; opacity: 0; } 15% { opacity: .8; } to { left: -60%; opacity: .8; } }
.impact { animation: flash 1.6s steps(1) infinite; }
.impact i { width: 44px; height: 44px; top: 20px; left: calc(50% - 22px); background: var(--rose); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
@keyframes flash { 0%, 70% { background: #0e0c22; } 72% { background: #fff; } 76% { background: #000; } 80% { background: #fff; } 84%, 100% { background: #0e0c22; } }
.hair i { width: 6px; height: 56px; top: 14px; border-radius: 3px; background: var(--rose); transform-origin: top center; animation: sway 1.8s ease-in-out infinite; }
.hair i:nth-child(1) { left: 42%; }
.hair i:nth-child(2) { left: 50%; animation-delay: .12s; }
.hair i:nth-child(3) { left: 58%; animation-delay: .24s; }
@keyframes sway { 0%, 100% { transform: rotate(18deg); } 50% { transform: rotate(-18deg); } }
.pan { background: repeating-linear-gradient(90deg, #0e0c22 0 30px, #221e48 30px 60px); background-size: 120px 100%; animation: slide .8s linear infinite; }
.pan i { width: 22px; height: 22px; border-radius: 50%; background: var(--volt); top: 31px; left: calc(50% - 11px); }
@keyframes slide { from { background-position: 0 0; } to { background-position: -120px 0; } }
.fx i { width: 10px; height: 10px; border-radius: 50%; background: var(--volt); bottom: 10px; animation: burst 1.5s ease-out infinite; }
.fx i:nth-child(1) { left: 30%; }
.fx i:nth-child(2) { left: 50%; background: var(--rose); animation-delay: .25s; }
.fx i:nth-child(3) { left: 70%; animation-delay: .5s; }
@keyframes burst { 0% { transform: translateY(0) scale(.4); opacity: 1; } 100% { transform: translateY(-64px) scale(1.4); opacity: 0; } }

.cut { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: c; }
.cut li { counter-increment: c; background: #f6f3e8; color: #222; border-radius: 4px; padding: 14px 16px; background-image: repeating-linear-gradient(0deg, transparent 0 27px, #e2dcc8 27px 28px); }
.cut li h3 { color: #17140a; }
.cut li::before { content: "CUT 0" counter(c); display: block; font-weight: 900; font-size: 13px; letter-spacing: .12em; color: #c0392b; margin-bottom: 6px; }
.cut p { margin: 0; color: #555; font-size: 15px; }

.faq details { border-bottom: 1px solid var(--line); max-width: 52em; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; padding: 18px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "▸ "; color: var(--volt); }
.faq details[open] summary::before { content: "▾ "; }
.faq details p { margin: 0 0 18px; color: #d4d0ef; }

.more-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.more-list a { display: inline-block; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); padding: 9px 16px; border-radius: 4px; }
.more-list a:hover { border-color: var(--volt); color: var(--volt); }

.site-foot { max-width: 1100px; margin: 0 auto; padding: 26px 20px 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--soft); }
.site-foot p { margin: 0 0 6px; }
.site-foot a { color: var(--soft); }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .clips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clips .tags { overflow-wrap: anywhere; }
  .sound { grid-template-columns: 1fr; }
  .top-nav { display: none; }
  .keys { max-width: 420px; }
  .glossary { grid-template-columns: 1fr 1fr; }
  .cut { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  h1 { font-size: clamp(30px, 10vw, 40px); }
  .intro > * { min-width: 0; }
  .glossary, .cut { grid-template-columns: 1fr; }
  .top { padding: 0 16px; }
  .play-key { height: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo, .demo i, .wave i { animation: none !important; }
}
