/* Homepage-only refinement layer. It intentionally stops before the workspace app. */

:root {
  --home-refine-line: #e8e8e8;
  --home-refine-ink: #171717;
  --home-refine-muted: #707070;
  --home-refine-blue: #2563eb;
  --home-refine-warm: #fffdf8;
}

/* Manifesto: keep the copy, remove the decorative side pieces. */
[data-section03-story] .story-inner {
  min-height: 520px;
  padding: 104px 32px;
  display: grid;
  place-items: center;
}

[data-section03-story] .story-copy.statement-copy {
  position: relative;
  inset: auto;
  grid-area: auto;
  width: min(100%, 720px);
  max-width: 720px;
  margin: 0;
  padding: 0;
  transform: none;
  justify-self: center;
  align-self: center;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-section03-story] .statement-nowrap {
  white-space: nowrap;
}

/* Quote strip: half-height, one text colour, no auxiliary mark. */
[data-section04-links] .home-testimonial-band {
  margin: 0;
  min-height: 118px;
  padding: 26px 48px;
}

[data-section04-links] .home-testimonial-content {
  min-height: 64px;
  width: 100%;
  display: block;
}

[data-section04-links] .home-testimonial-content > p {
  max-width: 900px;
  margin: 0;
  color: #262626;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.48;
}

/* Opportunity cards: quiet white paper and restrained depth. */
.home-discovery {
  --home-discovery-card-width: 188px;
  --home-discovery-card-height: 252px;
}

.home-discovery-card {
  background: #fff;
  border-color: #ececec;
  box-shadow:
    0 1px 2px rgba(24, 24, 24, 0.015),
    0 5px 14px rgba(24, 24, 24, 0.02);
}

.home-discovery-card-copy h3 {
  color: #242424;
  font-size: 18px;
  line-height: 1.28;
}

.home-discovery-card-copy p {
  color: #6c6c6c;
  font-size: 14px;
  line-height: 1.45;
}

.home-discovery-card-stats dt {
  color: #2d2d2d;
  font-size: 14px;
}

.home-discovery-card-stats dd {
  color: #777;
  font-size: 12.5px;
}

.home-discovery-copy {
  padding-top: 8px;
}

/* Dub-inspired asymmetric mosaic, populated with Yuchaoguan bot capabilities. */
.customers {
  padding: 0;
}

.bot-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row dense;
  grid-auto-rows: 292px;
  gap: 1px;
  overflow: hidden;
  border-top: 1px solid var(--home-refine-line);
  border-bottom: 1px solid var(--home-refine-line);
  background: var(--home-refine-line);
}

/* This section owns its staggered reveal. Keep the outer shell visible so the
   shared page reveal utility never leaves a full-height blank region. */
.bot-mosaic.reveal {
  opacity: 1;
  transform: none;
}

.bot-mosaic-cell {
  --mosaic-x: 50%;
  --mosaic-y: 50%;
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--home-refine-ink);
  background: #fff;
  box-shadow: none;
  transition: background-color 180ms ease;
}

.bot-mosaic-wide {
  grid-column: span 2;
}

.bot-mosaic-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 38px 30px;
}

.bot-mosaic-logo > svg {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  stroke-width: 1.7;
}

.bot-mosaic-logo > div {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.bot-mosaic-logo strong {
  font-size: 22px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.bot-mosaic-logo span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7b7b7b;
  font-size: 14.5px;
  line-height: 1.3;
  white-space: nowrap;
}

.bot-mosaic-logo span b {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.09);
}

.bot-mosaic-story {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 44px;
}

.bot-mosaic-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  margin-bottom: 13px;
  color: #656565;
  font-size: 13px;
  font-weight: 560;
}

.bot-mosaic-kicker svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.bot-mosaic-story h3 {
  margin: 0 0 8px;
  color: #171717;
  font-size: clamp(21px, 1.6vw, 25px);
  font-weight: 650;
  line-height: 1.24;
  letter-spacing: -0.025em;
}

.bot-mosaic-story p {
  max-width: 520px;
  margin: 0;
  color: #666;
  font-size: 16.5px;
  line-height: 1.65;
}

