/* Landing page. Builds on base.css tokens. */

.section { padding-block: clamp(72px, 10vw, 128px); border-bottom: 1px solid var(--line); }
.section-head { display: grid; gap: 18px; justify-items: start; max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2, .scripts h2, .faq-grid h2 { font-size: var(--step-3); text-transform: uppercase; }
.section-head p, .section-p { color: var(--muted); font-size: 1.06rem; max-width: 62ch; }

/* ---- hero ---- */
.hero { position: relative; isolation: isolate; padding-top: clamp(56px, 8vw, 104px); border-bottom: 1px solid var(--line); overflow: hidden; }
/* Same layout as the share image: copy on the left over plain ink, a real in-game print of the bot on the
   right (hero-*.webp, home.js picks one per visit) fading into the ink under the copy. */
.hero-copy { display: grid; gap: 20px; justify-items: start; align-content: center; min-height: 460px;
  grid-template-columns: minmax(0, 560px); grid-template-areas: "tag" "h1" "lead" "actions" "note"; }
.hero-shot { position: absolute; inset: 0 0 auto auto; z-index: -1; width: min(1340px, 72vw); height: 680px; margin: 0; }
.hero-shot::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--ink), rgb(7 11 20 / .55) 45%, rgb(7 11 20 / .25)),
    linear-gradient(0deg, var(--ink), transparent 35%),
    linear-gradient(180deg, rgb(7 11 20 / .6), transparent 18%);
}
.hero-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% center; }
.hero-shot img:not([src]) { visibility: hidden; }
.hero-copy > .tag { grid-area: tag; line-height: 1.7; }
.hero-copy > .tag i { font-style: normal; color: var(--line-2); margin-inline: 6px; }
.hero-copy > .tag a { color: var(--text, #fff); text-decoration: underline; text-underline-offset: 3px; }
.hero-copy > h1 { grid-area: h1; align-self: end; font-size: clamp(2.5rem, 5.2vw, 4.4rem); }
.hero-copy > .lead { grid-area: lead; }
.hero-copy > .hero-actions { grid-area: actions; }
.hero-copy > .hero-note { grid-area: note; }
.hero h1 { font-size: var(--step-4); font-stretch: 122%; font-weight: 900; text-transform: uppercase; line-height: .96; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--cyan); }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { font: 400 .78rem/1.5 var(--mono); color: var(--dim); }
.hero-note i { font-style: normal; color: var(--line-2); margin-inline: 8px; }

/* ---- screenshots: framed like evidence, with a mono caption bar ---- */
.shot { border: 1px solid var(--line-2); background: #000; min-width: 0; }
.shot img { width: 100%; }
.shot figcaption {
  display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px;
  font: 400 .74rem/1.4 var(--mono); color: var(--dim); background: var(--ink-2); border-top: 1px solid var(--line);
}
.shot figcaption b { color: var(--text); font-weight: 600; margin-right: 6px; }

/* A capture with its own tab row (the painel): the buttons pick which image shows. */
.shot-tabs { display: flex; overflow-x: auto; background: var(--ink-2); border-bottom: 1px solid var(--line); }
.shot-tabs button { flex: none; padding: 10px 14px; border: 0; border-right: 1px solid var(--line); background: none; cursor: pointer;
  font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); box-shadow: inset 0 -2px 0 transparent; }
.shot-tabs button:hover { color: var(--text); }
.shot-tabs button[aria-selected="true"] { color: var(--cyan); background: var(--panel); box-shadow: inset 0 -2px 0 var(--cyan); }

/* ---- showcase: the features only this bot has, one tab each; the capture leads ---- */
.showcase { margin-top: clamp(40px, 6vw, 64px); border: 1px solid var(--line-2); border-bottom: 0; background: var(--ink-2); }
.show-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line-2); }
.show-tabs button { position: relative; display: grid; gap: 4px; justify-items: start; padding: 16px 18px; text-align: left;
  background: none; border: 0; border-left: 1px solid var(--line); color: var(--muted); cursor: pointer; font: inherit; }
