/* clipcmd website — colors from the clipcmd icon: prompt green, copy blue, slate */
:root {
  --bg: #0B1120;
  --bg-2: #0F172A;
  --card: #131C2E;
  --card-2: #182233;
  --border: #24324A;
  --border-2: #2A3A55;
  --text: #F1F5F9;
  --text-2: #CBD5E1;
  --muted: #94A3B8;
  --green: #4ADE80;
  --blue: #38BDF8;
  --red: #F87171;
  --term: #0C0C0C;
  --npm: #CB3837;
  --vscode: #007ACC;
  --radius: 16px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7DD3FC; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.88em; background: rgba(148, 163, 184, 0.12); border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 6px; padding: 0.08em 0.4em; color: var(--text); }
kbd { font-size: 0.85em; background: var(--card-2); border: 1px solid var(--border-2); border-bottom-width: 3px; border-radius: 6px; padding: 0.05em 0.45em; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; text-align: center; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 920px; }
.center { text-align: center; }
.grad { background: linear-gradient(90deg, var(--green), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.small { font-size: 15px; color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); color: var(--text); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 12px; font-weight: 700; font-size: 16px; text-decoration: none; color: #0B1120; background: linear-gradient(90deg, var(--green), var(--blue)); border: 0; cursor: pointer; transition: transform 0.15s ease, filter 0.15s ease; }
.btn:hover { color: #0B1120; filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-2); }
.btn-ghost:hover { color: var(--text); background: var(--card); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 15px; border-radius: 10px; }
.btn-npm { background: var(--npm); color: #fff; }
.btn-npm:hover { color: #fff; }
.btn-vscode { background: var(--vscode); color: #fff; }
.btn-vscode:hover { color: #fff; }
.copy { flex: none; font: 600 14px var(--sans); color: var(--text); background: var(--card-2); border: 1px solid var(--border-2); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.copy:hover { background: #22304A; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 17, 32, 0.82); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid rgba(36, 50, 74, 0.7); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.brand:hover { color: var(--text); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.icon-link { display: inline-flex; color: var(--text-2); }
.icon-link svg { width: 24px; height: 24px; }
.icon-link:hover { color: var(--text); }

/* hero */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(148,163,184,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,0.06) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); pointer-events: none; }
.hero::after { content: ''; position: absolute; width: 900px; height: 900px; left: -300px; top: -420px; background: radial-gradient(circle, rgba(74,222,128,0.16), transparent 62%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.eyebrow { color: var(--green); font-weight: 600; font-size: 15px; letter-spacing: 0.01em; margin-bottom: 18px; }
h1 { font-size: clamp(40px, 5.6vw, 66px); font-weight: 800; letter-spacing: -0.035em; }
.lead { font-size: 19px; color: var(--text-2); margin-top: 22px; max-width: 560px; }
.install-line { display: flex; align-items: center; gap: 12px; margin-top: 28px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 10px 10px 10px 18px; max-width: 460px; }
.install-line code { flex: 1; background: none; border: 0; padding: 0; font-size: 17px; white-space: nowrap; overflow: auto; }
.p { color: var(--green); user-select: none; }
.hint { margin-top: 12px; font-size: 15px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* terminal demo */
.hero-demo { display: grid; gap: 16px; min-width: 0; }
.term { background: var(--term); border: 1px solid #2A2A2A; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(56,189,248,0.06); }
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #1C1C1C; padding: 8px 10px 0; }
.term-tabs { display: flex; gap: 4px; overflow-x: auto; }
.term-tab { font: 500 13px var(--sans); color: #A3A3A3; background: transparent; border: 0; border-radius: 8px 8px 0 0; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.term-tab[aria-selected="true"] { background: var(--term); color: #EDEDED; }
.term-tab:hover { color: #EDEDED; }
.term-replay { font-size: 17px; color: #A3A3A3; background: transparent; border: 0; padding: 4px 8px 10px; cursor: pointer; }
.term-replay:hover { color: #EDEDED; }
.term-body { height: 380px; overflow-y: auto; padding: 16px 18px 20px; font: 14.5px/1.6 var(--mono); color: #CCCCCC; white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.term-body .line { min-height: 1.6em; }
.c-cmd { color: #F9F1A5; }
.c-cyan { color: #3A96DD; }
.c-yel { color: #C19C00; }
.c-red { color: #E74856; }
.c-green { color: #16C60C; }
.c-dim { color: #8C8C8C; }
.caret { display: inline-block; width: 8px; height: 1.15em; background: #CCCCCC; vertical-align: -0.2em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tbtns { display: flex; flex-wrap: wrap; gap: 0 1ch; }
.tbtn { font: inherit; color: #CCCCCC; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted rgba(204,204,204,0.55); text-underline-offset: 4px; border-radius: 3px; }
.tbtn:hover { color: #fff; text-decoration-color: #fff; background: rgba(74,222,128,0.14); }
.tbtn.selected { color: var(--green); }
.tbtns.fresh .tbtn { animation: pop 0.45s ease both; }
.tbtns.fresh .tbtn:nth-child(2) { animation-delay: 0.08s; }
.tbtns.fresh .tbtn:nth-child(3) { animation-delay: 0.16s; }
.tbtns.fresh .tbtn:nth-child(4) { animation-delay: 0.24s; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); color: var(--green); } to { opacity: 1; transform: none; } }

/* agent box */
.agent { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.agent-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.agent-head svg { width: 20px; height: 20px; flex: none; }
.agent-head label { font-weight: 700; font-size: 15px; }
.agent-head label span { font-weight: 400; color: var(--muted); }
.agent-clear { margin-left: auto; font: 500 13px var(--sans); color: var(--muted); background: none; border: 1px solid var(--border-2); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.agent-clear:hover { color: var(--text); }
#agent-box { width: 100%; min-height: 128px; resize: vertical; background: var(--bg); color: var(--text-2); border: 1.5px solid var(--border-2); border-radius: 10px; padding: 12px 14px; font: 13px/1.5 var(--mono); }
#agent-box:focus { outline: none; border-color: var(--green); }
.agent-meta { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.agent-meta.ok { color: var(--green); }

/* copied tag (the real clipcmd tag) */
.copied-tag { position: fixed; z-index: 200; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 12px; border-radius: 9px; background: #202225; color: #fff; font: 500 15px var(--sans); box-shadow: 0 10px 30px rgba(0,0,0,0.5); pointer-events: none; opacity: 0; transition: opacity 0.12s ease; }
.copied-tag.show { opacity: 0.97; }
.copied-tag svg { width: 22px; height: 22px; }

/* sections */
.section { padding: 96px 0; border-top: 1px solid rgba(36, 50, 74, 0.55); }
.section-lead { text-align: center; color: var(--text-2); font-size: 18px; margin: 16px auto 0; max-width: 720px; }

/* before / after */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.compare-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.compare-card h3 { font-size: 22px; margin-bottom: 18px; }
.compare-card.bad h3 { color: var(--red); }
.compare-card.good h3 { color: var(--green); }
.compare-card.good { border-color: rgba(74, 222, 128, 0.45); box-shadow: 0 0 0 1px rgba(74,222,128,0.12), 0 20px 60px rgba(74,222,128,0.06); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 14px; font-size: 18px; color: var(--text-2); }
.steps li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--sans); background: #334155; color: var(--text); }
.good .steps li::before { background: rgba(74,222,128,0.18); color: var(--green); }
.steps li.miss { color: var(--red); font-style: italic; counter-increment: none; }
.steps li.miss::before { content: '✗'; background: rgba(248,113,113,0.16); color: var(--red); }
.good-note { margin-top: 22px; color: var(--text-2); }

/* video */
.video-frame { margin-top: 40px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 30px 90px rgba(0,0,0,0.5); background: #000; aspect-ratio: 16 / 9; }
.video-frame video { width: 100%; height: 100%; }

/* install */
.parts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; }
.part { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.part h3 { font-size: 22px; }
.part p { color: var(--text-2); }
.part .small { color: var(--muted); }
.part .btn { align-self: flex-start; margin-top: auto; }
.step-badge { align-self: flex-start; font: 800 12px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: var(--npm); border-radius: 6px; padding: 4px 10px; }
.step-badge.blue { background: var(--vscode); }
.cmd-block { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.cmd-row { display: flex; align-items: center; gap: 10px; padding-left: 8px; }
.cmd-row code { flex: 1; background: none; border: 0; padding: 0; font-size: 15px; white-space: nowrap; overflow-x: auto; }
.then { max-width: 760px; margin: 40px auto 18px; padding-left: 1.4em; display: grid; gap: 10px; color: var(--text-2); font-size: 18px; }
.then li::marker { color: var(--green); font-weight: 800; }

/* features */
.buttons-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 44px; }
.bcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.bcard .k { align-self: flex-start; background: none; border: 0; padding: 0; font-size: 19px; font-weight: 700; text-decoration: underline dotted; text-underline-offset: 6px; }
.k.green { color: var(--green); } .k.blue { color: var(--blue); } .k.white { color: var(--text); }
.k.grad-text { background: linear-gradient(90deg, var(--green), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; text-decoration-color: var(--blue); }
.bcard h3 { font-size: 19px; }
.bcard pre { margin: auto 0 0; background: var(--bg); border: 1px solid #1E293B; border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.feature { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.feature h3 { margin-bottom: 10px; }
.feature p { color: var(--text-2); font-size: 16px; }

/* how it works */
.flow { list-style: none; padding: 0; margin: 48px 0 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; position: relative; }
.flow li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; position: relative; }
.flow li:not(:last-child)::after { content: '→'; position: absolute; right: -15px; top: 30px; color: var(--muted); font-size: 20px; z-index: 1; }
.flow .n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--green), var(--blue)); color: #0B1120; font-weight: 800; margin-bottom: 14px; }
.flow h3 { margin-bottom: 8px; font-size: 18px; }
.flow p { color: var(--text-2); font-size: 15.5px; }

/* compatibility */
.compat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 44px 0 24px; }
.compat > div { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.compat h3 { margin-bottom: 14px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14.5px; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 999px; padding: 5px 12px; }

/* faq */
.faq { margin-top: 40px; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--green); font-size: 24px; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding: 0 0 18px; }

/* final cta */
.cta { background: radial-gradient(ellipse at 50% 0%, rgba(56,189,248,0.12), transparent 60%); }
.cta img { margin: 0 auto 22px; border-radius: 20px; }
.center-line { margin: 26px auto 0; }
.center-actions { justify-content: center; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 36px 0 44px; color: var(--muted); font-size: 15px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer nav a, .footer p a { color: var(--text-2); text-decoration: none; }
.footer nav a:hover, .footer p a:hover { color: var(--text); text-decoration: underline; }
.footer p { margin-left: auto; }
.small-brand { font-size: 17px; }
.small-brand img { border-radius: 6px; }

/* grid and flex children may shrink below their content (long one-line commands scroll instead) */
.hero-grid > *, .compare-grid > *, .parts > *, .buttons-grid > *, .features > *, .flow > li, .compat > *, .cmd-block, .install-line code, .cmd-row code { min-width: 0; }

/* scroll reveal */
/* hidden only once the script runs, so the page reads fine without JavaScript */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .lead, .install-line { max-width: none; }
  .buttons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li:not(:last-child)::after { display: none; }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .compare-grid, .parts, .features, .compat { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 72px 0; }
  .footer p { margin-left: 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16px; }
  .hero { padding: 44px 0 64px; }
  .lead { font-size: 17px; }
  .buttons-grid, .flow { grid-template-columns: minmax(0, 1fr); }
  .term-body { height: 340px; font-size: 13px; padding: 14px; }
  .install-line code { font-size: 15px; }
  .compare-card, .part { padding: 22px; }
  .btn { width: 100%; }
  .part .btn { width: 100%; }
  .nav-cta .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .tbtns.fresh .tbtn { animation: none; }
  .btn, .copied-tag { transition: none; }
}

/* the product name, first in the main heading */
.h1-brand { display: block; width: fit-content; margin-bottom: 14px; font-family: var(--mono); font-size: 0.42em; font-weight: 700; letter-spacing: 0; color: var(--green); background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.35); border-radius: 10px; padding: 4px 14px; }
