/* The home page: the mascot pyramid and the three demos (save, find, stomp).
   Everything that moves is driven by home.js; this file only lays it out. */
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glA { 0% { clip-path: inset(8% 0 62% 0); transform: translate(-9px,0); } 25% { clip-path: inset(52% 0 22% 0); transform: translate(7px,1px); } 50% { clip-path: inset(28% 0 48% 0); transform: translate(-5px,-1px); } 75% { clip-path: inset(68% 0 6% 0); transform: translate(9px,0); } 100% { clip-path: inset(40% 0 40% 0); transform: translate(0,0); } }
@keyframes glB { 0% { clip-path: inset(60% 0 12% 0); transform: translate(8px,0); } 25% { clip-path: inset(18% 0 58% 0); transform: translate(-8px,0); } 50% { clip-path: inset(44% 0 30% 0); transform: translate(5px,1px); } 75% { clip-path: inset(4% 0 78% 0); transform: translate(-9px,0); } 100% { clip-path: inset(40% 0 40% 0); transform: translate(0,0); } }
@keyframes glMain { 0%,100% { transform: none; opacity: 1; } 20% { transform: translate(3px,-1px) skewX(6deg); opacity: .75; } 45% { transform: translate(-3px,1px) skewX(-4deg); opacity: 1; } 70% { transform: translate(1px,0) scaleY(.97); opacity: .85; } }
@keyframes scan { 0% { opacity: 0; } 30% { opacity: .9; } 100% { opacity: 0; } }
@keyframes caret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

