/* ==========================================================================
   Progressive enhancement contract
   --------------------------------------------------------------------------
   Base rules (no ancestor class needed) render every section as plain,
   fully-visible stacked content — the correct behaviour with JS disabled.
   The `.js:not(.reduced-motion)` ancestor (set by an inline <head> script,
   see index.html) unlocks the pinned / absolutely-positioned / 3D layouts
   that main.js then animates with GSAP. `prefers-reduced-motion` is also
   honoured natively via @media so it works even before JS runs.
   ========================================================================== */

section {
  position: relative;
  z-index: 2;
  padding: 120px 0;
}

/* ---------------------------------- Hero --------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) 0 40px;
  overflow: hidden;
}

.hero-scene {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  perspective: 1400px;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(1100px, 130vw);
  height: 620px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    closest-side,
    rgba(59, 130, 246, 0.32),
    rgba(139, 92, 246, 0.16) 55%,
    transparent 75%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-content .eyebrow {
  justify-content: center;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 82px);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.04;
  margin-top: 22px;
  text-wrap: balance;
}

.hero-lede {
  margin: 22px auto 0;
  font-size: 18px;
  color: var(--text-dim);
  max-width: 46ch;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 38px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-cards {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 2;
}

.hero-card {
  position: absolute;
  transform-style: preserve-3d;
  border-radius: var(--radius-md);
  opacity: 0.85;
}

.hero-card-1 {
  top: 10%;
  left: -3%;
  width: 300px;
  height: 196px;
}

.hero-card-2 {
  top: 8%;
  right: -4%;
  width: 280px;
  height: 236px;
}

.hero-card-3 {
  bottom: 4%;
  left: 12%;
  width: 250px;
  height: 162px;
  opacity: 0.7;
}

@media (max-width: 1180px) {
  .hero-card-1 {
    left: -8%;
  }
  .hero-card-2 {
    right: -8%;
  }
}

@media (max-width: 980px) {
  .hero-cards {
    display: none;
  }

  .hero-glow {
    top: 32%;
    height: 420px;
  }
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.scroll-cue span {
  width: 1px;
  height: 32px;
  background: linear-gradient(var(--text-faint), transparent);
}

.js:not(.reduced-motion) .scroll-cue span {
  animation: scrollcue 1.9s ease-in-out infinite;
}

@keyframes scrollcue {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  35% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* --------------------------------- Pitch --------------------------------- */
.pitch {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pitch-pin {
  max-width: 920px;
  padding: 0 32px;
  text-align: center;
}

.pitch-text {
  font-size: clamp(24px, 4.4vw, 52px);
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.pitch-text .word {
  color: var(--text);
}

.js:not(.reduced-motion) .pitch-text .word {
  color: var(--text-faint);
}

.pitch-text .word.hl {
  color: var(--text);
}

.js:not(.reduced-motion) .pitch-text .word.hl {
  color: var(--text-faint);
}

/* ------------------------------- Showcase --------------------------------
   One statement, one screen — a centered eyebrow/headline/subline stack
   with a single supporting UI card underneath, echoing Opacity's pattern
   of a big claim taking the stage rather than a marketing two-column
   feature block. No 01/02/03 numbering: the six modules aren't a sequence,
   so the eyebrow names the module and the dot rail (JS mode only) is the
   only "where am I" signal. */
.showcase-progress {
  display: none;
}

.showcase-track {
  display: flex;
  flex-direction: column;
  gap: 120px;
}

.showcase-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.showcase-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
}

.showcase-scene h3 {
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.08;
  margin-top: 14px;
  text-wrap: balance;
}

.showcase-scene p {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 40ch;
}

.showcase-visual {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

.mockup-card {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 3;
}

/* Full 3D pinned mode — desktop/tablet only. Scroll-jacked pin animations
   are a poor fit for touch scrolling and small viewports, so below 861px
   this whole block never applies and the plain stacked markup above (fully
   visible, normal document flow) is what renders — same contract as the
   reduced-motion fallback, just keyed off viewport width instead. */
@media (min-width: 861px) {
  .js:not(.reduced-motion) #showcase {
    padding: 0;
  }

  .js:not(.reduced-motion) .showcase-pin {
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
  }

  .js:not(.reduced-motion) .showcase-track {
    position: relative;
    width: 100%;
    height: 560px;
  }

  .js:not(.reduced-motion) .showcase-item {
    position: absolute;
    inset: 0;
    justify-content: center;
    perspective: 1500px;
  }

  .js:not(.reduced-motion) .showcase-scene {
    transform-style: preserve-3d;
  }

  .js:not(.reduced-motion) .mockup-card {
    transform-style: preserve-3d;
  }

  .js:not(.reduced-motion) .showcase-progress {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
  }
}

.showcase-progress .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-strong);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}

