/* TainerHub site. Colours follow the app (web/src/index.css): forest
   neutrals, one lime accent, plus teal/sky/violet/amber/rose for colour. */
:root {
  --canvas: #0a1210;
  --panel: #111c18;
  --panel-2: #15201b;
  --line: #22322b;
  --ink-50: #eef5f1;
  --ink-200: #bccdc4;
  --ink-300: #98aea3;
  --ink-400: #7a9187;
  --lime: #c4f04a;
  --lime-200: #e4fbab;
  --lime-500: #a6d62a;
  --teal: #2dd4bf;
  --sky: #38bdf8;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --rose: #fb7185;
  --font-sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", "Outfit", ui-sans-serif, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 16px;
  --wrap: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--canvas);
  background-image:
    radial-gradient(1200px 600px at 15% -10%, rgba(196, 240, 74, .10), transparent 60%),
    radial-gradient(900px 500px at 95% 5%, rgba(45, 212, 191, .08), transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink-200);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink-50); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
code, kbd, pre { font-family: var(--font-mono); font-size: .88em; }
:not(pre) > code, kbd {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .05em .4em;
  color: var(--lime-200);
}
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: var(--canvas); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font: 600 16px/1 var(--font-display);
  border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--lime); color: var(--canvas); box-shadow: 0 8px 30px -10px rgba(196, 240, 74, .6); }
.btn-primary:hover { background: var(--lime-200); }
.btn-ghost { border-color: var(--line); color: var(--ink-50); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--lime-500); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 18, 16, .78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(34, 50, 43, .7);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-50); font: 700 19px var(--font-display); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--ink-300); font-size: 15px; }
.nav-links a:not(.btn):hover { color: var(--ink-50); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink-50); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 14px var(--font-mono); color: var(--lime-200);
  background: rgba(196, 240, 74, .08); border: 1px solid rgba(196, 240, 74, .25);
  padding: 6px 14px; border-radius: 999px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(196, 240, 74, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(196, 240, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(196, 240, 74, 0); } }
h1 { font-size: clamp(38px, 5.2vw, 62px); margin: 22px 0 20px; }
.grad { background: linear-gradient(100deg, var(--lime) 10%, var(--teal) 60%, var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 19px; color: var(--ink-300); max-width: 36em; }
.install { margin: 28px 0 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.install-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-400); }
.install pre, .code pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: var(--ink-50); white-space: pre; }
.prompt { color: var(--lime); user-select: none; margin-right: 8px; }
.copy {
  font: 600 12px var(--font-mono); color: var(--canvas); background: var(--lime);
  border: 0; border-radius: 6px; padding: 5px 10px; cursor: pointer; flex: none;
}
.copy:hover { background: var(--lime-200); }
.copy.done { background: var(--teal); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-shot { margin: 0; position: relative; }
.hero-shot::before {
  content: ""; position: absolute; inset: 8% -4% -6% 6%;
  background: linear-gradient(135deg, rgba(196, 240, 74, .35), rgba(45, 212, 191, .25) 50%, rgba(56, 189, 248, .25));
  filter: blur(60px); z-index: -1; border-radius: 40px;
}
.window { border-radius: 14px; overflow: hidden; border: 1px solid #2c3f37; background: var(--panel); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #34443d; }
.window-bar i:nth-child(1) { background: var(--rose); }
.window-bar i:nth-child(2) { background: var(--amber); }
.window-bar i:nth-child(3) { background: var(--lime); }
.window-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 10px; font: 12px var(--font-mono); color: var(--ink-400); }
.window video { width: 100%; aspect-ratio: 1000 / 564; object-fit: contain; background: var(--canvas); }
.hero-shot figcaption { text-align: center; font-size: 13px; color: var(--ink-400); margin-top: 12px; }

.stats { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stats li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.stats strong { display: block; font: 700 clamp(21px, 2.3vw, 28px) var(--font-display); white-space: nowrap; color: var(--ink-50); }
.stats li:nth-child(1) strong { color: var(--lime); }
.stats li:nth-child(2) strong { color: var(--teal); }
.stats li:nth-child(3) strong { color: var(--sky); }
.stats li:nth-child(4) strong { color: var(--violet); }
.stats span { font-size: 14px; color: var(--ink-400); }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: linear-gradient(180deg, rgba(17, 28, 24, .55), rgba(17, 28, 24, .2)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 10px 0 14px; }
.section-head p:last-child { color: var(--ink-300); font-size: 18px; }
.kicker { font: 600 13px var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--lime); }
.center { text-align: center; margin-top: 36px; }
.link-arrow::after { content: " →"; }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  --c: var(--lime);
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; overflow: hidden; transition: transform .2s, border-color .2s;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--c), transparent); }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.card h3 { font-size: 20px; margin: 16px 0 8px; }
.card p { font-size: 15.5px; color: var(--ink-300); }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-lime { --c: var(--lime); }
.c-teal { --c: var(--teal); }
.c-sky { --c: var(--sky); }
.c-violet { --c: var(--violet); }
.c-amber { --c: var(--amber); }
.c-rose { --c: var(--rose); }

