/* The home page, fifth test copy (/home-v5.html, 21.10): v4 in dark, with the
   generators second and three blocks from v3. This sheet gives the v3 blocks
   the tokens they read (they were built over picker.html's) and v4's type -
   one sans, set tight, the key words in the page's gradient - and styles the
   generators' rail. Over home-v3*.css, home-v4.css and home-v4-dark.css. */

html[data-v4="dark"] {
  --surface: #111114; --surface-2: #16161a; --line-strong: #2c2c33;
  --ink-mid: #c4c4cc; --ink-dim: #8e8e98; --accent: #c4dc7c;
  --serif: var(--sans); --r-xl: 22px; --r-lg: 18px;
}

/* the v3 blocks sit in the page's measure and rhythm */
.v3-sec { width: min(1180px, 100% - 40px); margin: 0 auto; padding-top: 112px; scroll-margin-top: 70px; }
.v3-label { font: 500 13px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--green); }
.v3-label::before { display: none; }
.v3-head { margin-bottom: 40px; gap: 0; }
.v3-head .v3-label { margin-bottom: 14px; }
.v3-head h2, .v3-check-copy h2, .hb-center h2 { font-family: var(--sans); font-weight: 650; letter-spacing: -0.035em;
  font-size: clamp(32px, 4vw, 52px); line-height: 1.05; }