.showcase-progress .dot.active {
  background: var(--primary);
  transform: scale(1.4);
}

/* ---------------------------------- Hub ---------------------------------- */
.hub-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hub-center-static {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--text-dim);
  max-width: 46ch;
  text-align: center;
}

.hub-ring {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 620px;
  margin: 44px auto 0;
  width: 100%;
}

.hub-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.hub-node .icon {
  width: 20px;
  height: 20px;
  color: var(--primary-light);
}

.hub-node span {
  font-size: 12px;
  color: var(--text-dim);
}

.hub-spokes,
.hub-center {
  display: none;
}

@media (max-width: 640px) {
  .hub-ring {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Full 3D orbit — desktop/tablet only, same rationale as the showcase
   pin above. Below 861px the plain icon grid defined earlier stands. */
@media (min-width: 861px) {
  .js:not(.reduced-motion) .hub-scene {
    position: relative;
    height: 620px;
    justify-content: center;
  }

  .js:not(.reduced-motion) .hub-center-static {
    position: absolute;
    top: 0;
    text-align: center;
  }

  .js:not(.reduced-motion) .hub-orbit-wrap {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1600px;
  }

  .js:not(.reduced-motion) .hub-ring {
    display: block;
    position: relative;
    width: 480px;
    height: 480px;
    max-width: none;
    margin: 0;
    transform-style: preserve-3d;
    transform: rotateX(58deg);
  }

  .js:not(.reduced-motion) .hub-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 92px;
    height: 92px;
    margin: -46px;
    justify-content: center;
    transform: rotate(calc(360deg / var(--count) * var(--i))) translateX(215px) rotate(calc(360deg / var(--count) * var(--i) * -1)) rotateX(-58deg);
  }

  .js:not(.reduced-motion) .hub-spokes {
    display: block;
    position: absolute;
    inset: 0;
  }

  .js:not(.reduced-motion) .hub-spoke {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 215px;
    height: 1px;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.55), transparent);
    transform-origin: 0 50%;
    transform: rotate(calc(360deg / var(--count) * var(--i)));
  }

  .js:not(.reduced-motion) .hub-center {
    display: grid;
    place-items: center;
    position: absolute;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.02em;
    box-shadow: 0 0 60px var(--primary-glow);
    transform: translateZ(20px);
  }
}

/* ------------------------------- Security -------------------------------- */
.security-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 48px;
}

@media (max-width: 900px) {
  .security-layout {
    grid-template-columns: 1fr;
  }
}

.vault-scene {
  display: flex;
  justify-content: center;
}

.vault-card {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
}

.vault-face {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #101526, #0a0d17);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 28px;
}

.vault-front {
  display: none;
}

.vault-front .icon,
.vault-back .icon-shield {
  width: 44px;
  height: 44px;
  color: var(--primary-light);
}

.vault-back ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  width: 100%;
}

.vault-back li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: left;
}

.vault-back li .icon {
  width: 15px;
  height: 15px;
  color: var(--success);
  flex-shrink: 0;
}

.security-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 520px) {
  .security-badges {
    grid-template-columns: 1fr;
  }
}

.security-badge {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.security-badge .icon {
  width: 22px;
  height: 22px;
  color: var(--secondary-light);
}

.security-badge h4 {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 620;
}

.security-badge p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Full 3D vault flip — desktop/tablet only, same rationale as above. */
@media (min-width: 861px) {
  .js:not(.reduced-motion) .vault-scene {
    perspective: 1600px;
  }

  .js:not(.reduced-motion) .vault-card {
    position: relative;
    transform-style: preserve-3d;
  }

  .js:not(.reduced-motion) .vault-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
  }

  .js:not(.reduced-motion) .vault-front {
    display: flex;
  }

  .js:not(.reduced-motion) .vault-back {
    transform: rotateY(180deg);
  }
}

/* ---------------------------------- Scale --------------------------------- */
.scale-section {
  position: relative;
  overflow: hidden;
}

.cube-field {
  position: absolute;
  inset: -10% -5%;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

.cube {
  position: absolute;
  width: 46px;
  height: 46px;
  transform-style: preserve-3d;
}

.cube-face {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.05);
}

