/* arci.prayukta.com — what Arci adds to Prayukta's home.css and pages.css:
   the hero, the docs layout, code, key caps, tables and screenshots. */

/* home.css clips the frame with overflow: hidden, which makes it a scroll container and stops the
   docs sidebar from sticking; clip draws the same edge without that. */
.app-wrapper {
  overflow: clip;
}

/* ── Hero ──────────────────────────────────────────── */

/* Copy beside the animated mark (hero.svg), as on yukta.prayukta.com; the
   mark sits under the copy in one column. */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 48px;
  align-items: center;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* Built for speed: the copy beside the command list of what you'd type, in
   one column on narrow screens. */
.speed-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
}

.speed-grid > .section-head {
  margin-bottom: 0;
}

.page-head > .container.hero-grid > * {
  margin-top: 0;
}

.hero-copy {
  container-type: inline-size;
}

.hero-copy > * + * {
  margin-top: 24px;
}

/* "Arci." on its own line, "Type it, it's done." whole below it: the type
   shrinks with the column (1cqi = 1% of it) rather than break the line —
   that line is about 10.6 times the font size wide. */
.hero-copy h1 {
  font-size: min(44px, 9cqi);
  letter-spacing: -0.04em;
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.btn--primary {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}

.btn--primary:hover {
  color: var(--bg);
  background: var(--gold-text);
  border-color: var(--gold-text);
}

/* The Apple logo on "Download for Mac": the text's own color, sat on its cap height */
.apple-logo {
  width: 15px;
  height: 15px;
  margin-top: -3px;
  fill: currentColor;
  flex: none;
}

.nav-link.nav-download {
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 2px;
  margin-left: 6px;
}

/* ── Home and docs index ───────────────────────────── */

.feature .feature-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
}

.feature-title a {
  color: var(--ink);
  transition: color 0.15s ease;
}

.feature-title a:hover {
  color: var(--gold-text);
}

/* Docs index: each page is a card, clickable anywhere, that says so —
   gold title, an arrow that moves, a border that lights up. */
.feature-grid--links .feature {
  padding: 20px 22px 22px 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.feature-grid--links .feature::before {
  left: 22px;
  top: 28px;
}

.feature-grid--links .feature-title a {
  color: var(--gold-text);
}

/* The title's link covers the whole card. */
.feature-grid--links .feature-title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.feature-grid--links .feature:hover,
.feature-grid--links .feature:focus-within {
  border-color: var(--gold);
  background: var(--bg);
}

.feature-grid--links .feature-title a:focus-visible {
  outline: none;
}

.feature-grid--links .feature:focus-within {
  outline: 1px solid var(--gold-text);
  outline-offset: 2px;
}

.feature-grid--links .feature:hover .arrow-right,
.feature-grid--links .feature:focus-within .arrow-right {
  transform: translateX(3px);
}

.feature code,
.prose code,
.fineprint code {
  padding: 1px 4px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.split > .doc pre {
  margin-top: 0;
}

/* ── Pricing ───────────────────────────────────────── */

.pricing--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
}

.plan .btn + .plan-alt,
.plan-alt {
  display: block;
  margin-top: 12px;
  text-align: center;
}

.plan .checklist {
  margin-bottom: 24px;
}

.pro-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 860px;
}

#compare .doc,
#faq .faq-list {
  max-width: 860px;
}

#compare td:not(:first-child) {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}

/* ── Screenshots ───────────────────────────────────── */

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--code-bg);
}

.shot figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

/* ── How Arci works (/architecture) ────────────────── */

/* Two drawings of the same diagram: wide for desktop, stacked for phones. Hand-drawn SVG,
   styled here so it uses the site's tokens and type. */
.arch {
  margin: 0;
}

.arch svg {
  display: block;
  width: 100%;
  height: auto;
}

.arch .arch-narrow {
  display: none;
  max-width: 440px;
  margin: 0 auto;
}

.arch figcaption {
  margin-top: 16px;
  max-width: 46em;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.arch text {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--ink);
}

.arch .t-zone {
  font-weight: 500;
  fill: var(--text);
  letter-spacing: 0.02em;
}

.arch .t-title {
  font-size: 11px;
  font-weight: 500;
  fill: var(--gold-text);
  letter-spacing: 0.02em;
}

.arch .t-dim,
.arch .dim {
  fill: var(--text-secondary);
}

.arch .t-dim,
.arch .t-small {
  font-size: 11px;
}

.arch .t-label {
  font-size: 11px;
  fill: var(--text-muted);
}

.arch .zone {
  fill: var(--surface);
  stroke: var(--line-strong);
}

.arch .zone-net {
  fill: none;
  stroke: var(--line-strong);
  stroke-dasharray: 4 4;
}

.arch .box {
  fill: var(--bg);
  stroke: var(--line-strong);
}

.arch .box-file {
  fill: var(--bg);
  stroke: var(--gold);
}

.arch .chip,
.arch .bar {
  fill: var(--surface);
  stroke: var(--line);
}

.arch .frame {
  fill: var(--code-bg);
  stroke: var(--line-strong);
}

.arch .tile {
  fill: var(--line-strong);
}

.arch .tile-on {
  fill: var(--line);
  stroke: var(--gold-text);
}

.arch .prompt {
  fill: var(--gold-text);
}

.arch .caret {
  stroke: var(--ink);
}

.arch .wire {
  fill: none;
  stroke: var(--text-muted);
}

.arch .wire-net {
  fill: none;
  stroke: var(--gold-text);
  stroke-dasharray: 4 3;
}

