/* KB#4049 «Бизнес-роли» — the /roles page in the heavy luxury (program KB#4045, item 2; Decision #481).
   One stylesheet, this page only; main.css and main.js are untouched. The page is one deep jade-black in both
   themes, like /how-it-works (KB#4030) and /investors (KB#3968); the header and the footer follow the site.
   - The first screen: a photograph generated in ChatGPT (landing-assets/roles-page/hero-*.webp) under the text at
     the right, fading into the band on the left and at the foot; on a phone it flows under the text as a band.
   - The six roles: jade plates in a thin copper rim, each with the cast copper role tile of the home page (KB#3939),
     a copper title (the h2 of the role), the description, and the income and the requirement under a copper rule.
   - The closing action: the jade plate button in a copper rim.
   Existing role copy and the #builder anchor remain; KB#4260 adds Exchange and Agent entries. Text is solid copper or ivory: no gradient-clipped ink
   (KB#3895), and nothing smaller than 16 px for the 60+ audience (KB#4024). */

body[data-page="roles"] {
  --rl-bg: #04130f;
  --rl-ink: #f5ecdf;
  --rl-copy: #d9e3dd;
  --rl-muted: #bccbc4;
  --rl-copper: #e9b386;
  --rl-rule: rgb(214 152 101 / .5);
  --rl-rim: #b67c4e;
  --rl-rim-hi: #e8b88c;
  --rl-gutter: clamp(16px, 2.6vw, 36px);
  --rl-col: 1240px;
  --rl-jade: url("/landing-assets/toc/jade-plate.webp");
  --rl-hero: url("/landing-assets/roles-page/hero.webp");
}
body[data-page="roles"] main.rl-page {
  padding-top: 0;
  background: var(--rl-bg);
  color: var(--rl-copy);
  overflow-x: clip;
}
body[data-page="roles"] .rl-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--rl-col) + 2 * var(--rl-gutter));
  margin-inline: auto;
  padding-inline: var(--rl-gutter);
}

