/* EBONEX marketing site — the shapes a section is built from.
 *
 * The site had one shape: a row of identical cards. A reader met the same rectangle on every page and learned
 * nothing from its form, so every idea looked like every other idea. These are the alternatives: a pinned visual
 * that changes as you read past it, a grid whose cells are deliberately unequal, a card that turns over, a border
 * that lights where the cursor is. They are written here once and used by name, so a section is chosen rather than
 * defaulted into.
 *
 * The effects are after Aceternity UI (ui.aceternity.com), which is React, Tailwind and Motion. This site is static
 * HTML with no build step and no framework, and it stays that way: these are the same effects written in plain CSS
 * with the few lines of JavaScript each one genuinely needs, reading this site's own tokens. Nothing is copied.
 *
 * Every effect degrades: the JavaScript only ever adds motion to markup that already reads correctly without it,
 * and `prefers-reduced-motion` turns the movement off rather than the content.
 */

/* ---------------------------------------------------------------- backgrounds */

/* Aurora: two wide colour fields drifting behind a section. Painted on ::before/::after of a positioned layer so it
   costs no elements, and blurred far past its own box so no edge of it is ever visible. */
.fx-aurora{position:absolute;inset:0;z-index:-1;overflow:clip;pointer-events:none}
.fx-aurora::before,.fx-aurora::after{content:"";position:absolute;width:70vw;height:70vw;max-width:980px;max-height:980px;border-radius:50%;filter:blur(90px);opacity:.5}
.fx-aurora::before{top:-28%;inset-inline-start:-14%;background:radial-gradient(circle,var(--primary-container),transparent 68%);animation:fx-drift-a 22s var(--ease-soft) infinite alternate}
.fx-aurora::after{bottom:-32%;inset-inline-end:-12%;background:radial-gradient(circle,var(--tertiary-container),transparent 68%);animation:fx-drift-b 26s var(--ease-soft) infinite alternate}
@keyframes fx-drift-a{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(9%,7%,0) scale(1.14)}}
@keyframes fx-drift-b{from{transform:translate3d(0,0,0) scale(1.08)}to{transform:translate3d(-8%,-6%,0) scale(.94)}}