.cube-face.front { transform: translateZ(23px); }
.cube-face.back { transform: translateZ(-23px) rotateY(180deg); }
.cube-face.right { transform: rotateY(90deg) translateZ(23px); }
.cube-face.left { transform: rotateY(-90deg) translateZ(23px); }
.cube-face.top { transform: rotateX(90deg) translateZ(23px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(23px); }

.js:not(.reduced-motion) .cube {
  animation: cubespin 16s linear infinite;
}

@keyframes cubespin {
  from { transform: rotateX(0) rotateY(0); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 52px;
}

@media (max-width: 860px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat {
  padding: 26px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-value-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
}

.stat-value,
.stat-value-static,
.stat-suffix {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-suffix {
  font-size: 0.55em;
}

.stat p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ---------------------------------- CTA ----------------------------------- */
.cta-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 48px;
  border-radius: var(--radius-lg);
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(59, 130, 246, 0.22), transparent 60%),
    var(--bg-elevated);
  border: 1px solid var(--border-strong);
}

.cta-card h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
}

.cta-card p {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 16px;
}

.cta-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .cta-card {
    padding: 44px 26px;
  }
}

/* -------------------------- Reduced motion overrides ---------------------- */
@media (prefers-reduced-motion: reduce) {
  .js .cube,
  .js .scroll-cue span {
    animation: none !important;
  }
}

/* ----------------- Module deep-dives (Quality / Fleet) -------------------
   Prose blurb + feature-card grid. Cards deliberately mirror
   .security-badge's look so the page reads as one system. */
.module-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}

@media (max-width: 900px) {
  .module-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.module-copy p {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-dim);
}

.module-copy p:first-child {
  margin-top: 0;
}

.module-copy p strong {
  color: var(--text);
  font-weight: 620;
}

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

@media (max-width: 520px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.feature-card .icon {
  width: 22px;
  height: 22px;
  color: var(--primary-light);
}

#quality .feature-card .icon {
  color: var(--secondary-light);
}

.feature-card h4 {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 620;
}

.feature-card p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ------------------------- Collaboration -------------------------------
   Three alternating copy + mockup panels (whiteboard, PDF editor, document
   editor). The mockups are static HTML built from the shared .mock-window
   pieces; only the cursors/carets move, and that motion is CSS-only and
   switched off for reduced-motion users. */
.collab-panel {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
  margin-top: 88px;
}

.collab-panel:first-of-type {
  margin-top: 56px;
}

.collab-panel-flip .collab-copy {
  order: 2;
}

@media (max-width: 900px) {
  .collab-panel {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 64px;
  }

  .collab-panel-flip .collab-copy {
    order: 0;
  }
}

.collab-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary-light);
}

.collab-copy h3 {
  margin-top: 10px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  font-weight: 680;
}

.collab-copy p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dim);
}

.collab-copy p.collab-tag {
  margin-top: 0;
  font-size: 12px;
  color: var(--secondary-light);
}

.collab-copy p strong {
  color: var(--text);
  font-weight: 620;
}

.collab-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.collab-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.collab-list .icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--success);
}

.collab-list code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--primary-light);
}

.collab-visual {
  min-width: 0;
}

.collab-visual .mock-window {
  height: auto;
}

/* Avatar stack in a mock titlebar ("who's here"). */
.avatar-stack {
  margin-left: auto !important;
  display: inline-flex;
}

.avatar-stack i,
.pdf-comment i {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  color: #05070d;
  background: var(--c);
  border: 2px solid var(--bg-elevated);
}

.avatar-stack i + i {
  margin-left: -6px;
}

/* Whiteboard mock */
.wb-canvas {
  position: relative;
  height: 300px;
  background-color: #0e121c;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 18px 18px;
  overflow: hidden;
}

.wb-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
}

.wb-lines rect {
  stroke: var(--primary-light);
  stroke-dasharray: none;
  fill: rgba(59, 130, 246, 0.08);
}

.wb-note {
  position: absolute;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 11.5px;
  line-height: 1.35;
  color: #1f1a05;
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.6);
}

.wb-note-1 {
  left: 6%;
  top: 14%;
  background: #fde68a;
  transform: rotate(-2deg);
}

.wb-note-2 {
  left: 9%;
  top: 56%;
  background: #bbf7d0;
  transform: rotate(1.5deg);
}

.wb-record {
  position: absolute;
  left: 56%;
  top: 30%;
  width: 38%;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.8);
}

