/* vibetime — shared design system */

@font-face { font-family: "Geist"; src: url("fonts/Geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #08090a;
  --bg-2: #0b0d0c;
  --card: #0f1110;
  --card-2: #141716;
  --line: rgb(255 255 255 / .07);
  --line-2: rgb(255 255 255 / .12);
  --fill: rgb(255 255 255 / .045);
  --fill-2: rgb(255 255 255 / .08);
  --text: #edf0ee;
  --text-2: #9ea6a2;
  --text-3: #646c68;
  --accent: #4ade80;
  --accent-2: #22c55e;
  --accent-3: #86efac;
  --accent-ink: #03140a;
  --accent-soft: rgb(74 222 128 / .1);
  --accent-line: rgb(74 222 128 / .32);
  --glow: rgb(74 222 128 / .28);
  --teal: #2dd4bf;
  --sky: #7dd3fc;
  --amber: #fbbf24;
  --red: #f87171;
  --tip-bg: #1b1f1d;
  --tip-fg: #f3f5f4;
  --shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 1px 2px rgb(0 0 0 / .5), 0 12px 32px -16px rgb(0 0 0 / .6);
  --shadow-lg: 0 1px 0 rgb(255 255 255 / .05) inset, 0 30px 80px -30px rgb(0 0 0 / .8);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  --r: 14px;
  --max: 1160px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f9f8;
  --bg-2: #f2f4f3;
  --card: #ffffff;
  --card-2: #fafbfa;
  --line: rgb(10 22 15 / .08);
  --line-2: rgb(10 22 15 / .14);
  --fill: rgb(10 22 15 / .035);
  --fill-2: rgb(10 22 15 / .065);
  --text: #0a0f0c;
  --text-2: #4c5651;
  --text-3: #89928d;
  --accent: #16a34a;
  --accent-2: #15803d;
  --accent-3: #22c55e;
  --accent-ink: #ffffff;
  --accent-soft: rgb(22 163 74 / .08);
  --accent-line: rgb(22 163 74 / .3);
  --glow: rgb(22 163 74 / .2);
  --teal: #0d9488;
  --sky: #0284c7;
  --amber: #d97706;
  --red: #dc2626;
  --tip-bg: #0d1210;
  --tip-fg: #f3f5f4;
  --shadow: 0 1px 2px rgb(10 22 15 / .04), 0 8px 24px -14px rgb(10 22 15 / .14);
  --shadow-lg: 0 30px 80px -36px rgb(10 22 15 / .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, kbd, pre, .mono { font-family: var(--mono); font-feature-settings: "liga" 0; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ icons */
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bi { width: 16px; height: 16px; flex: none; fill: currentColor; }
.ico {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--fill); border: 1px solid var(--line); color: var(--text);
}
.ico .bi { width: 15px; height: 15px; }
.ico .mono-letter { font: 600 11px/1 var(--mono); color: var(--text-2); }

/* ------------------------------------------------------------------ type */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}
.h1 { font-size: clamp(44px, 7.4vw, 88px); font-weight: 620; letter-spacing: -.055em; line-height: .98; margin: 0; }
.h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 600; letter-spacing: -.045em; line-height: 1.04; margin: 0; }
.h3 { font-size: 17px; font-weight: 580; letter-spacing: -.015em; line-height: 1.3; margin: 0; }
.lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; color: var(--text-2); margin: 0; }
.grad {
  background: linear-gradient(100deg, var(--accent-3) 0%, var(--accent) 35%, var(--teal) 70%, var(--accent-3) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: grad-pan 9s ease-in-out infinite alternate;
}
@keyframes grad-pan { to { background-position: 100% 0; } }

/* ------------------------------------------------------------------ brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 640; font-size: 17px; letter-spacing: -.03em; }
.brand .logo { width: 26px; height: 26px; border-radius: 7px; overflow: hidden; }
.brand .logo .hands { transform-origin: 16px 17.2px; transition: transform .9s var(--spring); }
.brand:hover .logo .hands { transform: rotate(360deg); }
.brand .logo .spark { transform-origin: 16px 7.6px; transition: transform .6s var(--spring); }
.brand:hover .logo .spark { transform: scale(1.35) rotate(90deg); }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { height: 60px; display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--fill); }
.nav .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ------------------------------------------------------------------ buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--text); font-size: 14px; font-weight: 520; white-space: nowrap;
  cursor: pointer; user-select: none; overflow: hidden; isolation: isolate;
  transition: background .2s, border-color .2s, color .2s, box-shadow .3s, transform .2s var(--spring);
}
.btn:hover { background: var(--card-2); border-color: color-mix(in srgb, var(--text) 22%, transparent); }
.btn:active { transform: scale(.97); }
.btn .i { width: 15px; height: 15px; }
.btn-lg { height: 44px; padding: 0 20px; border-radius: 12px; font-size: 15px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--fill); border-color: transparent; color: var(--text); }
.btn-icon { width: 36px; padding: 0; }
.btn-primary {
  background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 580;
  box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, 0 0 0 1px color-mix(in srgb, var(--accent) 60%, black) , 0 8px 24px -10px var(--glow);
}
.btn-primary:hover { background: var(--accent); border-color: transparent; box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, 0 0 0 1px color-mix(in srgb, var(--accent) 60%, black), 0 10px 34px -8px var(--glow); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .45) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn .arrow { transition: transform .35s var(--spring); }
.btn:hover .arrow { transform: translateX(3px); }
.spin .i { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ tabs (segmented) */
.tabs {
  position: relative; display: inline-flex; gap: 2px; padding: 3px;
  border-radius: 11px; background: var(--fill); border: 1px solid var(--line);
}
.tabs button {
  position: relative; z-index: 1; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none;
  color: var(--text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; transition: color .25s;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs .ind {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; border-radius: 8px;
  background: var(--card-2); border: 1px solid var(--line-2); box-shadow: 0 1px 3px rgb(0 0 0 / .2);
  transition: transform .45s var(--spring), width .45s var(--spring);
}
:root[data-theme="light"] .tabs .ind { background: #fff; box-shadow: 0 1px 2px rgb(10 22 15 / .08), 0 2px 8px -2px rgb(10 22 15 / .1); }

/* ------------------------------------------------------------------ cards */
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow);
}
:root[data-theme="dark"] .card { background: linear-gradient(180deg, rgb(255 255 255 / .018), transparent 40%), var(--card); }
.spot { --mx: 50%; --my: 0%; overflow: hidden; }
.spot::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(380px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .4s;
}
.spot:hover::before, .spot:hover::after { opacity: 1; }
.spot > * { position: relative; z-index: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--fill);
  font-size: 13px; color: var(--text-2); white-space: nowrap;
}
.pill .i { width: 14px; height: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }

.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 550; }
.delta .i { width: 13px; height: 13px; }
.delta.up { color: var(--accent); }
.delta.down { color: var(--red); }
.u { color: var(--text-3); font-weight: 500; font-size: .62em; margin-left: 1px; letter-spacing: 0; }

