@import url("tokens.css");
@import url("fonts.css");
@import url("components.css");

/* mcpdevlabs.com — layout. Sections rest in their final state without JS; GSAP only adds
   entrances, scroll-linked parallax and count-ups, all behind prefers-reduced-motion. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  padding-inline: var(--gutter);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: var(--teal); text-underline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; font-weight: 700; }
p { margin: 0; }
.container { max-width: var(--container); margin: 0 auto; }
.lede { font-size: 19px; color: var(--muted); max-width: 60ch; }
section { padding-block: 96px; position: relative; }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 18px; }
.bleed { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.dark { background: var(--deep); color: var(--deep-ink); }
.dark h1, .dark h2, .dark h3 { color: var(--deep-ink); }
.dark .lede, .dark .section-head p, .dark .trust { color: var(--deep-muted); }
.dark .eyebrow { color: var(--teal-bright); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--teal); color: #fff; padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ── nav ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
  --nav-ink: var(--ink); --nav-muted: var(--muted);
  background: color-mix(in srgb, var(--ground) 78%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s ease, background .25s ease;
}
.nav.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--ground) 90%, transparent); }
.nav.over-dark { --nav-ink: var(--deep-ink); --nav-muted: var(--deep-muted); background: rgba(11, 20, 18, .35); }
.nav.over-dark.scrolled { background: rgba(11, 20, 18, .78); border-bottom-color: var(--deep-line); }
.nav-inner { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; gap: 24px; height: 72px; transition: height .3s var(--ease-out); }
.nav.scrolled .nav-inner { height: 62px; }
.nav .mark { color: var(--nav-ink); }
.nav.over-dark .mark::before { background: var(--teal-bright); }
.menu { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.menu a { position: relative; color: var(--nav-muted); text-decoration: none; font-weight: 500; font-size: 15.5px; transition: color var(--dur-fast) ease; }
.menu a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--teal-bright); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out); }
.menu a:not(.btn):hover, .menu a.active { color: var(--nav-ink); }
.menu a:not(.btn):hover::after, .menu a.active::after { transform: scaleX(1); }
.menu .btn { min-height: 42px; padding-inline: 18px; font-size: 15px; }
.menu a.btn-primary { color: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .menu a.btn-primary { color: var(--deep); } }
:root[data-theme="dark"] .menu a.btn-primary { color: var(--deep); }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 3px auto; border-radius: 2px; transition: transform .25s var(--ease-out), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.nav.over-dark .burger { background: var(--deep-2); border-color: var(--deep-line); }
.nav.over-dark .burger span { background: var(--deep-ink); }

/* ── hero (dark, aurora, product stage) ───────────────── */
.hero { padding-block: 76px 104px; overflow: clip; isolation: isolate; margin-top: -72px; padding-top: 148px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 72%); mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 72%);
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-grid > *, .show > *, .demo-grid > *, .band-grid > * { min-width: 0; }
.hero h1 { font-size: clamp(40px, 5.6vw, 74px); line-height: 1.02; font-weight: 800; margin-top: 16px; }
.hero h1 .w { display: inline-block; animation: rise .8s var(--ease-out) both; animation-delay: calc(80ms + var(--i, 0) * 55ms); }
.h-anim { animation: rise .9s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero .lede { margin-top: 24px; font-size: 19.5px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust { margin-top: 20px; font-size: 14px; color: var(--muted); }
.hero .proof { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font: 500 13px/1 var(--font-mono); color: var(--deep-muted); letter-spacing: .02em; }
.hero .proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero .proof span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 4px rgba(55, 198, 161, .18); }

.stage { position: relative; aspect-ratio: 1 / 1.08; width: 100%; max-width: 640px; margin-inline: auto; }
.stage .chat { position: absolute; left: 9%; right: 9%; top: 50%; transform: translateY(-50%); z-index: 2; box-shadow: var(--shadow-float), 0 0 0 1px rgba(255, 255, 255, .05); }
.stage .lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; }
.stage .lines path { fill: none; stroke: rgba(55, 198, 161, .38); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 5 9; animation: flow 2.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.orbit .chip {
  position: absolute; z-index: 3; transform: translate(-50%, -50%); height: 40px; font-size: 14px; padding: 0 14px 0 10px;
  background: #121C19; border-color: #263631; color: var(--deep-ink); box-shadow: 0 16px 32px -14px rgba(0, 0, 0, .8);
  animation: float var(--fd, 5s) var(--ease-in-out) infinite alternate; animation-delay: var(--fdl, 0s);
}
@keyframes float { from { translate: 0 -6px; } to { translate: 0 6px; } }
.orbit .chip.more { background: var(--teal-bright); color: var(--deep); border-color: transparent; }

/* ── sources: platform wall (four category marquees) ───── */
.sources { padding-block: 48px 56px; border-bottom: 1px solid var(--line); }
.sources .head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.sources .head h2 { font-size: clamp(24px, 2.6vw, 30px); }
.sources .head h2 b { color: var(--teal); font-weight: 800; }
.sources .hint { font-size: 15px; color: var(--muted); }
.sources .cat { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 12px 20px; align-items: center; }
.sources .cat + .cat { margin-top: 8px; }
.wall-label { display: flex; align-items: center; gap: 10px; font: 500 12.5px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wall-label .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }

/* ── photo bands (full bleed, dark overlay, parallax on the image only) ── */
.band { padding-block: 128px; color: var(--deep-ink); isolation: isolate; overflow: clip; }
.band-media { position: absolute; inset: 0; z-index: -2; background: var(--deep); }
.band-media img { width: 100%; height: 118%; object-fit: cover; display: block; margin-top: -9%; filter: saturate(.85); }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(11, 20, 18, .94) 0%, rgba(11, 20, 18, .78) 48%, rgba(11, 20, 18, .5) 100%); }
.band .eyebrow { color: var(--teal-bright); }
.band h2 { color: var(--deep-ink); font-size: clamp(32px, 4.4vw, 54px); max-width: 15ch; }
.band p { color: var(--deep-muted); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.band .statements { display: grid; gap: 12px; margin-top: 26px; }
.band .statements li { list-style: none; display: flex; gap: 14px; align-items: flex-start; font-size: 17.5px; color: var(--deep-ink); }
.band .statements li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: rgba(245, 176, 74, .16); border: 1px solid rgba(245, 176, 74, .5); }
.band .statements { padding: 0; margin: 26px 0 0; }
.band .problem-vis { display: grid; gap: 14px; padding: 22px; }

