/* Korean has no spaces inside a word, so the default breaks it mid-word. Every run of
   landing-page prose opts out; English is unaffected. */
.dg-home-heading,
.dg-home-tagline,
.dg-home-feature-title,
.dg-home-feature-details,
.dg-home-section-heading h2,
.dg-home-section-heading p,
.pt-routes-lead,
.pt-route-lands,
.dg-home-section-item p,
.dg-home-step-label ~ p,
.dg-home-steps p {
  word-break: keep-all;
}

/* Landing-page overrides. The live sandbox sits in the home hero's preview slot
   (`hero.preview`), which docgo lays out as a column beside the copy; this page wants
   the opposite — headline centred, and the product itself filling the fold right
   underneath it. */

/* The copy is a lead-in, not the fold: it stays tight enough that the window clears the
   header and is most of what a visitor sees first. */
.dg-home-hero {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.dg-home-hero-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  max-width: 48rem;
}

.dg-home-hero .dg-home-heading {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
}

.dg-home-hero .dg-home-tagline {
  margin-top: 0.9rem;
  margin-inline: auto;
  max-width: 44rem;
  font-size: 0.96rem;
  line-height: 1.6;
}

.dg-home-hero .dg-home-actions {
  margin-top: 1.35rem;
  justify-content: center;
}

/* Held in from the content edge so the light behind it has somewhere to fall. */
.dg-home-preview {
  position: relative;
  flex: 1 1 100%;
  width: 100%;
  max-width: 74rem;
  margin: clamp(1.6rem, 2.8vw, 2.25rem) auto 0;
}

.pt-stage {
  --pt-glow: 27%;

  position: relative;
  isolation: isolate;
  text-align: left;
}

/* The same wash disappears on a dark page — it needs more of the accent to read. */
:root[data-theme='dark'] .pt-stage {
  --pt-glow: 40%;
}

/* Light behind the window and a ground shadow under it. Without both, a bordered box on
   a flat page reads as a screenshot laid on top of it rather than something standing in
   the page. */
.pt-stage::before,
.pt-stage::after {
  position: absolute;
  z-index: -1;
  left: 50%;
  translate: -50% 0;
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

.pt-stage::before {
  top: -16%;
  width: 104%;
  height: 92%;
  background: radial-gradient(
    ellipse at 50% 42%,
    color-mix(in srgb, var(--dg-accent) var(--pt-glow), transparent),
    transparent 68%
  );
  filter: blur(70px);
}

.pt-stage::after {
  bottom: -2.75rem;
  width: 84%;
  height: 6rem;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.26), transparent 72%);
  filter: blur(40px);
}

.pt-frame {
  overflow: hidden;
  border: 1px solid var(--dg-border);
  border-radius: 18px;
  background: var(--dg-surface);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--dg-accent) 9%, transparent),
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 18px 36px -20px rgba(0, 0, 0, 0.3),
    0 60px 100px -50px rgba(0, 0, 0, 0.55);
}