.show-tabs button:first-child { border-left: 0; }
.show-tabs b { font: 800 .9rem/1.1 var(--display); font-stretch: 112%; text-transform: uppercase; letter-spacing: .03em; color: var(--text); }
.show-tabs span { font: 400 .74rem/1.3 var(--mono); color: var(--dim); }
.show-tabs button:hover b, .show-tabs button[aria-selected="true"] b { color: var(--cyan); }
.show-tabs button[aria-selected="true"] { background: var(--panel); }
/* The line under the open tab; while .auto it fills up, and its end moves to the next tab (home.js). */
.show-tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--cyan); transform-origin: left; }
.showcase.auto .show-tabs button[aria-selected="true"]::after { animation: show-fill var(--show-ms, 10s) linear; }
.showcase.auto:hover .show-tabs button[aria-selected="true"]::after,
.showcase.auto:focus-within .show-tabs button[aria-selected="true"]::after { animation-play-state: paused; }
@keyframes show-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.show-panel { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
.show-panel + .show-panel { border-top: 1px solid var(--line-2); }
.showcase.js .show-panel:not(.on) { display: none; }
.showcase:not(.js) .show-tabs { display: none; }
.show-panel .shot { align-self: start; border: 0; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.show-text { display: grid; gap: 14px; align-content: start; justify-items: start; padding: clamp(20px, 3vw, 32px); }
.show-text h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); text-transform: uppercase; }
.show-text p { color: var(--muted); font-size: .95rem; }
.show-text .checks li { font-size: .88rem; padding-block: 8px; }
.show-text .checks li::before { top: 17px; }
.show-text .checks li b { color: var(--text); font-weight: 600; }

/* ---- facts strip ---- */
.facts { border-bottom: 1px solid var(--line); background: var(--ink-2); }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts-grid > div { display: grid; gap: 8px; padding: 28px 24px; border-left: 1px solid var(--line); }
.facts-grid > div:first-child { border-left: 0; padding-left: 0; }
.facts strong { font: 800 1.9rem/1 var(--display); font-stretch: 118%; }
.facts strong.num { font-family: var(--mono); font-weight: 600; font-size: 1.6rem; letter-spacing: -.02em; }
.facts span { color: var(--muted); font-size: .88rem; }


/* ---- features: capture large, copy narrow, alternate sides ---- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 64px); align-items: center;
  padding-block: clamp(48px, 7vw, 80px); border-top: 1px solid var(--line); }
.section-head + .feature { border-top: 0; padding-top: 0; }
.wrap > .feature:only-child { border-top: 0; padding-block: 0; }
.feature.flip { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.feature.flip .feature-text { order: 2; }
.feature-text { display: grid; gap: 16px; justify-items: start; }
.feature h3 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); text-transform: uppercase; }
.feature p { color: var(--muted); }
.checks { list-style: none; width: 100%; border-top: 1px solid var(--line); }
.checks li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); font-size: .94rem; }
.checks li::before { content: ''; position: absolute; left: 2px; top: 19px; width: 8px; height: 2px; background: var(--cyan); }

/* Tab guide: the bot's side bar on the left, one tab explained on the right. Without JS every
   panel shows, stacked; home.js turns it into tabs. */
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start;
  padding-top: clamp(48px, 7vw, 80px); border-top: 1px solid var(--line); }
.guide-head { grid-column: 1 / -1; display: grid; gap: 14px; justify-items: start; max-width: 760px; }
.guide-head h3 { font-size: var(--step-2); text-transform: uppercase; }
.guide-head p { color: var(--muted); max-width: 62ch; }
.guide-nav { position: sticky; top: 84px; display: grid; border: 1px solid var(--line-2); background: var(--panel); }
.guide-nav b { padding: 12px 14px 6px; font: 600 .66rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.guide-nav a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 14px; color: var(--muted); text-decoration: none;
  font-size: .9rem; border-left: 2px solid transparent; }