/* ── the action: a jade plate in a thin copper rim ── */
body[data-page="roles"] .rl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  min-width: min(100%, 360px);
  max-width: 100%;
  padding: 14px 52px;
  border: 1.5px solid var(--rl-rim);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgb(255 236 210 / .10), transparent 42%),
    radial-gradient(90% 120% at 50% 30%, rgb(14 70 52 / .55), rgb(2 20 15 / .55)),
    var(--rl-jade) 50% 40% / 520px auto;
  box-shadow:
    inset 0 1px 0 rgb(255 220 180 / .35),
    inset 0 0 0 1px rgb(20 10 4 / .55),
    0 0 0 1px rgb(0 0 0 / .35),
    0 10px 22px rgb(0 0 0 / .45);
  color: #f6dcbc;
  font: 600 1.375rem/1.3 var(--pn-font-ui);
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 2px rgb(0 0 0 / .7);
  overflow-wrap: anywhere;
  transition: filter .2s ease, border-color .2s ease;
}
body[data-page="roles"] .rl-btn:hover { filter: brightness(1.12); border-color: var(--rl-rim-hi); color: #fff0dc; }
body[data-page="roles"] .rl-btn:focus-visible { outline: 3px solid #f5ecdf; outline-offset: 3px; }

/* ── the first screen ── */
body[data-page="roles"] .rl-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: clamp(420px, 34vw, 540px);
  padding-block: clamp(20px, 2.4vw, 32px) clamp(36px, 3.6vw, 52px);
  background: linear-gradient(180deg, #03120e 0%, #03120e 70%, var(--rl-bg) 100%);
}
body[data-page="roles"] .rl-hero-copy { position: relative; z-index: 1; max-width: min(50%, 700px); min-width: 0; }
body[data-page="roles"] .rl-hero .breadcrumb-nav { max-width: none; margin: 0 0 clamp(28px, 4vw, 56px); padding: 0; background: none; border: 0; box-shadow: none; }
body[data-page="roles"] .rl-hero .breadcrumb { font: 400 1.125rem/1.4 var(--pn-font-ui); gap: .25rem .55rem; }
body[data-page="roles"] .rl-hero .breadcrumb li,
body[data-page="roles"] .rl-hero .breadcrumb li[aria-current="page"] { color: var(--rl-copy); }
body[data-page="roles"] .rl-hero .breadcrumb li a { color: var(--rl-copper); text-decoration: underline; text-underline-offset: 3px; }
body[data-page="roles"] .rl-hero .breadcrumb li a:hover { color: var(--rl-ink); }
body[data-page="roles"] .rl-hero h1 {
  margin: 0 0 clamp(16px, 1.8vw, 24px);
  color: var(--rl-copper);
  font: 600 clamp(2.75rem, 5vw, 4.75rem)/1.06 var(--pn-font-ui);
  letter-spacing: -0.015em;
  text-align: start;
  text-wrap: balance;
  overflow-wrap: break-word;
  text-shadow: 0 2px 0 rgb(70 34 12 / .6), 0 8px 26px rgb(0 0 0 / .65);
}
body[data-page="roles"] .rl-lead {
  max-width: 34rem;
  margin: 0;
  color: var(--rl-copy);
  font: 400 clamp(1.25rem, 1.75vw, 1.5rem)/1.45 var(--pn-font-ui);
  text-align: start;
  text-wrap: pretty;
  text-shadow: 0 1px 10px rgb(0 8 6 / .8);
}
body[data-page="roles"] .rl-hero-art {
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(64%, 1150px);
  background: var(--rl-hero) 70% 50% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / .7) 14%, #000 32%), linear-gradient(0deg, transparent 0%, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / .7) 14%, #000 32%), linear-gradient(0deg, transparent 0%, #000 22%);
  mask-composite: intersect;
}
/* right to left: the text stands at the right, so the photograph turns to face it from the left */
[dir="rtl"] body[data-page="roles"] .rl-hero-art { transform: scaleX(-1); }

/* ── the seven entry cards ── */
body[data-page="roles"] .rl-roles { padding-block: clamp(28px, 3vw, 44px) 0; }
body[data-page="roles"] .rl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}
body[data-page="roles"] .rl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(20px, 2vw, 28px);
  border: 1.5px solid var(--rl-rim);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(255 236 210 / .08), transparent 38%),
    radial-gradient(120% 140% at 30% 20%, rgb(60 130 96 / .14), rgb(2 18 13 / .26)),
    var(--rl-jade) 50% 50% / 640px auto;
  box-shadow:
    inset 0 1px 0 rgb(255 220 180 / .3),
    inset 0 0 0 1px rgb(20 10 4 / .5),
    0 12px 26px rgb(0 0 0 / .45);
  scroll-margin-top: 96px;
}
body[data-page="roles"] .rl-card-head { display: flex; align-items: center; gap: clamp(14px, 1.4vw, 20px); min-width: 0; }
body[data-page="roles"] .rl-tile {
  flex: 0 0 auto;
  width: clamp(72px, 6.4vw, 88px);
  aspect-ratio: 1;
  background: var(--rl-tile) center / contain no-repeat;
  filter: drop-shadow(0 8px 12px rgb(0 0 0 / .45));
}
body[data-page="roles"] .rl-provider { --rl-tile: url("/landing-assets/roles/icon-provider.webp"); }
body[data-page="roles"] .rl-investor { --rl-tile: url("/landing-assets/roles/icon-investor.webp"); }
body[data-page="roles"] .rl-customer { --rl-tile: url("/landing-assets/roles/icon-customer.webp"); }
body[data-page="roles"] .rl-advertiser { --rl-tile: url("/landing-assets/roles/icon-advertiser.webp"); }
body[data-page="roles"] .rl-validator { --rl-tile: url("/landing-assets/roles/icon-validator.webp"); }
body[data-page="roles"] .rl-builder { --rl-tile: url("/landing-assets/roles/icon-builder.webp"); }
/* the customer's tile is drawn facing the text; a mirrored render, not a CSS flip (the light stays top-left) */
html[dir="rtl"] body[data-page="roles"] .rl-customer { --rl-tile: url("/landing-assets/roles/icon-customer-rtl.webp"); }
body[data-page="roles"] .rl-card h2 {
  margin: 0;
  min-width: 0;
  color: var(--rl-copper);
  font: 600 clamp(1.375rem, 1.65vw, 1.625rem)/1.2 var(--pn-font-ui);
  text-align: start;
  overflow-wrap: break-word;
  text-shadow: 0 2px 0 rgb(60 30 12 / .5), 0 4px 14px rgb(0 0 0 / .5);
}
body[data-page="roles"] .rl-desc {
  margin: 0;
  color: var(--rl-copy);
  font: 400 clamp(1.0625rem, 1.3vw, 1.1875rem)/1.55 var(--pn-font-ui);
  text-align: start;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
body[data-page="roles"] .rl-meta {
  display: grid;
  gap: 8px;
  margin: auto 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--rl-rule);
  list-style: none;
}
body[data-page="roles"] .rl-meta li {
  position: relative;
  margin: 0;
  padding-inline-start: 22px;
  text-align: start;
  overflow-wrap: anywhere;
}
/* a small copper lozenge marks each line */
body[data-page="roles"] .rl-meta li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: .62em;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #f0c49b, #a8703f);
  transform: rotate(45deg);
  box-shadow: 0 1px 2px rgb(0 0 0 / .6);
}
body[data-page="roles"] .rl-earn { color: var(--rl-ink); font: 600 1.125rem/1.45 var(--pn-font-ui); }
body[data-page="roles"] .rl-earn strong { font-weight: inherit; }
body[data-page="roles"] .rl-req { color: var(--rl-muted); font: 400 1.0625rem/1.5 var(--pn-font-ui); }
body[data-page="roles"] .rl-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  min-height: 48px;
  color: var(--rl-copper);
  font: 600 1.125rem/1.35 var(--pn-font-ui);
  text-align: start;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