/* ------------------------------------------------------------------ command box */
.cmd {
  display: flex; align-items: center; gap: 4px; min-width: 0;
  height: 48px; padding: 0 6px 0 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  font: 400 13.5px/1 var(--mono); text-align: left;
}
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; padding: 14px 0; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd .ps { color: var(--text-3); margin-right: 10px; user-select: none; }
.copy-btn .i { transition: transform .35s var(--spring), opacity .2s; }
.copy-btn .ok { position: absolute; opacity: 0; transform: scale(.4); color: var(--accent); }
.copy-btn.done .cp { opacity: 0; transform: scale(.4); }
.copy-btn.done .ok { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ tooltip / toast */
.tip {
  position: fixed; z-index: 100; left: 0; top: 0; pointer-events: none;
  padding: 7px 10px; border-radius: 9px; background: var(--tip-bg); color: var(--tip-fg);
  font-size: 12.5px; line-height: 1.35; box-shadow: 0 10px 30px -8px rgb(0 0 0 / .5); border: 1px solid rgb(255 255 255 / .08);
  opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .15s, transform .2s var(--ease); white-space: nowrap;
}
.tip.show { opacity: 1; transform: none; }
.tip b { display: block; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.tip span { color: rgb(243 245 244 / .6); }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 12px; background: var(--tip-bg); color: var(--tip-fg); font-size: 14px; font-weight: 500;
  border: 1px solid rgb(255 255 255 / .08); box-shadow: 0 20px 50px -12px rgb(0 0 0 / .55);
  transform: translate(-50%, 160%); transition: transform .5s var(--spring);
}
.toast.show { transform: translate(-50%, 0); }
.toast .i { color: var(--accent); }

/* ------------------------------------------------------------------ motion */
.reveal { opacity: 0; transform: translateY(18px); filter: blur(6px); }
.reveal.in {
  opacity: 1; transform: none; filter: none;
  transition: opacity .9s var(--ease), transform 1s var(--ease), filter .9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.words .w { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(10px); animation: word-in 1s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes word-in { to { opacity: 1; transform: none; filter: none; } }

/* ------------------------------------------------------------------ footer */
.footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-top: 28px; padding-bottom: 36px; color: var(--text-3); font-size: 13.5px; }
.footer .brand { font-size: 15px; color: var(--text); }
.footer .brand .logo { width: 22px; height: 22px; }
.footer nav { display: flex; gap: 18px; margin-left: auto; }
.footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .words .w { opacity: 1; transform: none; filter: none; }
}
