/* Pancake MCP landing, in the style of pancake.vn: soft mint-to-blue hero,
   Pancake blue (#105ce2) pill buttons, light blue sections, a navy footer.
   One family (Be Vietnam Pro, bundled); tag colours only in the inbox mock. */

@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/assets/fonts/BeVietnamPro-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("/assets/fonts/BeVietnamPro-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #1d2939;
  --ink-soft: #475467;
  --line: #eaecf0;
  --line-strong: #d0d5dd;
  --paper: #ffffff;
  --mist: #f2f4f7;
  --sky: #f0f8ff;
  --blue: #105ce2;
  --blue-deep: #0b4cc0;
  --blue-light: #2b7fff;
  --blue-wash: #e6f0ff;
  --night: #101828;
  --syrup: #f2a93b;
  --syrup-ink: #7a4a00;
  --leaf: #17713d;
  --radius-panel: 20px;
  --radius-card: 16px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  /* The hero's wash, as on pancake.vn: mint on the left, blue on the right. */
  background:
    radial-gradient(55% 520px at 8% 0%, rgba(150, 236, 210, 0.55), transparent 70%),
    radial-gradient(50% 560px at 92% 8%, rgba(160, 200, 255, 0.55), transparent 72%),
    linear-gradient(180deg, #f3fbff 0, #ffffff 900px) no-repeat;
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
ol,
ul,
figure {
  margin: 0;
}

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

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
}

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

.wrap {
  width: min(1200px, 100% - 40px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 10px 14px;
  background: var(--night);
  color: #fff;
  border-radius: 8px;
  z-index: 20;
}
.skip:focus {
  top: 12px;
}

/* Buttons: pills, as on pancake.vn */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 100px;
  background: var(--blue);
  color: #fff;
  font: 600 16px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button:hover {
  background: var(--blue-deep);
}
.button--small {
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
}

/* Header */

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand__name {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lang__option {
  min-width: 40px;
  min-height: 32px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--ink-soft);
  font: 600 13px/1 var(--font);
  cursor: pointer;
}
.lang__option[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
}

/* Hero */

.hero {
  padding: 56px 0 104px;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  font-size: 14px;
  color: var(--ink);
}
.hero__title {
  margin-top: 20px;
  font-size: clamp(2rem, 3.3vw, 2.6rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero__highlight {
  display: block;
  background: linear-gradient(296deg, var(--blue-light) 38%, var(--blue) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 19px;
  color: var(--ink-soft);
}

/* Connect: the address to paste, and the three steps */

.connect {
  margin-top: 36px;
  max-width: 560px;
}
.connect__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.address {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 24px;
  border-radius: 100px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 8px 24px -12px rgba(16, 92, 226, 0.35);
}
.address__url {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.steps {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--ink-soft);
}
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.steps__number {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

/* Hero demo: an AI chat next to a Pancake inbox. The chat sits a little
   lower and over the inbox's margin, never over its rows. */

.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
.demo__inbox {
  grid-column: 2;
  grid-row: 1;
  padding: 18px 18px 8px 30px;
  border-radius: var(--radius-panel);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px -20px rgba(16, 92, 226, 0.28);
}
.inbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.inbox__title {
  font-weight: 600;
}
.inbox__filter {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink-soft);
  font-size: 13px;
}
.inbox__list {
  list-style: none;
  padding: 0;
}
.inbox__row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  font-size: 14px;
  line-height: 1.35;
}
.inbox__row + .inbox__row {
  border-top: 1px solid var(--mist);
}
.inbox__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.inbox__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}
.inbox__top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox__preview {
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox__meta {
  display: flex;
  flex: none;
  align-items: center;
  gap: 5px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.avatar--a { background: #e2608a; }
.avatar--b { background: #3a8fd6; }
.avatar--c { background: #2a9d8f; }
.avatar--d { background: #8a63d2; }
.chip {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.chip--price {
  background: #fde9c6;
  color: var(--syrup-ink);
  box-shadow: inset 0 0 0 1px var(--syrup);
}
.chip--ship {
  background: #e7f6ed;
  color: var(--leaf);
  box-shadow: inset 0 0 0 1px #9fd8b5;
}
.assignee {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--mist);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.demo__chat {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  margin: 64px -20px 0 0;
  padding: 16px;
  border-radius: var(--radius-panel);
  background: var(--night);
  color: #fff;
  box-shadow: 0 24px 48px -18px rgba(16, 24, 40, 0.55), 0 2px 6px rgba(16, 24, 40, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}
.chat__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
}
.bubble {
  max-width: 88%;
  padding: 9px 13px;
  font-size: 14px;
  line-height: 1.45;
}
.bubble--user {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
  background: var(--blue);
}
.bubble--ai {
  align-self: flex-start;
  border-radius: 16px 16px 16px 4px;
  background: rgba(255, 255, 255, 0.1);
}
.bubble--typing {
  display: flex;
  gap: 4px;
  align-self: flex-start;
  border-radius: 16px 16px 16px 4px;
  background: rgba(255, 255, 255, 0.1);
}
.bubble--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}
.tool-call {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}
.tool-call__ok {
  color: #86efac;
}

/* The one orchestrated moment: the conversation plays once, and the tags
   land on the inbox rows when the AI is done. */
@media (prefers-reduced-motion: no-preference) {
  .demo-step {
    animation: appear 0.4s ease-out both;
  }
  .demo-step--1 { animation-delay: 0.4s; }
  .demo-step--2 { animation: typing 1.1s ease-out 1s both; }
  .demo-step--3 { animation-delay: 2.1s; }
  .demo-step--4 { animation-delay: 3.4s; }
  .demo-step--5 { animation-delay: 4.3s; }
  .demo-step--6 { animation-delay: 5.1s; }
  .demo-step--7,
  .demo-step--8,
  .demo-step--9 {
    animation: land 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  }
  .demo-step--7 { animation-delay: 5.5s; }
  .demo-step--8 { animation-delay: 5.65s; }
  .demo-step--9 { animation-delay: 5.8s; }
}
@keyframes appear {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes typing {
  0% { opacity: 0; max-height: 40px; }
  15%, 85% { opacity: 1; max-height: 40px; }
  100% { opacity: 0; max-height: 0; padding-block: 0; margin-block: -4px; }
}
@keyframes land {
  from { opacity: 0; transform: translateY(-14px) scale(0.85); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bubble--typing {
    display: none;
  }
}

/* Setup: one tab per AI app, its steps and the snippets to copy */

.setup {
  padding: 16px 0 104px;
}
.setup__lead {
  max-width: 64ch;
  margin: 12px auto 0;
  text-align: center;
  color: var(--ink-soft);
}
.setup__card {
  max-width: 880px;
  margin: 40px auto 0;
  padding: 24px 28px 28px;
  border-radius: var(--radius-card);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px -28px rgba(16, 92, 226, 0.35);
}
.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--mist);
}
.tabs__tab {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font: 600 15px/1.2 var(--font);
  cursor: pointer;
}
.tabs__tab:hover {
  color: var(--ink);
}
.tabs__tab[aria-selected="true"] {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}
.setup__panel {
  padding-top: 24px;
}
.setup__where {
  font-size: 15px;
  color: var(--ink-soft);
}
.guide {
  display: grid;
  gap: 20px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}
.guide > li {
  position: relative;
  min-width: 0;
  padding-left: 40px;
  counter-increment: guide;
}
.guide > li::before {
  content: counter(guide);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.guide > li > * + * {
  margin-top: 10px;
}
.guide p code,
.setup__note code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--mist);
  color: var(--ink);
}
.setup__note {
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--sky);
  color: var(--ink-soft);
  font-size: 15px;
}
.snippet {
  border-radius: 12px;
  background: var(--night);
  color: #e4e7ec;
  overflow: hidden;
}
.snippet__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.snippet__file {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
.snippet__copy {
  flex: none;
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: 600 13px/1 var(--font);
  cursor: pointer;
}
.snippet__copy:hover {
  background: rgba(255, 255, 255, 0.2);
}
.snippet__code {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.55;
}
.snippet__code code {
  font-size: 14px;
}
.snippet__code--tall {
  max-height: 300px;
  overflow-y: auto;
}

/* Tools */

.tools {
  padding: 88px 0 104px;
  background: var(--sky);
}
.setup__title,
.tools__title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-align: center;
}
.tools__count {
  margin-top: 8px;
  text-align: center;
  font-size: 15px;
  color: var(--blue);
  font-weight: 600;
}
.tools__note {
  max-width: 64ch;
  margin: 12px auto 0;
  text-align: center;
  color: var(--ink-soft);
}
.tools__table {
  margin-top: 40px;
  padding: 8px 28px 20px;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  overflow-x: auto;
}
.tools__table > p {
  padding: 16px 0 4px;
  color: var(--ink-soft);
}
.tools__table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.tools__table th,
.tools__table td {
  padding: 12px 16px 12px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.tools__table thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.tools__table tbody th {
  padding-top: 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  border-bottom-color: var(--blue-wash);
}
.tools__table td code {
  color: var(--ink-soft);
}
.kind {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.kind--read {
  background: var(--mist);
  color: var(--ink-soft);
}
.kind--write {
  background: var(--blue-wash);
  color: var(--blue);
}
.kind--destructive {
  background: #fef3f2;
  color: #b42318;
}

/* Footer: navy, as on pancake.vn */

.site-footer {
  padding: 56px 0 40px;
  background: var(--night);
  color: #d0d5dd;
  font-size: 15px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
}
.brand--on-dark {
  color: #fff;
}
.site-footer__about {
  margin-top: 12px;
  max-width: 36ch;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 28px;
  padding: 0;
  list-style: none;
}
.site-footer__links a {
  color: #f2f4f7;
  text-decoration: none;
}
.site-footer__links a:hover {
  text-decoration: underline;
}
.site-footer__copyright {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  color: #98a2b3;
}

/* Toast for copy feedback */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 100px;
  background: var(--night);
  color: #fff;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Smaller screens */

@media (max-width: 960px) {
  .hero {
    padding-top: 32px;
  }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .demo {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .demo__inbox,
  .demo__chat {
    grid-column: 1;
    grid-row: auto;
    margin: 0;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }
  .site-header__actions .button {
    display: none;
  }
  .address {
    flex-wrap: wrap;
    padding: 14px;
    border-radius: var(--radius-card);
  }
  .address__url {
    flex-basis: 100%;
    font-size: 15px;
  }
  .address .button {
    width: 100%;
  }
  .tools__table {
    padding: 4px 16px 16px;
  }
  .setup__card {
    padding: 16px 16px 20px;
  }
  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide > li {
    padding-left: 0;
    padding-top: 36px;
  }
}