.v3-head h2 em, .v3-check-copy h2 em, .hb-center h2 em { font-style: normal;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.v3-sub { font-size: 17px; color: var(--ink-2); }
.v3-head .v3-sub { margin-top: 16px; }
.v3-steps h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; font-size: 22px; }
.v3-num { color: var(--green); }
.v3-badge { font: 600 10.5px/1 var(--sans); letter-spacing: .02em; text-transform: none; border: 0; padding: 4px 7px;
  border-radius: 999px; background: rgba(196, 220, 124, 0.14); color: #c4dc7c; }
.v3-check { background: radial-gradient(70% 90% at 100% 0%, rgba(196, 220, 124, 0.10), transparent 60%), #0e0e11;
  border-color: var(--line); }
.v3-check-vis { background: #09090b; border-color: var(--line); }
.v3-canvas { background-color: #0b0b0d; border-color: var(--line); }
.v3-hub { background-color: #0b0b0d; border-color: var(--line); }
.hb-center { background: radial-gradient(closest-side, rgba(11, 11, 13, 0.95), rgba(11, 11, 13, 0.6) 70%, transparent); }
.hb-src { background: #121216; border-color: var(--line-2); }
.hb-src em { color: #c4dc7c; font-family: var(--sans); font-weight: 600; text-transform: none; }
.v3-card { background: var(--bg-2); border-color: var(--line); }
.v3-card h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; font-size: 20px; }
.v3-who { color: var(--ink-3); }
.v3-who span { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink-2); }
.v3-steps li.on { border-color: #3a3a42; }
.v3-prog { background: #c4dc7c; }

/* 2. start a project: one row of generators, scrolled sideways */
.start { padding-top: 72px; }
.start-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.start-head p { margin: 12px 0 0; font-size: 16.5px; color: var(--ink-2); max-width: 560px; }
.start-nav { display: flex; gap: 8px; }
.arw { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
  color: var(--ink); font-size: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.arw:hover { border-color: #4a4a54; background: rgba(255, 255, 255, 0.06); }
/* two rows read left to right: home-v5.js sets --cols to half the cards */
.start .gens { display: grid; grid-auto-flow: row; grid-template-columns: repeat(var(--cols, 10), 210px);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.start .gens::-webkit-scrollbar { display: none; }
.start .gen { scroll-snap-align: start; }
.start .gen .im { aspect-ratio: 1 / 1; }

/* the print check in 3D (check-demo.js): the real coaster in place of the drawing */
#checkVis .cv-stage { height: 300px; margin: -8px -8px 0; }
#checkVis .cv-stage canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 600px) { #checkVis .cv-stage { height: 240px; } }

/* Yearly / Monthly over the plans (as on /pricing) */
#pricing .period { display: flex; gap: 4px; width: fit-content; margin: 0 auto 26px; padding: 4px;
  border: 1px solid var(--line-2); border-radius: 999px; }
#pricing .period button { border: 0; background: transparent; color: var(--ink-mid); font: inherit; font-size: 13px;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; }
#pricing .period button span { color: var(--accent); font-size: 11.5px; margin-left: 4px; }
#pricing .period button.on { background: rgba(255, 255, 255, 0.1); color: var(--ink); }

/* the bento's map tile */
.tv-map { background: #0c0c0f radial-gradient(circle at 50% 55%, rgba(59, 130, 246, 0.10), transparent 60%); }
.tv-map .ring { position: absolute; left: 50%; top: 55%; width: 120px; height: 120px; margin: -60px; border-radius: 50%;
  border: 1.5px solid rgba(59, 130, 246, 0.55); }
.tv-map .pin { position: absolute; width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: #00ae42; border: 2px solid #fff; }
.tv-map .p1 { left: 38%; top: 40%; } .tv-map .p2 { left: 60%; top: 30%; background: #d8b26a; } .tv-map .p3 { left: 54%; top: 62%; }
.tile.run .tv-map .pin { animation: v5-pin 3.6s var(--ease) infinite; }
.tile.run .tv-map .p2 { animation-delay: .3s; } .tile.run .tv-map .p3 { animation-delay: .6s; }
@keyframes v5-pin { 0%, 10% { translate: 0 -14px; opacity: 0; } 25%, 85% { translate: 0 0; opacity: 1; } 100% { opacity: 0; } }

/* the final call and the footer on the page's background: one surface, the
   call's glow running down into the footer (owner, 23.10: no black band) */
html[data-v4="dark"] .final { background: transparent; border-top: 0; overflow: visible; }
.final::before { top: 78%; width: 1100px; height: 640px; opacity: .8; }
.ft5 { position: relative; padding: 72px 0 36px; color: var(--ink-3); font-size: 14px; }
.ft5::before { content: ""; position: absolute; left: 50%; top: 0; width: min(1100px, 92%); height: 1px;
  transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent); }
.ft5-top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.ft5-brand p { margin: 14px 0 18px; max-width: 300px; line-height: 1.55; color: var(--ink-3); }
.ft5-social { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* the email on its own line, the icons under it */
.ft5-social > a:first-child { flex-basis: 100%; margin-bottom: 4px; }
.ft5-social a { color: var(--ink-2); }
.ft5-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line-2); transition: border-color .2s, background .2s; }
.ft5-icon svg { width: 15px; height: 15px; }
.ft5-icon:hover { border-color: #4a4a54; background: rgba(255, 255, 255, 0.05); }
.ft5-col { display: flex; flex-direction: column; gap: 11px; }
.ft5-col h4 { margin: 4px 0 6px; font: 600 13px/1 var(--sans); color: var(--ink); letter-spacing: 0; }
.ft5 a { text-decoration: none; transition: color .2s; }
.ft5-col a { color: var(--ink-3); }
.ft5 a:hover { color: var(--ink); }
.ft5-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-4); }
.ft5-bottom nav { display: flex; gap: 20px; }
.ft5-bottom a { color: var(--ink-4); }

@media (max-width: 980px) {
  .start-nav { display: none; }
  .start .gens { grid-template-columns: repeat(var(--cols, 10), 170px); }
}
@media (max-width: 600px) {
  .ft5-top { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .ft5-brand { grid-column: 1 / -1; }
  .v3-sec { padding-top: 84px; }
  .start-head { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .tile.run .tv-map .pin { animation: none; }
}

/* "works with": the marks where there is one, the name beside it */
.works .logos { gap: 10px 36px; align-items: center; }
.works .logos li { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3);
  font: 600 16px var(--sans); letter-spacing: -0.02em; transition: color .15s; }
.works .logos li:hover { color: var(--ink); }
.works .logos svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.works .logos svg.ln { fill: none; stroke: currentColor; stroke-width: 1.6; }

/* 1. the hero's demo laid out as the board: the chat on the left, the plate on
   the right (agent-demo.js frames the pieces for it from data-layout="split") */
#agentDemo[data-layout="split"] { --chat-w: 340px; min-height: 540px;
  background: #0c0c0d; }
#agentDemo[data-layout="split"] .ad-stage { left: var(--chat-w);
  background: radial-gradient(70% 70% at 50% 55%, rgba(196, 220, 124, 0.07), transparent 70%); }
#agentDemo[data-layout="split"] .ad-chat { inset: 0 auto 0 0; width: var(--chat-w); padding: 18px 16px 16px;
  background: #101012; border-right: 1px solid var(--line); }
#agentDemo[data-layout="split"] .ad-msg.you { max-width: 92%; }
#agentDemo[data-layout="split"] .ad-msg.ai { max-width: 100%; background: #16161a; backdrop-filter: none; }
#agentDemo[data-layout="split"] .ad-ask { border-radius: 16px; box-shadow: none; background: #16161a; }
#agentDemo[data-layout="split"] .ad-field { white-space: nowrap; }
#agentDemo[data-layout="split"] .ad-badge { bottom: 16px; }
.ad-top { position: absolute; left: calc(var(--chat-w, 0px) + 16px); top: 14px; display: flex; gap: 10px;
  align-items: center; font-size: 12px; color: var(--ink-3); pointer-events: none; }
.ad-top b { font-weight: 600; color: var(--ink-2); padding: 4px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.06); }
#agentDemo:not([data-layout="split"]) .ad-top { display: none; }

@media (max-width: 760px) {
  /* a phone: the plate on top, the chat under it */
  #agentDemo[data-layout="split"] { --chat-w: 0px; min-height: 600px; }
  #agentDemo[data-layout="split"] .ad-stage { inset: 0 0 auto 0; height: 300px; }
  #agentDemo[data-layout="split"] .ad-chat { inset: 300px 0 0 0; width: auto; border-right: 0;
    border-top: 1px solid var(--line); }
  #agentDemo[data-layout="split"] .ad-badge { bottom: auto; top: 252px; }
  .ad-top span { display: none; }
}

/* round two (21.10) */
.tv-ams { justify-content: center; align-items: center; }

/* "files for": the printers' marks; Creality's is a wordmark */
.works .logos svg.wm { width: auto; height: 14px; aspect-ratio: 24 / 3.6; }
.works .logos li.more { font: 400 14px var(--sans); letter-spacing: 0; color: var(--ink-4); }

/* the demo's ask line: a long request wraps upwards instead of running out of the box */
#agentDemo[data-layout="split"] .ad-ask { align-items: flex-end; }
#agentDemo[data-layout="split"] .ad-field { display: block; white-space: normal; overflow: visible;
  line-height: 1.45; padding: 6px 0; }
#agentDemo[data-layout="split"] .ad-field #adTyped { white-space: normal; overflow: visible; }
#agentDemo[data-layout="split"] .ad-caret { vertical-align: -2px; }
/* the request is shown whole, not typed (23.10): the ask line is one row again,
   its orb in the middle, and kept clear of a long answer above it */
#agentDemo[data-layout="split"] .ad-chat { gap: 14px; }
#agentDemo[data-layout="split"] .ad-ask { align-items: center; }

/* MCP: the protocol is the headline, the clients beneath it */
.kicker.mcp-k { display: inline-flex; align-items: center; gap: 8px; }
.kicker.mcp-k svg { width: 15px; height: 15px; fill: currentColor; }
.dev h2 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-row { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.ai-row li { display: inline-flex; align-items: center; gap: 8px; font: 600 15px var(--sans); color: #d4d4d8; }
.ai-row svg { width: 18px; height: 18px; fill: currentColor; }

/* roadmap: building now is lit, what comes next is dashed */
.next.now li { border-style: solid; border-color: rgba(196, 220, 124, 0.35); background: rgba(196, 220, 124, 0.05); }
.done-h { margin: 0 0 12px; }

/* the longer headline: a long Russian word must fit a phone */
.hero h1 { hyphens: manual; -webkit-hyphens: manual; text-wrap: balance; overflow-wrap: break-word; font-size: clamp(34px, 4.6vw, 60px); max-width: 900px; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) { .hero h1 { font-size: min(34px, 7.6vw); } }

/* Pricing cards from plans-data.js (home-plans.js, 22.10): the founding chip,
   the yearly price struck through, and each line in a div (the list is flex). */
.plan .hp-chip { align-self: flex-start; margin-top: 8px; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; background: #d8b26a; color: #1a1408; }
.plan .hp-chip[hidden], .plan .pr s[hidden] { display: none; }
.plan .pr s { font-size: 16px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.plan li > div em { font-style: normal; color: var(--ink-3); }
.plan li a { text-decoration: underline; text-underline-offset: 3px; }
#homePlans ul { align-content: start; }

/* Community (owner, 30.10): our socials as four cards, before the final call */
.comm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.comm-card { display: flex; flex-direction: column; gap: 4px; padding: 22px; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--bg-2); color: var(--ink); text-decoration: none;
  transition: border-color .2s, background .2s; }
.comm-card:hover { border-color: #3a3a42; background: rgba(255, 255, 255, 0.04); }
.comm-ic { display: block; margin-bottom: 16px; color: var(--ink); line-height: 0; }
.comm-ic svg { width: 28px; height: 28px; }
.comm-card b { font: 600 17px/1.2 var(--sans); letter-spacing: -0.01em; }
.comm-h { font-size: 14px; color: var(--ink-3); }
.sec-head a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 980px) { .comm { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .comm { gap: 10px; }
  .comm-card { padding: 16px; }
  .comm-ic { margin-bottom: 12px; }
  .comm-ic svg { width: 24px; height: 24px; }
}

/* Pricing (owner, 30.10): the full list of each plan, as on /pricing - a line
   the plan does not have reads dim, with a cross */
.plan li.no { color: var(--ink-4); }
.plan li.no::before { content: "\00d7"; color: var(--ink-4); font-size: 14px; margin-top: 0; }
/* "Everything in Seller, plus:" - a lead-in line, no tick, a rule under it */
.plan li.lead { display: block; padding-bottom: 10px; margin-bottom: 2px; border-bottom: 1px solid var(--line); color: var(--ink); }
.plan li.lead::before { content: none; }

/* The top bar (owner, 31.10): the section links in the middle of the page, the
   logo and the buttons at the ends - a three-column grid, the outer two equal. */
.nv-in { display: grid; grid-template-columns: 1fr auto 1fr; }
.nv-links { flex: none; justify-content: center; }
.nv-end { grid-column: 3; justify-self: end; margin-left: 0; white-space: nowrap; }
