/* ===========================================================
   MY Broadband Corporation — landing page
   Brand system: Outfit type, single accent blue, dot motif,
   white space first, soft rounded surfaces.
   =========================================================== */

:root {
  --ink: #1D1D1F;
  --gray: #6E6E73;
  --accent: #0A6CF0;
  --accent-dark: #085ac9;

  --dot-blue: #2D7FF9;
  --dot-green: #1AB877;
  --dot-amber: #FF9F2D;
  --dot-coral: #FF5A5F;
  --dot-purple: #8B5CF6;

  --tile: #F5F5F7;
  --line: #E7E7E9;
  --line2: #D2D2D6;
  --white: #FFFFFF;

  --maxw: 1080px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(29, 29, 31, .06);
  --shadow-md: 0 10px 30px rgba(29, 29, 31, .08);
  --shadow-lg: 0 20px 50px rgba(29, 29, 31, .14);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Language cloak — hides content only for Chinese visitors until i18n applies (no English flash). */
html.zh-cloak body { visibility: hidden; }

.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gray); margin: 0 0 14px;
}

/* ---------- Wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; }
.wordmark:hover { text-decoration: none; }
.wordmark__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.wordmark__text { font-size: 16px; }
.wordmark__text strong { font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(10, 108, 240, .28); }
.btn--primary:hover { background: var(--accent-dark); box-shadow: 0 10px 24px rgba(10, 108, 240, .34); transform: translateY(-1px); }
.btn--ghost { background: var(--white); color: var(--ink); border-color: var(--line2); }
.btn--ghost:hover { background: var(--tile); border-color: var(--gray); }
.btn--icon { padding: 10px; }
.btn--lg { font-size: 16px; padding: 15px 26px; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0);
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { color: var(--ink); font-weight: 700; font-size: 15px; }
.nav__links a:hover { color: var(--accent); text-decoration: none; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--ink);
  background: transparent; border: 1px solid var(--line2); border-radius: 999px;
  padding: 8px 13px; cursor: pointer; line-height: 1; min-width: 48px;
  flex: none; white-space: nowrap;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.lang-toggle:hover { background: var(--tile); border-color: var(--gray); }
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__actions .btn--icon { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(72px, 12vw, 150px) 24px clamp(56px, 8vw, 96px); text-align: center; }
.hero__title { font-size: clamp(46px, 9vw, 92px); font-weight: 700; margin-bottom: 22px; }
.hero__sub { font-size: clamp(17px, 2.4vw, 21px); color: var(--gray); max-width: 620px; margin: 0 auto 34px; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.hero__call { color: var(--gray); font-size: 15px; }
.hero__call:hover { color: var(--accent); }
.hero__trust { margin-top: 40px; font-size: 14px; color: var(--gray); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--tint { background: var(--tile); }
.section__head { max-width: 640px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section__title { font-size: clamp(30px, 5vw, 46px); font-weight: 700; }
.section__lead { margin-top: 18px; font-size: 18px; color: var(--gray); }
.section__note { margin-top: 34px; text-align: center; font-size: 14px; color: var(--gray); }

/* ---------- Service tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--line2); }
.tile__mark { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--c); margin-bottom: 20px; }
.tile__title { font-size: 26px; font-weight: 700; }
.tile__lead { margin-top: 12px; color: var(--gray); }
.tile__list { list-style: none; padding: 0; margin: 22px 0 0; }
.tile__list li { position: relative; padding-left: 26px; margin-bottom: 12px; font-size: 15.5px; }
.tile__list li::before {
  content: ""; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip {
  font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--tile); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.section--tint .chip { background: var(--white); }

/* floating idle motion on tiles */
.tile { animation: floaty 6s ease-in-out infinite; }
.tile:nth-child(2) { animation-delay: -3s; }
.tile:hover { animation-play-state: paused; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Process steps ---------- */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative;
}
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow-sm);
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 16px;
}
.step__title { font-size: 19px; font-weight: 700; }
.step p { margin-top: 10px; color: var(--gray); font-size: 15px; }