.guide-nav a:hover { color: var(--text); background: var(--ink-2); }
.guide-nav a[aria-current] { color: var(--text); border-left-color: var(--cyan); background: var(--ink-2); }
.guide-nav a span { font: 400 .7rem/1.6 var(--mono); color: var(--dim); }
.guide-panels { display: grid; gap: 56px; min-width: 0; }
.js-guide .guide-panels > article:not(.on) { display: none; }
.tab-panel { display: grid; gap: 20px; scroll-margin-top: 84px; }
.tab-panel header { display: grid; gap: 10px; justify-items: start; }
.tab-panel h4 { font: 800 clamp(1.4rem, 2.4vw, 1.9rem)/1.1 var(--display); font-stretch: 112%; text-transform: uppercase; }
.tab-panel > p, .tab-panel header p { color: var(--muted); max-width: 70ch; }
.tab-panel .checks { columns: 2; column-gap: 32px; }
.tab-panel .checks li { break-inside: avoid; }
.tab-panel .checks li b { color: var(--text); font-weight: 600; }
.shot video, .shot img { display: block; width: 100%; height: auto; }
.shot.small figcaption { justify-content: flex-start; font-size: .78rem; color: var(--muted); }

/* ---- scripts + community ---- */
.scripts { background: var(--ink-2); }
.scripts-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.scripts-grid > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; justify-items: start; }
.code { width: 100%; border: 1px solid var(--line-2); background: var(--ink); }
.code figcaption { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--line);
  font: 400 .74rem/1.4 var(--mono); color: var(--dim); }
.code pre { overflow-x: auto; padding: 18px; font: 400 .84rem/1.7 var(--mono); color: #C9D3E6; }
.code .k { color: var(--cyan); }
.code .s { color: var(--warn); }
.code .c { color: var(--dim); }

.community { border: 1px solid var(--line-2); background: var(--panel); padding: 28px; }
.community h3 { font-size: var(--step-1); text-transform: uppercase; }
.community p { color: var(--muted); font-size: .94rem; }
.latest { list-style: none; width: 100%; border-top: 1px solid var(--line); }
.latest li { border-bottom: 1px solid var(--line); }
.latest a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; color: var(--text); text-decoration: none; }
.latest a:hover .latest-title { color: var(--cyan); }
.latest-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .94rem; }
.latest-meta { font: 400 .74rem/1 var(--mono); color: var(--dim); white-space: nowrap; }
.latest-icon { display: grid; place-items: center; width: 24px; height: 24px; background: var(--ink-2); border: 1px solid var(--line-2);
  font: 700 .72rem/1 var(--display); color: var(--cyan); overflow: hidden; }
.latest-icon img { width: 100%; height: 100%; object-fit: contain; }
.latest-empty { padding: 12px 0; color: var(--dim); font-size: .9rem; }