/* ── how it works ──────────────────────────────────────── */
.setup { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: center; margin-top: 64px; }
.photo-frame { position: relative; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); box-shadow: var(--shadow-float); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9); }
.photo-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(11, 20, 18, .55)); }
.status { position: relative; z-index: 1; margin-left: -72px; padding: 24px 26px; display: grid; gap: 14px; box-shadow: var(--shadow-float); }
.status .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 500 12px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.status .head b { color: var(--teal); font-weight: 600; }
.status ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.status li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink); padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.status li img { width: 18px; height: 18px; object-fit: contain; }
.status li .ok { margin-left: auto; font: 500 12px/1 var(--font-mono); color: var(--teal); display: inline-flex; align-items: center; gap: 6px; }
.status li .ok::before { content: ""; width: 7px; height: 4px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-1px); }
.status .foot { font-size: 13px; color: var(--muted); }

/* ── demo panel ────────────────────────────────────────── */
.demo-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: start; }
.tabs { display: grid; gap: 6px; position: relative; }
.tab {
  text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; padding: 14px 16px;
  font: 500 16px/1.35 var(--font-body); color: var(--muted); cursor: pointer;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
}
.tab:hover { color: var(--ink); transform: translateX(2px); }
.tab small { display: block; font: 400 13.5px/1.4 var(--font-body); color: var(--muted); margin-top: 4px; }
.tab[aria-selected="true"] { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-card); }
.tab[aria-selected="true"]::before { content: ""; position: absolute; left: -1px; width: 3px; height: 28px; margin-top: 4px; border-radius: 3px; background: var(--teal); }
.panes { position: relative; }

/* ── bento (features) ──────────────────────────────────── */
.b .stack { display: grid; gap: 8px; }
.b .stack .row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font: 500 13.5px/1 var(--font-mono); color: var(--ink); }
.b .stack .row img { width: 16px; height: 16px; }
.b .stack .row .acct { color: var(--muted); font-weight: 400; margin-left: auto; }
.b .toggle { display: inline-flex; align-items: center; gap: 12px; font: 500 13px/1 var(--font-mono); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.b .toggle i { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .3s ease; }
.b .toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease-spring); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.b:hover .toggle i { background: var(--teal); }
.b:hover .toggle i::after { transform: translateX(18px); }
.b .stat { font: 800 clamp(48px, 5vw, 72px)/1 var(--font-display); letter-spacing: -0.03em; color: var(--ink); }
.b .stat b { font: inherit; }
.b .stat small { display: block; font: 500 13px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.b.stats { grid-template-columns: repeat(3, 1fr); align-content: center; align-items: end; gap: 20px; }
.b .kw { display: grid; gap: 6px; }
.b .kw .row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font: 400 13.5px/1 var(--font-mono); color: var(--muted); }
.b .kw .row b { color: var(--ink); font-weight: 500; }
.b .kw .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.b .kw .bar i { display: block; height: 100%; width: var(--w); background: var(--teal); border-radius: 2px; transform-origin: left; }

