/* Rethink art direction · About Samah · 2026-11-18
   Loads after site.css on the two About pages. No markup changes. It restyles the page's header only
   (the first section); every section below is as the client built it.

   Header = the deck's Card with image page (Thirty-Day Reset Deck): a portrait as a full-height panel, a glass
   figure card lapping its inner edge, the headline open under the filled blade, over the owner's group turned
   180 degrees at 400%. The deck page has the portrait on the left; the site reads text first, so English mirrors
   the page and Arabic keeps it as drawn.
   Like the home hero it is a header, not a full screen: --H is the 16:9 page where the screen can hold it,
   otherwise 86% of the screen less the navigation. One page unit, --k, is 1/1080 of that height, and the
   portrait, the card, the pattern and the type are all the deck's numbers times --k. Across, the portrait stands
   on the content's far edge and the words on its near edge, the edges the navigation uses. */
main > section:first-child{
  --gl-bg:radial-gradient(farthest-side at 85% 85%,rgba(227,83,54,.060) 0%,rgba(227,83,54,0) 72%),radial-gradient(farthest-side at 15% 15%,rgba(112,25,189,.048) 0%,rgba(112,25,189,0) 72%),linear-gradient(135deg,rgba(255,255,255,.900),rgba(255,255,255,.780));
  --gl-rim:rgba(255,255,255,.810);
  --gl-shadow:inset 0 1px 0 rgba(255,255,255,.931),inset 1px 0 0 rgba(255,255,255,.486),0 9px 35.9px rgba(112,25,189,.106);
  --gl-blur:30px;
  --e:max(var(--margin),calc((100vw - var(--max)) / 2));
}
main > section:first-child .figure{border-radius:0;border-start-end-radius:calc(var(--radius) * 2);}
/* the three figures become one glass card, a row each, as the deck's list panel sets them: no boxes in a box.
   The card laps the dark portrait, so its glass is the light recipe at a fuller white (.90 to .78): the labels
   keep their contrast where the photo shows through. */
/* Owner, 2026-11-22: the labels stood too close to the figures, "1M+" touching its label. The figures' column was a
   fixed width counted from the row's small type (4.4em of 12px), narrower than the widest figure at its real size, so
   the figure ran over the gap. Now the card is one grid: the first column is as wide as the widest figure, whatever
   it says and at whatever size, then one gap (--stat-gap: 23px stacked, 48 of the deck's 1080 on the wide layout,
   so it grows with the figures), then the labels, which all start on one line. Each
   row takes the card's columns (subgrid), so no figure can reach its label. */
main > section:first-child .stats{--stat-gap:var(--s3);display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:var(--stat-gap);align-content:center;row-gap:0;margin:0;
  background:var(--gl-bg);border:1px solid var(--gl-rim);box-shadow:var(--gl-shadow);backdrop-filter:blur(var(--gl-blur));-webkit-backdrop-filter:blur(var(--gl-blur));
  border-radius:0;border-start-end-radius:calc(var(--radius) * 3);}
main > section:first-child .stats .stat{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;align-items:baseline;column-gap:var(--stat-gap);flex-direction:row;
  padding:var(--s2) 0;margin:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;}
main > section:first-child .stats .stat b{white-space:nowrap;}
/* a browser without subgrid: each row sizes its own figure, so the gap still holds (the labels then start unevenly) */
@supports not (grid-template-columns:subgrid){
  main > section:first-child .stats .stat{grid-template-columns:max-content minmax(0,1fr);}
}
main > section:first-child .stats .stat + .stat{border-top:1px solid rgba(128,111,155,.28);}
/* Owner, 2026-11-19: the big figures in Ember and bolder. Ember here is type, the accent's own use, never a fill. */
main > section:first-child .stats .stat b{font-weight:600;line-height:1;letter-spacing:-.02em;color:var(--ember);}
main > section:first-child .stats .stat span{font-size:12px;font-weight:500;line-height:1.35;color:var(--sec);}
html[dir="ltr"] main > section:first-child .stats .stat span{letter-spacing:.12em;text-transform:uppercase;}

