/* Layered surfaces for the public product illustrations. */
:root {
  --surface-shadow: 0 1px 2px #171a1d05, 0 10px 24px -17px #29312424, 0 28px 52px -36px #29312430;
  --surface-shadow-raised: 0 2px 4px #171a1d06, 0 14px 28px -18px #29312430, 0 36px 64px -36px #29312438;
  --surface-edge: inset 0 1px 0 #ffffffb3;
}

/* Large showcases sit above the paper; their inner cards remain quieter. */
.workspace {
  border-color: #394144;
  box-shadow: inset 0 1px 0 #ffffff12, 0 3px 7px #171a1d0d, 0 18px 38px -20px #171a1d3b, 0 52px 76px -46px #171a1d66;
}
.app-card {
  border-color: #ffffff0a;
  box-shadow: inset 0 1px 0 #ffffff05, 0 4px 12px #0000000d;
}
.feature-tile {
  box-shadow: var(--surface-edge), var(--surface-shadow);
  transition: box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.budget-preview, .metric-sheet, .team-preview {
  box-shadow: inset 0 1px 0 #fff, 0 3px 5px #23301d04, 0 14px 28px -14px #34412d24, 0 30px 40px -30px #34412d2b;
}
.loop-card, .chat-window {
  box-shadow: var(--surface-edge), 0 2px 4px #171a1d05, 0 16px 32px -20px #29312430, 0 32px 58px -36px #2931243b;
}
.stack-layer {
  box-shadow: inset 0 1px 0 #fff, 0 3px 4px #29312405, 0 14px 24px -14px #29312426;
}
.use-case-card {
  box-shadow: var(--surface-edge), 0 2px 4px #171a1d03, 0 12px 22px -18px #29312426;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

/* The three primary sources get emphasis without making the catalogue noisy. */
.connector {
  animation-fill-mode: backwards;
}
.connector.featured {
  box-shadow: var(--surface-edge), var(--surface-shadow);
}
.mini-source {
  box-shadow: inset 0 1px 0 #fff, 0 2px 4px #171a1d04, 0 14px 30px -20px #29312433;
}
.canonical-chip {
  box-shadow: inset 0 1px 0 #ffffff12, 0 4px 8px #171a1d0a, 0 20px 36px -20px #171a1d55;
}
.mapping-demo {
  box-shadow: var(--surface-edge), 0 2px 4px #171a1d04, 0 22px 42px -28px #29312430;
}

/* Data definitions and access examples share the same restrained depth. */
body[data-page="platform"] .context-panel {
  border-color: #ffffff26;
  box-shadow: inset 0 1px 0 #ffffff08, 0 4px 10px #0000000a, 0 24px 42px -24px #00000040;
}
body[data-page="platform"] :is(.mapping, .metric-panel, .identity-card, .loop-panel) {
  box-shadow: var(--surface-edge), var(--surface-shadow);
}

/* Keyboard focus gets the same surface emphasis as a pointer. */
.feature-tile:focus-within, .connector:focus-within, .use-case-card:focus-visible {
  border-color: #bfc6b7;
  box-shadow: var(--surface-edge), var(--surface-shadow-raised);
}
.feature-tile:focus-within .budget-preview { transform: translateY(0); }
.metrics-tile:focus-within .metric-sheet { transform: rotate(0) translateY(0); }

@media (hover: hover) and (pointer: fine) {
  .feature-tile:hover, .connector:hover, .use-case-card:hover {
    border-color: #bfc6b7;
    box-shadow: var(--surface-edge), var(--surface-shadow-raised);
  }
  .connector:hover, .use-case-card:hover { transform: translateY(-3px); }
}

/* Touch and reduced-motion users keep the depth without positional changes. */
@media (hover: none) {
  .connector:hover, .use-case-card:hover { transform: none; }
}
.no-motion :is(.button, .connector, .use-case-card):hover { transform: none; }
.no-motion .feature-tile:is(:hover, :focus-within) .budget-preview { transform: translateY(5px); }
.no-motion .metrics-tile:is(:hover, :focus-within) .metric-sheet { transform: rotate(-1deg) translateY(5px); }
.no-motion .platform-stack:hover .stack-layer { transform: rotateX(11deg) rotateZ(-3deg); }
@media (prefers-reduced-motion: reduce) {
  :is(.button, .connector, .use-case-card):hover { transform: none; }
  .feature-tile:is(:hover, :focus-within) .budget-preview { transform: translateY(5px); }
  .metrics-tile:is(:hover, :focus-within) .metric-sheet { transform: rotate(-1deg) translateY(5px); }
  .platform-stack:hover .stack-layer { transform: rotateX(11deg) rotateZ(-3deg); }
}
