/*
 * MIBO TECH demo site — Apple design language.
 *
 * Black, white, grey and one blue. The guest app inside the frames keeps its own
 * brand colours; the site around it is deliberately neutral so the product is what
 * stands out.
 */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --subtle: #86868b;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --black: #000000;
  --radius: 20px;
  --shadow-card: 0 4px 24px rgb(0 0 0 / 0.06);
  --shadow-window: 0 30px 80px -30px rgb(0 0 0 / 0.45);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

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

/* ---------- bilingual ---------- */
html[data-lang="en"] [data-lang="zh"],
html[data-lang="zh"] [data-lang="en"] { display: none !important; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; line-height: 1.07; font-weight: 600; }
h1 { font-size: clamp(40px, 6vw, 76px); }
h2 { font-size: clamp(30px, 4.2vw, 48px); }
h3 { font-size: 21px; letter-spacing: -0.01em; }
.lede { color: var(--muted); font-size: clamp(18px, 2.2vw, 23px); line-height: 1.45; font-weight: 400; margin: 18px auto 0; max-width: 23em; }
.sub { color: var(--muted); font-size: 17px; margin: 10px 0 0; }

html[data-lang="zh"] h1 { font-size: clamp(34px, 5vw, 62px); letter-spacing: 0.01em; line-height: 1.18; }
html[data-lang="zh"] h2 { font-size: clamp(27px, 3.6vw, 42px); letter-spacing: 0.01em; line-height: 1.24; }
html[data-lang="zh"] .lede { line-height: 1.6; max-width: 30em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 980px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: rgb(0 113 227 / 0.06); }
.btn-neutral { background: var(--bg-alt); color: var(--ink); }
.btn-neutral:hover { background: #e8e8ed; }
.btn-link { background: none; border: 0; padding: 0; color: var(--blue); font-size: inherit; }
.btn-link:hover { text-decoration: underline; }
.btn .chev { font-size: 0.95em; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgb(0 0 0 / 0.08);
}
.nav-in { display: flex; align-items: center; gap: 26px; height: 52px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; margin-left: auto; font-size: 13.5px; color: var(--ink); }
.nav-links a { text-decoration: none; opacity: 0.85; }
.nav-links a:hover { opacity: 1; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 980px; padding: 2px; }
.lang button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  padding: 3px 9px;
  border-radius: 980px;
  cursor: pointer;
  white-space: nowrap;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.nav .btn { padding: 6px 14px; font-size: 13.5px; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 0; text-align: center; }
.hero .lede { margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 32px; }

.hero-visual { position: relative; max-width: 1000px; margin: 64px auto 0; padding: 0 24px; }
.product-stage {
  position: relative;
  border-radius: 28px;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f2 100%);
  padding: 44px 44px 0;
  overflow: hidden;
}
.window-shot {
  position: relative;
  margin-left: 20%;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  border: 1px solid rgb(0 0 0 / 0.12);
  box-shadow: var(--shadow-window);
  background: #fff;
}
.window-shot .bar {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  background: #ececee;
  border-bottom: 1px solid rgb(0 0 0 / 0.08);
}
.window-shot .bar i { width: 7px; height: 7px; border-radius: 50%; background: #c8c8cc; display: block; }
.window-shot img { width: 100%; }
.phone-shot {
  position: absolute;
  left: 40px;
  bottom: 26px;
  width: 186px;
  padding: 6px;
  border-radius: 26px;
  background: #1d1d1f;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.45);
}
.phone-shot .screen { position: relative; border-radius: 21px; overflow: hidden; background: #fff; }
.phone-shot .screen::after {
  content: "";
  position: absolute;
  top: 4px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 11px;
  background: #1d1d1f;
  border-radius: 980px;
}
.phone-shot img { width: 100%; }

/* ---------- sections ---------- */
section { scroll-margin-top: 72px; }
.band { padding: 110px 0; }
.band.alt { background: var(--bg-alt); }
.head { max-width: 760px; }
.head.center { margin: 0 auto; text-align: center; }
.head h2 { margin-bottom: 12px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* portal cards */
.portal {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--bg-alt);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.portal:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.35); }
.portal .shot {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 300px;
  padding: 32px 32px 0;
  overflow: hidden;
}
.portal .shot img { border-radius: 10px 10px 0 0; box-shadow: 0 12px 30px -16px rgb(0 0 0 / 0.3); width: 100%; }
.portal .shot.phone img { width: 46%; border-radius: 20px 20px 0 0; }
.portal .body { padding: 8px 32px 40px; }
.portal .body h3 { font-size: 30px; letter-spacing: -0.02em; margin-bottom: 18px; }
html[data-lang="zh"] .portal .body h3 { font-size: 28px; }
.portal ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 16px; }
.portal li { display: flex; gap: 10px; align-items: baseline; }
.portal li::before { content: "—"; color: var(--line); }
.portal .open { margin-top: 22px; color: var(--blue); font-size: 15px; }