@media (min-width:1024px){
  main > section:first-child{--H:max(560px,min(56.25vw,calc(86svh - 72px)));--k:calc(var(--H) / 1080);
    position:relative;isolation:isolate;overflow:hidden;padding:0;min-height:var(--H);}
  /* the pattern: group centre 26.86% / -59.5% of the page, height 400%, measured from the portrait as on the deck */
  main > section:first-child::before{content:"";position:absolute;z-index:0;pointer-events:none;
    inset-inline-end:calc(var(--e) - 1721.4 * var(--k));top:calc(-2802.6 * var(--k));height:calc(4320 * var(--k));aspect-ratio:1843.04/1935.25;
    transform:rotate(180deg) scaleX(-1);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='631.29 -240.05 1843.04 1935.25'%3E%3Cdefs%3E%3CclipPath id='bwl'%3E%3Cpath d='M1438.38,200.87h379.18v900.73c0,88.13-71.55,159.68-159.68,159.68h-379.18V360.55C1278.7,272.42,1350.25,200.87,1438.38,200.87Z'/%3E%3C/clipPath%3E%3CclipPath id='stm'%3E%3Cpath d='M2106.91,197.37h-197.54v804.55c0,120.25-5.28,159.72-15.82,253.35h0c84.84-21.76,213.36-86.53,213.36-279.82V197.37H2106.91Z'/%3E%3C/clipPath%3E%3CclipPath id='sqs'%3E%3Cpath d='M2474.33-240.05h-368.45V197.37h368.45V-240.05H2474.33Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cpath d='M999.74,479.71v778.07h197.54V453.24c0-120.25,5.28-159.73,15.82-253.36h0C1128.26,221.64,999.74,286.42,999.74,479.71Z' fill='%237019BD'/%3E%3Cpath d='M1438.38,200.87h379.18v900.73c0,88.13-71.55,159.68-159.68,159.68h-379.18V360.55C1278.7,272.42,1350.25,200.87,1438.38,200.87Z' fill='none' stroke='%237019BD' stroke-width='8' clip-path='url(%23bwl)'/%3E%3Cpath d='M2106.91,197.37h-197.54v804.55c0,120.25-5.28,159.72-15.82,253.35h0c84.84-21.76,213.36-86.53,213.36-279.82V197.37H2106.91Z' fill='none' stroke='%237019BD' stroke-width='8' clip-path='url(%23stm)'/%3E%3Cpath d='M2474.33-240.05h-368.45V197.37h368.45V-240.05H2474.33Z' fill='none' stroke='%237019BD' stroke-width='8' clip-path='url(%23sqs)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;}
  html[dir="rtl"] main > section:first-child::before{transform:rotate(180deg);}
  main > section:first-child > .wrap{display:block;position:static;width:auto;max-width:none;margin:0;}
  main > section:first-child > .wrap > div:last-child{display:contents;}
  /* portrait: 680 of 1080, full height, from the top edge */
  main > section:first-child .figure--tall{position:absolute;z-index:1;top:0;bottom:0;inset-inline-end:var(--e);width:calc(680 * var(--k));aspect-ratio:auto;
    border:0;border-radius:0;box-shadow:none;}
  /* Owner, 2026-11-20: her face on the centre of the photo. In the picture her face stands at 62% across, not at
     the middle, so the picture is held to the panel's far edge and enlarged by 2%, which puts 62% of the picture
     on 50% of the panel. */
  main > section:first-child .figure--tall img{object-position:100% 12%;transform:scale(1.02);transform-origin:100% 12%;}
  /* glass: 520 x 340 at 600 down, lapping 200 over the portrait's inner edge */
  main > section:first-child .stats{--stat-gap:max(var(--s3),calc(48 * var(--k)));position:absolute;z-index:2;inset-inline-end:calc(var(--e) + 480 * var(--k));top:calc(600 * var(--k));
    width:max(300px,calc(520 * var(--k)));min-height:calc(340 * var(--k));padding:calc(20 * var(--k)) calc(44 * var(--k));border-start-end-radius:calc(28 * var(--k));}
  main > section:first-child .stats .stat{padding:calc(20 * var(--k)) 0;}
  main > section:first-child .stats .stat b{font-size:max(26px,calc(52 * var(--k)));}
  main > section:first-child .stats .stat span{font-size:max(11px,calc(19 * var(--k)));}
  /* the words: their top on the card's top, from the content's near edge to the card */
  main > section:first-child .head{position:absolute;z-index:3;inset-inline-start:var(--e);top:calc(600 * var(--k));gap:0;
    --hw:calc(100vw - 2 * var(--e) - max(300px,520 * var(--k)) - 480 * var(--k) - var(--s5));width:var(--hw);}
  main > section:first-child .title--xl{font-size:min(calc(84 * var(--k)),calc(var(--hw) / 8.4));line-height:1.05;letter-spacing:-.02em;margin:0;}
  html[dir="rtl"] main > section:first-child .title--xl{line-height:1.3;letter-spacing:0;}
  main > section:first-child .sub{margin:calc(28 * var(--k)) 0 0;max-width:34em;font-size:max(16px,calc(30 * var(--k)));line-height:1.45;color:var(--ink);}
  main > section:first-child .actions{margin-top:calc(36 * var(--k));}
}
@media (max-width:1023px){
  /* the stacked portrait, a 4:5 frame: the same centring needs a closer crop here (the picture at 1.3 times),
     held so the top of her head keeps its room */
  main > section:first-child .figure--tall img{object-position:100% 50%;transform:scale(1.2955);transform-origin:100% 31.4%;}
  /* stacked, as the client built it: words, portrait, then the one glass card lapping the portrait's foot */
  main > section:first-child .stats{position:relative;z-index:1;margin:calc(var(--s5) * -1) var(--s3) 0;padding:var(--s1) var(--s3);}
  main > section:first-child .stats .stat b{font-size:28px;}
}