/* hero: mascot, theme tag, title, typing line, downloads */
.hero { max-width: 900px; margin: 0 auto; padding: 40px 24px 64px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.mascot { position: relative; width: 340px; height: 232px; max-width: 86vw; padding: 0; border: 0; background: transparent; cursor: pointer; animation: bob 4.5s ease-in-out infinite; color: var(--face); }
.mascot .glow { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--glow) 0%, transparent 65%); transition: background .3s; }
.mascot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mascot .m-main g.lines { stroke: var(--face); transition: stroke .3s; }
.mascot .m-main .fill { fill: var(--face); transition: fill .3s; }
.mascot .m-trunk { stroke: var(--trunk); transition: stroke .3s; }
.mascot .m-gap { stroke: #000; }
.mascot .ghost { display: none; }
.mascot .ghost.a { color: var(--ghost-a, #6BF08A); animation: glA .48s steps(4) both; }
.mascot .ghost.b { color: #7DD3FC; animation: glB .48s steps(4) both; }
.mascot .scan { display: none; position: absolute; inset: -10px; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 2px, transparent 2px 5px); }
.mascot.glitching .ghost { display: block; }
.mascot.glitching .scan { display: block; animation: scan .48s linear both; }
.mascot.glitching .m-main { animation: glMain .48s steps(5) both; }
.theme-tag { margin-top: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 4px 12px; transition: color .3s, border-color .3s; }
.title-row { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: clamp(6px, 1.5vw, 16px); }
.title-row svg { width: clamp(52px, 8vw, 84px); height: auto; flex: none; }
.title-row .mirror { transform: scaleX(-1); }
.title-row h1 { margin: 0; font-size: clamp(56px, 9vw, 96px); line-height: 1; font-weight: 700; letter-spacing: -.02em; }
.typing { margin: 22px 0 0; min-height: 64px; max-width: 640px; font-size: 20px; line-height: 1.5; color: var(--soft-text); }
.chip { font-family: var(--mono); font-weight: 600; color: var(--on-accent); background: var(--accent); border-radius: 8px; padding: 2px 10px; transition: background .3s, color .3s; }
.typing .chip { margin-right: 10px; }
.caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; margin-left: 2px; background: var(--accent); animation: caret 1s steps(1) infinite; }
.downloads { margin-top: 36px; display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; scroll-margin-top: 24px; }
.free-line { margin: 20px 0 0; font-size: 19px; font-weight: 500; color: #D5D9DE; }
.toast { margin: 14px 0 0; font-size: 15px; color: var(--accent); min-height: 22px; }

/* demos */
.demos { max-width: 1000px; margin: 0 auto; padding: 16px 24px 72px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.demos h2 { margin: 0; font-size: clamp(32px, 4.5vw, 46px); font-weight: 800; letter-spacing: -.02em; text-align: center; }
.demos h2 span { color: var(--accent); transition: color .3s; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 760px; }
.tab { text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; color: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 92px; }
.tab .name { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--muted); }
.tab .line { font-size: 15px; line-height: 1.35; color: var(--soft-text); }
.tab .bar { margin-top: auto; height: 3px; border-radius: 2px; background: #1C1F23; overflow: hidden; }
.tab .bar i { display: block; height: 3px; width: 0; background: var(--accent); }
.tab[aria-selected="true"] { background: var(--panel); border-color: var(--accent); }
.tab[aria-selected="true"] .name { color: var(--accent); }
@media (max-width: 600px) { .tabs { grid-template-columns: 1fr; } .tab { min-height: 0; } }
.frame { width: 100%; max-width: 760px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.frame-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #1C1F23; }
.frame-bar i { width: 11px; height: 11px; border-radius: 6px; background: var(--line2); }
.frame-bar span { margin-left: 10px; font-size: 13px; color: var(--muted); }
.stage { position: relative; height: 340px; }
.scene { position: absolute; inset: 0; }
.bar-line { height: 10px; border-radius: 5px; background: #17191C; }
.card { background: #000; border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 20px 40px rgba(0,0,0,.6); animation: pop .2s ease-out; text-align: left; }
.pill-btn { border-radius: 16px; padding: 6px 16px; font-size: 13px; font-weight: 700; }
.pop { animation: pop .2s ease-out; }
.privacy-line { margin: 16px 0 0; text-align: center; font-size: 16px; color: var(--muted); }
.privacy-line a { font-weight: 600; }

/* save */
.save { padding: 28px 30px; }
.save p.sentence { margin: 22px 0 0; font-size: 18px; line-height: 1.6; color: var(--soft-text); }
.sel { position: relative; white-space: nowrap; }
.sel b { position: absolute; left: -2px; top: 1px; bottom: 1px; width: 0; background: var(--sel); border-radius: 4px; }
.sel span { position: relative; color: #fff; }
.save-icon { display: inline-flex; vertical-align: middle; margin-left: 8px; width: 34px; height: 34px; border-radius: 17px; background: #000; border: 1.5px solid var(--accent); align-items: center; justify-content: center; transition: transform .12s; }
.save-icon g { stroke: var(--accent); }
.save-card { position: absolute; right: 26px; bottom: 24px; width: min(330px, calc(100% - 52px)); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.save-card .cap { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .09em; color: var(--muted); }
.save-card .text { margin: 0; font-size: 14px; line-height: 1.45; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.save-card .field { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.save-card .field .lbl { color: var(--muted); }
.save-card .field .val { flex: 1; }
.save-card .row { display: flex; justify-content: flex-end; gap: 8px; }
.saved-pill { position: absolute; right: 26px; bottom: 24px; display: flex; align-items: center; gap: 10px; background: #000; border: 1px solid var(--accent); border-radius: 999px; padding: 10px 16px; font-size: 15px; }
.small-caret { display: inline-block; width: 2px; height: 1em; vertical-align: -2px; margin-left: 1px; background: #fff; animation: caret 1s steps(1) infinite; }

/* find */
.find { display: flex; flex-direction: column; justify-content: flex-end; }
.thread { flex: 1; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; }
.bubble { align-self: flex-end; max-width: 72%; background: #17191C; border-radius: 16px 16px 4px 16px; padding: 12px 16px; font-size: 15px; line-height: 1.5; }
.dots { align-self: flex-start; color: var(--muted); font-size: 22px; letter-spacing: 4px; animation: caret 1s steps(1) infinite; }
.reply { align-self: flex-start; max-width: 72%; color: var(--soft-text); font-size: 15px; line-height: 1.5; }
.composer { position: relative; padding: 0 16px 16px; }
.qmenu { position: absolute; left: 30px; bottom: 72px; width: min(330px, calc(100% - 46px)); background: rgba(0,0,0,.97); border: 1.4px solid var(--accent); border-radius: 12px; padding: 6px 0 8px; box-shadow: 0 18px 36px rgba(0,0,0,.6); }
.qmenu .head { margin: 0; padding: 6px 14px 4px; font-size: 11px; letter-spacing: .09em; color: rgba(255,255,255,.6); white-space: nowrap; }
.qrow { margin: 0 6px; height: 34px; border-radius: 8px; padding: 0 8px; display: flex; align-items: center; gap: 12px; }
.qrow .c { font-weight: 700; font-size: 14px; }
.qrow .n { font-size: 14px; color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow.on { background: var(--tint); }
.qrow.on .c { color: var(--accent); }
.inputbox { display: flex; align-items: center; gap: 10px; background: #000; border: 1px solid var(--line2); border-radius: 16px; padding: 14px 16px; font-size: 16px; line-height: 1.45; }
.inputbox .txt { flex: 1; min-width: 0; color: var(--dim); }
.inputbox .txt.live { color: #fff; }
.inputbox svg { flex: none; color: var(--face); }
.keycap { position: absolute; right: 28px; top: -46px; font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--on-accent); background: var(--accent); border-radius: 8px; padding: 5px 12px; }

/* stomp */
.stomp { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.fake-box { position: relative; border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--dim); background: #000; border: 1px solid var(--line2); }
.fake-box.big { border-radius: 12px; padding: 16px; font-size: 15px; }
.ol { position: absolute; inset: -4px; border-radius: 12px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ol.hot { border-style: solid; border-width: 3px; background: color-mix(in srgb, var(--accent) 24%, transparent); }
.ol .tag { position: absolute; left: 8px; top: 6px; background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.flash { position: absolute; inset: -1px; border-radius: 12px; border: 2.5px solid var(--accent); }
.flash b { position: absolute; inset: 0; border-radius: 10px; background: var(--accent); }
.ring { position: absolute; border: 2px solid var(--accent); }
.puff { position: absolute; border-radius: 50%; background: var(--accent); }
.leg { position: absolute; left: calc(50% - 40px); width: 80px; height: 100px; overflow: visible; transform-origin: 50% 91%; }
.stomped { position: absolute; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 4px 11px; font-size: 13px; font-weight: 700; }
.notice { position: absolute; right: 20px; top: 18px; width: min(300px, calc(100% - 40px)); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.notice p { margin: 0; font-size: 14px; line-height: 1.45; }
.notice .pill-btn { align-self: flex-end; background: #fff; color: #000; }
.hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; white-space: nowrap; background: rgba(0,0,0,.94); border: 1.4px solid var(--accent); border-radius: 20px; padding: 8px 8px 8px 16px; font-size: 14px; animation: pop .2s ease-out; }
.hint span { border: 1px solid var(--accent); color: var(--accent); border-radius: 12px; padding: 3px 12px; font-size: 12px; }
@media (max-width: 600px) { .hint { font-size: 12px; } .stage { height: 380px; } }
.inputbox .m-trunk { stroke: var(--trunk); }
.inputbox .m-gap { stroke: #000; }
