/* Blockchain service pages: the "blockchain_development" (/bc) and
 * "smart_contract" (/sc) layouts.
 *
 * Built on services.css (hero, rotating words, badge, chips, points, editor,
 * form section) and mql-lock-page.css (container, sections, cards, reveal);
 * this file adds the blockchain visuals and sections:
 *
 * 1. /bc hero: a node network whose links and nodes pulse, and a chain of
 *    blocks sliding past like freshly mined blocks (the row is rendered
 *    twice and moved by half its width, so the loop never jumps).
 * 2. /sc hero: a hex grid with a scanning beam and floating token standards.
 * 3. Pillars, network chips, steps, the explorer mock (transactions go from
 *    "Pending" to "Success" in turn), the stage pipeline with a travelling
 *    pulse, and the FAQ (native <details>).
 *
 * Only transform and opacity are animated, sizes are reserved (no layout
 * shift), everything loops only under prefers-reduced-motion: no-preference
 * and pauses while the hero is off screen (service-page.js). Without motion
 * the final state is shown: every block, every "Success", every line.
 */

.bc-body {
  --bc-blue: #8fb4ff;
  --bc-violet: #b28dff;
  --bc-line: rgba(143, 180, 255, 0.28);
  --bc-block-w: clamp(6.25rem, 5.5rem + 2vw, 8rem);
  --bc-loop: 9s;
}

/* ================================================================ /bc hero */

.bc-hero {
  padding-bottom: clamp(10.5rem, 8rem + 6vw, 14.5rem);
}

.bc-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bc-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.bc-net__links line {
  stroke: var(--bc-line);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.bc-net__nodes circle {
  fill: var(--auth-gold);
  /* Scale each node around its own centre. */
  transform-box: fill-box;
  transform-origin: center;
}

.bc-net__nodes circle:nth-child(3n) {
  fill: var(--bc-blue);
}

/* The chain of blocks, faded out at both edges. */
.bc-chain {
  position: absolute;
  right: 0;
  bottom: clamp(3.75rem, 2.75rem + 2.5vw, 5.75rem);
  left: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  opacity: 0.85;
}

.bc-chain__track {
  display: flex;
  align-items: center;
  width: max-content;
}

.bc-block {
  flex: 0 0 auto;
  width: var(--bc-block-w);
}

.bc-block__face {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 0.6rem 0.7rem 0.7rem;
  overflow: hidden;
  border: 1px solid rgba(235, 196, 42, 0.35);
  border-radius: 12px;
  background:
    linear-gradient(160deg, rgba(235, 196, 42, 0.14), transparent 55%),
    var(--mql-surface-raised);
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.bc-block__label {
  color: var(--auth-subtle);
  font-size: 0.65rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bc-block__hash {
  color: var(--auth-gold);
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 0.62rem + 0.2vw, 0.8rem);
  white-space: nowrap;
}

/* A thin "mining" bar; it fills from the left on a loop (transform only). */
.bc-block__bar {
  height: 3px;
  margin-top: 0.2rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--auth-gold-strong), var(--bc-blue));
  transform-origin: left;
}

.bc-link {
  flex: 0 0 auto;
  width: clamp(1.25rem, 0.9rem + 1vw, 2rem);
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(235, 196, 42, 0.7) 0 6px, transparent 6px 10px);
}

@media (prefers-reduced-motion: no-preference) {
  .bc-chain__track {
    animation: bc-chain-slide 46s linear infinite;
  }

  .bc-block__bar {
    animation: bc-mine 3.2s var(--auth-ease) infinite;
  }

  .bc-block:nth-of-type(2n) .bc-block__bar { animation-delay: -1.1s; }
  .bc-block:nth-of-type(3n) .bc-block__bar { animation-delay: -2.2s; }

  .bc-net__nodes circle {
    animation: bc-node 3.6s ease-in-out infinite;
  }

  .bc-net__nodes circle:nth-child(2n) { animation-delay: -1.2s; }
  .bc-net__nodes circle:nth-child(3n) { animation-delay: -2.4s; }

  .bc-net__links line {
    animation: bc-link-flash 4.8s ease-in-out infinite;
  }

  .bc-net__links line:nth-child(2n) { animation-delay: -1.6s; }
  .bc-net__links line:nth-child(3n) { animation-delay: -3.2s; }

  .svc-hero.is-offscreen .bc-scene *,
  .svc-hero.is-offscreen .sc-scene,
  .svc-hero.is-offscreen .sc-scene * {
    animation-play-state: paused;
  }
}

