/* Tabu website: same dark style as the app */
:root {
  --page: #050b18;
  --panel: rgba(5, 11, 24, 0.82);
  --border: rgba(41, 134, 230, 0.25);
  --text: #ffffff;
  --muted: #7a8aa2;
  --accent: #2986e6;
  --warning: #f5a524;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--accent); }

/* text only for screen readers and search engines */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- top bar and tabs ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 48px 12px 24px;   /* top, right, bottom, left */
  background: rgba(5, 11, 24, 0.9);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  padding: 4px 0;
  text-decoration: none;
}
.brand svg { display: block; height: 22px; width: auto; }

/* computer: the menu is always open, tabs in one row, no Menu button */
.menu-toggle, .menu-button { display: none; }
.menu nav { display: flex; gap: 16px; }
@media (max-width: 1150px) {  /* narrower windows: tabs smaller and closer so they fit */
  .menu nav { gap: 4px; }
  .menu nav a, .menu nav span { font-size: 14px; padding: 6px 10px; }
}
.menu nav a, .menu nav span {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.menu nav a { color: #e6edf7; font-weight: 500; }
.menu nav a:hover { color: var(--text); background: rgba(41, 134, 230, 0.25); }
.menu nav a.active { color: var(--text); background: var(--accent); font-weight: 600; }
.menu nav .todo { color: rgba(255, 255, 255, 0.55); cursor: default; }  /* tab not built yet */

/* ---------- Home: one screen, picture fills it, no scrolling ---------- */
body.home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.home .top { position: relative; }

/* background layers (no picture: drawn by the browser, sharp at any size) */
.sky, .grid, .waves { position: fixed; z-index: -1; pointer-events: none; }
.sky {
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(41, 134, 230, 0.28), transparent 70%),
    radial-gradient(ellipse 40% 35% at 85% 70%, rgba(139, 92, 246, 0.16), transparent 70%),
    radial-gradient(ellipse 40% 35% at 10% 75%, rgba(45, 212, 191, 0.10), transparent 70%),
    var(--page);
}
.grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(41, 134, 230, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 134, 230, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000, transparent 80%);
}
.waves {
  left: 0;
  bottom: 0;
  width: 200%;          /* twice as wide: slides left by half, then repeats */
  height: 42vh;
}

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(10px, 2.2vh, 24px);
  padding: 8vh 16px 28px;
  text-align: center;
}
.home-main .chips { margin-top: auto; }   /* small banners at the very bottom */