/* ---- plans ---- */
.plan-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; border: 1px solid var(--line-2); }
.plan { position: relative; display: grid; gap: 10px; align-content: start; padding: 36px 28px 28px; border-left: 1px solid var(--line-2); background: var(--ink); }
.plan:first-child { border-left: 0; }
.plan h3 { font: 800 clamp(1.5rem, 2.4vw, 1.9rem)/1.1 var(--display); font-stretch: 115%; text-transform: uppercase; }
.price span { transition: opacity .15s; }
.price { font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.price small { font-size: .95rem; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 4px; }
.bill { color: var(--dim); font-size: .8rem; margin-bottom: 14px; }
.plan .btn { width: 100%; margin-top: auto; }
.plan-for { color: var(--muted); font-size: .92rem; }
.plan-list { list-style: none; display: grid; margin-bottom: 20px; border-top: 1px solid var(--line); }
.plan-list li { position: relative; padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.plan-list li b { font-weight: 600; }
.plan-list li::before { position: absolute; left: 2px; font: 600 .9rem/1.4 var(--mono); }
.plan-list .yes::before { content: '✓'; color: var(--ok); }
.plan-list .no { color: var(--dim); }
.plan-list .no::before { content: '–'; color: var(--dim); }
.plan-list .soon { color: var(--muted); }
.plan-list .soon::before { content: '+'; color: var(--cyan); }
.period { display: inline-flex; margin-bottom: 20px; border: 1px solid var(--line-2); }
.period button { padding: 10px 18px; background: none; border: 0; border-left: 1px solid var(--line-2); color: var(--muted);
  font: 600 .78rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.period button:first-child { border-left: 0; }
.period button span { color: var(--ok); margin-left: 4px; }
.period button:hover { color: var(--text); }
.period button[aria-pressed="true"] { background: var(--cyan); color: var(--cyan-ink); }
.period button[aria-pressed="true"] span { color: var(--cyan-ink); }
.plan.best { background: var(--panel); box-shadow: inset 0 3px 0 var(--cyan); }
.plan.best h3 { color: var(--cyan); }
.plan-flag { position: absolute; top: 28px; right: 28px; font: 600 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--cyan-ink); background: var(--cyan); padding: 6px 8px; }

.passes { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); margin-top: 20px; border: 1px solid var(--line); }
.passes-label { display: flex; align-items: center; padding: 14px 20px; color: var(--muted); font-size: .9rem; }
.pass { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 14px 20px; border-left: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pass b { flex-basis: 100%; font: 700 .8rem/1 var(--display); font-stretch: 115%; text-transform: uppercase; letter-spacing: .05em; }
.pass span { color: var(--muted); font-size: .9rem; }
.pass:hover { background: var(--panel); color: var(--text); }
.pass:hover span { color: var(--cyan); }

/* ---- steps: the one real sequence on the page ---- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.steps li { display: grid; gap: 10px; align-content: start; padding: 28px 28px 0 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps .num { font-size: .8rem; color: var(--cyan); }
.steps h3 { font-size: 1.3rem; text-transform: uppercase; }
.steps p { color: var(--muted); font-size: .95rem; }

/* ---- faq ---- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 5vw, 64px); }
.faq-grid header { display: grid; gap: 18px; align-content: start; justify-items: start; }
.faq-grid header p { color: var(--muted); }
.faq { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 1.2rem/1 var(--mono); color: var(--cyan); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 62ch; }

/* ---- closing ---- */
.final { padding-block: clamp(64px, 9vw, 112px); background: var(--ink-2); }
.final-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.final h2 { font-size: var(--step-3); text-transform: uppercase; max-width: 22ch; }

/* ---- narrow ---- */
@media (max-width: 960px) {
  .scripts-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-shot { width: 100%; height: 100%; opacity: .35; }
  .show-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .show-tabs button { flex: 0 0 auto; }
  .show-panel { grid-template-columns: minmax(0, 1fr); }
  .show-panel .shot { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .feature-text { order: 0; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .plan-row { grid-template-columns: minmax(0, 1fr); }
  .plan { border-left: 0; border-top: 1px solid var(--line-2); }
  .plan:first-child { border-top: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .guide { grid-template-columns: minmax(0, 1fr); }
  .guide-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .guide-nav b { grid-column: 1 / -1; }
  .steps li, .steps li + li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .tab-panel .checks { columns: 1; }
  .shot figcaption { flex-direction: column; gap: 2px; }
  .passes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .passes-label { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .pass { gap: 6px 10px; padding: 14px 12px; }
  .pass:first-of-type { border-left: 0; }
  .community { padding: 20px; }
}

/* 881-1000px: the home nav has the most items (12 with the language switch); shrink it so the logo keeps its room. */
@media (min-width: 881px) and (max-width: 1000px) { .nav-links { gap: 9px; } .nav-links a { font-size: .78rem; } .nav-links .btn.small { padding: 0 10px; } }

/* Small phones: placed last so it wins over the wider breakpoints above. */
@media (max-width: 400px) { .period { display: flex; } .period button { flex: 1; padding: 10px 8px; } .pass { padding-inline: 8px; } .pass b { font-size: .7rem; letter-spacing: 0; } }
@media (max-width: 340px) { .passes { grid-template-columns: minmax(0, 1fr); } .pass { border-left: 0; border-top: 1px solid var(--line); padding-inline: 12px; } }
