/* ============================================================
   BankrShell — terminal agent / hacker theme
   ============================================================ */

:root {
    --bg:        #050807;
    --bg-soft:   #0a0f0d;
    --panel:     #0b110e;
    --line:      #16241c;
    --green:     #36f08a;
    --green-dim: #1f9c5a;
    --amber:     #ffcb6b;
    --bankr-orange: #ff9f66;
    --bankr-orange-dim: #e8844f;
    --text:      #c8ffe0;
    --text-dim:  #6f8f7d;
    --red:       #ff5f56;
    --yellow:    #ffbd2e;
    --grn-dot:   #27c93f;
    --mono:      'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    height: var(--app-height, 100dvh);
    width: 100%;
    max-width: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
}

a { color: var(--green); text-decoration: none; }
b { color: var(--green); font-weight: 700; }

/* ---------- CRT overlay ---------- */
.crt-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0,0,0,0) 0px,
            rgba(0,0,0,0) 2px,
            rgba(0,0,0,0.18) 3px,
            rgba(0,0,0,0) 4px
        );
    mix-blend-mode: multiply;
    opacity: 0.5;
}
.crt-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(54,240,138,0.05), rgba(0,0,0,0.55) 120%);
}

/* ---------- Slider mechanism (percent-based — avoids Android 100vw bug) ---------- */
.viewport {
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: var(--app-height, 100dvh);
    overflow: hidden;
    position: relative;
}

.slider {
    display: flex;
    width: 200%;
    height: 100%;
    height: var(--app-height, 100dvh);
    transform: translate3d(0, 0, 0);
    transition: transform 0.75s cubic-bezier(0.76, 0, 0.24, 1);
    will-change: transform;
}
.slider.show-terminal { transform: translate3d(-50%, 0, 0); }

.panel {
    width: 50%;
    flex: 0 0 50%;
    min-width: 0;
    height: 100%;
    height: var(--app-height, 100dvh);
}

/* ---------- Landing backgrounds ---------- */
.landing {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(54,240,138,0.12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 20%, rgba(255,203,107,0.06), transparent 50%),
        linear-gradient(180deg, rgba(54,240,138,0.04), transparent 280px),
        var(--bg);
}
.bg-grid {
    position: fixed;
    inset: 0;
    width: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(54,240,138,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(54,240,138,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}
.bg-glow-a {
    width: 420px; height: 420px;
    top: 10%; left: -8%;
    background: rgba(54,240,138,0.25);
    animation: drift 18s ease-in-out infinite;
}
.bg-glow-b {
    width: 360px; height: 360px;
    bottom: 15%; right: -5%;
    background: rgba(255,203,107,0.12);
    animation: drift 22s ease-in-out infinite reverse;
}
.bg-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.landing > *:not(.bg-grid):not(.bg-glow):not(.bg-glow-a):not(.bg-glow-b):not(.bg-noise):not(.hero-bg):not(.hero-matrix):not(.hero-term-stack):not(.hero-term-panel):not(.hero-scanline):not(.hero-bg-vignette) {
    position: relative;
    z-index: 1;
}
.landing::-webkit-scrollbar { width: 10px; }
.landing::-webkit-scrollbar-thumb { background: var(--line); }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(5,8,7,0.9);
    backdrop-filter: blur(6px);
    font-size: 14px;
}
.brand .prompt { color: var(--green); }
.brand .sep    { color: var(--text-dim); }
.brand .path   { color: var(--amber); }
.brand .dollar { color: var(--text-dim); margin-right: 10px; }
.brand-name {
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text);
}
.topnav a {
    margin-left: 22px;
    color: var(--text-dim);
    font-size: 13px;
    letter-spacing: 1px;
    transition: color 0.2s;
}
.topnav a:hover { color: var(--green); }

/* hero */
.hero {
    position: relative;
    min-height: calc(100vh - 53px);
    display: flex;
    align-items: center;
    padding: 40px 28px;
    overflow: hidden;
}

