/* BotBarn landing page. Palette and type follow the app (spec 010): one blue accent, Inter, dark by default. */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #121417;
  --panel: #1a1d23;
  --panel-2: #262a31;
  --fg: #e8eaed;
  --muted: rgb(232 234 237 / 0.68);
  --faint: rgb(232 234 237 / 0.48);
  --line: rgb(232 234 237 / 0.12);
  --accent: #8ea6f5;
  --on-accent: #10131a;
  --ok: #7dd3a0;
  --err: #f28b82;
  --shadow: 0 24px 48px -32px rgb(0 0 0 / 0.6);
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --panel-2: #eef0f3;
    --fg: #1a1d23;
    --muted: rgb(26 29 35 / 0.7);
    --faint: rgb(26 29 35 / 0.5);
    --line: rgb(26 29 35 / 0.12);
    --accent: #2f55d4;
    --on-accent: #ffffff;
    --ok: #166534;
    --err: #b91c1c;
    --shadow: 0 24px 48px -36px rgb(26 29 35 / 0.35);

    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
}

.skip:focus {
  top: 12px;
}

/* Layout */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  border-top: 1px solid var(--line);
  padding: 88px 0;
  scroll-margin-top: 64px;
}

.section--tight {
  padding: 64px 0;
}

.label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.label b {
  font-weight: 500;
  color: var(--accent);
}

.h2 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 60ch;
  margin: 16px 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  font-size: 0.875em;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel-2);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, filter 0.15s;
}

.btn--lg {
  min-height: 44px;
  padding: 0 22px;
  font-size: 1rem;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  filter: brightness(1.08);
}

.btn--outlined {
  border-color: var(--line);
  color: var(--fg);
}

.btn--outlined:hover,
.btn--text:hover {
  background: var(--panel-2);
}

.btn--text {
  color: var(--fg);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Header */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header__row {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}

.mark {
  flex: none;
  color: var(--accent);
}

.mark__eye {
  fill: var(--bg);
}

.header__nav {
  display: flex;
  gap: 24px;
}

.header__nav a {
  font-size: 0.9375rem;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
}

.header__nav a:hover {
  color: var(--fg);
}

.header__actions {
  display: flex;
  white-space: nowrap;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* Hero */

.hero {
  padding: 88px 0 104px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 64px;
  align-items: center;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 3.5rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.hero__lead {
  margin-top: 24px;
}

.hero .cta {
  margin-top: 28px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.facts li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.cta__note {
  margin: 14px 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

/* AI session card */

.chat {
  --step: 0.5s;

  margin: 0;
  padding: 20px;
  font-size: 0.875rem;
  box-shadow: var(--shadow);
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.chat__avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.chat__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.chat__name strong {
  font-weight: 600;
}

.chat__name span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.chip-ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
  font-size: 0.8125rem;
  font-weight: 500;
}

.chip-ok i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.chat__state {
  margin-left: auto;
  animation: reveal 0.3s ease-out both;
  animation-delay: calc(var(--step) * 5);
}

.msg {
  max-width: 88%;
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.5;
}

.msg--user {
  margin-left: auto;
  border-bottom-right-radius: 4px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.msg--ai {
  border-bottom-left-radius: 4px;
  background: var(--panel-2);
  animation: reveal 0.3s ease-out both;
  animation-delay: calc(var(--step) * 5.4);
}

.tools {
  margin: 16px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  list-style: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.9;
}

.tools li {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  animation: reveal 0.25s ease-out both;
  animation-delay: calc(var(--step) * 0.8 + var(--i) * var(--step));
}

.tools i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.tools .ok {
  background: var(--ok);
}

.tools .err {
  background: var(--err);
}

.tools span {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--faint);
}

.tools li:last-child span {
  color: var(--ok);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}

/* Build with AI */

.ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  margin-top: 48px;
}

.ai__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.ai__list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 14px;
  border-top: 2px solid var(--line);
  counter-increment: step;
}

.ai__list li:first-child {
  border-top-color: var(--accent);
}

.ai__list strong {
  font-weight: 600;
}

.ai__list strong::before {
  content: counter(step) '. ';
  font-family: var(--mono);
  color: var(--accent);
}

.ai__list span {
  color: var(--muted);
}

.safe {
  margin: 0;
  padding: 0;
  list-style: none;
}

.safe li {
  position: relative;
  padding: 12px 0 12px 30px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.55;
}

.safe li:first-child {
  border-top: 1px solid var(--line);
}

/* A small lock drawn in CSS */
.safe li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 19px;
  width: 12px;
  height: 9px;
  border-radius: 2px;
  background: var(--ok);
}

.safe li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 13px;
  width: 6px;
  height: 7px;
  border: 2px solid var(--ok);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.safe strong {
  font-weight: 600;
  color: var(--fg);
}

.ai__clients {
  margin: 20px 0 4px;
  color: var(--faint);
}

/* The directory button, then the server-address guide for the other assistants (spec 055) */
.ai__connect {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 12px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 500;
  text-decoration: none;
}

.link-arrow:hover span {
  transform: translateX(2px);
}

.link-arrow span {
  transition: transform 0.15s;
}

/* Bring your code */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.split .link-arrow {
  margin-top: 12px;
}

.gets__head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--faint);
}

