/*
 * QDing Operations System
 * Shared QPoint foundations, expressed with QDing's ticket, bell and service-rhythm language.
 * Presentation-only: routes, data, authentication and existing DOM hooks remain unchanged.
 */
:root {
  --bg: #fffdf8;
  --surface: #ffffff;
  --surface-soft: #fff7e8;
  --workspace: #f4f8fe;
  --ink: #17324d;
  --muted: #62768a;
  --line: #dce7f0;
  --primary: #1f57c3;
  --primary-dark: #17469d;
  --blue: #17324d;
  --teal: #197e93;
  --green: #338664;
  --orange: #e5742d;
  --orange-dark: #c95d1e;
  --amber: #f5b631;
  --amber-soft: #fff0c7;
  --orange-soft: #fff0e7;
  --shadow: 0 18px 45px rgba(23, 50, 77, 0.09);
  --shadow-soft: 0 9px 26px rgba(23, 50, 77, 0.06);
  --radius: 20px;
  --radius-control: 11px;
}

html { scroll-behavior: smooth; }
body {
  min-width: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
}
* { -webkit-tap-highlight-color: transparent; }
*:focus-visible {
  outline: 3px solid rgba(31, 87, 195, 0.28);
  outline-offset: 3px;
}

.shell { max-width: 1216px; }
.topbar {
  background: rgba(255, 253, 248, 0.9);
  border-bottom-color: rgba(23, 50, 77, 0.09);
}
.topbar .shell { min-height: 78px; }
.brand { gap: 0; }
.brand-mark {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 8px 16px rgba(23, 50, 77, 0.16));
}
.brand-logo-wrap { display: flex; align-items: center; min-width: 0; }
.brand-logo-lockup {
  display: block;
  width: auto;
  height: 40px;
  max-width: 194px;
  filter: drop-shadow(0 8px 16px rgba(23, 50, 77, 0.12));
}
.brand-logo-mark {
  display: none;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  filter: drop-shadow(0 7px 13px rgba(23, 50, 77, 0.14));
}
/* The original inline mark/copy stays in the DOM as a safe fallback, but the approved SVG lockup is the rendered brand. */
.brand > svg.brand-mark,
.brand > span:not(.brand-logo-wrap) { display: none; }
.brand strong { font-size: 20px; letter-spacing: -0.45px; }
.brand span { color: var(--muted); }
.topbar-right { gap: 12px; }
.nav { gap: 4px; }
.nav a,
.btn {
  min-height: 42px;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.1px;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.nav a:not(.btn) { padding-inline: 12px; }
.nav a:not(.btn):hover { color: var(--primary); background: #edf4ff; }
.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 9px 18px rgba(31, 87, 195, 0.2);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-secondary:hover { color: var(--primary); border-color: #bdd4f4; background: #f8fbff; }
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* Hero: a single illustrated operations scene, framed by QDing service-rhythm marks. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: 86px 0 104px;
  border: 0;
  background:
    radial-gradient(circle at 4% 9%, rgba(245, 182, 49, 0.22), transparent 18rem),
    radial-gradient(circle at 94% 88%, rgba(31, 87, 195, 0.11), transparent 24rem),
    var(--bg);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  top: 106px;
  left: -86px;
  width: 270px;
  height: 106px;
  border-top: 2px solid rgba(229, 116, 45, 0.28);
  border-radius: 60% 46% 0 0;
  transform: rotate(-14deg);
}
.hero::after {
  right: -92px;
  bottom: 34px;
  width: 244px;
  height: 244px;
  border: 20px solid rgba(245, 182, 49, 0.16);
  border-radius: 50%;
}
.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(500px, 1fr);
  gap: 58px;
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--orange);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1 {
  max-width: 690px;
  margin-top: 17px;
  color: var(--ink);
  font-size: clamp(44px, 4.55vw, 60px);
  line-height: 1.1;
  letter-spacing: -2.7px;
  text-wrap: balance;
}
.hero p {
  max-width: 585px;
  margin-top: 21px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}
.hero-actions { gap: 11px; margin-top: 31px; }
.hero-notes {
  grid-template-columns: 1fr 1fr;
  gap: 13px 20px;
  margin-top: 31px;
  color: var(--muted);
  font-size: 13px;
}
.hero-notes > div {
  position: relative;
  padding-left: 17px;
  line-height: 1.6;
}
.hero-notes > div::before {
  content: "";
  position: absolute;
  top: .4rem;
  left: 0;
  width: 8px;
  height: 8px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  background: var(--amber-soft);
}

.hero-operations {
  position: relative;
  min-height: 500px;
  margin-right: -56px;
  padding: 18px 0 22px 38px;
}
.hero-art {
  position: relative;
  z-index: 2;
  width: min(100%, 650px);
  margin: 18px 0 0 auto;
  aspect-ratio: 1.18;
  overflow: hidden;
  border: 1px solid rgba(23, 50, 77, 0.12);
  border-radius: 42% 18% 34% 18% / 18% 26% 20% 34%;
  background: #fff5df;
  box-shadow: 0 30px 56px rgba(23, 50, 77, 0.16);
}
.hero-art::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 22px;
  left: 24px;
  width: 55px;
  height: 14px;
  border-top: 3px solid rgba(229, 116, 45, 0.76);
  border-radius: 50%;
  transform: rotate(-11deg);
  pointer-events: none;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 69% center;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
}
.hero-rhythm {
  position: absolute;
  z-index: 1;
  overflow: visible;
  color: var(--orange);
  pointer-events: none;
}
.hero-rhythm path {
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: .02 .035;
}
.hero-rhythm circle { fill: var(--amber); stroke: var(--orange); stroke-width: 2; }
.hero-rhythm-top { top: -4px; left: 0; width: 320px; }
.hero-rhythm-bottom { right: 22px; bottom: -2px; width: 330px; color: var(--primary); transform: rotate(2deg); }
.hero-ticket {
  position: absolute;
  z-index: 4;
  display: grid;
  align-content: center;
  gap: 6px;
  width: 136px;
  height: 82px;
  padding: 16px 18px;
  background: #fffdf8;
  border: 1px solid rgba(23, 50, 77, 0.14);
  box-shadow: var(--shadow-soft);
}
.hero-ticket::before,
.hero-ticket::after {
  content: "";
  position: absolute;
  left: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
}
.hero-ticket::before { top: -6px; }
.hero-ticket::after { bottom: -6px; }
.hero-ticket i {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #d8e3ef;
}
.hero-ticket i:nth-child(1) { width: 72%; background: var(--orange); }
.hero-ticket i:nth-child(2) { width: 100%; }
.hero-ticket i:nth-child(3) { width: 56%; }
.hero-ticket b {
  position: absolute;
  right: 15px;
  bottom: 12px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--amber);
}
.hero-ticket-queue {
  top: 83px;
  left: 0;
  border-radius: 19px 6px 19px 6px;
  transform: rotate(-6deg);
}
.hero-ticket-order {
  right: 8px;
  bottom: 76px;
  border-radius: 7px 19px 7px 19px;
  transform: rotate(7deg);
}
.hero-bell {
  position: absolute;
  z-index: 4;
  right: 22px;
  top: 58px;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid #f1cb76;
  border-radius: 50%;
  color: #d67a18;
  background: #fff4d5;
  box-shadow: 0 13px 22px rgba(204, 129, 25, 0.14);
  transform: rotate(9deg);
}
.hero-bell svg { width: 48px; height: 48px; }

