/* About page. Loads after site.css, on /about only.
   Look: a soft canvas (near-black in dark, warm cream in light) with a glossy brand-teal object with white highlights drawn in
   WebGL as a fine halftone, fixed behind the page and turning as you scroll. Headlines are very large and set in two
   weights (light, then a bold line), with mono tags like "[ 002 / 004 ]", a running list, words that fly past, a frosted
   numbered card and the brand name in particles. Without JS everything is a plain, complete page; .fx (added by
   about.js when motion is allowed) turns on the sticky scroll scenes. Logical properties keep RTL correct. */

body.site:has(.ab) {
  --ab-bg: #050708; --ab-fg: #f2f5f6; --ab-fg-2: #aab6bb; --ab-dim: #6d797e;
  --ab-line: rgba(255, 255, 255, .12); --ab-card: rgba(10, 14, 16, .9); --ab-card-line: rgba(255, 255, 255, .1);
  --ab-teal: #3cc6d4; --ab-accent: #9fe6ee; --ab-gl-teal: #2fb9c8; --ab-gl-white: #f2feff;
  background: var(--ab-bg);
}
html:has(> body.site .ab) { background: #050708; }
html[data-theme=light] body.site:has(.ab) {
  --ab-bg: #f6f2e9; --ab-fg: #15191b; --ab-fg-2: #4a5256; --ab-dim: #7b8184;
  --ab-line: rgba(21, 25, 27, .14); --ab-card: rgba(255, 252, 246, .9); --ab-card-line: rgba(21, 25, 27, .08);
  --ab-teal: #028697; --ab-accent: #0a9aab; --ab-gl-teal: #12a6b7; --ab-gl-white: #ffffff;
}
html[data-theme=light]:has(> body.site .ab) { background: #f6f2e9; }
@media (prefers-color-scheme: light) {
  html:not([data-theme=dark]) body.site:has(.ab) {
    --ab-bg: #f6f2e9; --ab-fg: #15191b; --ab-fg-2: #4a5256; --ab-dim: #7b8184;
    --ab-line: rgba(21, 25, 27, .14); --ab-card: rgba(255, 252, 246, .9); --ab-card-line: rgba(21, 25, 27, .08);
    --ab-teal: #028697; --ab-accent: #0a9aab; --ab-gl-teal: #12a6b7; --ab-gl-white: #ffffff;
  }
  html:not([data-theme=dark]):has(> body.site .ab) { background: #f6f2e9; }
}
body.site:has(.ab) .rails::before, body.site:has(.ab) .rails::after { display: none; }
body.site:has(.ab) .site-nav:not(.scrolled) { background: transparent; border-color: transparent; }

.ab { position: relative; color: var(--ab-fg); }
.ab > section { position: relative; z-index: 1; }
.ab h1, .ab h2, .ab h3 { color: var(--ab-fg); }

/* ---------- The fixed background: WebGL canvas, or a soft CSS stand-in when WebGL is missing ---------- */
.ab-gl { position: fixed; image-rendering: auto; inset: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.ab.gl .ab-gl { opacity: 1; }
.ab-fallback, .ab-halftone { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.ab-fallback { background: radial-gradient(28% 34% at 72% 46%, color-mix(in srgb, var(--ab-accent) 70%, transparent), transparent 70%), radial-gradient(34% 40% at 64% 58%, color-mix(in srgb, var(--ab-teal) 70%, transparent), transparent 72%); filter: blur(30px); opacity: .75; }
.ab-halftone { background-image: radial-gradient(circle, color-mix(in srgb, var(--ab-accent) 40%, transparent) 1.2px, transparent 1.6px); background-size: 7px 7px; -webkit-mask-image: radial-gradient(30% 35% at 18% 30%, #000, transparent 70%), radial-gradient(28% 30% at 82% 80%, #000, transparent 70%); mask-image: radial-gradient(30% 35% at 18% 30%, #000, transparent 70%), radial-gradient(28% 30% at 82% 80%, #000, transparent 70%); opacity: .5; }
.ab.gl .ab-fallback, .ab.gl .ab-halftone { display: none; }

/* ---------- Loader: a counter from 000 to 100 over a soft blob, once per visit ---------- */
.ab-loader { display: none; }
.ab-loader.on { display: block; position: fixed; inset: 0; z-index: 300; background: var(--ab-bg); transition: opacity .7s ease, visibility .7s; }
.ab-loader.done { opacity: 0; visibility: hidden; }
.ab-loader-blob { position: absolute; inset-inline-start: 50%; top: 50%; width: min(70vw, 720px); aspect-ratio: 1.1; translate: -50% -50%; border-radius: 46% 54% 50% 50% / 52% 44% 56% 48%; background: radial-gradient(45% 40% at 38% 30%, #ffffff, transparent 70%), radial-gradient(70% 70% at 60% 65%, var(--ab-teal), transparent 72%), var(--ab-gl-teal); filter: blur(40px); opacity: .85; animation: ab-blob 2.4s var(--ease) both; }
[dir=rtl] .ab-loader-blob { translate: 50% -50%; }
.ab-count { position: absolute; top: 22px; inset-inline-start: var(--gutter); font: 300 28px/1 var(--sans); letter-spacing: -.02em; color: var(--ab-fg); font-variant-numeric: tabular-nums; direction: ltr; }
@keyframes ab-blob { from { scale: .6; rotate: -14deg; } to { scale: 1; rotate: 6deg; } }

/* ---------- Type ---------- */
.ab-xl { font-size: clamp(42px, 6.6vw, 112px) !important; line-height: 1 !important; font-weight: 300 !important; letter-spacing: -.045em !important; }
.ab-l { font-size: clamp(30px, 4vw, 58px) !important; line-height: 1.06 !important; font-weight: 300 !important; letter-spacing: -.035em !important; }
.ab .ser { font-family: var(--sans); font-style: normal; font-weight: 600; letter-spacing: inherit; color: var(--ab-fg); }
.ab-xl .ser { display: block; }
.ab-lead { color: var(--ab-fg-2); font-size: 17px; line-height: 1.6; max-width: 46ch; margin: 28px 0 0; }
.ab-mono, .ab-tag { font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ab-fg-2); }
.ab-tag { letter-spacing: .06em; direction: ltr; unicode-bidi: isolate; }

/* Pill buttons with a hairline, like the tags. */
.ab-btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border: 1px solid var(--ab-fg); border-radius: 999px; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ab-fg) !important; text-decoration: none; transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
.ab-btn:hover { background: var(--ab-fg); color: var(--ab-bg) !important; }
.ab-btn.solid { background: var(--ab-fg); color: var(--ab-bg) !important; }
.ab-btn.solid:hover { background: transparent; color: var(--ab-fg) !important; }
.ab-btn.ghost { border-color: var(--ab-line); }
.ab-btn:focus-visible { outline: 2px solid var(--ab-teal); outline-offset: 3px; }
[dir=rtl] .ab-btn span { display: inline-block; transform: scaleX(-1); }

/* ---------- Sections ---------- */
.ab-sec { padding-block: clamp(90px, 16vh, 180px); }
.ab-hero { min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; padding-block: 40px 28px; }
.ab-hero h1 { max-width: 11.5ch; }
.ab-hero-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 40px; }
.ab-scroll { display: inline-flex; align-items: center; gap: 10px; }
.ab-scroll i { width: 1px; height: 28px; background: linear-gradient(var(--ab-fg-2), transparent); animation: ab-drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes ab-drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.ab-statement h2 { max-width: 13ch; }
.ab-made { margin-top: clamp(70px, 12vh, 140px); }
.ab-made .ab-mono { display: block; padding-bottom: 14px; border-bottom: 1px solid var(--ab-line); }
.ab-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ab-marquee-track { display: flex; width: max-content; list-style: none; margin: 0; padding: 18px 0 0; animation: ab-run 48s linear infinite; }
.ab-marquee-track li { font-size: clamp(20px, 2.2vw, 30px); font-weight: 300; letter-spacing: -.02em; white-space: nowrap; padding-inline: 28px; color: var(--ab-fg); }
.ab-marquee-track li::after { content: "·"; margin-inline-start: 56px; color: var(--ab-accent); }
.ab-marquee:hover .ab-marquee-track { animation-play-state: paused; }
@keyframes ab-run { to { transform: translateX(-50%); } }
[dir=rtl] .ab-marquee-track { animation-name: ab-run-rtl; }
@keyframes ab-run-rtl { to { transform: translateX(50%); } }

.ab-end { text-align: end; }
.ab-end h2 { max-width: 12ch; margin-inline-start: auto; }

/* Flying words: a plain numbered list until .fx makes it a sticky scene. */
.ab-fly-words { list-style: none; margin: 0 auto; padding: 40px var(--gutter); width: min(var(--w), 100%); display: grid; gap: 8px; }
.ab-fly-words li { display: flex; align-items: baseline; gap: 18px; border-top: 1px solid var(--ab-line); padding-top: 10px; }
.ab-fly-i { font: 500 13px/1 var(--mono); letter-spacing: .14em; color: var(--ab-accent); }
.ab-fly-w { font-size: clamp(48px, 9vw, 140px); font-weight: 400; letter-spacing: -.05em; line-height: 1; }
.fx .ab-fly { height: calc(var(--n) * 90vh + 100vh); }
.fx .ab-fly-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; perspective: 800px; }
.fx .ab-fly-words { position: absolute; inset: 0; padding: 0; width: auto; display: block; transform-style: preserve-3d; }
.fx .ab-fly-words li { position: absolute; top: 50%; left: 50%; display: block; border: 0; padding: 0; text-align: center; white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.fx .ab-fly-i { display: block; margin-bottom: 14px; }
.fx .ab-fly-w { font-size: clamp(64px, 15vw, 240px); }

.ab-why-grid { display: grid; gap: 28px; }
.ab-why-meta { display: flex; gap: 28px; align-items: flex-start; }
.ab-why-body { display: grid; gap: 22px; justify-items: start; max-width: 620px; }
.ab-why-body p { margin: 0; color: var(--ab-fg-2); font-size: 16px; line-height: 1.7; max-width: 54ch; }
.ab-rule { width: 100%; height: 1px; background: linear-gradient(90deg, var(--ab-accent), var(--ab-line) 40%); }
[dir=rtl] .ab-rule { background: linear-gradient(-90deg, var(--ab-accent), var(--ab-line) 40%); }
@media (min-width: 900px) {
  .ab-why-grid { grid-template-columns: 1fr 1fr; }
  .ab-why-body { grid-column: 2; }
}

/* Frosted card, numbered columns with hairlines. */
.ab-card { border-radius: 28px; padding: clamp(24px, 4vw, 52px); background: var(--ab-card); border: 1px solid var(--ab-card-line); }
.ab-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ab-card-head h2 { max-width: 12ch; }
.ab-card-cols { display: grid; gap: 34px; margin-top: clamp(60px, 12vh, 150px); }
.ab-col { border-inline-start: 1px solid var(--ab-line); padding-inline-start: 20px; }
.ab-num { display: block; font-size: clamp(56px, 6vw, 92px); font-weight: 300; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.ab-col h3 { font-size: 19px !important; font-weight: 500 !important; letter-spacing: -.01em !important; margin: 18px 0 8px !important; }
.ab-col p { margin: 0; color: var(--ab-fg-2); font-size: 14px; line-height: 1.65; }
@media (min-width: 860px) { .ab-card-cols { grid-template-columns: repeat(3, 1fr); } }

/* Team: the brand name in particles. Without .fx it is a plain block with the name in outline. */
.ab-team-stage { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding-block: calc(var(--nav-h) + 24px) 48px; overflow: hidden; }
.fx .ab-team { height: 260vh; }
.fx .ab-team-stage { position: sticky; top: 0; height: 100vh; }
.ab-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ab-team-top { display: flex; justify-content: space-between; gap: 20px; position: relative; }
.ab-brandword { position: relative; margin: 0; text-align: center; font-size: clamp(54px, 13vw, 210px); font-weight: 600; letter-spacing: .02em; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--ab-teal); direction: ltr; }
.ab.dust .ab-brandword { visibility: hidden; }
.ab-team-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px; position: relative; }
.ab-team-note { max-width: 40ch; }
.ab-team-note p { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: var(--ab-fg-2); }
.ab-team-claim { text-align: end; max-width: 10ch; }
.ab-team-claim .ser { display: block; }

.ab-card-data { display: grid; gap: 26px; justify-items: start; }
.ab-list { list-style: none; counter-reset: ab; margin: 0; padding: 0; display: grid; width: 100%; }
.ab-list li { counter-increment: ab; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--ab-line); color: var(--ab-fg-2); font-size: 15px; line-height: 1.6; }
.ab-list li::before { content: counter(ab, decimal-leading-zero); font: 500 11px/2.2 var(--mono); letter-spacing: .08em; color: var(--ab-accent); }

.ab-final { min-height: 92vh; display: flex; align-items: center; text-align: center; padding-block: 120px; }
.ab-final h2 { margin-inline: auto; max-width: 14ch; }
.ab-final .ab-lead { margin-inline: auto; }
.ab-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }

/* The site footer sits on the page canvas as a frosted card. */
body.site:has(.ab) .site-footer { position: relative; z-index: 1; background: transparent; border: 0; padding-top: 0; }
body.site:has(.ab) .site-footer > .wrap { background: var(--ab-card); border: 1px solid var(--ab-card-line); border-radius: 28px; padding: clamp(24px, 4vw, 44px); margin-bottom: var(--gutter); }

/* ---------- Right to left: Vazirmatn needs more line height and no negative tracking ---------- */
[dir=rtl] .ab-xl, [dir=rtl] .ab-l { letter-spacing: 0 !important; line-height: 1.3 !important; font-weight: 300 !important; }
[dir=rtl] .ab .ser { font-weight: 700; }
[dir=rtl] .ab-fly-w, [dir=rtl] .ab-num { letter-spacing: 0; }
[dir=rtl] .ab-mono, [dir=rtl] .ab-btn { text-transform: none; letter-spacing: 0; font-size: 13px; }
[dir=rtl] .ab-marquee-track li { letter-spacing: 0; }

/* ---------- Reduced motion: still and complete ---------- */
@media (prefers-reduced-motion: reduce) {
  .ab-marquee { -webkit-mask-image: none; mask-image: none; }
  .ab-marquee-track { width: auto; flex-wrap: wrap; gap: 6px 0; padding-inline: var(--gutter); }
  .ab-marquee-track li[aria-hidden] { display: none; }
}

/* If the script never finishes the intro, the loader still goes away on its own. */
.ab-loader.on { animation: ab-gone .01s 3.2s forwards; }
@keyframes ab-gone { to { opacity: 0; visibility: hidden; } }
