/* MQTTHost.com: tokens follow ui-ux-pro-max design system (trust blue + orange CTA, Plus Jakarta Sans) */
:root {
  --bg: #f6f8fd;
  --bg-tint: #edf2fc;
  --surface: #ffffff;
  --surface-2: #f1f5fd;
  --text: #0c1a45;
  --text-muted: #4a5878;
  --border: #dfe6f3;
  --primary: #2459e0;
  --primary-soft: #e4ecfd;
  --accent: #ea580c;          /* large text + icons only */
  --accent-btn: #c8460c;      /* button fill, white label 4.8:1 */
  --accent-btn-hover: #b13d0a;
  --accent-soft: #fff1e8;
  --deep: #0f2a7a;
  --shadow: 0 1px 2px rgb(23 50 120 / .06), 0 8px 24px rgb(23 50 120 / .07);
  --shadow-lg: 0 2px 4px rgb(23 50 120 / .06), 0 24px 48px rgb(23 50 120 / .12);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1024;
    --bg-tint: #0e1630;
    --surface: #121b38;
    --surface-2: #17224a;
    --text: #e7ecf9;
    --text-muted: #a5b1cf;
    --border: #243158;
    --primary: #7aa2ff;
    --primary-soft: #1a2a5c;
    --accent: #ff8a4c;
    --accent-btn: #c8460c;
    --accent-btn-hover: #d9520f;
    --accent-soft: #3a1f12;
    --deep: #1a3796;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
em { font-style: normal; color: var(--accent); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* Buttons: pill radius for interactive, 16px for cards */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;
  font: 700 .9375rem/1 var(--font);
  white-space: nowrap;
  border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .875rem; }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 1rem; }