/* --- Hero animated terminal background --- */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.hero-matrix {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.22;
}
.hero-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0, 0, 0, 0.12) 4px
    );
    animation: scan-drift 8s linear infinite;
}
.hero-bg-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 80% at 15% 50%, rgba(5, 8, 7, 0.55), transparent 60%),
        radial-gradient(ellipse 90% 100% at center, transparent 30%, rgba(5, 8, 7, 0.92) 100%),
        linear-gradient(180deg, rgba(5, 8, 7, 0.4), rgba(5, 8, 7, 0.85));
}
.hero-term-stack {
    position: absolute;
    inset: -10% -5%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    padding-right: 4%;
    transform: perspective(900px) rotateY(-8deg);
    opacity: 0.55;
}
.hero-term-panel {
    width: min(340px, 32vw);
    border: 1px solid rgba(54, 240, 138, 0.15);
    border-radius: 6px;
    background: rgba(7, 12, 10, 0.75);
    box-shadow:
        0 0 0 1px rgba(54, 240, 138, 0.06),
        0 20px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(54, 240, 138, 0.08);
    overflow: hidden;
    backdrop-filter: blur(4px);
    animation: term-float 7s ease-in-out infinite;
}
.hero-term-panel.panel-a { animation-delay: 0s; margin-top: -40px; }
.hero-term-panel.panel-b { animation-delay: -2.3s; opacity: 0.85; width: min(360px, 34vw); }
.hero-term-panel.panel-c { animation-delay: -4.6s; margin-top: 50px; opacity: 0.7; }
.htp-bar {
    display: flex;
    gap: 7px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(54, 240, 138, 0.1);
    background: rgba(13, 21, 18, 0.9);
}
.htp-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line);
}
.htp-bar span:nth-child(1) { background: var(--red); }
.htp-bar span:nth-child(2) { background: var(--yellow); }
.htp-bar span:nth-child(3) { background: var(--grn-dot); }
.htp-body {
    display: block;
    height: 220px;
    padding: 14px 16px;
    margin: 0;
    font-size: 10px;
    line-height: 1.55;
    color: rgba(54, 240, 138, 0.55);
    white-space: pre;
    overflow: hidden;
    animation: term-scroll 18s linear infinite;
    text-shadow: 0 0 8px rgba(54, 240, 138, 0.25);
}
.panel-b .htp-body { animation-duration: 22s; animation-delay: -6s; }
.panel-c .htp-body { animation-duration: 16s; animation-delay: -3s; color: rgba(200, 255, 224, 0.45); }

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 880px;
    margin: 0 auto;
    width: 100%;
}

.ascii {
    color: var(--green);
    font-size: clamp(7px, 1.6vw, 13px);
    line-height: 1.1;
    text-shadow: 0 0 12px rgba(54,240,138,0.4);
    margin-bottom: 26px;
    white-space: pre;
    overflow-x: auto;
}
.tag {
    color: var(--text-dim);
    letter-spacing: 3px;
    font-size: 13px;
    margin-bottom: 12px;
}
.headline {
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1px;
    color: #eafff2;
    text-shadow: 0 0 24px rgba(54,240,138,0.18);
    animation: headline-glow 5s ease-in-out infinite;
}
.subhead {
    margin: 22px 0 30px;
    max-width: 640px;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.7;
}

.cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.btn-launch {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    color: #021b0d;
    background: var(--green);
    border: none;
    padding: 15px 26px;
    cursor: pointer;
    border-radius: 2px;
    box-shadow: 0 0 0 1px var(--green), 0 0 22px rgba(54,240,138,0.45);
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-launch:hover {
    transform: translateY(-2px);
    background: #54ffa0;
    box-shadow: 0 0 0 1px #54ffa0, 0 0 34px rgba(54,240,138,0.7);
}
.btn-launch:active { transform: translateY(0); }
.btn-launch.sm { font-size: 13px; padding: 12px 20px; }
.btn-launch .blink { animation: blink 1s steps(1) infinite; }

.btn-ghost {
    font-family: var(--mono);
    color: var(--text-dim);
    border: 1px solid var(--line);
    padding: 14px 22px;
    border-radius: 2px;
    font-size: 14px;
    transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { color: var(--green); border-color: var(--green-dim); }
.btn-x {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-x .x-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.btn-x:hover .x-icon { color: var(--green); }

.status-line {
    margin-top: 34px;
    color: var(--text-dim);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.status-line .dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    animation: pulse 1.6s infinite;
}

/* blocks */
.block {
    max-width: 980px;
    margin: 0 auto;
    padding: 70px 28px;
    border-top: 1px dashed var(--line);
}
.block-title {
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--green);
    margin-bottom: 34px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}
.card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 24px;
    border-radius: 3px;
    transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: var(--green-dim); transform: translateY(-3px); }
.card-id {
    position: absolute;
    top: 14px; right: 16px;
    color: var(--line);
    font-size: 26px;
    font-weight: 800;
}
.card h3 { color: var(--text); letter-spacing: 1px; margin-bottom: 10px; font-size: 17px; }
.card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.card.engine h3 { color: var(--green); }
.mono-sm { color: var(--amber) !important; font-size: 12px !important; margin-bottom: 8px; }

.access-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 32px;
}
.access-box p { margin-bottom: 12px; font-size: 15px; }
.access-box .muted { color: var(--text-dim); font-size: 14px; }

.foot {
    max-width: 980px;
    margin: 0 auto;
    padding: 30px 28px 50px;
    padding-bottom: max(50px, calc(env(safe-area-inset-bottom, 0px) + 32px));
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--text-dim);
}
.muted { color: var(--text-dim); }