/* Half the track is one full copy of the blocks: sliding by -50% loops seamlessly. */
@keyframes bc-chain-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes bc-mine {
  0% { transform: scaleX(0); opacity: 1; }
  70% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0.25; }
}

@keyframes bc-node {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.6); opacity: 0.35; }
}

@keyframes bc-link-flash {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* ================================================================ /sc hero */

.sc-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* A faint hexagon grid (an SVG pattern as a data: image, allowed by the CSP). */
.sc-scene__grid {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16Z M28 64v33' fill='none' stroke='rgba(235,196,42,0.13)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 45%, #000, transparent 80%);
}

/* The scanning beam: a soft band that sweeps down the hero. */
.sc-scene__beam {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(143, 180, 255, 0.09) 55%, rgba(235, 196, 42, 0.14) 60%, transparent);
  opacity: 0;
}

/* A floating token standard: a gold-edged hexagon (two clip-path layers). */
.sc-hex {
  --sc-hex: calc(var(--svc-decor) * 1.75 * var(--k, 1));
  position: absolute;
  display: none;
  place-items: center;
  width: var(--sc-hex);
  aspect-ratio: 1 / 1.1547;
  background: linear-gradient(150deg, rgba(235, 196, 42, 0.7), rgba(143, 180, 255, 0.45));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  opacity: 0.75;
}

.sc-hex::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: linear-gradient(160deg, #1a1b24, #0c0d12);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.sc-hex__label {
  position: relative;
  color: var(--auth-gold);
  font-family: var(--font-mono);
  font-size: calc(var(--sc-hex) * 0.15);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.02em;
}

/* Like the /ea coins: only in the gutters beside the copy, from 1200px, at a
   fraction (--x) of the gutter measured from the outer edge. */
@media (min-width: 1200px) {
  .sc-hex {
    display: grid;
  }

  .sc-hex:nth-of-type(odd) {
    left: calc((100% - var(--svc-copy)) / 2 * var(--x) - var(--sc-hex) / 2);
  }

  .sc-hex:nth-of-type(even) {
    right: calc((100% - var(--svc-copy)) / 2 * var(--x) - var(--sc-hex) / 2);
  }

  .sc-hex:nth-of-type(1) { --k: 1.1; --x: 0.45; top: 10%; }
  .sc-hex:nth-of-type(2) { --k: 0.9; --x: 0.5; top: 16%; }
  .sc-hex:nth-of-type(3) { --k: 0.8; --x: 0.3; top: 56%; }
  .sc-hex:nth-of-type(4) { --k: 1; --x: 0.4; top: 58%; }
  .sc-hex:nth-of-type(5) { --k: 0.7; --x: 0.85; top: 34%; }
  .sc-hex:nth-of-type(6) { --k: 0.75; --x: 0.85; top: 36%; }
}

@media (prefers-reduced-motion: no-preference) {
  .sc-hex {
    animation: sc-float 8s ease-in-out infinite alternate;
  }

  .sc-hex:nth-of-type(2) { animation-duration: 9s; animation-delay: -3s; }
  .sc-hex:nth-of-type(3) { animation-duration: 7s; animation-delay: -1.5s; }
  .sc-hex:nth-of-type(4) { animation-duration: 10s; animation-delay: -5s; }
  .sc-hex:nth-of-type(5) { animation-duration: 7.5s; animation-delay: -2s; }
  .sc-hex:nth-of-type(6) { animation-duration: 8.5s; animation-delay: -4s; }

  .sc-scene__beam {
    animation: sc-scan 7s ease-in-out infinite;
  }
}

