/* HyperFrames demo page — Jarvis Playground */
:root {
    --hf-bg: #07090d;
    --hf-panel: #0d1117;
    --hf-border: rgba(255, 255, 255, 0.09);
    --hf-text: #f4f7fa;
    --hf-muted: rgba(255, 255, 255, 0.62);
    --hf-cyan: #22d3ee;
    --hf-violet: #8b5cf6;
}

.hf-hero {
    position: relative;
    padding: 170px 24px 90px;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(1100px 620px at 50% 30%, rgba(34, 211, 238, 0.13), transparent 62%),
        radial-gradient(800px 500px at 85% 90%, rgba(139, 92, 246, 0.10), transparent 60%),
        var(--hf-bg);
    border-bottom: 1px solid var(--hf-border);
}

.hf-hero-glow {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(900px 560px at 50% 40%, #000 30%, transparent 78%);
    pointer-events: none;
}

.hf-hero-content { position: relative; max-width: 980px; margin: 0 auto; }

.hf-kicker {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--hf-cyan);
    opacity: 0.85;
    margin-bottom: 22px;
}

.hf-title {
    font-size: clamp(52px, 8vw, 96px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--hf-text);
}
.hf-title span { color: var(--hf-cyan); text-shadow: 0 0 60px rgba(34, 211, 238, 0.4); }

.hf-sub {
    margin-top: 18px;
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 600;
    color: var(--hf-text);
    opacity: 0.9;
}

.hf-lede {
    margin: 22px auto 0;
    max-width: 780px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--hf-muted);
}
.hf-lede code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--hf-cyan);
}

.hf-pipeline {
    margin-top: 38px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
}
.hf-pipe-step {
    font-size: 14px;
    font-weight: 600;
    color: var(--hf-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hf-border);
    padding: 9px 18px;
    border-radius: 999px;
}
.hf-pipe-step.accent {
    color: #04141a;
    background: linear-gradient(90deg, var(--hf-cyan), #67e8f9);
    border: none;
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.4);
}
.hf-pipe-arrow { color: var(--hf-cyan); font-size: 18px; opacity: 0.7; }

/* Clips */
.hf-clips {
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 24px 30px;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.hf-clip {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: center;
}
.hf-clip.flip .hf-clip-media { order: 2; }
.hf-clip.flip .hf-clip-body { order: 1; }

.hf-clip-media {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--hf-border);
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.hf-clip-media::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}
.hf-clip-media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.hf-clip-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--hf-cyan);
    margin-bottom: 14px;
}
.hf-clip-body h2 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--hf-text);
    margin-bottom: 14px;
}
.hf-clip-body p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--hf-muted);
}
.hf-clip-body code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.88em;
    color: var(--hf-cyan);
}

.hf-clip-meta {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hf-clip-meta span {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--hf-muted);
    border: 1px solid var(--hf-border);
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 999px;
}

/* Full library */
.hf-lib {
    max-width: 1280px;
    margin: 40px auto 0;
    padding: 70px 24px 20px;
    border-top: 1px solid var(--hf-border);
}
.hf-lib h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--hf-text);
    margin-bottom: 12px;
}
.hf-lib-count {
    font-size: 15px;
    font-weight: 600;
    color: var(--hf-cyan);
    letter-spacing: 0.06em;
    margin-left: 12px;
}
.hf-lib-sub {
    max-width: 820px;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--hf-muted);
    margin-bottom: 34px;
}
.hf-lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.hf-lib-cell {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--hf-border);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
}
.hf-lib-cell:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 24px rgba(34, 211, 238, 0.15);
}
.hf-lib-cell .hf-video { pointer-events: none; }
.hf-lib-cell .hf-video::before { content: ""; display: block; padding-top: 56.25%; }
.hf-lib-cell span {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 22px 14px 10px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    z-index: 2;
}