.section-desc {
    color: var(--text-dim);
    font-size: 14px;
    margin: -18px 0 28px;
    line-height: 1.6;
}
.section-note { font-size: 12px; margin-top: 16px; }

.block-glow {
    background:
        radial-gradient(ellipse at center, rgba(54,240,138,0.03), transparent 70%);
}

/* about */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}
.about-grid .wide { grid-column: 1 / -1; }
.card.stat {
    text-align: center;
    padding: 28px 20px;
}
.stat-num {
    font-size: 42px;
    font-weight: 800;
    color: var(--green);
    text-shadow: 0 0 20px rgba(54,240,138,0.4);
    margin-bottom: 8px;
}

/* fee bar */
.fee-bar {
    display: flex;
    height: 36px;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 24px;
    border: 1px solid var(--line);
}
.fee-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #021b0d;
}
.fee-seg.creator { background: var(--green); }
.fee-seg.llm { background: var(--line); color: var(--text-dim); }

.fee-table {
    margin-top: 20px;
    padding: 0;
    overflow: hidden;
}
.fee-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.fee-table th,
.fee-table td {
    padding: 12px 16px;
    text-align: left;
    border-top: 1px solid var(--line);
}
.fee-table th {
    color: var(--green);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 11px;
    background: rgba(54,240,138,0.04);
}
.fee-table td { color: var(--text-dim); }
.fee-table td:last-child { color: var(--green); font-weight: 700; }
.fee-table tr:hover td { background: rgba(54,240,138,0.03); }

/* roadmap */
.roadmap { display: flex; flex-direction: column; gap: 0; }
.road-item {
    position: relative;
    padding: 24px 24px 24px 48px;
    border-left: 2px solid var(--line);
    margin-left: 12px;
}
.road-item:last-child { border-left-color: transparent; }
.road-item::before {
    content: "";
    position: absolute;
    left: -7px; top: 28px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--line);
    border: 2px solid var(--bg);
}
.road-item.done::before { background: var(--green); box-shadow: 0 0 10px var(--green); }
.road-item.active::before { background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: pulse 1.6s infinite; }
.road-phase {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--green-dim);
    display: block;
    margin-bottom: 6px;
}
.road-item.active .road-phase { color: var(--amber); }
.road-item h3 { font-size: 16px; margin-bottom: 8px; color: var(--text); }
.road-item p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* deployments */
.deploy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.deploy-loading, .deploy-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
    font-size: 14px;
    border: 1px dashed var(--line);
    border-radius: 3px;
    background: rgba(11,17,14,0.6);
}
.deploy-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 18px;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.deploy-card:hover {
    border-color: var(--green-dim);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(54,240,138,0.08);
}
.deploy-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.deploy-img {
    width: 52px; height: 52px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
    flex-shrink: 0;
    background: var(--bg-soft);
}
.deploy-img.broken { display: none; }
.deploy-img.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: var(--green);
    text-transform: uppercase;
}
.deploy-card h3 { font-size: 15px; line-height: 1.3; }
.deploy-card .ticker { color: var(--amber); font-weight: 700; }
.deploy-time { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.deploy-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    font-size: 12px;
    margin-bottom: 10px;
}
.deploy-meta dt { color: var(--text-dim); }
.deploy-meta dd { color: var(--text); word-break: break-all; }
.deploy-links { font-size: 12px; }
.deploy-links a { margin-right: 8px; }

/* ---------- Terminal panel ---------- */
.terminal-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 24px;
    background: var(--bg);
}
.term-window {
    width: 100%;
    max-width: 1000px;
    height: 100%;
    max-height: 88vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-soft);
    box-shadow: none;
}
.term-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #0d1512;
    border-bottom: 1px solid var(--line);
}
.term-left { display: flex; align-items: center; gap: 14px; }
.term-back {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--green);
    background: transparent;
    border: 1px solid var(--green-dim);
    padding: 5px 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.term-back:hover {
    background: var(--green);
    color: #021b0d;
    box-shadow: 0 0 14px rgba(54,240,138,0.5);
}
.term-dots { display: flex; gap: 8px; }
.td { width: 13px; height: 13px; border-radius: 50%; display: inline-block; }
.td.red    { background: var(--red); }
.td.yellow { background: var(--yellow); }
.td.green  { background: var(--grn-dot); }
.term-title { color: var(--text-dim); font-size: 12px; }
.term-engine { color: var(--amber); font-size: 12px; }

.term-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px;
    font-size: 14px;
    line-height: 1.6;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
    -webkit-touch-callout: default;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}