/* ── The first band ("Money... is a decision."). Owner, 2026-11-19: better hierarchy and composition, the banner
   centred, the image removed, a fully purple ground. The band is solid Lumen with everything on its centre line.
   Three levels: the headline, large; the three decisions side by side as three equal columns, each opening with
   its own "A decision" as a small label, a hairline between them; then the one button. On Lumen the lit-word
   halo and the Lumen-coloured words would vanish, so the headline is plain white, the labels are white and
   semibold, and the button is Paper with Lumen words (it turns Ember under the pointer like every other). ── */
main > section.image-band:nth-child(2){min-height:0;background:var(--lumen);color:#fff;text-align:center;padding-block:clamp(64px,8vw,128px);}
main > section.image-band:nth-child(2) .bgwrap,main > section.image-band:nth-child(2) .bg,main > section.image-band:nth-child(2)::before{display:none;}
main > section.image-band:nth-child(2) .copy{width:auto;max-width:none;margin:0;align-items:center;gap:0;}
main > section.image-band:nth-child(2) .title{font-size:clamp(44px,6.6vw,104px);line-height:1.02;letter-spacing:-.03em;}
html[dir="rtl"] main > section.image-band:nth-child(2) .title{line-height:1.3;letter-spacing:0;}
main > section.image-band:nth-child(2) .title b{color:#fff;text-shadow:none;}
main > section.image-band:nth-child(2) .statement{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s4);width:100%;max-width:none;
  margin-top:clamp(40px,5vw,72px);font-size:clamp(18px,1.5vw,22px);font-weight:300;line-height:1.5;color:#fff;}
html[dir="rtl"] main > section.image-band:nth-child(2) .statement{line-height:1.8;}
main > section.image-band:nth-child(2) .statement p{margin:0;text-wrap:balance;}
/* each sentence in two even lines (about.js gives each its own width) */
main > section.image-band:nth-child(2) .statement .rk-two{display:block;margin-inline:0;text-wrap:balance;}
/* Owner, later: centred blocks of three different lengths never looked balanced, the first much narrower than the
   others; the band lacked a systemized structure. The three are now equal columns on one grid: each opens with
   a rule the full width of its column, then its number and label, then its sentence, all from the same edge.
   The rules are equal, the edges line up, and the sentences' different lengths show only as a ragged far end. */
main > section.image-band:nth-child(2) .statement{text-align:start;counter-reset:d;}
main > section.image-band:nth-child(2) .statement p{counter-increment:d;padding-top:var(--s3);border-top:1px solid rgba(255,255,255,.46);}
main > section.image-band:nth-child(2) .statement p + p{margin-top:0;}
main > section.image-band:nth-child(2) .statement .lumen::before{content:counter(d,decimal-leading-zero);margin-inline-end:var(--s2);font-family:var(--font-latin);font-weight:600;letter-spacing:.1em;opacity:.72;}
main > section.image-band:nth-child(2) .statement .lumen{display:block;margin-bottom:var(--s2);color:#fff;font-size:13px;font-weight:600;line-height:1.4;}
html[dir="ltr"] main > section.image-band:nth-child(2) .statement .lumen{letter-spacing:.16em;text-transform:uppercase;}
html[dir="rtl"] main > section.image-band:nth-child(2) .statement .lumen{font-size:15px;}
main > section.image-band:nth-child(2) .actions{justify-content:center;margin-top:clamp(40px,5vw,72px);}
main > section.image-band:nth-child(2) .btn.btn-primary{background-color:#fff;border-color:#fff;color:var(--lumen);}
main > section.image-band:nth-child(2) .btn.btn-primary:hover,main > section.image-band:nth-child(2) .btn.btn-primary:focus-visible{background-color:#fff;border-color:#e35336;color:#fff;}
/* three columns from 1280px (below it the page's content column is 800px wide), where each can hold its sentence in two lines; the type is sized from the column so the
   longest sentence (about.js measures it) always fits in two. Narrower than that the three stack, two lines each. */
main > section.image-band:nth-child(2) .statement{container-type:inline-size;}
@media (min-width:1280px){
  main > section.image-band:nth-child(2) .statement{grid-template-columns:repeat(3,minmax(0,1fr));gap:0 var(--s5);}
  main > section.image-band:nth-child(2) .statement p{
    font-size:min(22px,calc(((100cqi - 2 * var(--s5)) / 3 - 1px) / (var(--rk-longest,36) * .58)));}
}

/* photo:about-closing
   The closing band ("Begin your story"). Owner, 2026-11-20: use this photograph here, the man in the majlis with
   the app on his tablet (his file nb_majlis.png, from his own generated set). img/about-closing.jpg is that image,
   pixels unaltered, reduced from 2752 to 2400 wide and saved as a JPEG.
   Owner, later the same day: the Ink fading into the photograph felt too harsh, and is not how the best brands
   set words beside a picture. It is gone. The band is now two plain parts with one clean edge between them: the
   words on solid Ink on the near side, the photograph on the far 56% of the band, full height, running off the
   band's far edge. Nothing lies over the photograph and nothing fades. The photograph's one rounded corner, the
   upper one beside the words, is the system's own (as on the film on the home page).
   The crop: the picture's near 41% is a pale blurred arch and the framed calligraphy, with nothing of his in it,
   so the photograph shows the far 59%, him from above his head to below the tablet. The picture is laid in a box
   wider than the part shown and that box is clipped to the part shown, so the crop holds at any band height.
   Arabic turns the picture over so he sits on its far side and faces the words; the calligraphy, which would then
   read backwards, is in the part not shown.
   A phone stacks them: the photograph on top, cropped to him and not turned over, the words under it on Ink,
   again with a clean edge.
   build.py leaves this block out if the image is not in the folder. */
main > section.image-band:last-of-type{min-height:clamp(460px,40vw,1000px);background:var(--ink);}
main > section.image-band:last-of-type::after{content:"";position:absolute;z-index:-2;top:0;bottom:0;inset-inline-start:auto;inset-inline-end:0;width:94.92%;
  background:url("img/about-closing.jpg") 100% 50% / cover no-repeat;clip-path:inset(0 0 0 41% round clamp(28px,4.4vw,84px) 0 0 0);}
html[dir="rtl"] main > section.image-band:last-of-type::after{transform:scaleX(-1);}
main > section.image-band:last-of-type .bgwrap,main > section.image-band:last-of-type .bg{display:none;}
main > section.image-band:last-of-type::before,html[dir="rtl"] main > section.image-band:last-of-type::before{background:none;}
main > section.image-band:last-of-type .copy{width:auto;max-width:min(37%,36rem);}
@media (max-width:833px){
  /* a phone stacks them: the photograph on top, the words under it on Ink */
  main > section.image-band:last-of-type{display:block;min-height:0;padding-top:64vw;}
  main > section.image-band:last-of-type::after,html[dir="rtl"] main > section.image-band:last-of-type::after{bottom:auto;width:auto;inset-inline:0;height:64vw;background-size:auto 150%;background-position:96% 44%;clip-path:none;transform:none;}
  main > section.image-band:last-of-type .copy{max-width:none;padding-top:var(--s4);}
}
/* end photo */

/* The entrance (site.css, section 7). Owner, 2026-11-20: the pattern's line stood there first and her portrait then
   faded in over it, so for a moment the line seemed to run through her face. She arrives first; the pattern behind
   her waits until her portrait is fully there and then comes in. If the script never runs, the pattern shows by
   itself with everything else (--rk-safe). */
@media (prefers-reduced-motion:no-preference){
  main > section:first-child::before{transition:opacity 1200ms cubic-bezier(.22,.61,.36,1) 620ms;}
  html:not(.rk-off) main > section:first-child:has(.figure--tall:not(.rk-in))::before{opacity:0;animation:var(--rk-safe);}
}