/* TABU logo */
.logo { margin: 0 0 clamp(4px, 1vh, 12px); line-height: 0; cursor: pointer; }   /* click: the logo animation plays again */
/* logo video: edges faded and blended, so its dark rectangle disappears into the page */
.logo-video {
  display: block;
  width: clamp(380px, 58vw, 880px);
  aspect-ratio: 1136 / 256;
  height: auto;
  max-height: 22vh;
  mix-blend-mode: screen;
  filter: contrast(1.35) brightness(0.9);   /* video's dark blue background close to black, so "screen" hides it */
  -webkit-mask-image: linear-gradient(to right, transparent 4%, #000 20%, #000 80%, transparent 96%),
                      linear-gradient(to bottom, transparent 2%, #000 18%, #000 82%, transparent 98%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 4%, #000 20%, #000 80%, transparent 96%),
                      linear-gradient(to bottom, transparent 2%, #000 18%, #000 82%, transparent 98%);
          mask-composite: intersect;
}
/* drawn logo: backup only */
.logo-svg {
  display: none;
  width: clamp(220px, 34vw, 520px);
  height: auto;
  max-height: 18vh;
  filter: drop-shadow(0 0 24px rgba(41, 134, 230, 0.35));
}
.no-video .logo-video { display: none; }
.no-video .logo-svg { display: inline-block; }

.tagline {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 50px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.5px;
}
.t-white { color: #fff; }
.t-blue { color: #38a8ff; }
.t-purple { color: #8b5cf6; }
.t-grey { color: #9fb0c8; }
.t-teal { color: #2dd4bf; }

.subline {
  margin: 0;
  color: #c3cede;
  font-size: clamp(14px, 1.25vw, 19px);
  line-height: 1.6;
}

/* the four tiles */
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(10px, 1.6vw, 22px); }
.tile {
  width: clamp(96px, 9vw, 140px);
  padding: clamp(12px, 1.8vh, 20px) 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  background: rgba(5, 11, 24, 0.6);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 18%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 8%, transparent);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.tile svg {
  width: clamp(30px, 3vw, 44px);
  height: auto;
  fill: none;
  stroke: var(--c);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--c));
}
.tile span {
  color: var(--c);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.tile:hover {
  transform: translateY(-5px);
  border-color: var(--c);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 35%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 12%, transparent);
}

/* tiles as buttons (Home pop-ups, Projects types) */
button.tile { font: inherit; color: inherit; cursor: pointer; }
button.tile:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
.tile.active {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, rgba(5, 11, 24, 0.6));
  box-shadow: 0 0 26px color-mix(in srgb, var(--c) 40%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 14%, transparent);
}

/* Home: info pop-up for the four boxes */
.info-pop {
  --c: var(--accent);
  width: min(440px, calc(100vw - 32px));
  padding: 30px 24px 24px;
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  border-radius: 18px;
  background: rgba(8, 16, 34, 0.97);
  color: var(--text);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px color-mix(in srgb, var(--c) 25%, transparent);
}
.info-pop::backdrop { background: rgba(2, 6, 14, 0.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.info-pop[open] { animation: pop-in 0.25s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
.pop-icon svg {
  width: 52px; height: 52px;
  fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 8px var(--c));
}
.info-pop h2 { margin: 10px 0 8px; color: var(--c); font-size: 20px; letter-spacing: 2px; text-transform: uppercase; }
.pop-text { margin: 0 0 20px; color: #d5deea; }
.pop-close {
  position: absolute; top: 8px; right: 12px;
  border: 0; background: none; color: var(--muted);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.pop-close:hover { color: var(--text); }
.pop-close:focus { outline: none; }
.pop-close:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; border-radius: 6px; }   /* frame only for keyboard users */

/* Projects page: the four type boxes and the work below */
.proj-tiles { margin-bottom: 4px; }
.proj-title { margin: 30px 0 0; font-size: 26px; }
.proj[hidden] { display: none; }

/* floating cards on the sides */
.float-card {
  position: fixed;
  z-index: -1;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(41, 134, 230, 0.3);
  background: rgba(5, 11, 24, 0.5);
  box-shadow: 0 0 24px rgba(41, 134, 230, 0.15);
  animation: float 7s ease-in-out infinite alternate;
}
.float-card svg {
  width: 38px;
  fill: none;
  stroke: #3b82f6;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.fc-1 { left: 8%;  top: 16%; }
.fc-2 { left: 12%; top: 42%; animation-delay: -3s; animation-duration: 9s; }
.fc-3 { right: 8%; top: 18%; animation-delay: -5s; }
.fc-4 { right: 11%; top: 44%; animation-delay: -1s; animation-duration: 8s; }
@keyframes float { from { transform: translateY(-10px) rotate(-3deg); } to { transform: translateY(10px) rotate(3deg); } }
@media (max-width: 1100px), (max-height: 600px) { .float-card { display: none; } }

/* small banners at the bottom */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}

/* ---------- Home animations (calm; switched off for "reduce motion") ---------- */

/* 1. the waves slide slowly sideways, each at its own speed */
.wave { animation: wave-slide 40s linear infinite; }
.wave-b { animation-duration: 55s; animation-direction: reverse; }
.wave-c { animation-duration: 70s; }
@keyframes wave-slide { from { transform: translateX(0); } to { transform: translateX(-1440px); } }

/* 2. a soft light travelling slowly across the waves */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 35% 25% at 50% 50%, rgba(80, 160, 255, 0.22), transparent 70%);
  mix-blend-mode: screen;
  animation: glow-move 18s ease-in-out infinite alternate;
}
@keyframes glow-move {
  0%   { transform: translate(-35%, 25%); opacity: 0.4; }
  50%  { opacity: 1; }
  100% { transform: translate(35%, 15%);  opacity: 0.5; }
}

/* 3. small glowing dots rising from the waves */
.particles { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.particles span {
  position: absolute;
  bottom: -10px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px 2px var(--c);
  opacity: 0;
  animation: rise var(--d) linear var(--w) infinite;
}
@keyframes rise {
  0%   { transform: translate(0, 0);          opacity: 0; }
  10%  { opacity: 0.8; }
  70%  { opacity: 0.5; }
  100% { transform: translate(30px, -75vh);   opacity: 0; }
}

/* 4. entrance: top bar slides in, then logo, text, tiles and banners fade up one after another */
body.home .top { animation: slide-down 0.7s ease-out both; }
body.home .home-main > *, body.home .tile, body.home .chip { animation: fade-up 0.7s ease-out backwards; }  /* backwards: hover lift still works after */
body.home .logo     { animation: none; }   /* the video is the logo's entrance (and an animation here would stop the blending) */
body.home .tagline  { animation-delay: 0.4s; }
body.home .subline  { animation-delay: 0.55s; }
body.home .tiles, body.home .chips { animation: none; }
body.home .tile:nth-child(1) { animation-delay: 0.7s; }
body.home .tile:nth-child(2) { animation-delay: 0.8s; }
body.home .tile:nth-child(3) { animation-delay: 0.9s; }
body.home .tile:nth-child(4) { animation-delay: 1.0s; }
body.home .chip:nth-child(1) { animation-delay: 1.15s; }
body.home .chip:nth-child(2) { animation-delay: 1.25s; }
body.home .chip:nth-child(3) { animation-delay: 1.35s; }
@keyframes slide-down { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-up    { from { transform: translateY(20px);  opacity: 0; } to { transform: none; opacity: 1; } }

/* 5. banners lift a little under the mouse */
.chip { transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.chip:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(41, 134, 230, 0.35);
}

/* ---------- inner pages (every tab except Home): they scroll ---------- */
.waves-bg {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 260px;
  z-index: -1;
  pointer-events: none;
  background: url("images/waves.svg") repeat-x 0 100% / 936px 260px;
  opacity: 0.5;
  animation: waves-bg-slide 40s linear infinite;
}
@keyframes waves-bg-slide { to { background-position-x: -936px; } }

.content { max-width: 1040px; margin: 0 auto; padding: 48px 24px 60px; }
.page-head { text-align: center; margin-bottom: 32px; }
.page-head h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 46px); line-height: 1.15; }
.page-head .lead { margin: 0 auto; max-width: 680px; color: #c3cede; font-size: 18px; }

.panel {
  margin-top: 20px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.panel h2 { margin: 0 0 12px; font-size: 22px; }
.panel h3 { margin: 18px 0 8px; font-size: 18px; }
.panel p, .panel li { color: #d5deea; }
.panel p { margin: 0 0 10px; }
.panel ul { margin: 0 0 10px; padding-left: 20px; }
.panel.warning { border-color: rgba(245, 165, 36, 0.45); }
.panel.warning h2 { color: var(--warning); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 20px; }
.card {
  --c: var(--accent);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px color-mix(in srgb, var(--c) 25%, transparent); }
.card h3 { margin: 4px 0 0; font-size: 19px; }
.card p { margin: 0; color: #c3cede; font-size: 15px; }
.card .actions { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.card-icon svg {
  width: 34px; height: 34px;
  fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--c));
}

.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(41, 134, 230, 0.18);
  color: #8cc4ff;
}
.badge.soon { background: rgba(245, 165, 36, 0.15); color: var(--warning); }
.badge.ok { background: rgba(74, 222, 128, 0.15); color: #4ade80; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn.outline { background: transparent; color: #8cc4ff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; filter: none; }

.note { color: var(--muted); font-size: 14px; }

/* download tables */
.versions { width: 100%; border-collapse: collapse; margin-top: 8px; }
.versions th, .versions td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.versions th { color: var(--muted); font-size: 14px; font-weight: 600; }

/* forms */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 15px; color: #d5deea; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(5, 11, 24, 0.7);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(41, 134, 230, 0.25); }
.form .check { display: flex; gap: 10px; align-items: flex-start; }
.form .check input { width: auto; margin-top: 5px; }
.form .hp { position: absolute; left: -9999px; }   /* hidden trap field for spam robots */
.optional { color: var(--muted); font-size: 13px; }
/* Contact: fits on one computer screen without scrolling (owner) */
@media (min-width: 701px) {
  .page-contact .content { padding-top: 28px; padding-bottom: 20px; }
  .page-contact .page-head { margin-bottom: 20px; }
  .page-contact .form { gap: 12px; }
  .page-contact .form textarea { min-height: 110px; }
  .page-contact .site-footer { padding: 8px 16px 16px; }
}
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }   /* button with a note on its right */
.send-row { align-items: flex-end; }
.form-status { margin: 0; min-height: 0; font-size: 15px; }
.form-status:empty { display: none; }
.form-status.ok { color: #4ade80; }
.form-status.error { color: #ff6b6b; }
.send-row .note { margin-left: auto; line-height: 1.2; }   /* right corner, sitting on the same line as the bottom of the button (owner) */

/* legal list */
.doc-list { list-style: none; margin: 0; padding: 0 !important; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.doc-list li:last-child { border-bottom: 0; }

/* expandable lists (Legal): .fold = a type (closed at first), .sub = a project inside it */
.fold {
  --c: var(--accent);
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.fold > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  list-style: none;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
}
.fold > summary::-webkit-details-marker, .sub > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { background: rgba(41, 134, 230, 0.08); }
.fold > summary::after {          /* arrow on the right, turns when open */
  content: "";
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.fold[open] > summary::after { transform: rotate(225deg); }
.fold[open] > summary { border-bottom: 1px solid var(--border); }
.fold-icon svg {
  display: block; width: 26px; height: 26px;
  fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 5px var(--c));
}
.fold .count { color: var(--muted); font-size: 14px; font-weight: 500; }
.fold-body { padding: 6px 22px 14px; }
.sub { border-bottom: 1px solid var(--border); }
.sub:last-child { border-bottom: 0; }
.sub > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
}
.sub > summary::before {          /* small arrow on the left, turns when open */
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--c);
  border-bottom: 2px solid var(--c);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.sub[open] > summary::before { transform: rotate(45deg); }
.sub .doc-list { padding: 0 0 8px 18px !important; }
.empty { margin: 6px 0; color: var(--muted); font-size: 15px; }

.site-footer { text-align: center; padding: 24px 16px 100px; color: var(--muted); font-size: 14px; }
.site-footer p { margin: 4px 0; }

@media (max-width: 700px) {
  body.home .chips { display: none; }   /* Home: the three small banners don't fit well on phones (owner) */
  .content { padding: 32px 16px 40px; }
  .form-row { grid-template-columns: 1fr; }
  .page-head .lead { font-size: 16px; }
}

/* ---------- capybara (capy.js, pictures in images/capy/) ---------- */
.capy {
  position: fixed;   /* capy.js places it anywhere on the screen (top-left corner + move) */
  left: 0;
  top: 0;
  z-index: 6;
  cursor: pointer;
  will-change: transform;
}
.capy[hidden] { display: none; }
.capy-flip { transform-origin: 50% 100%; }
.capy-pose {
  position: relative;
  height: 74px;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}
.capy-pose img {
  display: block;
  width: auto;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

/* "rig": walk and run with moving legs. The same picture 5 times on top of each other:
   4 strips along the bottom (one leg each) swing from the hip, the body (top part) covers the joints.
   Numbers are % of the picture (walk.png 130x109, run.png 132x105). */
.capy-pose.rig img { position: absolute; inset: 0; width: 100%; height: 100%; }
.rig-walk { aspect-ratio: 130 / 109; }
.rig-run  { aspect-ratio: 132 / 105; }
/* .shade = the ground shadow under the feet, stays still; leg strips stop just below the feet */
.rig-walk .shade { clip-path: inset(91% 0 0 0); }
.rig-walk .body { clip-path: inset(0 0 22.9% 0); }
.rig-walk .l1 { clip-path: inset(69.7% 73.8% 8% 0);     transform-origin: 17% 73.4%; }
.rig-walk .l2 { clip-path: inset(69.7% 51.5% 8% 26.2%); transform-origin: 38% 73.4%; }
.rig-walk .l3 { clip-path: inset(69.7% 32.3% 8% 48.5%); transform-origin: 60% 73.4%; }
.rig-walk .l4 { clip-path: inset(69.7% 0 8% 67.7%);     transform-origin: 79% 73.4%; }
.rig-run .shade { clip-path: inset(90% 0 0 0); }
.rig-run .body { clip-path: inset(0 0 27.6% 0); }
.rig-run .l1 { clip-path: inset(62.9% 71.2% 9% 0);     transform-origin: 21% 66.7%; }
.rig-run .l2 { clip-path: inset(62.9% 50% 9% 28.8%);   transform-origin: 38% 66.7%; }
.rig-run .l3 { clip-path: inset(62.9% 30.3% 9% 50%);   transform-origin: 61% 66.7%; }
.rig-run .l4 { clip-path: inset(62.9% 0 9% 69.7%);     transform-origin: 74% 66.7%; }
.capy.walking { --swing: 14deg; --step: 0.4s; }
.capy.running { --swing: 24deg; --step: 0.15s; }
.capy.walking .leg, .capy.running .leg { animation: capy-leg var(--step) ease-in-out infinite alternate; }
.capy .leg.b { animation-direction: alternate-reverse; }
@keyframes capy-leg { from { transform: rotate(var(--swing)); } to { transform: rotate(calc(-1 * var(--swing))); } }

/* moving: a little bob (the legs do the rest), shaking on the rocket */
.capy.walking .capy-pose { animation: capy-waddle 0.4s ease-in-out infinite alternate; }
.capy.running .capy-pose { animation: capy-waddle 0.15s ease-in-out infinite alternate; }
.capy.flying .capy-pose  { animation: capy-shake 0.08s linear infinite alternate; }
@keyframes capy-waddle { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-3px) rotate(1deg); } }

/* effects for the tricks */
.capy-pose.fx-dance   { animation: capy-dance 0.4s ease-in-out infinite alternate; }
.capy-pose.fx-recoil  { animation: capy-recoil 0.12s ease-in-out infinite alternate; }
.capy-pose.fx-shake   { animation: capy-shake 0.1s linear infinite alternate; }
.capy-pose.fx-pulse   { animation: capy-pulse 0.6s ease-in-out infinite alternate; }
.capy-pose.fx-jump    { animation: capy-jump 0.9s ease-out; }
.capy-pose.fx-glow    { animation: capy-glow 1s ease-in-out infinite alternate; }
.capy-pose.fx-wave    { animation: capy-wave 1.2s ease-in-out infinite alternate; }
.capy-pose.fx-breathe { animation: capy-breathe 2.2s ease-in-out infinite; }
@keyframes capy-dance   { from { transform: rotate(-8deg); } to { transform: rotate(8deg) translateY(-6px); } }
@keyframes capy-recoil  { from { transform: translateX(0); } to { transform: translateX(-4px); } }
@keyframes capy-shake   { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes capy-pulse   { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes capy-jump {
  0% { transform: none; } 40% { transform: translateY(-70px) rotate(-10deg); }
  75% { transform: translateY(-12px); } 100% { transform: none; }
}
@keyframes capy-glow {
  from { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }
  to   { filter: drop-shadow(0 0 18px rgba(80, 140, 255, 0.9)); }
}
@keyframes capy-wave    { from { transform: rotate(-3deg) skewX(-2deg); } to { transform: rotate(3deg) skewX(2deg); } }
@keyframes capy-breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.95); } }

/* what it says */
.capy-say {
  position: absolute;
  left: 50%;
  bottom: 100%;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 4px #000;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}
.capy-say.show { animation: capy-say 1.5s ease-out forwards; }
@keyframes capy-say {
  0% { opacity: 0; transform: translate(-50%, 6px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -14px); }
}

/* on/off button, bottom-right */
.capy-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 7;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.capy-toggle:hover { border-color: var(--accent); }
.capy-toggle[aria-pressed="false"] { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .particles { display: none; }
  .logo-video { display: none; }
  .logo-svg { display: inline-block; }
}

/* ---------- phones, tablets, small windows: Menu button instead of the tab row ---------- */
@media (max-width: 960px) {
  body { font-size: 16px; }
  .top { padding: 10px 16px; }

  /* Menu button opens the list of tabs */
  .menu { position: relative; }
  .menu-button {
    display: block;
    cursor: pointer;
    user-select: none;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
  }
  .menu nav { display: none; }
  .menu-toggle:checked ~ nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 190px;
    padding: 8px;
    background: rgba(5, 11, 24, 0.96);
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .menu nav a, .menu nav span { padding: 10px 12px; font-size: 16px; }

  .chip { font-size: 13px; padding: 7px 13px; }
}