/* The page moves between open bands, ticket-led clusters and a service timeline. */
.band {
  position: relative;
  padding: 102px 0;
  border: 0;
  background: var(--surface);
}
.band-muted { background: var(--workspace); }
.section-head { gap: 13px; max-width: 780px; margin-bottom: 42px; }
.section-head h2 {
  color: var(--ink);
  font-size: clamp(32px, 4vw, 49px);
  line-height: 1.17;
  letter-spacing: -1.8px;
}
.section-head p { color: var(--muted); font-size: 16px; line-height: 1.9; }
.card,
.journey-step {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.card { padding: 26px; }
.icon {
  width: 44px;
  height: 44px;
  border-radius: 14px 8px 14px 8px;
  background: var(--primary);
}
.card h3 { margin-top: 18px; color: var(--ink); font-size: 22px; letter-spacing: -0.6px; }
.card p { color: var(--muted); line-height: 1.84; }

#pain { overflow: hidden; background: #fff; }
#pain::before {
  content: "";
  position: absolute;
  right: 7%;
  top: 112px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(31, 87, 195, 0.14);
  border-radius: 50%;
  box-shadow: 24px 24px 0 -1px rgba(245, 182, 49, 0.16);
}
.pain-grid { grid-template-columns: 1.06fr .94fr .94fr; gap: 18px; }
#pain .card {
  position: relative;
  overflow: hidden;
  min-height: 276px;
  background: #fff;
}
#pain .card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -38px;
  width: 132px;
  height: 132px;
  border: 18px solid rgba(31, 87, 195, 0.07);
  border-radius: 50%;
}
#pain .card:nth-child(1) { margin-top: 0; border-color: #f0d3bc; background: linear-gradient(140deg, #fff 0%, #fff8f1 100%); }
#pain .card:nth-child(2) { margin-top: 34px; }
#pain .card:nth-child(3) { margin-top: 9px; background: linear-gradient(140deg, #fff 0%, #f6fbff 100%); }
#pain .card:nth-child(1) .icon { border-radius: 50% 50% 12px 12px; }