.gets__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 0;
  padding: 20px;
  list-style: none;
}

.gets__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
}

.gets__list li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
}

/* Pricing */

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

.terms {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.terms li {
  position: relative;
  padding: 10px 0 10px 24px;
  line-height: 1.6;
  color: var(--muted);
}

.terms li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 20px;
  width: 8px;
  height: 2px;
  background: var(--accent);
}

.terms strong {
  font-weight: 600;
  color: var(--fg);
}

.plans {
  overflow: hidden;
}

/* While plans load, the fallback keeps its room but stays invisible */
.plans[data-state='loading'] .plans__fallback {
  visibility: hidden;
}

.plans__head {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

.plan {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px dashed var(--line);
}

.plan__info,
.plan__price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.plan__info strong {
  font-weight: 600;
}

.plan__tag {
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--accent);
  vertical-align: 2px;
}

.plan__limits,
.plan__desc,
.plan__price span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.plan__limits {
  font-family: var(--mono);
}

.plan__price {
  align-items: flex-end;
  text-align: right;
  white-space: nowrap;
}

.plan__price strong {
  font-family: var(--mono);
  font-size: 1.0625rem;
  font-weight: 600;
}

.plans__foot {
  padding: 20px;
}

.plans__fallback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 24px;
  color: var(--muted);
}

.plans__fallback p {
  margin: 0;
  line-height: 1.6;
}

/* FAQ */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
}

.faq__more {
  margin-top: 16px;
}

.faq__list details {
  border-top: 1px solid var(--line);
}

.faq__list details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq__list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 1.0625rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq__list summary::-webkit-details-marker {
  display: none;
}

.plus {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.plus::before,
.plus::after {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.plus::after {
  transform: rotate(90deg);
}

details[open] .plus {
  transform: rotate(45deg);
}

.faq__list p {
  max-width: 62ch;
  margin: 0 0 16px;
  line-height: 1.65;
  color: var(--muted);
}

.faq__list p:last-child {
  margin-bottom: 24px;
}

/* Closing and footer */

.closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.closing .btn {
  flex: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

.brand--small {
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer__links a {
  color: var(--faint);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--fg);
}

/* Suggested language (langhint.js): a bar above the header, in the suggested language */

.langhint {
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}

.langhint__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.langhint__text {
  flex: 1 1 auto;
}

.langhint__go {
  min-height: 44px;
}

.langhint__close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

.langhint__close:hover {
  color: var(--fg);
}

/* Language switch (spec 033): codes in the header, names in the footer */

.langs {
  display: flex;
  flex-wrap: wrap;
}

.langs a {
  color: var(--faint);
  text-decoration: none;
}

.langs a:hover,
.langs a[aria-current] {
  color: var(--fg);
}

.langs abbr {
  text-decoration: none;
}

.langs--header {
  flex-wrap: nowrap;
  gap: 2px;
  margin-right: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.langs--header a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 5px;
}

.langs--footer {
  gap: 8px 20px;
  font-size: 0.875rem;
}

.footer__note {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--faint);
}

/* Responsive */

@media (max-width: 960px) {
  .hero {
    padding: 48px 0 64px;
  }

  .hero__grid,
  .ai,
  .split,
  .pricing,
  .faq {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .ai {
    margin-top: 32px;
  }
}

/* Section links need room in every language; below this width the page is short enough to scroll */
@media (max-width: 1100px) {
  .header__nav {
    display: none;
  }
}

@media (max-width: 860px) {
  .closing {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }

  .header__row {
    gap: 16px;
  }

  .section {
    padding: 48px 0;
  }

  .section--tight {
    padding: 40px 0;
  }

  .hero {
    padding: 28px 0 48px;
  }

  .hero__title {
    font-size: 2.125rem;
  }

  .hero__lead {
    margin-top: 16px;
    font-size: 1rem;
  }

  .hero .cta {
    margin-top: 24px;
  }

  .hero .cta .btn {
    flex: 1 1 auto;
  }

  /* Touch targets */
  .btn,
  .brand {
    min-height: 44px;
  }

  .chat {
    padding: 16px;
  }

  .msg {
    max-width: 94%;
  }

  .ai__list {
    gap: 20px 16px;
  }

  .split .lead {
    font-size: 1rem;
  }

  .gets__list {
    gap: 12px 12px;
    padding: 16px;
  }

  .gets__list li {
    font-size: 0.875rem;
  }

  .terms {
    margin-top: 20px;
  }

  .terms li {
    padding: 8px 0 8px 24px;
  }

  .terms li::before {
    top: 19px;
  }

  .faq__list summary {
    min-height: 56px;
    padding: 14px 0;
    font-size: 1rem;
  }

  .faq__more {
    margin-top: 8px;
  }

  .footer {
    padding-bottom: 24px;
  }

  .footer__links {
    gap: 0 20px;
  }

  .footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .header__signin {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