.term-output,
.term-output .line,
.line.cmd .ct,
.line.bot {
    user-select: text;
    -webkit-user-select: text;
}
.term-prompt,
.term-caret,
.line.cmd .lp {
    user-select: none;
    -webkit-user-select: none;
}
.term-body::-webkit-scrollbar { width: 8px; }
.term-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.term-output { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.line { margin-bottom: 4px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.line.cmd .lp { color: var(--green); white-space: pre; overflow-wrap: normal; word-break: keep-all; }
.line.cmd .ct { color: var(--text); }
.line.sys     { color: var(--text-dim); }
.line.err     { color: var(--red); }
.line.bot {
    color: var(--bankr-orange);
    text-shadow: 0 0 14px rgba(255, 159, 102, 0.18);
}
.line.okline  { color: var(--green); }
.line .ok     { color: var(--green); font-weight: 700; }
.line .bad    { color: var(--red); font-weight: 700; }

/* Baris input — inline terminal prompt, bukan form box */
.term-inputline {
    position: relative;
    display: block;
    margin-top: 6px;
    word-break: break-word;
    overflow-wrap: anywhere;
    cursor: text;
    -webkit-tap-highlight-color: transparent;
}
.term-prompt {
    color: var(--green);
    white-space: pre;
    overflow-wrap: normal;
    word-break: keep-all;
}
.term-echo {
    color: var(--text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
}
/* input hanya tangkap keyboard — tidak tampil sebagai kotak form */
.term-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    opacity: 0;
    font-size: 16px;
    caret-color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
}
.term-input:focus,
.term-input:focus-visible {
    outline: none;
    border: none;
    box-shadow: none;
    background: transparent;
}
.term-inputline:focus-within {
    outline: none;
    box-shadow: none;
    background: transparent;
}
.term-inputline:focus-within .term-caret {
    animation: blink 1.05s steps(1) infinite;
    opacity: 1;
}
.term-inputline:not(:focus-within) .term-caret {
    opacity: 0.35;
    animation: none;
}
.term-caret {
    color: var(--green);
    animation: blink 1.05s steps(1) infinite;
}

.typing .ti-dot { animation: pulse 1s infinite; color: var(--green); }

/* ---------- animations ---------- */
@keyframes blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}
@keyframes scan-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}
@keyframes term-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes term-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}
@keyframes headline-glow {
    0%, 100% { text-shadow: 0 0 24px rgba(54, 240, 138, 0.18); }
    50% { text-shadow: 0 0 36px rgba(54, 240, 138, 0.38), 0 0 64px rgba(54, 240, 138, 0.12); }
}

/* iOS: lock scroll when terminal open */
body.terminal-open {
    overflow: hidden;
    overscroll-behavior: none;
    height: var(--app-height, 100dvh);
}

@supports (-webkit-touch-callout: none) {
    .panel.terminal-panel {
        min-height: -webkit-fill-available;
    }
    body.terminal-open {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }
}

/* ---------- responsive ---------- */
@media (max-width: 600px) {
    .topnav { display: none; }
    .topbar {
        padding-top: max(14px, calc(var(--inset-top, env(safe-area-inset-top, 0px)) + 6px));
        padding-left: max(18px, calc(env(safe-area-inset-left, 0px) + 14px));
        padding-right: max(18px, calc(env(safe-area-inset-right, 0px) + 14px));
    }
    .hero {
        padding: 24px 18px;
        min-height: auto;
        padding-top: max(40px, calc(var(--inset-top, 0px) + 24px));
    }
    .foot {
        padding-bottom: max(56px, calc(var(--inset-bottom, env(safe-area-inset-bottom, 0px)) + 40px));
    }
    .hero-term-stack { display: none; }
    .hero-matrix { opacity: 0.14; }
    .ascii { display: none; }
    .brand-name { display: none; }
    .about-grid .wide { grid-column: auto; }
    .fee-bar { flex-direction: column; height: auto; }
    .fee-seg { width: 100% !important; padding: 8px; }

    /* terminal — tinggi ikut visual viewport, tanpa geser top (cegah loop iOS) */
    .panel.terminal-panel {
        height: 100%;
        max-height: none;
        min-height: 0;
        padding: 0;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: 0;
        box-sizing: border-box;
    }
    .term-window {
        flex: 1;
        width: 100%;
        max-width: none;
        max-height: none;
        height: auto;
        min-height: 0;
        margin: 0;
        border-radius: 0;
        border: none;
    }
    .term-titlebar {
        flex-shrink: 0;
        padding: 8px 10px;
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
    }
    .term-title { display: none; }
    .term-engine { font-size: 11px; }
    .term-body {
        flex: 1;
        min-height: 0;
        padding: 12px 10px 8px;
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
        padding-bottom: calc(8px + var(--keyboard-inset, 0px));
        font-size: 12.5px;
        line-height: 1.55;
        overscroll-behavior: none;
    }
    .term-echo, .term-prompt { font-size: 12.5px; }

    .landing {
        overscroll-behavior-y: none;
        padding-bottom: var(--inset-bottom, env(safe-area-inset-bottom, 0px));
    }
}