.btn--accent { background: var(--accent-btn); color: #fff; box-shadow: 0 6px 18px rgb(200 70 12 / .28); }
.btn--accent:hover { background: var(--accent-btn-hover); box-shadow: 0 10px 24px rgb(200 70 12 / .34); }
.btn--accent .ph-arrow-right { transition: transform .2s var(--ease); }
.btn--accent:hover .ph-arrow-right { transform: translateX(3px); }
.btn--outline { background: var(--surface); color: var(--text); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary-soft); }
.btn--ghost { color: var(--text); border-color: var(--border); background: transparent; }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--light { background: #fff; color: #0c1a45; }
.btn--light:hover { background: #e9efff; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 4px 20px rgb(23 50 120 / .06); }
.nav__inner { height: 72px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.375rem; letter-spacing: -0.03em; }
.brand img { width: 40px; height: auto; }
.brand b { color: var(--accent); font-weight: 800; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a { font-weight: 600; font-size: .9375rem; padding: 10px 14px; border-radius: 999px; transition: background-color .2s, color .2s; }
.nav__links a:hover { background: var(--primary-soft); color: var(--primary); }
.nav__actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.375rem; cursor: pointer; align-items: center; justify-content: center; }
.mobile-menu { border-top: 1px solid var(--border); background: var(--surface); padding: 8px 16px 16px; }
.mobile-menu a { display: block; padding: 14px 8px; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: 0; }

/* Hero */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 30%; height: 120%;
  background: radial-gradient(closest-side, rgb(36 89 224 / .14), transparent 70%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.5rem); line-height: 1.08; letter-spacing: -0.035em; max-width: 14ch; }
.hero .lead { margin-top: 20px; font-size: 1.125rem; color: var(--text-muted); max-width: 46ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__art { margin: 0; }
.hero__art img {
  width: 100%;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 50% 50%, #000 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 72% 78% at 50% 50%, #000 62%, transparent 100%);
}

/* Proof strip */
.proof { padding: 8px 0 72px; }
.proof__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.proof__item { display: flex; align-items: center; gap: 14px; padding: 22px 24px; }
.proof__item + .proof__item { border-left: 1px solid var(--border); }
.proof__item i { font-size: 2rem; color: var(--primary); flex: none; }
.proof__item strong { display: block; font-size: 1rem; font-weight: 700; }
.proof__item span { font-size: .875rem; color: var(--text-muted); }

/* Platform */
.platform { padding: 40px 0 96px; }
.platform__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.platform__art { margin: 0; }
.platform__art img {
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 50%, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 75% at 50% 50%, #000 60%, transparent 100%);
}
.platform__copy { border-left: 1px solid var(--border); padding-left: 48px; }
.platform__copy p { margin-top: 18px; color: var(--text-muted); font-size: 1.0625rem; max-width: 48ch; }
.link { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-weight: 700; color: var(--primary); min-height: 44px; }
.link i { transition: transform .2s var(--ease); }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.link:hover i { transform: translateX(3px); }

/* Capabilities bento */
.caps { padding: 96px 0; background: var(--bg-tint); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-head p { margin-top: 12px; color: var(--text-muted); font-size: 1.0625rem; }
.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "a a b c"
    "a a d e"
    "f f f f";
}
.bento > :nth-child(1) { grid-area: a; }
.bento > :nth-child(2) { grid-area: b; }
.bento > :nth-child(3) { grid-area: c; }
.bento > :nth-child(4) { grid-area: d; }
.bento > :nth-child(5) { grid-area: e; }
.bento > :nth-child(6) { grid-area: f; }
.cell {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.cell:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cell .icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  font-size: 1.5rem; color: var(--primary); background: var(--primary-soft); margin-bottom: 18px;
}
.cell p { margin-top: 8px; color: var(--text-muted); font-size: .9375rem; }
.cell--feature {
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgb(36 89 224 / .16), transparent 60%),
    radial-gradient(80% 60% at 0% 100%, rgb(234 88 12 / .10), transparent 60%),
    var(--surface);
}
.cell--feature { position: relative; isolation: isolate; }
.cell--feature::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--primary) 28%, transparent) 1.2px, transparent 1.6px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(70% 60% at 75% 30%, #000, transparent 75%);
          mask-image: radial-gradient(70% 60% at 75% 30%, #000, transparent 75%);
}
.cell--feature h3 { font-size: 1.5rem; }
.cell--feature p { font-size: 1rem; max-width: 46ch; }
.cell--feature .icon { width: 56px; height: 56px; font-size: 1.75rem; margin-bottom: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 0; padding: 0; }
.chips li { font: 500 .8125rem/1 var(--mono); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); white-space: nowrap; }
.cell--accent { background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); }
.cell--accent .icon { color: var(--accent); background: var(--surface); }
.cell--deep {
  display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: center;
  background: linear-gradient(110deg, #0f2a7a, #2459e0); border-color: transparent; color: #fff;
}
.cell--deep .icon { grid-row: span 2; margin: 0; color: #fff; background: rgb(255 255 255 / .14); }
.cell--deep p { color: rgb(255 255 255 / .82); margin-top: 4px; }

/* Connect / code */
.connect { padding: 96px 0; }
.connect__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: center; }
.connect__copy p { margin-top: 16px; color: var(--text-muted); font-size: 1.0625rem; max-width: 42ch; }
.tabs { display: inline-flex; gap: 4px; margin-top: 28px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.tabs button {
  min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent;
  font: 600 .875rem var(--font); color: var(--text-muted); cursor: pointer; transition: background-color .2s, color .2s;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.code { background: #0d1530; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid #1f2b52; }
.code__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 20px; border-bottom: 1px solid #1f2b52; }
.code__file { font: 500 .8125rem var(--mono); color: #93a2c9; }
.code__copy {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid #2b3a68; background: transparent; color: #c9d4f2;
  font: 600 .8125rem var(--font); cursor: pointer; transition: background-color .2s;
}
.code__copy:hover { background: #1a2550; }
.code pre { margin: 0; padding: 24px; overflow-x: auto; font: 400 .875rem/1.75 var(--mono); color: #dbe3fa; }
.code .c { color: #7d8bb3; }
.code .s { color: #ffb38a; }
.code .n { color: #8fb4ff; }
.code .k { color: #b9a6ff; }

/* Use cases */
.uses { padding: 96px 0; background: var(--bg-tint); }
.uses__grid { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: center; }
.uses__head p { margin-top: 14px; color: var(--text-muted); }
.uses__cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.use { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.use:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.use img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; transition: transform .6s var(--ease); }
.use:hover img { transform: scale(1.05); }
.use figcaption { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; font-size: .9375rem; }
.use figcaption i { font-size: 1.25rem; color: var(--primary); }

/* Pricing */
.pricing { padding: 96px 0; }
.pricing__grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 20px; align-items: stretch; }
.pricing__head { align-self: center; padding-right: 8px; }
.pricing__head p { margin-top: 14px; color: var(--text-muted); }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px 24px; box-shadow: var(--shadow);
}
.plan__for { color: var(--text-muted); font-size: .875rem; margin-top: 4px; }
.plan__price { margin: 18px 0 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: .875rem; }
.plan__price span { font-size: 2.25rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; margin-right: 4px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; font-size: .9375rem; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li i { color: var(--primary); margin-top: 4px; flex: none; }
.plan .btn { margin-top: auto; }
.plan--popular { border: 2px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 45%); box-shadow: var(--shadow-lg); }
.plan--popular li i { color: var(--accent); }
.plan__badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent-btn); color: #fff; font-size: .75rem; font-weight: 700;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}

/* CTA band */
.cta { padding: 24px 0 96px; }
.cta__band {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center;
  padding: 32px 40px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(60% 120% at 0% 100%, rgb(122 162 255 / .35), transparent 60%),
    linear-gradient(110deg, #0f2a7a 0%, #1d47c4 55%, #2459e0 100%);
  box-shadow: var(--shadow-lg);
}
.cta__art { width: 130px; border-radius: 16px; }
.cta__copy h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); }
.cta__copy p { margin-top: 8px; color: rgb(255 255 255 / .84); max-width: 52ch; }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 56px 0 28px; background: var(--surface); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer__tag { margin-top: 14px; color: var(--text-muted); max-width: 32ch; font-size: .9375rem; }
.footer h4 { font-size: .875rem; margin-bottom: 12px; }
.footer nav a { display: block; color: var(--text-muted); font-size: .9375rem; padding: 6px 0; }
.footer nav a:hover { color: var(--primary); }
.footer__base { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .875rem; }
.footer__base a { margin-left: 20px; }
.footer__base a:hover { color: var(--primary); }

/* Dark mode: give light-background illustrations a soft panel instead of a fade */
@media (prefers-color-scheme: dark) {
  .hero__art img, .platform__art img {
    -webkit-mask-image: none; mask-image: none;
    border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .nav.is-scrolled { box-shadow: 0 4px 20px rgb(0 0 0 / .3); }
  .brand img { border-radius: 6px; }
}

/* Motion: hero entrance + scroll reveal, gated on reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise .8s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: .06s; }
  .hero__copy > :nth-child(3) { animation-delay: .12s; }
  .hero__copy > :nth-child(4) { animation-delay: .18s; }
  .hero__art { animation: rise 1s var(--ease) .1s both; }
  .hero__art img { animation: float 7s ease-in-out 1.2s infinite; }
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Responsive */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .nav__toggle { display: inline-flex; }
  .pricing__grid { grid-template-columns: repeat(3, 1fr); }
  .pricing__head { grid-column: 1 / -1; text-align: center; max-width: 560px; margin: 0 auto 16px; padding: 0; }
  .uses__grid { grid-template-columns: 1fr; }
  .uses__cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero__grid, .platform__grid, .connect__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 32px; }
  .platform__copy { border-left: 0; padding-left: 0; }
  .proof__grid { grid-template-columns: repeat(2, 1fr); }
  .proof__item:nth-child(3) { border-left: 0; }
  .proof__item:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .bento { grid-template-columns: 1fr 1fr; grid-template-areas: "a a" "b c" "d e" "f f"; }
  .cell--feature { min-height: 260px; }
  .pricing__grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .plan--popular { margin-top: 8px; }
  .cta__band { grid-template-columns: 1fr; text-align: left; padding: 28px; }
  .cta__art { width: 96px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav__inner { height: 64px; gap: 12px; }
  .brand { font-size: 1.125rem; }
  .brand img { width: 32px; }
  .nav__actions .btn--ghost { display: none; }
  .nav__actions .btn--accent { padding: 0 14px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .proof__grid { grid-template-columns: 1fr; }
  .proof__item + .proof__item { border-left: 0; border-top: 1px solid var(--border); }
  .bento { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c" "d" "e" "f"; }
  .cell--deep { grid-template-columns: 1fr; }
  .cell--deep .icon { grid-row: auto; margin-bottom: 16px; }
  .uses__cards { grid-template-columns: 1fr; }
  .caps, .connect, .uses, .pricing { padding: 72px 0; }
  .platform { padding-bottom: 72px; }
  .cta__actions .btn { flex: 1 1 100%; }
  .footer__base { flex-direction: column; }
  .footer__base a { margin: 0 20px 0 0; }
}
@media (max-width: 380px) {
  .nav__actions .btn--accent { display: none; }
}