/* about / craft */
.about-grid { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 56px; align-items: center; }
.about-copy h2 { margin-bottom: 20px; }
.about-copy p { color: var(--muted); font-size: 18px; margin: 0 0 16px; }
.about-copy .sig { margin-top: 28px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); }
.about-copy .sig b { display: block; font-size: 19px; letter-spacing: 0.01em; color: var(--ink); text-transform: none; margin-top: 4px; }
.about-craft { display: grid; gap: 14px; }
.craft-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 14px 18px;
}
.craft-row .k { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); width: 92px; flex: 0 0 92px; }
.craft-row .v { font-size: 16px; }
.craft-row .v b { font-weight: 600; }

/* feature grid */
.feature { display: flex; gap: 14px; padding: 26px; border-radius: var(--radius); background: var(--bg-alt); }
.feature .ic { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: #fff; color: var(--ink); }
.feature .ic svg { width: 17px; height: 17px; }
.feature b { display: block; font-size: 17px; letter-spacing: -0.01em; }
.feature p { margin: 5px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.5; }

/* reasons */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.reason { padding: 34px 30px; border-radius: var(--radius); background: var(--black); color: #f5f5f7; }
.reason b { display: block; font-size: 21px; letter-spacing: -0.01em; margin-bottom: 10px; }
.reason p { margin: 0; font-size: 15px; color: #a1a1a6; line-height: 1.55; }
html[data-lang="zh"] .reason b { font-size: 20px; line-height: 1.35; }

/* demo call */
.demo-call { text-align: center; }
.demo-call h2 { margin-bottom: 28px; }
.demo-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* contact */
.contact {
  border-radius: 28px;
  background: var(--bg-alt);
  padding: 72px 56px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.contact h2 { margin-bottom: 14px; }
.contact p { margin: 0; color: var(--muted); font-size: 18px; }
.contact .ways { display: grid; gap: 12px; }
.way {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  text-decoration: none;
  font-size: 16px;
}
.way span small { display: block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); }
.way:hover { background: #fff; box-shadow: 0 4px 18px rgb(0 0 0 / 0.06); }
.way .go { color: var(--blue); }

footer.site {
  padding: 40px 0 56px;
  color: var(--subtle);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  border-top: 1px solid var(--line);
  margin-top: 90px;
}
footer.site .right { margin-left: auto; display: flex; gap: 20px; }
footer.site a { color: var(--subtle); text-decoration: none; }
footer.site a:hover { color: var(--ink); }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ================= preview pages ================= */
.pv-body { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
/* the preview pages use the room they are given; the landing page stays narrow */
.pv-body .wrap { max-width: 1520px; }
.pv-tight .pv-main { padding: 8px 0 20px; }
/* the back office preview uses the full width: a fixed rail, then the frame */
.pv-admin .wrap { max-width: none; padding: 0 16px; }
.pv-admin .pv-main { display: flex; align-items: center; padding: 12px 0; }
.pv-admin .preview-layout { width: 100%; grid-template-columns: 232px minmax(0, 1fr); gap: 22px; }
.pv-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgb(255 255 255 / 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgb(0 0 0 / 0.08);
}
.pv-head .row { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 0; flex-wrap: wrap; }
.pv-head .title { font-size: 15px; font-weight: 600; }
.pv-head .title small { display: block; font-size: 11.5px; font-weight: 400; color: var(--subtle); }
.pv-head .spacer { margin-left: auto; }
.pv-main { flex: 1; padding: 28px 0 48px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 980px;
  padding: 6px 13px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.iconbtn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.iconbtn:hover { color: var(--ink); }

.stage { display: flex; justify-content: center; align-items: flex-start; min-width: 0; width: 100%; }
.scaleBox { position: relative; }
.scaler { position: relative; }

/* phone frame */
.device-phone {
  padding: 12px;
  border-radius: 54px;
  background: #1d1d1f;
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / 0.6), inset 0 0 0 1px rgb(255 255 255 / 0.12);
}
.device-phone .glass { position: relative; border-radius: 43px; overflow: hidden; background: #fff; }
.device-phone .glass::after {
  content: "";
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 24px;
  border-radius: 980px;
  background: #000;
  z-index: 3;
  pointer-events: none;
}
.device-phone iframe { display: block; border: 0; background: #fff; }

/* desktop frame */
.device-desk {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgb(0 0 0 / 0.14);
  background: #fff;
  box-shadow: var(--shadow-window);
}
.desk-bar {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #f0f0f2;
  border-bottom: 1px solid rgb(0 0 0 / 0.08);
}
.desk-bar .lights { display: flex; gap: 6px; }
.desk-bar .lights i { width: 9px; height: 9px; border-radius: 50%; display: block; background: #c8c8cc; }
.desk-bar .lights i:nth-child(1) { background: #ff5f57; }
.desk-bar .lights i:nth-child(2) { background: #febc2e; }
.desk-bar .lights i:nth-child(3) { background: #28c840; }
.desk-bar .url {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  height: 23px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid rgb(0 0 0 / 0.08);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 11.5px;
  color: var(--subtle);
  overflow: hidden;
  white-space: nowrap;
}
.desk-bar .url b { color: var(--ink); font-weight: 500; }
.device-desk iframe { display: block; border: 0; background: #fff; }

/* veil */
.veil {
  position: absolute;
  inset: 0;
  background: rgb(245 245 247 / 0.82);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  z-index: 5;
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.veil.gone { opacity: 0; }
.spinner {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid rgb(0 0 0 / 0.12);
  border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* preview side rail: account, screen size, tips */
.preview-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 26px; align-items: start; min-width: 0; }
.preview-layout > * { min-width: 0; }
.pv-side { display: grid; gap: 16px; min-width: 0; }
.side-block { background: var(--bg-alt); border-radius: 16px; padding: 16px 16px 18px; min-width: 0; }
.side-block h3 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}
.pv-side .acct-field { display: flex; justify-content: space-between; gap: 8px; width: 100%; margin-bottom: 8px; background: #fff; padding: 7px 9px; min-width: 0; }
.pv-side .acct-field code { flex: 1; min-width: 0; font-size: 11.5px; overflow-wrap: anywhere; line-height: 1.35; }
.pv-side .btn { width: 100%; margin-top: 6px; padding: 9px 14px; font-size: 14px; }
.pv-side .acct-signout { width: 100%; margin-top: 8px; }
.pv-side .feedback { font-size: 12px; color: var(--muted); margin: 10px 0 0; min-height: 1em; }
.chip-stack { display: grid; gap: 8px; }
.chip-stack .chip { width: 100%; padding: 7px 10px; text-align: center; }
.tips { margin: 0; padding-left: 17px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.tips li + li { margin-top: 4px; }
.side-note { color: var(--subtle); font-size: 12px; line-height: 1.5; margin: 0; }
@media (max-width: 980px) {
  .preview-layout { grid-template-columns: 1fr; gap: 16px; }
  /* the frame comes first: the controls can be scrolled to */
  .preview-layout > .stage { order: 1; }
  .pv-side { order: 2; grid-template-columns: 1fr 1fr; align-items: start; }
  .pv-side .side-block:nth-child(3) { grid-column: span 2; }
}
@media (max-width: 734px) { .pv-side { grid-template-columns: 1fr; } .pv-side .side-block:nth-child(3) { grid-column: auto; } }

/* demo credentials strip */
.acct-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.acct-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.acct-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
}
.acct-field code { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 12.5px; }
.acct-field button { border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 11px; cursor: pointer; }
.acct-signout { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.acct-strip .feedback { font-size: 12px; color: var(--muted); margin: 0; }
.acct-strip .btn { padding: 7px 16px; font-size: 13.5px; }

.side-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; align-items: start; }
.info-card { background: var(--bg-alt); border-radius: 18px; padding: 26px; }
.info-card h3 { font-size: 15px; margin-bottom: 12px; }
.info-card ol { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.info-card p { color: var(--muted); font-size: 14px; margin: 0; }
.info-card .note { color: var(--subtle); font-size: 12.5px; margin-top: 12px; }

/* the back office is a desktop product: say so on narrow screens */
.only-narrow { display: none; }
@media (max-width: 734px) { .only-narrow { display: block; } }

/* mobile preview: a phone gets the app full screen */
.exit { display: none; }
@media (max-width: 880px) {
  body.pv-phone { overflow: hidden; }
  body.pv-phone .pv-head { display: none; }
  body.pv-phone .pv-main { padding: 0; height: 100dvh; overflow: hidden; }
  body.pv-phone .wrap { padding: 0; max-width: none; }
  body.pv-phone .stage { display: block; height: 100dvh; }
  body.pv-phone .scaleBox, body.pv-phone .scaler { width: 100% !important; height: 100dvh !important; }
  body.pv-phone .scaler { transform: none !important; }
  body.pv-phone .device-phone { padding: 0; border-radius: 0; box-shadow: none; background: none; height: 100dvh; }
  body.pv-phone .device-phone .glass { border-radius: 0; height: 100dvh; }
  body.pv-phone .device-phone .glass::after { display: none; }
  body.pv-phone .device-phone iframe { width: 100% !important; height: 100dvh !important; }
  body.pv-phone .exit {
    display: block;
    position: fixed;
    left: 14px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 60;
    background: rgb(0 0 0 / 0.72);
    color: #fff;
    border-radius: 980px;
    padding: 9px 16px;
    font-size: 13px;
    text-decoration: none;
    backdrop-filter: blur(8px);
  }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .reasons { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; padding: 44px 28px; gap: 28px; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 734px) {
  .wrap { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-in { gap: 12px; height: 48px; }
  .hero { padding: 44px 0 0; }
  h1 { font-size: 36px; }
  html[data-lang="zh"] h1 { font-size: 32px; }
  .lede { font-size: 17px; }
  .band { padding: 72px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  /* one device is enough on a phone: drop the back window */
  .product-stage { padding: 28px 20px; border-radius: 20px; }
  .window-shot { display: none; }
  .phone-shot { position: static; margin: 0 auto; width: 62%; border-radius: 20px; padding: 5px; }
  .phone-shot .screen { border-radius: 16px; }
  .phone-shot .screen::after { width: 34px; height: 9px; top: 4px; }
  .hero-visual { margin-top: 40px; }
  .portal .body { padding: 6px 24px 32px; }
  .portal .shot { height: 240px; padding: 24px 24px 0; }
  .portal .body h3 { font-size: 25px; }
  .contact { padding: 36px 22px; border-radius: 22px; }
  .side-row { grid-template-columns: 1fr; }
  footer.site .right { margin-left: 0; }
  .pv-head .row { gap: 8px; flex-wrap: nowrap; }
  .pv-head .title small { display: none; }
  .pv-head .btn-ghost, .pv-head .iconbtn { display: none; }
  .pv-head .title { font-size: 14px; }
  .pv-head .brand img { height: 20px; }
  .pv-head .btn-link { font-size: 14px; }
}
