/*
 * Me Modules: the page's own layer.
 *
 * The developer page, so the job here is the opposite of the other two: keep
 * the framing cinematic but make the middle scannable. The API surface is a
 * plain grid and the code block is a real code block, because a developer
 * checking whether the SDK can sign a payload should not have to read a story
 * to find out.
 *
 * Scoped under .srk-page to outrank Elementor's Global Kit, same as the others.
 */

.srmm-root {
  max-width: none;
  padding: 0;
}

.srmm-hero {
  padding-top: clamp(64px, 11vh, 150px);
  padding-bottom: clamp(64px, 9vh, 140px);
}

.srk-page .srmm-hero h1 {
  font-size: var(--srk-display-m); /* was display-l. See the shared note in scene-kit.css. */
}

.srk-page .srmm-closer h2 {
  font-size: var(--srk-display-m);
}

/* ---------------------------------------------------------------------------
   The code block. This page's signature.
   ------------------------------------------------------------------------ */

.srmm-code {
  margin-top: clamp(28px, 4vh, 48px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--srk-accent-live, var(--srh-accent)) 24%, transparent);
  background: rgba(2, 8, 20, 0.82);
  backdrop-filter: blur(6px);
  max-width: 900px;
}

.srmm-code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: rgba(234, 240, 255, 0.05);
  border-bottom: 1px solid rgba(234, 240, 255, 0.08);
}

.srmm-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(234, 240, 255, 0.22);
}

.srmm-code-name {
  margin-left: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--srh-ink-fade);
}

/*
 * The code scrolls inside its own container rather than pushing the page wide.
 * A code sample is exactly the content that breaks a layout horizontally, and
 * the page must never scroll sideways.
 */
.srmm-pre {
  margin: 0;
  padding: clamp(16px, 2vw, 26px);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(12.5px, 1vw, 14px);
  line-height: 1.7;
  color: var(--srh-ink);
  tab-size: 2;
}

.srmm-pre code {
  font: inherit;
  color: inherit;
  background: none;
  white-space: pre;
}

/* Comment and string tokens. Both measured on the code block's own ground. */
.srmm-c { color: rgba(234, 240, 255, 0.5); }
.srmm-s { color: var(--srk-accent-live, var(--srh-accent)); }

.srk-page .srmm-note {
  margin-top: 1.4em;
  color: var(--srh-ink-soft);
}

/* ---------------------------------------------------------------------------
   Steps
   ------------------------------------------------------------------------ */

.srk-page .srmm-steps {
  counter-reset: srmm-step;
  list-style: none;
  margin: clamp(28px, 4vh, 48px) 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  max-width: 900px;
}

.srk-page .srmm-steps li {
  counter-increment: srmm-step;
  position: relative;
  padding-left: 58px;
  font-size: var(--srk-body-l);
  color: var(--srh-ink);
  line-height: 1.6;
}

.srk-page .srmm-steps li::before {
  content: counter(srmm-step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  color: var(--srk-accent-live, var(--srh-accent));
  border: 1px solid color-mix(in srgb, var(--srk-accent-live, var(--srh-accent)) 40%, transparent);
  background: rgba(10, 36, 114, 0.35);
}

.srk-page .srmm-steps strong { color: var(--srh-pale); }

/* ---------------------------------------------------------------------------
   Build patterns, which are links
   ------------------------------------------------------------------------ */

.srk-page .srmm-pattern {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color 260ms var(--srk-ease), transform 260ms var(--srk-ease);
}

.srk-page .srmm-pattern:hover {
  border-color: var(--srk-accent-live, var(--srh-accent));
  transform: translateY(-3px);
}

.srk-page .srmm-pattern h3 {
  font-size: var(--srk-body-l);
  color: var(--srh-pale);
}

.srk-page .srmm-pattern-cta {
  margin-top: auto;
  padding-top: 1.1em;
  font-size: var(--srk-body);
  font-weight: 600;
  color: var(--srk-accent-live, var(--srh-accent));
}

.srk-page .srmm-pattern-cta::after {
  content: " \2192";
}

/* ---------------------------------------------------------------------------
   Utilities
   ------------------------------------------------------------------------ */

.srmm-narrow { max-width: 900px; }
.srmm-centre { text-align: center; }
.srk-page .srmm-centre p { margin-inline: auto; }
.srmm-centre-actions { justify-content: center; }
.srmm-closer { padding-bottom: clamp(110px, 16vh, 220px); }

@media (prefers-reduced-motion: reduce) {
  .srk-page .srmm-pattern { transition: none; }
  .srk-page .srmm-pattern:hover { transform: none; }
}