body[data-page="roles"] .rl-link::after {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'%3E%3Cpath d='M2 7h16M12 2l6 5-6 5' fill='none' stroke='%23e9b386' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
[dir="rtl"] body[data-page="roles"] .rl-link::after { transform: scaleX(-1); }
body[data-page="roles"] .rl-link:hover { color: var(--rl-ink); }
body[data-page="roles"] .rl-link:focus-visible { outline: 3px solid #f5ecdf; outline-offset: 3px; border-radius: 2px; }

/* ── the closing action ── */
body[data-page="roles"] .rl-cta { display: flex; justify-content: center; padding-block: clamp(36px, 4vw, 56px) clamp(48px, 5vw, 72px); }

/* the jade runs to the footer */
body[data-page="roles"] .footer { margin-top: 0; }

/* ── tablet ── */
@media (max-width: 1199px) {
  body[data-page="roles"] .rl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  body[data-page="roles"] .rl-hero-copy { max-width: min(54%, 520px); }
  body[data-page="roles"] .rl-hero-art { width: 66%; }
}

/* ── phone ── */
@media (max-width: 767px) {
  body[data-page="roles"] .rl-hero { display: block; min-height: 0; padding-block: 16px 0; }
  body[data-page="roles"] .rl-hero-copy { max-width: none; }
  body[data-page="roles"] .rl-hero .breadcrumb-nav { margin-bottom: 18px; }
  body[data-page="roles"] .rl-hero h1 { font-size: clamp(2.375rem, 11vw, 3rem); }
  /* the photograph flows under the text as a band, faded at the top and the foot */
  body[data-page="roles"] .rl-hero-art {
    position: relative;
    inset: auto;
    z-index: 0;
    display: block;
    width: auto;
    aspect-ratio: 16 / 10;
    margin: 18px calc(-1 * var(--rl-gutter)) 0;
    background-position: 62% 50%;
    background-size: cover;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 80%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 80%, transparent 100%);
  }
  body[data-page="roles"] .rl-roles { padding-top: 8px; }
  body[data-page="roles"] .rl-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  body[data-page="roles"] .rl-card { padding: 18px 16px 16px; gap: 12px; }
  body[data-page="roles"] .rl-tile { width: 64px; }
  body[data-page="roles"] .rl-card h2 { font-size: 1.375rem; }
  body[data-page="roles"] .rl-desc { font-size: 1rem; }
  body[data-page="roles"] .rl-earn { font-size: 1.0625rem; }
  body[data-page="roles"] .rl-req { font-size: 1rem; }
  body[data-page="roles"] .rl-btn { width: 100%; min-width: 0; padding-inline: 20px; }
}

/* ===================== REAL METAL · KB#4083 S3a =====================
   Decision #502 (Commander, 12.10.2026): metal is real copper poured into the jade, never drawn. The thin copper
   rim of the plates, the copper rim of the buttons, the copper rules and beads were colours; now they are the
   photographed element base (/shared/luxury-elements/, KB#4079): the cast plate rim laid over the edge of the
   plate (an overlay, so nothing moves), the cast copper and dark steel buttons, the cast octagon frame. Hairlines
   are grooves cut into the stone. Composition, copy and photographs stay as they are. */
body[data-page="roles"] { --s3-groove: rgb(0 0 0 / .55); --s3-lip: rgb(150 200 170 / .12); }
body[data-page="roles"] :is(.rl-card) {
  border-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: 0 12px 26px rgb(0 0 0 / .45) !important;
}
body[data-page="roles"] :is(.rl-card)::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  z-index: 1;
  border: 12px solid transparent;
  border-image: url(/shared/luxury-elements/plate-rim.webp) 130 / 12px stretch;
  pointer-events: none;
}
@media (max-width: 767px) { body[data-page="roles"] :is(.rl-card)::after { border-width: 10px; border-image-width: 10px; } }
body[data-page="roles"] :is(.rl-btn) {
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  border-image: url(/shared/luxury-elements/button-copper.webp) 45 65 fill / 10px 14px stretch !important;
  background: #09311f padding-box !important;
  box-shadow: none !important;
  color: #f3d2ad !important;
  text-shadow: 0 1px 1px rgb(0 0 0 / .55);
}
body[data-page="roles"] :is(.rl-btn):hover { filter: brightness(1.1); }
body[data-page="roles"] :is(.rl-meta) { border-color: var(--s3-groove) !important; }
/* the line marks: a small cast octagon frame, not a painted copper lozenge */
body[data-page="roles"] .rl-meta li::before {
  width: 12px; height: 12px; top: .5em; transform: none; box-shadow: none;
  background: url(/shared/luxury-elements/icon-frame.webp) center / 100% 100% no-repeat;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / .6));
}

/* KB#4260 — preserve the approved materials, emphasize the common Exchange entry. */
body[data-page="roles"] .rl-exchange { grid-column: 1 / -1; gap: 20px; padding: clamp(24px, 4vw, 48px); }
body[data-page="roles"] .rl-exchange h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
body[data-page="roles"] .rl-exchange .rl-desc { max-width: 48rem; }
body[data-page="roles"] .rl-exchange .rl-btn { align-self: flex-start; }
body[data-page="roles"] .rl-exchange { --rl-tile: url("/landing-assets/investors/icon-market.webp"); }
body[data-page="roles"] .rl-agent { --rl-tile: url("/landing-assets/investors/icon-bots.webp"); }
body[data-page="roles"] .rl-referral { padding-block-start: clamp(24px, 3vw, 44px); }
@media (max-width: 767px) {
  body[data-page="roles"] .rl-exchange { padding: 24px 16px; }
  body[data-page="roles"] .rl-exchange .rl-btn { align-self: stretch; }
}