.pt-frame-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 0.9rem;
  border-bottom: 1px solid var(--dg-border);
  background: var(--dg-bg-subtle, var(--dg-surface));
  color: var(--dg-muted);
  font-family: var(--dg-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.pt-frame-dots {
  position: absolute;
  left: 0.9rem;
  display: inline-flex;
  gap: 0.3rem;
}

.pt-frame-dots i {
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: var(--dg-border-strong, var(--dg-border));
}

.pt-frame-url {
  max-width: 22rem;
  flex: 1;
  margin-inline: auto;
  padding: 0.22rem 0.8rem;
  border: 1px solid var(--dg-border);
  border-radius: 999px;
  background: var(--dg-bg);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* The walkthrough plays on a loop and stays that way — the frame takes no input at
   all, so a wheel over it scrolls the page and a click lands on nothing. */
.pt-frame iframe {
  display: block;
  pointer-events: none;
  user-select: none;
  width: 100%;
  height: clamp(28rem, 60vh, 40rem);
  border: 0;
  background: var(--dg-bg);
}

/* The window arrives once, then rides the scroll: it eases back into the page as it
   leaves the fold, so the hero and what follows read as one movement. The scroll half
   needs `view()`; where that is missing only the entry animation runs. */
@keyframes pt-stage-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
}

@keyframes pt-stage-settle {
  to {
    opacity: 0.6;
    transform: scale(0.975);
  }
}

.pt-stage {
  animation: pt-stage-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@supports (animation-timeline: view()) {
  .pt-stage {
    animation:
      pt-stage-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both,
      pt-stage-settle linear both;
    animation-timeline: auto, view();
    animation-range:
      normal,
      exit 20% exit 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pt-stage {
    animation: none;
  }
}

@media (max-width: 860px) {
  .dg-home-preview {
    margin-top: 1.75rem;
  }

  /* The sandbox stacks its two panes on a phone, so a short frame leaves each of them
     with nothing to show. Height is the thing it needs most here. */
  .pt-frame iframe {
    height: min(78vh, 40rem);
  }

  .pt-frame-bar {
    height: 2.2rem;
  }

  .pt-frame-url {
    font-size: 0.6rem;
  }
}

/* ---------------------------------------------------------------- destinations */

/* One captured request on the left, everywhere it can land on the right, joined by a
   spine. A grid of equal cards made every destination look like a separate feature;
   this says the opposite — it is one request, routed. */

.pt-routes {
  margin: clamp(3.5rem, 7vw, 5.5rem) 0 1rem;
}

.pt-routes-head {
  max-width: 46rem;
  margin-bottom: 2.4rem;
}

.pt-routes-eyebrow {
  margin: 0 0 0.7rem;
  color: var(--dg-muted);
  font-family: var(--dg-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pt-routes-title {
  margin: 0 0 0.9rem;
  color: var(--dg-text-strong);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.pt-routes-lead {
  color: var(--dg-muted);
  line-height: 1.7;
}

.pt-routes-body {
  display: grid;
  grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

.pt-request {
  position: relative;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--dg-border);
  border-radius: 14px;
  background: var(--dg-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pt-request-tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--dg-primary-soft);
  color: var(--dg-accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pt-request-quote {
  margin: 0.8rem 0 0.7rem;
  color: var(--dg-text-strong);
  font-size: 1.05rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.pt-request-src {
  display: block;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--dg-border);
  border-radius: 8px;
  background: var(--dg-bg-subtle, var(--dg-surface));
  color: var(--dg-muted);
  font-family: var(--dg-font-mono);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.pt-request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.pt-request-meta li {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--dg-border);
  border-radius: 999px;
  color: var(--dg-muted);
  font-size: 0.7rem;
}

/* The spine, and a stub from each row back to it. */
.pt-routes-list {
  position: relative;
  margin: 0;
  padding: 0 0 0 1.6rem;
  list-style: none;
}

.pt-routes-list::before {
  position: absolute;
  left: 0;
  top: 1.4rem;
  bottom: 1.4rem;
  width: 1px;
  background: var(--dg-border-strong, var(--dg-border));
  content: '';
}

.pt-route {
  position: relative;
  display: grid;
  grid-template-columns: 1.6rem auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid transparent;
  border-bottom-color: var(--dg-border);
  border-radius: 10px 10px 0 0;
  color: inherit;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.pt-route::before {
  position: absolute;
  left: -1.6rem;
  top: 50%;
  width: 1.6rem;
  height: 1px;
  background: var(--dg-border-strong, var(--dg-border));
  content: '';
}

.pt-route:hover {
  border-color: var(--dg-border);
  border-radius: 10px;
  background: var(--dg-surface);
}

.pt-routes-list li:last-child .pt-route {
  border-bottom-color: transparent;
}

.pt-route-mark {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  color: var(--dg-text-strong);
}

.pt-route-mark svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

/* The "anything else" row is drawn, not a brand mark, so it is a stroke not a fill. */
.pt-route-more .pt-route-mark svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.pt-route-more .pt-route-mark {
  color: var(--dg-muted);
}

.pt-route-name {
  color: var(--dg-text-strong);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pt-route-kind {
  justify-self: start;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--dg-border);
  border-radius: 999px;
  color: var(--dg-muted);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pt-route-lands {
  justify-self: end;
  color: var(--dg-muted);
  font-size: 0.88rem;
  text-align: right;
}

@media (max-width: 860px) {
  .pt-routes-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .pt-routes-list {
    padding-left: 0;
  }

  .pt-routes-list::before,
  .pt-route::before {
    display: none;
  }

  .pt-route {
    grid-template-columns: 1.6rem auto minmax(0, 1fr);
    padding-left: 0;
  }

  .pt-route-lands {
    grid-column: 2 / -1;
    justify-self: start;
    text-align: left;
  }
}

/* docgo autolinks every heading with a `#`. That is a docs affordance — on the landing
   page there is nothing to deep-link to, and the mark just flickers in on hover. */
.dg-home-content .dg-anchor {
  display: none;
}