@keyframes sc-float {
  from { transform: translateY(0) rotate(-6deg); }
  to { transform: translateY(-16px) rotate(6deg); }
}

@keyframes sc-scan {
  0% { transform: translateY(-100%); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(380%); opacity: 0; }
}

/* ================================================================ Pillars */

.bc-pillars__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.75rem, 0.6rem + 0.6vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .bc-pillars__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .bc-pillars__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.bc-pillar {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
  padding: var(--mql-card-pad);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(143, 180, 255, 0.12), transparent 55%),
    var(--mql-surface-raised);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.95);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.bc-pillar:hover {
  border-color: rgba(235, 196, 42, 0.45);
}

.bc-pillar__icon,
.bc-card__icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--auth-gold-strong), var(--auth-gold));
  color: var(--color-brand-contrast);
  box-shadow: 0 10px 30px -12px var(--auth-gold-glow);
}

.bc-pillar__icon svg,
.bc-card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.bc-pillar__body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.bc-pillar__title {
  font-family: var(--font-brand);
  font-size: var(--mql-fs-h3);
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
}

.bc-pillar__text {
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  line-height: 1.5;
}

/* ================================================================== Cards */

/* A blue-to-gold edge lights up along the top of a card on hover. */
.bc-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--bc-blue), var(--auth-gold-strong));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 500ms var(--auth-ease);
}

.bc-card:hover::after {
  transform: scaleX(1);
}

/* =============================================================== Networks */

.bc-networks__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
  gap: clamp(0.6rem, 0.5rem + 0.4vw, 0.9rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bc-network {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.7rem;
  row-gap: 0.1rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-sm);
  background-color: var(--mql-surface);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.bc-network:hover {
  border-color: rgba(235, 196, 42, 0.45);
}

/* A small gold diamond, like a node on the chain. */
.bc-network__mark {
  grid-row: 1 / span 2;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--auth-gold-strong), var(--bc-blue));
  transform: rotate(45deg);
}

.bc-network__name {
  overflow-wrap: anywhere;
  font-weight: var(--font-weight-semibold);
}

.bc-network__kind {
  color: var(--auth-subtle);
  font-size: var(--font-size-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bc-networks__note {
  max-width: 48rem;
  margin: clamp(1.25rem, 1rem + 1vw, 2rem) auto 0;
  color: var(--auth-muted);
  line-height: 1.6;
  text-align: center;
}

/* ================================================================== Steps */

.bc-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.85rem, 0.7rem + 0.6vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .bc-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .bc-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.bc-step {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 0;
  padding: var(--mql-card-pad);
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  background-color: var(--mql-surface);
}

.bc-step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--auth-gold-strong), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 500ms var(--auth-ease);
}

.bc-step:hover::before {
  transform: scaleX(1);
}

.bc-step__number,
.sc-stage__number {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(235, 196, 42, 0.55);
  border-radius: 50%;
  background-color: var(--mql-surface-raised);
  color: var(--auth-gold);
  font-family: var(--font-brand);
  font-weight: var(--font-weight-brand);
}

.bc-step__title,
.sc-stage__title {
  font-family: var(--font-brand);
  font-size: var(--mql-fs-h3);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
}

.bc-step__text,
.sc-stage__text {
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  line-height: 1.6;
}

/* ===================================================== Block explorer mock */

.bc-explorer {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--auth-line-strong);
  border-radius: var(--auth-radius);
  background-color: var(--svc-editor-bg);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.bc-explorer__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--auth-success);
  font-weight: var(--font-weight-bold);
}

.bc-explorer__pulse {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--auth-success);
}

.bc-explorer__rows {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0.85rem;
  list-style: none;
}

.bc-tx {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.02);
  font-size: var(--font-size-xs);
}

.bc-tx__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(235, 196, 42, 0.35), rgba(143, 180, 255, 0.25)),
    var(--mql-surface-raised);
}