/* ---------- Values ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; } }
.value { padding: 8px 4px; }
.value__dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--c); margin-bottom: 16px; }
.value h3 { font-size: 20px; font-weight: 700; }
.value p { margin-top: 10px; color: var(--gray); }

/* ---------- FAQ ---------- */
.container--narrow { max-width: 760px; }
.faq { display: grid; gap: 12px; }
.faq__item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 22px; }
.faq__q { font-weight: 700; font-size: 17px; padding: 18px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--accent); flex: none; }
.faq__item[open] .faq__q::after { content: "−"; }
.faq__a { margin: 0 0 18px; color: var(--gray); font-size: 15.5px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; gap: 36px; } }
.contact__intro .section__title { text-align: left; }
.contact__details { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.contact__details li { display: flex; align-items: flex-start; gap: 12px; font-size: 15.5px; }
.contact__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-top: 8px; }

/* WeChat contact card */
.wechat-card { display: flex; gap: 16px; align-items: center; margin-top: 26px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 88px; }
.wechat-card:target { border-color: var(--dot-green); box-shadow: 0 0 0 3px rgba(7, 193, 96, .15); }
.wechat-card__qr { flex: none; width: 96px; height: 96px; border-radius: var(--radius-sm); }
.wechat-card__label { display: flex; align-items: center; gap: 7px; margin: 0; font-weight: 700; font-size: 15px; }
.wechat-card__hint { margin: 7px 0 0; font-size: 13.5px; color: var(--gray); }
.wechat-card__id { margin: 11px 0 0; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wechat-card__id strong { font-weight: 700; }
.wechat-copy { font-family: inherit; font-size: 12.5px; font-weight: 700; color: #076A37; background: rgba(7, 193, 96, .12); border: none; border-radius: 999px; padding: 5px 12px; cursor: pointer; transition: background .18s var(--ease); }
.wechat-copy:hover { background: rgba(7, 193, 96, .2); }
@media (max-width: 400px) { .wechat-card { flex-direction: column; text-align: center; } .wechat-card__label { justify-content: center; } .wechat-card__id { justify-content: center; } }

.quote {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-md);
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 7px; grid-column: 1 / -1; }
.field--half { grid-column: span 1; }
@media (max-width: 520px) { .field--half { grid-column: 1 / -1; } }
.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid var(--line2); border-radius: var(--radius-sm);
  padding: 12px 14px; background: var(--white); width: 100%;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 108, 240, .15);
}
.field textarea { resize: vertical; min-height: 92px; }
.quote .btn { grid-column: 1 / -1; margin-top: 4px; }
.quote__status { grid-column: 1 / -1; margin: 0; font-size: 14.5px; min-height: 1.2em; }
.quote__status.is-ok { color: #128a5a; }
.quote__status.is-err { color: #c0392b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.footer { background: var(--white); border-top: 1px solid var(--line); padding: 56px 0; text-align: center; }
.wordmark--footer { font-size: 17px; }
.footer__sub { margin-top: 8px; color: var(--gray); font-size: 14px; }
.dot-row { display: flex; gap: 8px; justify-content: center; margin: 20px 0; }
.dot-row span { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.footer__addr { max-width: 520px; margin: 0 auto; color: var(--gray); font-size: 14px; }
.footer__meta { margin-top: 12px; font-size: 14px; color: var(--gray); }
.footer__meta a { color: var(--gray); }
.footer__meta a:hover { color: var(--accent); }

/* ===========================================================
   Scroll-reveal animation
   =========================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Hero reveals animate on load (no observer dependency) */
.hero .reveal { animation: fadeUp .8s var(--ease) both; animation-delay: calc(var(--d, 0) * 110ms); opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ===========================================================
   Chat widget
   =========================================================== */
.chat { position: fixed; right: 22px; bottom: 22px; z-index: 60; }
.chat__launch {
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; box-shadow: 0 10px 26px rgba(10, 108, 240, .4);
  display: grid; place-items: center; position: relative;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  animation: chatPulse 2.6s ease-in-out infinite;
}
.chat__launch:hover { transform: scale(1.06); }
.chat__launch-close { display: none; }
.chat[data-open="true"] .chat__launch { animation: none; }
.chat[data-open="true"] .chat__launch-open { display: none; }
.chat[data-open="true"] .chat__launch-close { display: block; }
@keyframes chatPulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(10, 108, 240, .4), 0 0 0 0 rgba(10, 108, 240, .35); }
  50% { box-shadow: 0 10px 26px rgba(10, 108, 240, .4), 0 0 0 12px rgba(10, 108, 240, 0); }
}

.chat__panel {
  position: absolute; right: 0; bottom: 74px; width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right;
  animation: chatIn .28s var(--ease) both;
}
.chat__panel[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

.chat__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat__id { display: flex; align-items: center; gap: 10px; }
.chat__id .wordmark__dot { width: 10px; height: 10px; }
.chat__name { margin: 0; font-weight: 700; font-size: 15px; }
.chat__tagline { margin: 0; font-size: 12.5px; color: var(--gray); }
.chat__header-actions { display: flex; align-items: center; gap: 6px; }
.chat__wa {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700;
  color: #0B6E3E; background: rgba(26, 184, 119, .14); padding: 6px 10px; border-radius: 999px;
}
.chat__wa:hover { text-decoration: none; background: rgba(26, 184, 119, .18); }
.chat__wechat { display: inline-flex; align-items: center; gap: 5px; font-family: inherit; font-size: 12.5px; font-weight: 700; color: #076A37; background: rgba(7, 193, 96, .12); border: none; border-radius: 999px; padding: 6px 10px; cursor: pointer; transition: background .18s var(--ease); }
.chat__wechat:hover { background: rgba(7, 193, 96, .2); }

/* WeChat QR overlay inside the chat panel */
.chat__wechat-pop { position: absolute; inset: 0; z-index: 6; background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.chat__wechat-pop[hidden] { display: none; }
.chat__wechat-close { position: absolute; top: 12px; right: 12px; border: none; background: transparent; color: var(--gray); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.chat__wechat-close:hover { background: var(--tile); color: var(--ink); }
.chat__wechat-qr { width: 152px; height: 152px; border-radius: 12px; }
.chat__wechat-title { margin: 14px 0 0; font-weight: 700; font-size: 16px; }
.chat__wechat-hint { margin: 6px 0 0; font-size: 13px; color: var(--gray); max-width: 240px; line-height: 1.5; }
.chat__wechat-id { margin: 12px 0 0; font-size: 14px; }
.chat__wechat-id strong { font-weight: 700; }
.chat__close { border: none; background: transparent; color: var(--gray); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.chat__close:hover { background: var(--tile); color: var(--ink); }

.chat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--tile); }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; animation: fadeUp .3s var(--ease) both; }
.msg--bot { background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 5px; align-self: flex-start; }
.msg--user { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.msg a { color: inherit; text-decoration: underline; }
.msg--user a { color: #fff; }

.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); opacity: .5; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat__input { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat__input textarea {
  flex: 1; resize: none; font-family: inherit; font-size: 14.5px; line-height: 1.4;
  border: 1px solid var(--line2); border-radius: 14px; padding: 11px 13px; max-height: 120px;
}
.chat__input textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 108, 240, .14); }
.chat__send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .18s var(--ease), transform .18s var(--ease); }
.chat__send:hover { background: var(--accent-dark); }
.chat__send:disabled { opacity: .5; cursor: default; }
.chat__disclaimer { margin: 0; padding: 0 14px 12px; font-size: 11.5px; color: var(--gray); text-align: center; }
.chat__disclaimer a { color: var(--gray); text-decoration: underline; }

/* ===========================================================
   Reduced motion
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .tile { animation: none; }
}