/* Carousel */
.carousel { max-width: 1040px; margin: 0 auto; }
.carousel-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.carousel-tabs button {
  font: 500 14px var(--font-sans); color: var(--ink-300); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.carousel-tabs button:hover { color: var(--ink-50); border-color: var(--ink-400); }
.carousel-tabs button[aria-selected="true"] { color: var(--canvas); background: var(--lime); border-color: var(--lime); }
.carousel-stage { position: relative; }
.carousel-viewport { overflow: hidden; border-radius: 18px; border: 1px solid #2c3f37; background: var(--panel); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); touch-action: pan-y; }
.carousel-track { list-style: none; margin: 0; padding: 0; display: flex; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) { .carousel-track { transition: none; } }
.slide { flex: 0 0 100%; min-width: 0; }
.slide img { width: 100%; aspect-ratio: 2160 / 1220; object-fit: cover; object-position: top left; background: var(--canvas); }
.slide p { padding: 16px 22px; font-size: 16px; color: var(--ink-300); border-top: 1px solid var(--line); }
.slide strong { color: var(--ink-50); }
.carousel-btn {
  position: absolute; top: calc(50% - 30px); z-index: 2; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(10, 18, 16, .85); color: var(--ink-50);
  font: 28px/1 var(--font-sans); cursor: pointer; display: grid; place-items: center; padding-bottom: 4px;
}
.carousel-btn:hover { background: var(--lime); color: var(--canvas); border-color: var(--lime); }
.prev { left: -24px; }
.next { right: -24px; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel-dots span { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .3s, background .3s; }
.carousel-dots span.on { width: 26px; background: var(--lime); }

.phone-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 88px; }
.phone-copy h3 { font-size: 30px; margin: 10px 0 14px; }
.phone-copy p:last-child { color: var(--ink-300); font-size: 18px; }
.phones { display: flex; justify-content: center; gap: 22px; }
.phones img { width: min(220px, 44%); border-radius: 26px; border: 6px solid #1d2a24; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); }
.phones img:last-child { transform: translateY(28px); }

/* Architecture */
.arch {
  display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 0; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 36px;
  background-image: radial-gradient(circle at 50% 50%, rgba(196, 240, 74, .08), transparent 60%);
}
.arch-col { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.arch-col:first-child { flex-direction: row; }
.arch-col:last-child { flex-direction: row; }
.node {
  background: var(--panel-2); border: 1px solid #2c3f37; border-radius: 14px; padding: 14px 18px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.node b { font-family: var(--font-display); color: var(--ink-50); font-size: 16px; }
.node small { color: var(--ink-400); font-size: 13px; line-height: 1.5; }
.n-browser { border-color: color-mix(in srgb, var(--sky) 50%, var(--line)); }
.n-hub { border: 1.5px solid var(--lime); box-shadow: 0 0 40px -8px rgba(196, 240, 74, .45); padding: 20px 26px; }
.n-db { border-color: color-mix(in srgb, var(--violet) 50%, var(--line)); }
.n-agent { border-color: color-mix(in srgb, var(--teal) 50%, var(--line)); min-width: 150px; }
.agents { display: flex; flex-direction: column; gap: 12px; }
.link { flex: 1; position: relative; height: 2px; min-width: 40px; background: linear-gradient(90deg, var(--sky), var(--lime)); }
.link-rev { background: linear-gradient(270deg, var(--teal), var(--lime)); }
.link span {
  position: absolute; left: 4px; right: 4px; bottom: 10px; text-align: center; line-height: 1.4;
  font: 11.5px var(--font-mono); color: var(--ink-300); background: var(--panel); padding: 2px 6px; border-radius: 6px;
}
.link::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--lime); border-right: 0; }
.link-rev::after { right: auto; left: -2px; border-left: 0; border-right: 7px solid var(--lime); }

.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.how { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(17, 28, 24, .5); }
.num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--lime); color: var(--canvas); font: 700 16px var(--font-display); }
.how:nth-child(2) .num { background: var(--teal); }
.how:nth-child(3) .num { background: var(--sky); }
.how:nth-child(4) .num { background: var(--violet); }
.how h3 { font-size: 18px; margin: 14px 0 6px; }
.how p { font-size: 15px; color: var(--ink-300); }

/* Security */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sec { padding: 24px 24px 24px 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--lime); }
.sec:nth-child(2) { border-left-color: var(--teal); }
.sec:nth-child(3) { border-left-color: var(--sky); }
.sec:nth-child(4) { border-left-color: var(--violet); }
.sec:nth-child(5) { border-left-color: var(--amber); }
.sec:nth-child(6) { border-left-color: var(--rose); }
.sec h3 { font-size: 18px; margin-bottom: 8px; }
.sec p { font-size: 15px; color: var(--ink-300); }

/* Steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 auto; max-width: 820px; }
.steps li { counter-increment: s; position: relative; padding: 0 0 40px 68px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -4px; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; font: 700 20px var(--font-display); color: var(--canvas);
  background: linear-gradient(135deg, var(--lime), var(--teal));
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 48px; bottom: 6px; width: 2px; background: linear-gradient(var(--line), transparent); }
.steps h3 { font-size: 22px; margin-bottom: 8px; }
.steps p { color: var(--ink-300); }
.code { position: relative; margin-top: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.code .copy { position: absolute; right: 10px; top: 10px; }
.code pre { padding-right: 80px; }
.step-shot { margin-top: 16px; border-radius: 12px; border: 1px solid var(--line); }

/* Docs */
.docs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.doc { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.doc:hover { text-decoration: none; border-color: var(--lime-500); transform: translateY(-2px); }
.doc b { color: var(--ink-50); font-family: var(--font-display); font-size: 17px; }
.doc b::after { content: " →"; color: var(--lime); }
.doc span { color: var(--ink-400); font-size: 14px; }
.doc-gh { background: linear-gradient(135deg, rgba(196, 240, 74, .12), rgba(45, 212, 191, .08)); border-color: rgba(196, 240, 74, .3); }

/* Footer */
.footer { padding: 40px 0 56px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer nav a { color: var(--ink-300); font-size: 15px; }
.footer p { width: 100%; font-size: 14px; color: var(--ink-400); }

/* Responsive */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .features, .sec-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid, .docs { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .arch { grid-template-columns: 1fr; gap: 0; padding: 28px 20px; }
  .arch-col:first-child, .arch-col:last-child { flex-direction: column; gap: 0; }
  .link { width: 2px; height: 56px; min-width: 0; flex: none; background: linear-gradient(var(--sky), var(--lime)); }
  .link-rev { background: linear-gradient(0deg, var(--teal), var(--lime)); }
  .link span { left: 14px; right: auto; bottom: 50%; transform: translateY(50%); width: max-content; max-width: 40vw; text-align: left; }
  .link::after { right: -4px; top: auto; bottom: -2px; border: 5px solid transparent; border-top: 7px solid var(--lime); border-bottom: 0; }
  .link-rev::after { left: -4px; right: auto; top: -2px; bottom: auto; border: 5px solid transparent; border-bottom: 7px solid var(--lime); border-top: 0; }
  .arch-center { flex-direction: row; gap: 16px; }
  .agents { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .prev { left: 8px; }
  .next { right: 8px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10, 18, 16, .97); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links .btn { margin-top: 14px; justify-content: center; }
  .hero { padding: 40px 0 24px; }
  .lede { font-size: 17px; }
  .install-head span { font-size: 12px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .features, .sec-grid, .how-grid, .docs { grid-template-columns: 1fr; }
  .stats { margin-top: 40px; gap: 10px; }
  .stats li { padding: 14px 16px; }
  .stats strong { font-size: 21px; }
  .stats span { font-size: 13px; }
  .carousel-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .carousel-tabs::-webkit-scrollbar { display: none; }
  .carousel-tabs button { flex: none; }
  .carousel-btn { width: 38px; height: 38px; font-size: 22px; top: calc(50% - 40px); }
  .slide p { font-size: 14.5px; padding: 12px 14px; }
  .phone-row { grid-template-columns: 1fr; gap: 36px; margin-top: 64px; text-align: center; }
  .arch-center { gap: 10px; align-items: stretch; }
  .arch-center .node { padding: 14px 10px; justify-content: center; }
  .arch-center .node small { font-size: 12px; }
  .steps li { padding-left: 56px; }
  .steps li::before { width: 38px; height: 38px; font-size: 17px; }
  .steps li:not(:last-child)::after { left: 18px; }
  .code pre, .install pre { font-size: 13px; white-space: pre-wrap; word-break: break-all; }
  .code pre { padding-top: 46px; padding-right: 16px; }
}