.arch .head {
  fill: var(--text-muted);
}

.arch .head-net {
  fill: var(--gold-text);
}

/* ── Docs layout ───────────────────────────────────── */

.docs {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

.docs-nav p {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: lowercase;
}

.docs-nav ul + p {
  margin-top: 24px;
}

.docs-nav li + li {
  margin-top: 4px;
}

.docs-nav a {
  display: block;
  padding: 2px 0 2px 10px;
  color: var(--text-secondary);
  border-left: 1px solid var(--line);
  transition: color 0.15s ease;
}

.docs-nav a:hover {
  color: var(--gold-text);
}

.docs-nav a[aria-current='page'] {
  color: var(--ink);
  border-left-color: var(--gold-text);
}

/* ── Docs prose ────────────────────────────────────── */

.doc {
  max-width: 46em;
  min-width: 0;
}

.doc > section + section {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.doc h2 {
  margin-bottom: 16px;
  font-size: 20px;
  text-transform: none;
  scroll-margin-top: 24px;
}

.doc h3 {
  margin: 32px 0 12px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  scroll-margin-top: 24px;
}

.doc h2 a,
.doc h3 a {
  color: inherit;
}

.doc p,
.doc li,
.doc dd {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.doc strong {
  font-weight: 500;
  color: var(--text);
}

.doc * + p,
.doc * + ul,
.doc * + ol,
.doc * + dl {
  margin-top: 14px;
}

.doc h2 + p,
.doc h3 + p,
.doc h3 + ul {
  margin-top: 0;
}

.doc ul li,
.doc ol li {
  position: relative;
  padding-left: 20px;
}

.doc ul li + li,
.doc ol li + li {
  margin-top: 6px;
}

.doc ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: 1px;
}

.doc ol {
  counter-reset: step;
}

.doc ol li {
  counter-increment: step;
}

.doc ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 2.2;
  color: var(--gold-text);
}

.doc a {
  color: var(--gold-text);
  border-bottom: 1px solid var(--gold);
  transition: color 0.15s ease;
}

.doc a:hover {
  color: var(--rust);
}

.doc .lede {
  font-size: 16px;
  color: var(--text);
}

.doc .note {
  margin-top: 18px;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--gold);
  color: var(--text);
}

.doc dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 20px;
}

.doc dt {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  color: var(--ink);
  padding-top: 2px;
}

/* ── Code and keys ─────────────────────────────────── */

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.doc code,
.legal code {
  padding: 1px 5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow-wrap: anywhere;
}

.doc pre {
  margin-top: 16px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  background: var(--code-bg);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  -webkit-overflow-scrolling: touch;
}

.doc pre code {
  padding: 0;
  font-size: inherit;
  color: var(--text);
  background: none;
  border: 0;
  overflow-wrap: normal;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 5px;
  line-height: 1.5;
  text-align: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 2px;
  white-space: nowrap;
}

/* ── Tables ────────────────────────────────────────── */

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.doc th {
  padding: 0 16px 8px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  text-transform: lowercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.doc td {
  padding: 10px 16px 10px 0;
  line-height: 1.6;
  vertical-align: top;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--line);
}

.doc td:first-child {
  white-space: nowrap;
}

/* ── Responsive ────────────────────────────────────── */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .hero-visual {
    width: 220px;
    justify-self: center;
  }

  .speed-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 880px) {
  /* Below this the wide drawing's labels would shrink under 10px */
  .arch .arch-wide {
    display: none;
  }

  .arch .arch-narrow {
    display: block;
  }
}

@media (max-width: 760px) {
  .pro-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing--two {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 860px) {
  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .docs-nav {
    position: static;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
  }

  .docs-nav .on-this-page,
  .docs-nav .on-this-page + ul {
    display: none;
  }

  .docs-nav ul.pages {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 4px;
  }

  .docs-nav ul.pages li + li {
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  /* Tables become one card per row: the first cell (a field, a key) and, in three-column tables,
     the middle one on a line, then the description under them. */
  .doc table,
  .doc tbody,
  .doc tr,
  .doc td {
    display: block;
    width: auto;
  }

  .doc thead {
    display: none;
  }

  .doc tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .doc td {
    padding: 0;
    border: 0;
  }

  .doc td:first-child,
  .doc td:not(:first-child):not(:last-child) {
    display: inline-block;
    white-space: nowrap;
  }

  .doc td:first-child code {
    overflow-wrap: normal;
  }

  .doc td:not(:first-child):not(:last-child) {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
  }

  .doc td:last-child {
    margin-top: 4px;
  }

  /* The comparison: the feature on its own lines, the two plans' cells on one line under it. */
  #compare td:first-child {
    display: block;
    white-space: normal;
  }

  #compare td:not(:first-child) {
    display: inline-block;
    margin: 4px 16px 0 0;
    font-size: 12px;
  }

  #compare td:nth-child(2)::before {
    content: 'arci: ';
    color: var(--text-muted);
  }

  #compare td:nth-child(3)::before {
    content: 'pro: ';
    color: var(--text-muted);
  }
}

@media (max-width: 480px) {
  /* home.css drops the command list's second column on phones; here it goes under the first */
  .speed-grid .manifest-row {
    grid-template-columns: 20px minmax(0, 1fr);
    row-gap: 2px;
  }

  .speed-grid .manifest-type {
    display: block;
    grid-column: 2;
  }

  .doc dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .doc dd + dt {
    margin-top: 10px;
  }

  .nav-link.nav-download {
    margin-left: 0;
  }
}
