/* ==========================================================================
   getvibe.dev — The Vibe Suite
   DIRECTION CONTRACT (impeccable rebuild, 2026-07)
   THESIS: A signal board for eight small tools — a quiet dark console where
   one amber pulse mark carries the identity; refuses the SaaS landing stack
   (gradient hero, bento grid, logo cloud).
   OWN-WORLD: near-black console #0a0a0c, hairline-seamed cards, signal amber
   #f0b429 rationed to focus/action/mark, system sans with real weight steps,
   mono only for commands, flat — no shadows, gradients, or glow.
   STORY: visitor reads "companions for your coding agent", trusts
   local-first ("your machine, your keys"), copies one command or opens a
   product page.
   FIRST VIEWPORT: pulse wordmark top-left; hero = pulse mark, "The Vibe
   Suite", lede, local-first line; hairline product grid begins below.
   FORM: brief-pinned minimal dark register (offrouter.com / here.now);
   a pinned direction beats the concept roll. See DESIGN.md.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* color */
  --bg: #0a0a0c;
  --bg-raised: #121216;
  --bg-inset: #0e0e11;
  --fg: #ededf0;
  --muted: #a3a3ad;
  --faint: #868692;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #f0b429;
  --accent-hover: #f6c555;
  --accent-ink: #0a0a0c;

  /* type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --t-xs: 0.78125rem;  /* 12.5 */
  --t-sm: 0.875rem;    /* 14 */
  --t-md: 1rem;        /* 16 */
  --t-lg: 1.1875rem;   /* 19 */
  --t-xl: clamp(1.625rem, 1.25rem + 1.6vw, 2.25rem);
  --t-2xl: clamp(2rem, 1.4rem + 2.6vw, 3rem);

  /* space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-7: 2rem;
  --s-8: 3rem;
  --s-9: 4rem;
  --s-10: 6rem;

  /* shape + motion */
  --r-sm: 6px;
  --r-md: 12px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 140ms;

  --container: 65rem;
}

/* --- Base ---------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--t-md);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

h1, h2, h3, p, ul, figure { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:focus-visible,
button:focus-visible,
video:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

@media (min-width: 45rem) {
  .container { padding-inline: var(--s-7); }
}

.skip-link {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  z-index: 10;
  padding: var(--s-2) var(--s-4);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: var(--t-sm);
  font-weight: 600;
  border-radius: var(--r-sm);
  transform: translateY(-300%);
}

.skip-link:focus-visible {
  transform: none;
  outline-offset: 2px;
}

/* --- Header -------------------------------------------------------------- */

.site-header { padding-block: var(--s-5); }

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wordmark svg {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  flex: none;
}

.site-nav {
  display: flex;
  gap: var(--s-5);
  font-size: var(--t-sm);
}

.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--accent); }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  padding-block: var(--s-10) var(--s-9);
  max-width: 40rem;
}

.hero-pulse {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  color: var(--accent);
  margin-bottom: var(--s-6);
}

.hero h1 {
  font-size: var(--t-2xl);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin-bottom: var(--s-4);
}

.hero .lede {
  font-size: var(--t-lg);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-3);
}

.hero .sub {
  font-size: var(--t-md);
  color: var(--muted);
  max-width: 34rem;
}

/* --- Product grid (hub) --------------------------------------------------- */

.products { padding-bottom: var(--s-10); }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

@media (min-width: 40rem) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64rem) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--bg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: background var(--dur) var(--ease);
}

.card:hover { background: var(--bg-raised); }

.card .name {
  font-size: var(--t-md);
  font-weight: 650;
  letter-spacing: -0.005em;
}

.card .name a:hover { color: var(--accent); }

.card .tagline {
  font-size: var(--t-sm);
  color: var(--muted);
  flex-grow: 1;
  margin-bottom: var(--s-2);
}

.card-links {
  display: flex;
  gap: var(--s-4);
  font-size: var(--t-xs);
  margin-top: var(--s-1);
}

.card-links a { color: var(--muted); }
.card-links a:hover { color: var(--fg); }

.card-links .details { color: var(--fg); }
.card-links .details:hover { color: var(--accent); }

/* Invisible ninth bay: completes the 3x3 rectangle on wide screens */
.card--bay { display: none; }

@media (min-width: 64rem) {
  .card--bay { display: block; }
  .card--bay:hover { background: var(--bg); }
}

/* --- Install row (command + copy pill) ------------------------------------ */

.install {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--s-3);
}

.cmd {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 2.625rem;
  padding: 0 var(--s-4);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.cmd::-webkit-scrollbar { display: none; }

.copy {
  flex: none;
  margin-left: auto;      /* pinned right, never flush against the command */
  min-height: 2.625rem;
  padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.copy:hover,
.copy:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.copy.copied {
  color: var(--accent);
  border-color: var(--accent);
}

/* Hub cards stack the install row: command full width, copy pill below-right —
   uniform at every breakpoint, and the command never clips. */
.card .install {
  flex-direction: column;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.625rem var(--s-5);
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  font-size: var(--t-sm);
  font-weight: 500;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn--accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
}

/* --- Product page --------------------------------------------------------- */

.product-hero { max-width: 44rem; }

.product-hero h1 { font-size: var(--t-xl); }

.product-hero .install { margin-top: var(--s-6); max-width: 30rem; }

.demo { margin-block: var(--s-9); }

.demo video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.demo figcaption {
  margin-top: var(--s-3);
  font-size: var(--t-xs);
  color: var(--faint);
}

.about { max-width: 40rem; }

.about h2 {
  font-size: var(--t-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-4);
}

.about p { color: var(--muted); }

.features {
  list-style: none;
  padding: 0;
  margin-top: var(--s-5);
  display: grid;
  gap: var(--s-3);
}

.features li {
  position: relative;
  padding-left: var(--s-6);
  font-size: var(--t-sm);
  color: var(--fg);
}

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.875rem;
  height: 1px;
  background: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-8);
}

.back {
  margin-block: var(--s-9) var(--s-10);
  font-size: var(--t-sm);
}

.back a { color: var(--muted); }
.back a:hover { color: var(--accent); }

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--s-6) var(--s-8);
}

.footer-in {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  justify-content: space-between;
  font-size: var(--t-xs);
  color: var(--faint);
}

.footer-in a { color: var(--muted); }
.footer-in a:hover { color: var(--fg); }

/* --- Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-pulse path {
    stroke-dasharray: 130;
    stroke-dashoffset: 130;
    animation: pulse-draw 1.1s var(--ease) 0.1s forwards;
  }

  /* Hub hero only — product pages let the video be the motion (DESIGN.md) */
  .hero:not(.product-hero) > * {
    opacity: 0;
    transform: translateY(8px);
    animation: rise 0.7s var(--ease) forwards;
  }

  .hero:not(.product-hero) > *:nth-child(1) { animation-delay: 0s; }
  .hero:not(.product-hero) > *:nth-child(2) { animation-delay: 0.08s; }
  .hero:not(.product-hero) > *:nth-child(3) { animation-delay: 0.14s; }
  .hero:not(.product-hero) > *:nth-child(4) { animation-delay: 0.2s; }
}

@keyframes pulse-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