.wb-record-type {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.wb-record b {
  font-size: 12.5px;
  font-weight: 620;
}

.wb-shape-label {
  position: absolute;
  left: 65%;
  top: 74%;
  font-size: 11px;
  color: var(--primary-light);
}

.wb-cursor {
  position: absolute;
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
  color: var(--c);
  pointer-events: none;
}

.wb-cursor svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: #05070d;
  stroke-width: 1;
}

.wb-cursor em {
  margin-top: 12px;
  padding: 2px 7px;
  border-radius: 999px;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  color: #05070d;
  background: var(--c);
}

.wb-cursor-1 {
  left: 40%;
  top: 22%;
}

.wb-cursor-2 {
  left: 46%;
  top: 74%;
}

/* PDF mock */
.pdf-stage {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
  padding: 18px;
  background: #0e121c;
}

@media (max-width: 520px) {
  .pdf-stage {
    grid-template-columns: 1fr;
  }
}

.pdf-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border-radius: 4px;
  background: #f5f7fb;
  color: #1a1f2b;
}

.pdf-heading {
  font-size: 13px;
  margin-bottom: 4px;
}

.pdf-line {
  display: block;
  min-height: 7px;
  border-radius: 2px;
  background: rgba(26, 31, 43, 0.14);
  font-size: 10.5px;
  line-height: 1.4;
}

.pdf-line.short { width: 55%; }
.pdf-line.mid { width: 78%; }

.pdf-line:has(mark) {
  background: none;
}

.pdf-line mark {
  padding: 1px 3px;
  border-radius: 2px;
  color: #1a1f2b;
  background: #fde68a;
}

.pdf-line.redacted {
  width: 70%;
  min-height: 10px;
  background: #05070d;
}

.pdf-sign {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(26, 31, 43, 0.3);
  display: flex;
  flex-direction: column;
}

.pdf-sign-script {
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 20px;
  color: #1d4ed8;
}

.pdf-sign-label {
  font-size: 9.5px;
  color: #5b6377;
}

.pdf-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.pdf-comment {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.pdf-comment.reply {
  margin-left: 14px;
}

.pdf-comment i {
  flex-shrink: 0;
  border-color: transparent;
}

.pdf-comment p {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-dim);
}

.pdf-comment b {
  display: block;
  font-size: 11px;
  color: var(--text);
}

/* Document editor mock */
.doc-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}

.doc-toolbar span {
  width: 22px;
  height: 8px;
  border-radius: 3px;
  background: var(--border);
}

.doc-toolbar span.wide { width: 60px; }

.doc-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px auto;
  width: 86%;
  padding: 22px 22px 26px;
  border-radius: 4px;
  background: #f5f7fb;
  color: #1a1f2b;
}

.doc-heading {
  font-size: 14px;
}

.doc-text {
  font-size: 12px;
  line-height: 1.55;
}

.doc-text.dim {
  color: #3d4555;
}

.doc-caret {
  position: relative;
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin: 0 1px;
  vertical-align: text-bottom;
  background: var(--c);
}

.doc-caret em {
  position: absolute;
  left: -1px;
  bottom: 100%;
  padding: 1px 6px;
  border-radius: 3px 3px 3px 0;
  white-space: nowrap;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 600;
  color: #05070d;
  background: var(--c);
}

.doc-page .pdf-line {
  margin-top: 2px;
}

/* Motion: cursors drift, carets blink. CSS-only so it needs no JS. */
.js:not(.reduced-motion) .wb-cursor-1 {
  animation: wb-drift-1 7s ease-in-out infinite;
}

.js:not(.reduced-motion) .wb-cursor-2 {
  animation: wb-drift-2 9s ease-in-out infinite;
}

.js:not(.reduced-motion) .doc-caret {
  animation: doc-blink 1.1s steps(1) infinite;
}

.js:not(.reduced-motion) .doc-caret + .doc-caret,
.js:not(.reduced-motion) .doc-text.dim .doc-caret {
  animation-delay: 0.4s;
}

@keyframes wb-drift-1 {
  0%, 100% { transform: translate(0, 0); }
  35% { transform: translate(60px, 30px); }
  70% { transform: translate(18px, 64px); }
}

@keyframes wb-drift-2 {
  0%, 100% { transform: translate(0, 0); }
  40% { transform: translate(-40px, -30px); }
  75% { transform: translate(30px, 10px); }
}

@keyframes doc-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .wb-cursor,
  .doc-caret {
    animation: none !important;
  }
}