.bot-mosaic-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.bot-mosaic-status span {
  padding: 5px 9px;
  border: 1px solid #ececec;
  border-radius: 7px;
  color: #696969;
  background: rgba(255, 255, 255, 0.76);
  font-size: 12.5px;
  line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
  .bot-mosaic-cell:hover {
    z-index: 1;
    box-shadow: none;
  }

  .home-discovery-card:hover {
    box-shadow: 0 4px 12px rgba(24, 24, 24, 0.025);
  }
}

.bot-mosaic.is-mosaic-ready .bot-mosaic-cell {
  opacity: 0;
  transform: translateY(12px);
}

.bot-mosaic.is-mosaic-ready.is-mosaic-visible .bot-mosaic-cell {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms ease;
  transition-delay: calc(var(--mosaic-index, 0) * 34ms);
}

/* Dub-style CTA: two explicit curves, a flat bridge, and aligned side rails. */
.dark-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 388px;
}

.dark-cta::before {
  content: none;
}

.dark-cta-grid {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.15;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), transparent 86%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), transparent 86%);
}

.dark-cta-rails {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: min(960px, calc(100% - 32px));
  margin-inline: auto;
  border-inline: 1px solid rgba(255, 255, 255, 0.085);
  pointer-events: none;
}

.dark-cta-notch {
  position: absolute;
  z-index: 2;
  top: -1px;
  left: 50%;
  display: flex;
  width: min(700px, calc(100vw - 32px));
  height: 64px;
  color: #fff;
  transform: translateX(-50%) translateY(-1px);
  pointer-events: none;
}

.dark-cta-curve {
  width: 85px;
  height: 64px;
  flex: 0 0 85px;
  overflow: visible;
}

.dark-cta-curve-left {
  transform: translate(1px, 1px);
}

.dark-cta-curve-right {
  transform: translate(-1px, 1px) scaleX(-1);
}

.dark-cta-notch-center {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  height: 65px;
  border-top: 1px solid currentColor;
  background: currentColor;
}

.dark-cta-inner {
  position: relative;
  z-index: 3;
  gap: 20px;
  padding-top: 34px;
}

.dark-cta h2 {
  font-size: clamp(34px, 3.2vw, 44px);
}

.dark-cta p {
  font-size: 17px;
}

@media (max-width: 959px) {
  [data-section03-story] .story-inner {
    min-height: 470px;
    padding: 88px 32px;
  }

  [data-section04-links] .home-testimonial-band {
    padding: 24px 32px;
  }

  .bot-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 238px;
  }

  .bot-mosaic-story {
    padding: 24px 26px;
  }
}

@media (max-width: 639px) {
  [data-section03-story] .story-inner {
    min-height: auto;
    padding: 72px 22px;
  }

  [data-section03-story] .story-copy.statement-copy {
    width: 100%;
  }

  [data-section03-story] .statement-nowrap {
    white-space: normal;
  }

  [data-section04-links] .home-testimonial-band {
    min-height: 96px;
    padding: 20px 22px;
  }

  [data-section04-links] .home-testimonial-content {
    min-height: 0;
    display: block;
    text-align: left;
  }

  [data-section04-links] .home-testimonial-content > p {
    font-size: 17px;
    line-height: 1.5;
    text-align: left;
  }

  .home-discovery {
    --home-discovery-card-width: 176px;
    --home-discovery-card-height: 238px;
  }

  .home-discovery-card-copy h3 {
    font-size: 17px;
  }

  .bot-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .bot-mosaic-wide {
    grid-column: 1 / -1;
  }

  .bot-mosaic-cell {
    min-height: 158px;
  }

  .bot-mosaic-logo {
    min-width: 0;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px;
  }

  .bot-mosaic-logo > svg {
    width: 28px;
    height: 28px;
  }

  .bot-mosaic-logo strong {
    font-size: 17px;
  }

  .bot-mosaic-logo span {
    align-items: flex-start;
    font-size: 12px;
    white-space: normal;
  }

  .bot-mosaic-story {
    min-height: 224px;
    padding: 28px 24px;
  }

  .bot-mosaic-story h3 {
    font-size: 21px;
  }

  .bot-mosaic-story p {
    font-size: 15.5px;
  }

  .dark-cta {
    min-height: 352px;
  }

  .dark-cta-inner {
    padding-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bot-mosaic-cell,
  .bot-mosaic.is-mosaic-ready .bot-mosaic-cell,
  .bot-mosaic.is-mosaic-ready.is-mosaic-visible .bot-mosaic-cell {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