#products { overflow: hidden; background: #f5f8fd; }
#products::before {
  content: "";
  position: absolute;
  left: -92px;
  top: 174px;
  width: 360px;
  height: 180px;
  border-top: 2px solid rgba(229, 116, 45, 0.2);
  border-radius: 50%;
  transform: rotate(-22deg);
}
.product-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
}
.product-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
}
.product-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: -20px;
  bottom: -22px;
  width: 128px;
  height: 128px;
  border: 16px solid rgba(31, 87, 195, 0.07);
  border-radius: 44% 56% 54% 46%;
}
.product-card > * { position: relative; z-index: 1; }
.product-card:nth-child(1) { grid-column: span 7; background: linear-gradient(135deg, #fff 0%, #fff4e6 100%); }
.product-card:nth-child(2) { grid-column: span 5; margin-top: 34px; background: linear-gradient(135deg, #fff 0%, #f1fbf5 100%); }
.product-card:nth-child(3),
.product-card:nth-child(4),
.product-card:nth-child(5) { grid-column: span 4; }
.product-card:nth-child(6) { grid-column: span 5; margin-top: 12px; }
.product-card:nth-child(7) { grid-column: span 4; margin-top: 34px; }
.product-card:nth-child(8) { grid-column: span 3; margin-top: 4px; }
.product-card:nth-child(1)::before { border-color: rgba(229, 116, 45, 0.11); }
.product-card:nth-child(2)::before { border-color: rgba(51, 134, 100, 0.11); }
.badge { min-height: 28px; border-radius: 9px 9px 9px 3px; font-weight: 900; }
.badge-live { background: #e5f7ec; color: #176346; }
.badge-dev { background: #fff2d9; color: #925605; }
.badge-plan { background: #edf2f7; color: #597088; }
.product-card h3 { margin: 17px 0 0; font-size: 23px; }
.product-card ul { margin-top: 18px; }
.product-card li::before { color: var(--orange); }

#journey { overflow: hidden; background: #fffdf8; }
#journey .section-head { max-width: 670px; }
.journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 28px 10px 12px;
}
.journey::before {
  content: "";
  position: absolute;
  top: 74px;
  left: 4%;
  right: 4%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #d8e4ef 0 11px, transparent 11px 21px);
}
.journey-step {
  position: relative;
  z-index: 1;
  min-height: 234px;
  margin: 0 7px;
  padding: 19px 19px 22px;
  border-radius: 18px 18px 18px 5px;
  background: #fff;
}
.journey-step:nth-child(even) { margin-top: 42px; border-radius: 5px 18px 18px 18px; }
.journey-step::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 18px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--orange);
}
.journey-step:nth-child(even)::before { background: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.journey-step strong { margin-left: 26px; color: var(--orange); font-size: 27px; }
.journey-step:nth-child(even) strong { color: var(--primary); }
.journey-step span { margin-top: 25px; color: var(--ink); font-size: 16px; }
.journey-step p { font-size: 14px; line-height: 1.75; }

.role-grid { grid-template-columns: .88fr 1.08fr .88fr; gap: 18px; }
.role-grid .card { min-height: 235px; }
.role-grid .card:nth-child(2) { transform: translateY(-20px); background: #17324d; border-color: #17324d; }
.role-grid .card:nth-child(2) h3 { color: #fff; }
.role-grid .card:nth-child(2) p { color: rgba(255,255,255,.72); }
.role-grid .card:nth-child(2)::after {
  content: "";
  position: absolute;
  right: 25px;
  top: 24px;
  width: 54px;
  height: 12px;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%;
  transform: rotate(-11deg);
}

#rollout { background: #fff; }
#rollout .pain-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#rollout .card { min-height: 224px; background: #fffdf8; box-shadow: none; }
#rollout .card:nth-child(2) { background: #fff7e8; }

#routes { background: #f4f8fe; }
.route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.route-card {
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 18px;
  overflow: hidden;
  background: #fff;
}
.route-card img {
  height: 225px;
  border: 1px solid var(--line);
  border-radius: 17px 17px 50px 17px;
  object-position: top center;
}
.route-card > div { padding: 2px 8px 8px; }
.route-card h3 { margin-top: 16px; }
.route-card .badge { position: static; }
.route-actions { gap: 10px; }

.cta {
  position: relative;
  overflow: hidden;
  padding: 92px 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(245,182,49,.23), transparent 16rem),
    #17324d;
}
.cta::before,
.cta::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 16px;
  background: radial-gradient(circle at 8px 8px, var(--bg) 0 7px, transparent 7.5px) 0 0 / 28px 16px repeat-x;
}
.cta::before { top: 0; }
.cta::after { bottom: 0; transform: rotate(180deg); }
.cta .shell { position: relative; z-index: 1; }
.cta h2 { max-width: 760px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -1.7px; }
.cta .eyebrow { color: #ffd98e !important; letter-spacing: .1em; }
.cta .btn-secondary { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
.cta .btn-secondary:hover { color: #fff; background: rgba(255,255,255,.16); }

@media (max-width: 1120px) {
  .hero-grid { grid-template-columns: minmax(0, .95fr) minmax(430px, 1.05fr); gap: 34px; }
  .hero-operations { margin-right: -20px; min-height: 430px; }
  .hero-art { aspect-ratio: 1.1; }
  .product-card:nth-child(1),
  .product-card:nth-child(2),
  .product-card:nth-child(6) { grid-column: span 6; }
  .product-card:nth-child(3),
  .product-card:nth-child(4),
  .product-card:nth-child(5),
  .product-card:nth-child(7),
  .product-card:nth-child(8) { grid-column: span 4; }
}

@media (max-width: 960px) {
  .hero { padding: 68px 0 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { max-width: 720px; }
  .hero-operations { width: min(100%, 720px); min-height: 480px; margin: 0 auto; padding-left: 24px; }
  .product-card:nth-child(n) { grid-column: span 6; margin-top: 0; }
  .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .journey::before { display: none; }
  .journey-step:nth-child(even) { margin-top: 0; }
  .role-grid { grid-template-columns: 1fr 1fr; }
  .role-grid .card:nth-child(2) { transform: none; }
  .role-grid .card:nth-child(3) { grid-column: span 2; }
}

@media (max-width: 760px) {
  .shell { padding-inline: 16px; }
  .topbar .shell { min-height: 66px; flex-direction: row; align-items: center; padding-block: 0; }
  .brand-logo-lockup { display: none; }
  .brand-logo-mark { display: block; }
  .brand strong { font-size: 18px; }
  .brand > span > span { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; margin-left: auto; }
  .topbar-right {
    display: none;
    position: absolute;
    inset: calc(100% + 8px) 12px auto;
    width: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(35,66,92,.14);
  }
  .topbar.is-menu-open .topbar-right { display: grid; gap: 10px; }
  .topbar-right, .nav, .nav-auth { width: 100%; }
  .nav, .nav-auth { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .nav a, .nav-auth .btn { width: 100%; justify-content: flex-start; }
  .nav a.btn-primary { color: #fff; }
  .nav-auth .btn { justify-content: center; }
  .hero { padding: 52px 0 64px; }
  h1 { font-size: 40px; line-height: 1.17; letter-spacing: -1.8px; }
  .hero p { font-size: 16px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-notes { grid-template-columns: 1fr; margin-top: 26px; }
  .hero-operations { min-height: 340px; padding: 7px 0 0 15px; }
  .hero-art { width: calc(100% - 18px); margin-top: 20px; aspect-ratio: 1.17; border-radius: 39% 16% 30% 16% / 16% 24% 19% 29%; }
  .hero-ticket { transform: scale(.72) rotate(-6deg); transform-origin: left top; }
  .hero-ticket-queue { top: 46px; left: -4px; }
  .hero-ticket-order { right: -12px; bottom: 14px; transform: scale(.7) rotate(7deg); transform-origin: right bottom; }
  .hero-bell { top: 28px; right: 4px; transform: scale(.75) rotate(9deg); transform-origin: right top; }
  .hero-rhythm-top { width: 220px; top: -8px; }
  .hero-rhythm-bottom { width: 220px; right: 0; bottom: -18px; }
  .band { padding: 70px 0; }
  .section-head { margin-bottom: 30px; }
  .section-head h2 { font-size: 33px; letter-spacing: -1.3px; }
  .pain-grid, .role-grid, .route-grid, #rollout .pain-grid { grid-template-columns: 1fr; }
  #pain .card:nth-child(n) { margin-top: 0; min-height: 0; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card:nth-child(n) { grid-column: auto; }
  .journey { grid-template-columns: 1fr; padding: 0; gap: 12px; }
  .journey-step { min-height: 0; margin: 0 !important; padding: 18px 18px 21px; }
  .role-grid .card:nth-child(3) { grid-column: auto; }
  .route-card { grid-template-columns: 1fr; }
  .route-card img { height: 190px; }
  .cta { padding: 72px 0; }
  .cta .shell { align-items: flex-start; }
  .cta .hero-actions { width: 100%; }
}

@media (max-width: 390px) {
  .hero-operations { min-height: 310px; }
  .hero-ticket-order { display: none; }
  .hero-bell { right: -9px; }
}