/* Under the hood */
.hf-under {
    max-width: 1280px;
    margin: 40px auto 0;
    padding: 70px 24px;
    border-top: 1px solid var(--hf-border);
}
.hf-under h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--hf-text);
    margin-bottom: 36px;
}
.hf-under-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}
.hf-under-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--hf-border);
    border-radius: 16px;
    padding: 28px;
}
.hf-under-icon { font-size: 34px; margin-bottom: 14px; }
.hf-under-card h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--hf-text);
    margin-bottom: 10px;
}
.hf-under-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--hf-muted);
}
.hf-under-card code {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.9em;
    color: var(--hf-cyan);
}

.hf-footer {
    text-align: center;
    padding: 40px 24px 60px;
    border-top: 1px solid var(--hf-border);
    color: rgba(255, 255, 255, 0.4);
    font-size: 13.5px;
}
.hf-footer a { color: var(--hf-cyan); text-decoration: none; }
.hf-footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
    .hf-clip, .hf-clip.flip { grid-template-columns: 1fr; }
    .hf-clip.flip .hf-clip-media { order: 0; }
    .hf-clip.flip .hf-clip-body { order: 1; }
    .hf-hero { padding-top: 140px; }
}

/* ── Page → Video Studio ─────────────────────────────────── */
.hf-studio { max-width: 1100px; margin: 0 auto; padding: 90px 28px 30px; }
.hf-studio-head { margin-bottom: 34px; }
.hf-studio-head h2 { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 14px; }
.hf-studio-sub { font-size: 17px; line-height: 1.6; color: rgba(234,242,247,.62); max-width: 760px; }
.hf-studio-panel {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(8px);
}
.hf-studio-form { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.hf-studio-field { display: flex; flex-direction: column; gap: 8px; flex: 1 1 340px; min-width: 260px; }
.hf-studio-field-len { flex: 0 1 240px; min-width: 200px; }
.hf-studio-field span { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(234,242,247,.5); }
.hf-studio-field span strong { color: #22d3ee; font-variant-numeric: tabular-nums; }
.hf-studio-field input[type=url] {
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  color: #eaf2f7; font-size: 15px; padding: 12px 14px; outline: none; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.hf-studio-field input[type=url]:focus { border-color: rgba(34,211,238,.6); box-shadow: 0 0 0 3px rgba(34,211,238,.15); }
.hf-studio-field input[type=range] { accent-color: #22d3ee; width: 100%; cursor: pointer; }
.hf-studio-btn {
  background: linear-gradient(135deg, #22d3ee, #8b5cf6); color: #05070a;
  font-size: 15px; font-weight: 800; letter-spacing: .02em;
  border: none; border-radius: 12px; padding: 13px 26px; cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .2s;
  box-shadow: 0 8px 24px rgba(34,211,238,.25);
}
.hf-studio-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(34,211,238,.35); }
.hf-studio-btn:disabled { opacity: .5; cursor: wait; transform: none; }
.hf-studio-status { margin-top: 24px; }
.hf-studio-status-line { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; color: rgba(234,242,247,.75); margin-bottom: 8px; }
.hf-studio-pct { color: #22d3ee; font-variant-numeric: tabular-nums; }
.hf-studio-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.10); overflow: hidden; }
.hf-studio-bar i { display: block; height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6); transition: width .6s ease; }
.hf-studio-error { margin-top: 20px; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  background: rgba(248,113,113,.10); border: 1px solid rgba(248,113,113,.35); color: #fca5a5; }
.hf-studio-result { margin-top: 24px; }
.hf-studio-result video { width: 100%; max-width: 720px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12);
  background: #000; display: block; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.hf-studio-actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.hf-studio-dl { font-size: 14px; font-weight: 700; color: #22d3ee; text-decoration: none;
  border: 1px solid rgba(34,211,238,.4); border-radius: 10px; padding: 9px 16px; transition: background .2s; }
.hf-studio-dl:hover { background: rgba(34,211,238,.12); }
.hf-studio-meta { font-size: 13px; color: rgba(234,242,247,.45); }
@media (max-width: 720px) {
  .hf-studio { padding: 60px 20px 20px; }
  .hf-studio-head h2 { font-size: 30px; }
  .hf-studio-panel { padding: 20px; }
  .hf-studio-form { flex-direction: column; align-items: stretch; }
  .hf-studio-btn { width: 100%; }
}