/* ── two-column showcase ───────────────────────────────── */
.show { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.show.flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.show.flip .show-text { order: 2; }
.show-text { display: grid; gap: 16px; }
.show-text h2 { font-size: clamp(28px, 3.4vw, 40px); }
.show .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.show .tile .value { font-size: 34px; }
.show-text p { color: var(--muted); }
.protocol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: p; }
.protocol li { position: relative; padding-left: 34px; font-size: 15.5px; }
.protocol li::before { counter-increment: p; content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: .1em; font: 500 12.5px/1.6 var(--font-mono); color: var(--teal); }
.callout { border-left: 3px solid var(--teal); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 18px; font-size: 15.5px; box-shadow: var(--shadow-card); }
.callout .who { font: 500 12px/1 var(--font-mono); color: var(--teal); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.show .chat { box-shadow: var(--shadow-float); }

/* ── security band ─────────────────────────────────────── */
.band.security { padding-block: 112px; }
.band.security::before { background: linear-gradient(180deg, rgba(11, 20, 18, .9) 0%, rgba(11, 20, 18, .82) 100%); }
.band.security .section-head { max-width: 820px; }
.band.security .section-head p { color: var(--deep-muted); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.two .glass { padding: 30px; }
.two .glass.default { border-color: rgba(55, 198, 161, .55); box-shadow: inset 0 0 0 1px rgba(55, 198, 161, .35), 0 24px 50px -30px rgba(0, 0, 0, .7); }
.limits { margin-top: 20px; padding: 20px 24px; border: 1px dashed var(--glass-line); border-radius: var(--radius-lg); display: grid; gap: 8px; font-size: 15px; color: var(--deep-muted); }
.limits strong { color: var(--deep-ink); font-weight: 600; }

/* ── audiences ─────────────────────────────────────────── */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* ── FAQ ───────────────────────────────────────────────── */
.faq { max-width: 820px; display: grid; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 22px; box-shadow: var(--shadow-card); transition: border-color var(--dur-fast) ease; }
.faq details[open] { border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 600 17px/1.4 var(--font-body); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--font-mono); color: var(--teal); flex: none; transition: transform .25s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 66ch; overflow: hidden; }

/* ── final CTA + footer ────────────────────────────────── */
.final { padding-block: 120px; isolation: isolate; overflow: clip; }
.final > .container { position: relative; z-index: 1; display: grid; gap: 22px; max-width: 920px; }
.final h2 { font-size: clamp(36px, 5vw, 60px); }
.final p { color: var(--deep-muted); font-size: 19px; max-width: 58ch; }
.final .contact { display: flex; flex-wrap: wrap; gap: 18px 32px; font-size: 16px; color: var(--deep-ink); margin-top: 8px; }
.final .contact a { color: var(--deep-ink); }
.footer { padding-block: 32px 48px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.footer .container { display: grid; gap: 14px; }
.footer .row { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.footer a { color: var(--muted); }
.footer .legal { font-size: 13px; max-width: 90ch; }

/* ── reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero h1 .w, .h-anim { animation: none; }
  .stage .lines path { animation: none; }
  .orbit .chip { animation: none; }
  .nav-inner, .menu a, .menu a::after, .tab, .faq summary::after, .burger span { transition: none; }
  .b .toggle i, .b .toggle i::after { transition: none; }
}

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b.h2 { grid-row: span 1; }
}
@media (max-width: 1024px) {
  .hero-grid, .show, .show.flip, .band-grid, .setup { grid-template-columns: minmax(0, 1fr); }
  .show.flip .show-text { order: 0; }
  .three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .tabs { display: flex; flex-wrap: wrap; }
  .tab small { display: none; }
  .tab[aria-selected="true"]::before { display: none; }
  .status { margin-left: 0; margin-top: -40px; margin-inline: 16px; }
  .band h2 { max-width: none; }
}
@media (max-width: 900px) {
  .stage { aspect-ratio: auto; max-width: none; }
  .stage .chat { position: static; transform: none; }
  .stage .lines, .orbit { display: none; }
}
/* the full menu needs ~760px of nav; below that it becomes the burger dropdown */
@media (max-width: 900px) {
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px var(--gutter) 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .nav.over-dark .menu { background: var(--deep-2); border-bottom-color: var(--deep-line); }
  .menu.open { display: flex; }
  .menu a:not(.btn)::after { display: none; }
  .burger { display: block; }
}
@media (max-width: 720px) {
  section { padding-block: 64px; }
  .hero { padding-top: 116px; padding-bottom: 64px; }
  .bento, .three, .two, .steps { grid-template-columns: 1fr; }
  .b.w2 { grid-column: span 1; }
  .b.stats { grid-template-columns: repeat(3, 1fr); }
  .steps .line { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .value { font-size: 30px; }
  .cta-row .btn { width: 100%; }
  .sources .cat { grid-template-columns: 1fr; gap: 8px; }
  .sources .cat + .cat { margin-top: 18px; }
  .band { padding-block: 80px; }
  .band-media img { height: 100%; margin-top: 0; }
  .final { padding-block: 72px; }
  .status { margin-top: -24px; margin-inline: 10px; padding: 18px; }
}
@media (max-width: 480px) {
  .chat table { min-width: 0; font-size: 13px; }
  .chat th, .chat td { padding: 8px 6px; }
  .chat-body { padding-inline: 14px; }
  .msg.user { max-width: 92%; }
  .data th, .data td { padding: 10px 8px; font-size: 14px; }
  .data td .who { gap: 6px; }
}
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr; } .b.stats { grid-template-columns: 1fr; } }