.bc-tx__main {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.bc-tx__hash {
  overflow: hidden;
  color: var(--bc-blue);
  font-family: var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bc-tx__method {
  color: var(--auth-muted);
}

/* The block number is extra detail: shown only where there is room. */
.bc-tx__block {
  display: none;
  color: var(--auth-subtle);
  font-family: var(--font-mono);
}

@media (min-width: 480px) {
  .bc-tx {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .bc-tx__block {
    display: block;
  }
}

/* "Pending" and "Success" share one cell; the static state is "Success". */
.bc-tx__status {
  display: inline-grid;
}

.bc-tx__pending,
.bc-tx__ok {
  grid-area: 1 / 1;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-weight: var(--font-weight-bold);
  text-align: center;
}

.bc-tx__pending {
  background-color: var(--auth-gold-soft);
  color: var(--auth-gold);
  opacity: 0;
}

.bc-tx__ok {
  background-color: rgba(94, 224, 160, 0.14);
  color: var(--auth-success);
}

@media (prefers-reduced-motion: no-preference) {
  .bc-explorer__pulse {
    animation: svc-pulse 1.6s ease-in-out infinite;
  }

  .bc-tx {
    animation: bc-tx-in var(--bc-loop) var(--auth-ease) infinite;
  }

  .bc-tx__pending {
    animation: bc-pending var(--bc-loop) linear infinite;
  }

  .bc-tx__ok {
    animation: bc-confirmed var(--bc-loop) linear infinite;
  }

  .bc-tx:nth-child(2),
  .bc-tx:nth-child(2) > .bc-tx__status > * { animation-delay: 0.9s; }
  .bc-tx:nth-child(3),
  .bc-tx:nth-child(3) > .bc-tx__status > * { animation-delay: 1.8s; }
  .bc-tx:nth-child(4),
  .bc-tx:nth-child(4) > .bc-tx__status > * { animation-delay: 2.7s; }
}

/* Each transaction arrives, waits as "Pending", confirms, and leaves before the loop restarts. */
@keyframes bc-tx-in {
  0% { opacity: 0; transform: translateY(8px); }
  6%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}

@keyframes bc-pending {
  0%, 28% { opacity: 1; }
  32%, 100% { opacity: 0; }
}

@keyframes bc-confirmed {
  0%, 28% { opacity: 0; }
  32%, 100% { opacity: 1; }
}

/* ======================================================== Stage pipeline */

.sc-pipeline {
  position: relative;
}

.sc-pipeline__stages {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.85rem, 0.7rem + 0.6vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sc-stage {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 0;
  padding: var(--mql-card-pad);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  background-color: var(--mql-surface);
}

/* The ring that lights up when the pulse reaches a stage. */
.sc-stage__number::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px solid var(--auth-gold);
  border-radius: 50%;
  opacity: 0;
}

/* The track runs through the five stage numbers on wide screens only. */
.sc-pipeline__track {
  display: none;
}

@media (min-width: 960px) {
  .sc-pipeline__stages {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .sc-stage {
    justify-items: center;
    text-align: center;
  }

  /* From the centre of the first number to the centre of the last one. */
  .sc-pipeline__track {
    position: absolute;
    top: calc(var(--mql-card-pad) + 1.25rem - 1px);
    right: 10%;
    left: 10%;
    z-index: 1;
    display: block;
    height: 2px;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(235, 196, 42, 0.45), rgba(143, 180, 255, 0.45));
    pointer-events: none;
  }

  /* A box as wide as the track with the dot at its right end: moving the box
     moves the dot from the first stage to the last. */
  .sc-pipeline__runner {
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
  }

  .sc-pipeline__dot {
    position: absolute;
    top: -3px;
    right: 0;
    width: 3rem;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, var(--auth-gold-strong));
  }

  .sc-stage__number {
    z-index: 2;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sc-pipeline__runner {
    animation: sc-run 7.5s linear infinite;
  }

  .sc-stage__number::after {
    animation: sc-stage-glow 7.5s ease-out infinite;
  }

  .sc-stage:nth-child(2) .sc-stage__number::after { animation-delay: 1.5s; }
  .sc-stage:nth-child(3) .sc-stage__number::after { animation-delay: 3s; }
  .sc-stage:nth-child(4) .sc-stage__number::after { animation-delay: 4.5s; }
  .sc-stage:nth-child(5) .sc-stage__number::after { animation-delay: 6s; }
}

/* The pulse travels for 80% of the loop (one stage every 1.5 s), then fades. */
@keyframes sc-run {
  0% { transform: translateX(-100%); opacity: 0; }
  4% { opacity: 1; }
  80% { transform: translateX(0); opacity: 1; }
  90%, 100% { transform: translateX(0); opacity: 0; }
}

@keyframes sc-stage-glow {
  0% { opacity: 1; transform: scale(0.8); }
  14% { opacity: 0; transform: scale(1.35); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* =================================================================== FAQ */

.bc-faq__list {
  display: grid;
  gap: 0.75rem;
  max-width: 54rem;
  margin-inline: auto;
}

.bc-faq__item {
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-sm);
  background-color: var(--mql-surface);
  transition: border-color var(--transition-normal);
}

.bc-faq__item[open] {
  border-color: rgba(235, 196, 42, 0.45);
}

.bc-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 1rem 1.15rem;
  list-style: none;
  cursor: pointer;
}

.bc-faq__question::-webkit-details-marker {
  display: none;
}

.bc-faq__question:focus-visible {
  outline: 3px solid var(--auth-gold);
  outline-offset: 2px;
  border-radius: var(--auth-radius-sm);
}

.bc-faq__heading {
  font-family: var(--font-brand);
  font-size: var(--mql-fs-h3);
  font-weight: var(--font-weight-bold);
  line-height: 1.35;
}

.bc-faq__marker {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--auth-line-strong);
  border-radius: 50%;
  color: var(--auth-gold);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.bc-faq__marker svg {
  width: 0.95rem;
  height: 0.95rem;
}

.bc-faq__item[open] .bc-faq__marker {
  border-color: var(--auth-gold);
  transform: rotate(45deg);
}

.bc-faq__answer {
  padding: 0 1.15rem 1.1rem;
  color: var(--auth-muted);
  line-height: 1.65;
}

/* ======================================================= Related service */

.bc-related-section {
  padding-top: 0;
}

.mql-section--alt + .bc-related-section {
  padding-top: var(--mql-section-gap);
}

/* ======================================================== Hover and motion */

@media (prefers-reduced-motion: no-preference) {
  .bc-pillar:hover,
  .bc-network:hover {
    transform: translateY(-3px);
  }

  .bc-faq__item[open] .bc-faq__answer {
    animation: svc-open 320ms var(--auth-ease) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bc-pillar,
  .bc-network,
  .bc-card::after,
  .bc-step::before,
  .bc-faq__item,
  .bc-faq__marker {
    transition: none;
  }
}

/* ======================================================== Short screens */

@media (max-height: 560px) and (orientation: landscape) {
  .bc-hero {
    padding-bottom: 8.5rem;
  }

  .bc-chain {
    bottom: 3rem;
  }
}

/* Phones: a smaller network drawing, so its nodes do not crowd the copy. */
@media (max-width: 639.98px) {
  .bc-net {
    opacity: 0.45;
  }
}

/* ================================================================ Phones */

@media (max-width: 639.98px) {
  /* Two compact network chips per row instead of fifteen full-width cards. */
  .bc-networks__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .bc-network {
    column-gap: 0.55rem;
    padding: 0.65rem 0.7rem;
  }

  .bc-network__name {
    font-size: var(--font-size-sm);
    line-height: 1.3;
  }

  .bc-network__kind {
    font-size: 0.68rem;
  }

  /* Steps and stages: the number beside the text, so each card stays short. */
  .bc-step,
  .sc-stage {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.9rem;
    row-gap: 0.3rem;
  }

  .bc-step__number,
  .sc-stage__number {
    grid-row: 1 / span 2;
  }
}