/* Grid: faint ruled paper behind a section, faded out at the edges so it never meets the section boundary as a line. */
.fx-grid{position:absolute;inset:0;z-index:-1;pointer-events:none;
  background-image:linear-gradient(var(--outline-variant) 1px,transparent 1px),linear-gradient(90deg,var(--outline-variant) 1px,transparent 1px);
  background-size:64px 64px;opacity:.55;
  -webkit-mask-image:radial-gradient(ellipse 75% 65% at 50% 45%,#000 35%,transparent 100%);
  mask-image:radial-gradient(ellipse 75% 65% at 50% 45%,#000 35%,transparent 100%)}

/* Beams: slow vertical light running down a section, for the places that should feel like something is working. */
.fx-beams{position:absolute;inset:0;z-index:-1;overflow:clip;pointer-events:none}
.fx-beams i{position:absolute;top:-45%;width:1px;height:45%;background:linear-gradient(to bottom,transparent,var(--primary),transparent);opacity:.32;animation:fx-beam 7s linear infinite}
.fx-beams i:nth-child(2){inset-inline-start:22%;animation-duration:9s;animation-delay:1.4s}
.fx-beams i:nth-child(3){inset-inline-start:47%;animation-duration:6.5s;animation-delay:.6s}
.fx-beams i:nth-child(4){inset-inline-start:71%;animation-duration:11s;animation-delay:2.8s}
.fx-beams i:nth-child(5){inset-inline-start:89%;animation-duration:8s;animation-delay:3.6s}
.fx-beams i:first-child{inset-inline-start:7%}
@keyframes fx-beam{from{transform:translateY(0)}to{transform:translateY(320%)}}

/* Spotlight: one cone of light from the top corner, for a hero that needs a focus rather than a wash. */
.fx-spotlight{position:absolute;top:0;inset-inline-start:0;width:min(1200px,120%);height:min(900px,110%);z-index:-1;pointer-events:none;
  background:conic-gradient(from 160deg at 18% -8%,transparent 0deg,var(--primary-container) 14deg,transparent 42deg);
  filter:blur(58px);opacity:.75;animation:fx-spot 14s var(--ease-soft) infinite alternate}
@keyframes fx-spot{from{transform:translate3d(-4%,-2%,0) rotate(-3deg)}to{transform:translate3d(4%,2%,0) rotate(3deg)}}

/* ---------------------------------------------------------------- cards */

/* Glow: the border lights where the pointer is. --fx-x/--fx-y are set by site.js on the card under the cursor;
   with no JavaScript the card is simply a card, because the glow layer is transparent until they exist. */
.fx-glow{position:relative;isolation:isolate}
.fx-glow::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1.5px;opacity:0;transition:opacity var(--dur) var(--ease);
  background:radial-gradient(240px circle at var(--fx-x,50%) var(--fx-y,50%),var(--primary),transparent 70%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}
.fx-glow:hover::before,.fx-glow:focus-within::before{opacity:1}

/* Tilt: the card leans towards the pointer. The lean is small on purpose — enough to feel solid, not enough to
   make a reader work out which way the text is facing. */
.fx-tilt{transform:perspective(900px) rotateX(var(--fx-rx,0deg)) rotateY(var(--fx-ry,0deg));transform-style:preserve-3d;transition:transform var(--dur-lg) var(--ease-soft)}
.fx-tilt:hover{transition-duration:.08s}

/* Hover group: one highlight that slides between the items rather than a hover state on each. The highlight is the
   group's own ::before, moved by site.js to the item under the cursor, so nothing moves before the reader points. */
.fx-hover{position:relative}
/* A tinted wash rather than a surface colour: the groups sit on both the white and the tinted section background,
   and a plate picked for one of them is invisible on the other. */
.fx-hover::before{content:"";position:absolute;z-index:0;border-radius:var(--sh-xl);background:var(--surface-3);opacity:0;pointer-events:none;
  inset-inline-start:var(--fx-left,0);top:var(--fx-top,0);width:var(--fx-w,0);height:var(--fx-h,0);
  transition:opacity var(--dur) var(--ease),inset-inline-start var(--dur-lg) var(--ease),top var(--dur-lg) var(--ease),width var(--dur-lg) var(--ease),height var(--dur-lg) var(--ease)}
@supports (background:color-mix(in srgb,red 8%,transparent)){.fx-hover::before{background:color-mix(in srgb,var(--primary) 8%,transparent)}}
.fx-hover[data-fx-on]::before{opacity:1}
.fx-hover>*{position:relative;z-index:1}

/* Pane: a wide row of icon and writing, for three or four things that are alternatives to each other rather than
   steps. Paired with .fx-hover it reads as one list the reader moves down, not as cards to compare. */
.fx-pane{display:flex;align-items:flex-start;gap:clamp(18px,2vw,28px);padding:clamp(22px,2.4vw,30px) clamp(22px,2.4vw,32px)}
.fx-pane .fic{flex:none;margin:0}
.fx-pane b{display:block;margin-bottom:8px;font-size:clamp(19px,2vw,23px)}
.fx-pane p{margin:0;color:var(--on-surface-variant);font-size:17px;line-height:1.7;max-width:74ch}
@media(max-width:620px){.fx-pane{flex-direction:column;gap:14px}}

/* Flip: a card that turns over to its back. Both faces are in the markup and readable; the turn is decoration.
   It flips on hover and on keyboard focus, so it is not a thing only a mouse can open. */
.fx-flip,.cards .fx-flip,.trio .fx-flip{perspective:1400px;background:none;box-shadow:none;padding:0;min-height:0}
.fx-flip-in{position:relative;width:100%;height:100%;min-height:240px;transform-style:preserve-3d;transition:transform .7s var(--ease-soft)}
.fx-flip:hover .fx-flip-in,.fx-flip:focus-within .fx-flip-in{transform:rotateY(180deg)}
.fx-flip-face{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;gap:12px;padding:32px;border-radius:var(--sh-xl);background:var(--surface-1);box-shadow:var(--e2);backface-visibility:hidden;-webkit-backface-visibility:hidden}
.fx-flip-face.back{transform:rotateY(180deg);background:var(--primary-container);color:var(--on-primary-container)}
.fx-flip-face.back b,.fx-flip-face.back span{color:inherit}
.fx-flip-hint{position:absolute;inset-inline-end:18px;bottom:16px;font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--on-surface-variant);opacity:.7}

/* ---------------------------------------------------------------- layouts */

/* Row: a passage of writing beside the picture of what it describes, the picture on either side. Two of these in a
   row flip sides, so a page of them reads as a conversation rather than a list. */
.fx-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(40px,6vw,88px);align-items:center;width:100%}
.fx-row[data-fx-flip] .fx-row-art{order:-1}
.fx-row-text h2{margin:14px 0 18px;font-size:clamp(28px,3.4vw,42px);line-height:1.16}
.fx-row-text .explain-h{margin:0 0 18px;font-size:clamp(25px,3vw,34px);line-height:1.2}
.fx-row-text p{margin:0 0 18px;color:var(--on-surface-variant);font-size:17.5px;line-height:1.76}
.fx-row-text p:last-child{margin-bottom:0}
.fx-row-text a:not(.btn){color:var(--primary);text-decoration:underline;text-underline-offset:3px}
.fx-row-art{position:relative;display:grid;place-items:center;padding:clamp(24px,3vw,44px);border-radius:var(--sh-2xl);background:var(--surface-2);box-shadow:var(--e1);min-height:300px}
.fx-row-art svg{width:100%;height:auto;max-width:460px;display:block}
@media(max-width:900px){.fx-row{grid-template-columns:1fr;gap:32px}.fx-row[data-fx-flip] .fx-row-art{order:0}.fx-row-art{min-height:0}}

/* A statement that is the whole section: one sentence, large, with nothing to compare it to. */
.fx-statement{position:relative;max-width:20ch;margin:0 auto;text-align:center;font-size:clamp(34px,5.4vw,66px);line-height:1.08;letter-spacing:-.03em;font-weight:600;text-wrap:balance}
.fx-statement+p{max-width:640px;margin:clamp(28px,3vw,40px) auto 0;text-align:center;color:var(--on-surface-variant);font-size:18px;line-height:1.7}

/* Bento: a grid whose cells are deliberately unequal, so the important thing is the big one and a reader can see
   the ranking without reading a word. The spans are declared per item with data-fx-span. */
.fx-bento{display:grid;grid-template-columns:repeat(6,1fr);gap:clamp(14px,1.6vw,22px);width:100%}
.fx-bento>*{grid-column:span 2;display:flex;flex-direction:column;gap:12px;padding:clamp(24px,2.4vw,34px);border-radius:var(--sh-xl);background:var(--surface-1);box-shadow:var(--e2);transition:box-shadow var(--dur) var(--ease),transform var(--dur) var(--ease)}
.fx-bento>*:hover{box-shadow:var(--e4);transform:translateY(-3px)}
.fx-bento>[data-fx-span="3"]{grid-column:span 3}
.fx-bento>[data-fx-span="4"]{grid-column:span 4}
.fx-bento>[data-fx-span="6"]{grid-column:span 6}
.fx-bento b{font-size:clamp(18px,1.9vw,22px)}
.fx-bento p,.fx-bento>*>span:not(.fic):not(.hic):not(.pill){margin:0;color:var(--on-surface-variant);font-size:16px;line-height:1.66}
@media(max-width:980px){.fx-bento{grid-template-columns:repeat(2,1fr)}.fx-bento>*,.fx-bento>[data-fx-span="3"],.fx-bento>[data-fx-span="4"],.fx-bento>[data-fx-span="6"]{grid-column:span 2}}

/* Sticky reveal: the visual pins while its text scrolls past, and changes to the step the reader has reached. This
   is the shape for a page that has to explain something in order — several related ideas, one picture each, without
   the reader scrolling through a column of pictures. */
.fx-sticky{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(40px,6vw,96px);align-items:start;width:100%}
.fx-sticky-steps{display:flex;flex-direction:column;gap:0}
.fx-sticky-step{padding:clamp(72px,11vh,132px) 0;opacity:.34;transition:opacity var(--dur-lg) var(--ease)}
.fx-sticky-step[data-fx-current]{opacity:1}
.fx-sticky-step h3{margin:0 0 14px;font-size:clamp(23px,2.6vw,31px);line-height:1.24}
.fx-sticky-step p{margin:0;color:var(--on-surface-variant);font-size:17px;line-height:1.74}
.fx-sticky-stage{position:sticky;top:calc(var(--hdr) + clamp(48px,12vh,120px));height:fit-content}
.fx-sticky-art{position:relative;width:100%;aspect-ratio:4/3;border-radius:var(--sh-2xl);background:var(--surface-2);box-shadow:var(--e2);overflow:hidden}
.fx-sticky-art>*{position:absolute;inset:0;display:grid;place-items:center;opacity:0;transform:scale(.97);transition:opacity var(--dur-lg) var(--ease),transform var(--dur-lg) var(--ease)}
.fx-sticky-art>[data-fx-current]{opacity:1;transform:none}
@media(max-width:900px){
  .fx-sticky{grid-template-columns:1fr;gap:0}
  .fx-sticky-stage{position:static;margin-bottom:28px}
  .fx-sticky-step{padding:28px 0;opacity:1}
  /* With the stage unpinned there is nothing for the art to swap against, so every step carries its own text only
     and the art shows its first frame. A phone reader gets the writing, which is the part that matters. */
  .fx-sticky-art>*{opacity:1;transform:none;position:relative}
  .fx-sticky-art>*+*{display:none}
}

/* Ladder: numbered steps down one rail, for a sequence. Replaces a row of three equal cards wherever the three
   things are not equal but consecutive. */
.fx-ladder{position:relative;display:flex;flex-direction:column;gap:clamp(28px,3.4vw,44px);padding-inline-start:clamp(44px,5vw,72px);width:100%}
.fx-ladder::after{content:"";position:absolute;inset-block:14px;inset-inline-start:clamp(15px,1.75vw,25px);width:2px;background:linear-gradient(to bottom,var(--primary),var(--tertiary-container))}
.fx-ladder>*{position:relative}
.fx-ladder>*::before{content:attr(data-fx-step);position:absolute;inset-inline-start:calc(-1 * clamp(44px,5vw,72px));top:0;width:clamp(32px,3.5vw,52px);height:clamp(32px,3.5vw,52px);display:grid;place-items:center;border-radius:50%;background:var(--primary);color:var(--on-primary);font-size:15px;font-weight:600}
.fx-ladder h3{margin:0 0 10px;font-size:clamp(20px,2.1vw,25px);line-height:1.3}
.fx-ladder p{margin:0;color:var(--on-surface-variant);font-size:17px;line-height:1.72;max-width:62ch}
.fx-ladder a:not(.btn){color:var(--primary);text-decoration:underline;text-underline-offset:3px}
/* With a sliding highlight behind them the rungs need a box of their own to be highlighted, and the number moves
   down with the heading it belongs to. */
.fx-hover.fx-ladder>*{padding:20px 24px}
.fx-hover.fx-ladder>*::before{top:20px}

/* Marketplace bar: the search box, the kind filters and the count. Hidden until the catalogue has loaded, so a
   visitor is never handed a search box with nothing behind it. */
.mk-bar{display:flex;align-items:center;gap:clamp(12px,1.6vw,20px);flex-wrap:wrap;margin-bottom:clamp(28px,3vw,40px)}
.mk-search{display:flex;align-items:center;gap:10px;flex:1 1 280px;min-width:0;padding:12px 18px;border-radius:var(--sh-full);background:var(--surface-1);box-shadow:var(--e1)}
.mk-search .ic{width:18px;height:18px;flex:none;color:var(--on-surface-variant)}
.mk-search input{flex:1;min-width:0;border:0;background:none;font:inherit;font-size:16px;color:var(--on-surface);outline:0}
.mk-search input::placeholder{color:var(--on-surface-variant)}
.mk-kinds{display:flex;gap:6px;flex-wrap:wrap}
.pill-btn{border:0;padding:9px 16px;border-radius:var(--sh-full);background:var(--surface-2);color:var(--on-surface-variant);font:inherit;font-size:14.5px;font-weight:500;cursor:pointer;transition:background var(--dur) var(--ease),color var(--dur) var(--ease)}
.pill-btn:hover{background:var(--surface-4);color:var(--on-surface)}
.pill-btn[aria-pressed=true]{background:var(--primary-container);color:var(--primary);font-weight:600}
.mk-count{color:var(--on-surface-variant);font-size:14px;white-space:nowrap}
.mk-none{text-align:center;margin-top:28px}
.mk-card[hidden]{display:none}
/* A page head with a catalogue right under it does not need the full hero drop. */
.pagehead.short{padding-bottom:0}

/* ---------------------------------------------------------------- text */

/* Flip words: one word in a heading cycles through a list. The first word is in the markup, so a reader without
   JavaScript reads a complete and true sentence. */
.fx-words{display:inline-grid;vertical-align:bottom;overflow:hidden}
.fx-words>span{grid-area:1/1;transition:transform var(--dur-lg) var(--ease),opacity var(--dur-lg) var(--ease)}
.fx-words>span[data-fx-out]{transform:translateY(-110%);opacity:0}
.fx-words>span[data-fx-in]{transform:translateY(110%);opacity:0;transition:none}

.hero-ask{margin:26px 0 0;font-size:clamp(18px,1.8vw,22px);color:var(--on-surface);font-weight:500;text-align:center}
.hero-ask .fx-words{color:var(--primary)}

/* Reveal: a heading's words arrive one after another the first time it is scrolled to. */
.fx-reveal>span{display:inline-block;opacity:0;transform:translateY(.4em);transition:opacity .5s var(--ease),transform .5s var(--ease)}
.fx-reveal[data-fx-on]>span{opacity:1;transform:none}

/* ---------------------------------------------------------------- language */

/* Both languages are in the page and one of them is shown. The reader switches where they stand rather than being
   sent to another address, which is what the owner asked for. English is what is in the markup first and what a
   search engine reads; `html[lang]` decides which half is displayed, set before the body renders. */
[data-lang=ar]{display:none}
html[lang=ar] [data-lang=ar]{display:block}
html[lang=ar] [data-lang=en]{display:none}
/* Headings set tighter than Arabic letterforms want, and the Arabic face carries its own rhythm. */
[lang=ar] h1,[lang=ar] h2,[lang=ar] h3{letter-spacing:0;line-height:1.35}
[lang=ar] .lead,[lang=ar] p{line-height:1.9}
[lang=ar] .eyebrow{letter-spacing:.04em}
/* A drawn diagram keeps its own left-to-right reading: an arrow that means "and then" must not point backwards. */
[lang=ar] .fx-row-art svg,[lang=ar] .fx-sticky-art svg{direction:ltr}
.lang-btn{display:inline-flex;align-items:center;gap:7px;border:0;padding:9px 15px;border-radius:var(--sh-full);background:var(--surface-2);color:var(--on-surface);font:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:background var(--dur) var(--ease)}
.lang-btn:hover{background:var(--surface-4)}
.lang-btn .ic{width:16px;height:16px}
.lang-link{border:0;background:none;padding:0;font:inherit;color:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
@media(max-width:560px){.lang-btn span{display:none}.lang-btn{padding:9px 11px}}

/* ---------------------------------------------------------------- reduced motion */

/* Nothing here is load-bearing, so when movement is unwelcome it all stops and the content stays exactly as it is. */
@media(prefers-reduced-motion:reduce){
  .fx-aurora::before,.fx-aurora::after,.fx-spotlight,.fx-beams i{animation:none}
  .fx-beams i{opacity:.18}
  .fx-tilt{transform:none}
  .fx-flip-in,.fx-sticky-step,.fx-sticky-art>*,.fx-words>span,.fx-reveal>span{transition:none}
  .fx-flip:hover .fx-flip-in,.fx-flip:focus-within .fx-flip-in{transform:none}
  /* A card that no longer turns has to show its back some other way, so both faces stack and both are read. */
  .fx-flip-in{min-height:0}
  .fx-flip-face{position:relative;inset:auto;backface-visibility:visible}
  .fx-flip-face.back{transform:none;margin-top:12px}
  .fx-flip-hint{display:none}
  .fx-reveal>span{opacity:1;transform:none}
}
