/* membership.html: the two offers and the sign-in buttons that start the purchase.
   Linked after base.css and page.css. The buy flow itself is buy.js and membership.js; this
   sheet only paints what they write into, and every hook they read (`#heldFree`, `#heldMember`,
   `#buyNote`, `#buyOut`, `.provider-btn[data-provider]`, `.pb-label`, `.is-off`, `.buy-alert`)
   keeps its name.

   The offers follow the landing page's Membership section: an offer in a game's store, a
   chamfered plate with a crest, a price and the Books it holds, never a pricing card. */

/* ========== OFFERS ==========
   Side by side the two panels start on one top edge (align-items:start), so the shorter Free panel
   hangs from it rather than floating mid-height beside the taller Member panel; they are not
   stretched, as a stretched Free panel would carry dead space. */
.offers { max-width:980px; margin:0 auto; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(18px,3vw,40px); align-items:start; }
.offer-wrap { position:relative; display:flex; filter:drop-shadow(0 24px 40px rgba(0,0,0,.65)); }
.offer { --cut:26px; flex:1; display:flex; flex-direction:column; align-items:center; text-align:center; padding:56px clamp(22px,3vw,40px) clamp(30px,3vw,40px); }
.offer > :not(.grain-layer) { position:relative; z-index:1; }
.offer-paid { --fill:linear-gradient(180deg,rgba(40,26,10,.94),rgba(10,8,6,.95) 45%); }
.offer-paid-wrap { filter:drop-shadow(0 0 30px rgba(255,170,70,.35)) drop-shadow(0 24px 40px rgba(0,0,0,.65)); }
.rays { position:absolute; left:50%; top:0; width:560px; height:560px; margin:-280px 0 0 -280px; z-index:0; pointer-events:none; opacity:.4;
  background:repeating-conic-gradient(from 0deg, rgba(255,200,110,.32) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask:radial-gradient(closest-side,#000 10%,transparent 70%); mask:radial-gradient(closest-side,#000 10%,transparent 70%); animation:spin 60s linear .08 forwards; }
/* the rays turn a few degrees on arrival and hold there: a turn that never ends is motion this page
   has no control to pause (WCAG 2.2.2) */
@keyframes spin { to { transform:rotate(360deg); } }
.offer h2 { font:800 .8rem/1 var(--ui); letter-spacing:.28em; text-transform:uppercase; color:var(--gold); }
.price { margin-top:16px; font:900 clamp(2.9rem,5vw,4rem)/1 var(--display); background:var(--metal); -webkit-background-clip:text; background-clip:text; color:transparent; filter:drop-shadow(0 2px 0 rgba(0,0,0,.7)); }
.price .per { font-size:.42em; letter-spacing:.04em; }
.price-sub { display:block; margin-top:10px; font:500 .92rem/1.4 var(--body); color:var(--faded); }
.offer-rule { width:100%; max-width:300px; margin:24px auto 20px; display:flex; align-items:center; gap:10px; }
.offer-rule::before, .offer-rule::after { content:''; flex:1; height:1px; background:linear-gradient(90deg,transparent,var(--gold-dim)); }
.offer-rule::after { transform:scaleX(-1); }
.offer-rule i { width:7px; height:7px; transform:rotate(45deg); background:var(--gold); }
.held-label { font:800 .62rem/1 var(--ui); letter-spacing:.22em; text-transform:uppercase; color:var(--faded); }
/* `membership.js` paints these rows: a `.chip` per Book (hue on `--chip-hue`, a `.book-dot` and the
   Book's word) and one `.held-none` line. The word is always printed; the hue never carries alone. */
.held { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin-top:12px; }
.held .chip { display:inline-flex; align-items:center; gap:8px; min-height:30px; padding:0 10px; font:800 .66rem/1 var(--ui); letter-spacing:.16em; text-transform:uppercase; color:var(--parchment);
  background:rgba(6,7,10,.8); border:1px solid color-mix(in srgb, var(--chip-hue,#a6a194) 70%, transparent); }
.held .book-dot { width:10px; height:10px; flex:none; background:var(--chip-hue,#a6a194); }
.held-none { flex-basis:100%; margin-top:8px; font-size:.98rem; font-weight:600; color:var(--parchment); }
.plan-note { margin-top:18px; font-size:.98rem; color:var(--text); max-width:32ch; }
.offer .grow { flex:1; }

/* ========== SIGN-IN ==========
   The three buttons that start the purchase. Rules, sources and the arguments behind every
   number: docs/ui/external-brands.md. This records only what the CSS does about them.

   NO VENDOR COLOUR ON ANY CONTAINER (section 5): one chrome in every state for all three
   services, and no `[data-provider="…"]` rule, ever. Identity is the mark and the company's name
   in the label. tools/check_buy_flow.js pins the absence, and pins the clear space and the mark's
   height measured in the browser.

   THE CHAMFER IS DRAWN BY TWO PSEUDO-ELEMENTS, NOT CLIPPED ON THE BUTTON: the ::before is the rim
   and the ::after the fill, so focus thickens the rim (base.css, THE FOCUS RIM) and the button keeps
   its own box for hit-testing. */
.plan-cta { margin-top:auto; padding-top:24px; width:100%; text-align:left; }
.provider-set { display:flex; flex-direction:column; gap:10px; }
.provider-btn {
  /* Clear space is half the mark's drawn height on all four sides, and it is derived from the
     mark. 11 + 22 + 11 = 44, which is also the touch floor. `line-height:1.2` keeps the label's
     line box shorter than the mark, so the mark sets the height and the vertical sides are equal. */
  --mark:22px; --clear:calc(var(--mark) / 2); --markbox:30px; --cut:8px; --rim:1px;
  position:relative; isolation:isolate; display:flex; align-items:center; gap:var(--clear);
  width:100%; padding:var(--clear) 18px var(--clear) var(--clear);
  font:600 .92rem/1.2 var(--ui); color:var(--parchment); text-align:left; cursor:pointer;
  transition:transform .12s;
}
.provider-btn::before { content:''; position:absolute; inset:0; z-index:-2; clip-path:var(--oct); background:var(--line); transition:background .2s; }
.provider-btn::after { content:''; position:absolute; inset:var(--rim); z-index:-1; clip-path:var(--oct-in); background:#0d1016; transition:background .2s; }
.provider-btn:hover::before { background:var(--gold); }
.provider-btn:hover::after { background:#241a0a; }
.provider-btn:active { transform:translateY(1px); }
/* Mid-request, not unavailable. */
.provider-btn:disabled { opacity:.55; cursor:default; }
.provider-btn:disabled:active { transform:none; }
/* THE SERVICE IS NOT AVAILABLE (the relay answered 501). Two channels, not one: the value drops
   AND the face turns to a hatch, because a dim mark alone is colour doing the whole job and
   disappears on a display that flattens value. buy.js sets `aria-disabled`, not `disabled`, so
   the button keeps its place in the tab order and can still be pressed to hear why. */
.provider-btn.is-off { opacity:.5; cursor:default; }
.provider-btn.is-off::after { background:repeating-linear-gradient(135deg,#0d1016 0 6px,#1a1f29 6px 9px); }
.provider-btn.is-off:hover::before { background:var(--line); }
.provider-btn.is-off:hover::after { background:repeating-linear-gradient(135deg,#0d1016 0 6px,#1a1f29 6px 9px); }
.provider-btn.is-off:active { transform:none; }
.pb-mark { flex:none; width:var(--markbox); height:var(--mark); display:flex; align-items:center; justify-content:center; }
/* Height is the normalised dimension and the width follows it: no aspect ratio is ever touched. */
.pb-mark svg { height:var(--mark); width:auto; display:block; }

/* The running state of the flow: idle, working, every refusal. A live region, so it must never
   move the layout it lives in; the min-height holds two lines open from the first paint. */
.buy-note { margin-top:14px; min-height:3.1em; font:400 .92rem/1.55 var(--body); color:var(--faded); }
/* A refusal is marked on two channels, a change in the ink and a bar that was not there before. */
.buy-alert { color:var(--parchment); border-left:3px solid var(--gold); padding-left:12px; }
.buy-out { margin-top:10px; color:var(--faded); font-size:.86rem; }
.buy-out a { color:var(--gold-hi); }

@media (max-width:820px) {
  .offers { grid-template-columns:minmax(0,1fr); max-width:520px; }
}
/* A long translated price word ("Бесплатно") at the full size would be wider than a 320px phone's
   panel; a little smaller, it fits and the panel no longer widens the page. */
@media (max-width:360px) {
  .price { font-size:2.3rem; }
}
