/* Town Fit landing FX v7 - 3D tilt kept; near-square corners + wider card spacing site-wide (Mo, 2026-11-27). */

/* ---------- 3D package cards ---------- */
.ph-packages { perspective:1700px; }
.ph-package {
  box-shadow:0 22px 46px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.17), inset 0 -16px 30px rgba(0,0,0,.38);
}
.ph-package.ph-selected {
  box-shadow:0 26px 54px rgba(220,38,38,.30), 0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -16px 30px rgba(0,0,0,.22);
}
/* layered content: floats at different depths when the card tilts */
.ph-package .ph-tag { transform:translateZ(58px); }
.ph-package h3 { transform:translateZ(40px); }
.ph-package > strong { display:inline-block; transform:translateZ(68px); }
.ph-package p { transform:translateZ(26px); }
.ph-package .ph-package-cta { transform:translateZ(50px); }
.ph-package.ph-tilting { will-change:transform; }
/* light lands on the card surface a touch stronger while tilting */
.ph-package.ph-tilting:after { background:radial-gradient(460px circle at var(--gx,50%) var(--gy,50%),rgba(255,255,255,.24),transparent 50%); }

/* ---------- near-square corners, all boxes (Mo 2026-11-27: قلل الكيرف اوي) ---------- */
.ph-collage img { border-radius:14px; }
.ph-feature { border-radius:12px; }
.ph-package { border-radius:14px; }
.ph-banner { border-radius:16px; }
.ph-stat { border-radius:12px; }
.ph-panel { border-radius:14px; }
.ph-login-box { border-radius:16px; }
.ph-modal { border-radius:14px; }
.ph-credentials { border-radius:10px; }
.ph-client-list { border-radius:12px; }
.ph-edit-card { border-radius:12px; }
.ph-notice { border-radius:10px; }
.ph-code { border-radius:6px; }
.ph-site .file-chart, .ph-site .file-callout[data-tone=warning] { border-radius:12px; }
.ph-gym-plan-wrap { border-radius:14px; }
.ph-gym-photo { border-radius:10px; }
.ph-contact-map { border-radius:12px; }
.ph-contact-row { border-radius:10px; }
.ph-live-form input, .ph-live-form textarea, .ph-live-form select { border-radius:8px; }
.ph-live-notice, .ph-live-record { border-radius:10px; }
.ph-live-member, .ph-live-search { border-radius:8px; }
.ph-live-stat { border-radius:10px; }
.ph-live-token { border-radius:6px; }

/* ---------- clear spacing between all cards (Mo 2026-11-27) ---------- */
.ph-packages { gap:22px; }
.ph-features { gap:16px; }
@media (min-width:768px) {
  .ph-collage img { border-radius:18px; }
  .ph-packages { gap:26px; }
  .ph-features { gap:22px; }
}
/* on stacked mobile rows the selected card's -14px lift cancels the grid gap and overlaps neighbours: drop the lift there */
@media (max-width:767px) {
  .ph-package.ph-selected, .ph-package.ph-selected:hover { transform:none; }
}
@media (prefers-reduced-motion:reduce) {
  .ph-package, .ph-feature { transform-style:flat; }
}

/* ---------- v8 2026-11-27: full-bleed hero, background visible behind the header (Mo: عايز الخلفيه ماليه الـ landing حتى في الـ header) ---------- */
/* landing only: page spans the full window width (drops the 1180 card's dark side strips) */
.ph-site:has(.ph-hero) .ph-live-card { max-width:none; margin:0; }
/* header floats over the hero photo; soft top scrim keeps the links readable */
.ph-site:has(.ph-hero) .ph-topbar {
  position:absolute; top:0; inset-inline:0; z-index:60;
  background:linear-gradient(180deg, rgba(0,0,0,.82), rgba(0,0,0,.45) 62%, transparent);
  padding-bottom:36px;
}
/* hero fills the first screen edge to edge */
.ph-site:has(.ph-hero) .ph-hero { min-height:100vh; min-height:100dvh; }
@media (min-width:768px) {
  .ph-site:has(.ph-hero) .ph-hero { padding-top:150px; }
}
/* everything below the hero keeps the previous centered 1180 layout */
.ph-site:has(.ph-hero) .ph-live-card > *:not(.ph-topbar):not(.ph-hero):not(.ph-banner):not(.ph-mobile-nav):not(.ph-mobile-account) {
  max-width:1180px; margin-inline:auto;
}
/* banner keeps its old inset look: side margins on mobile, 1068 centered on desktop */
@media (min-width:768px) {
  .ph-site:has(.ph-hero) .ph-banner { max-width:1068px; margin-inline:auto; }
}

/* ---------- v9 2026-11-27: whole-box 3D tilt (Mo: عايز المربع كله يتحرك مش اللي جواه) ---------- */
/* tilt the outer membership box itself; it used to stay put while the clipped inner button moved */
.ph-gym-plans { perspective:1700px; }
.ph-gym-plan-wrap { position:relative; overflow:visible; transform-style:preserve-3d; }
.ph-gym-plan-wrap .ph-gym-plan { border-radius:14px; }
.ph-gym-plan-wrap.ph-tilting { transition:transform .12s ease-out, border-color .35s, box-shadow .35s; will-change:transform; z-index:2; }
/* content rides on the box as one solid piece: drop the separate floating inner layers */
.ph-package .ph-tag, .ph-package h3, .ph-package > strong, .ph-package p, .ph-package .ph-package-cta { transform:none; }
/* surface glare follows the finger on the membership box too */
.ph-gym-plan-wrap:after { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; background:radial-gradient(430px circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.19), transparent 48%); opacity:0; transition:opacity .35s; }
.ph-gym-plan-wrap.ph-tilting:after { opacity:1; }
/* let horizontal finger movement tilt the card while vertical scrolling still works on touch */
.ph-package, .ph-feature, .ph-gym-plan-wrap { touch-action:pan-y; }

/* ---------- v10 2026-11-27: new hero look (dark, red glow, pill headline, 3D barbell). Original Town Fit hero copy kept. ---------- */
.ph-hero-photo { display:none; }
.ph-hero { background:#050505; }
.ph-hero:after {
  background:
    radial-gradient(ellipse 60% 55% at 72% 38%, rgba(220,38,38,.20), transparent 62%),
    radial-gradient(ellipse 85% 45% at 50% 108%, rgba(160,20,20,.42), transparent 66%),
    linear-gradient(180deg, #000 0%, #060606 55%, #0a0505 100%);
}
.ph-hero-content { z-index:2; max-width:860px; align-items:center; }
.ph-hero h1.ph-pill { margin:18px 0 20px; font-size:30px; line-height:1.3; text-shadow:none; display:block; }
.ph-hero h1.ph-pill span.ph-pill-in {
  display:inline-block; position:relative; background:none; border:0; border-radius:0; padding:8px 0 26px; line-height:1.3; font-weight:900;
  color:#fff; -webkit-text-fill-color:#fff; box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none;
  filter:drop-shadow(0 8px 20px rgba(220,38,38,.55));
}
.ph-hero h1.ph-pill span.ph-pill-in:after {
  content:""; position:absolute; left:-8%; right:-8%; bottom:-6px; height:46px; z-index:-1; pointer-events:none;
  background:radial-gradient(ellipse 50% 50% at 50% 50%, rgba(220,38,38,.55), transparent 72%); filter:blur(10px);
}
.ph-hero h1.ph-pill em {
  display:block; font-style:normal; line-height:1.45;
  background:linear-gradient(180deg,#f87171,#dc2626 55%,#991b1b); -webkit-background-clip:text; background-clip:text; color:transparent; -webkit-text-fill-color:transparent;
}
.ph-hero p { max-width:560px; font-size:15px; line-height:1.9; color:#e6e6e6; }
.ph-hero .ph-actions { margin-top:26px; }
.db-scene { z-index:1; right:28%; top:8%; }
.db-float { --s:.6; }
.ph-site:has(.ph-hero) .ph-hero { align-items:center; padding-top:130px; padding-bottom:70px; }
@media (min-width:768px) {
  .ph-hero h1.ph-pill { font-size:46px; }
  .ph-hero h1.ph-pill span.ph-pill-in { padding:8px 0 28px; white-space:nowrap; }
  .ph-hero h1.ph-pill br { display:none; }
  .ph-hero h1.ph-pill em { display:inline; margin-inline-start:.3em; line-height:1.3; }
  .ph-hero p { font-size:17px; }
  .db-scene { right:17%; top:25%; }
  .db-float { --s:1.5; }
  .ph-site:has(.ph-hero) .ph-hero { padding-top:150px; }
}
@media (min-width:1100px) { .db-scene { right:16%; top:25%; } .db-float { --s:1.7; } }

/* header wordmark: "Town Fit Gym" on one line, Fit in the site red */
.ph-logo > span { display:inline-flex; flex-direction:row; flex-wrap:nowrap; align-items:baseline; gap:.28em; white-space:nowrap; direction:ltr; }
.ph-logo > span b { display:inline; white-space:nowrap; }
.ph-logo > span b.ph-logo-fit { color:#dc2626; }

/* mobile: hide the small circular badge (Mo) */
@media (max-width:767px) { .ph-badge { display:none !important; } }

/* ---------- v14 2026-11-27: seamless hero->gallery seam, alternating matte section tones, short-desktop dumbbell fix (Mo) ---------- */
/* hero bottom: drop the red band, fade into the page's dark tone so the gallery blends in */
.ph-hero:after {
  background:
    radial-gradient(ellipse 60% 55% at 72% 38%, rgba(220,38,38,.16), transparent 62%),
    linear-gradient(180deg, #000 0%, #060606 55%, #070707 100%);
}
/* alternating matte sections: full-bleed backgrounds painted behind each section, crossfading at every seam */
.ph-site { overflow-x:clip; }
.ph-site:has(.ph-hero) .ph-live-card > section:not(.ph-hero):not(.ph-banner) { position:relative; z-index:0; }
.ph-site:has(.ph-hero) .ph-live-card > section:not(.ph-hero):not(.ph-banner):before {
  content:""; position:absolute; top:0; bottom:0; left:50%; transform:translateX(-50%);
  width:100vw; z-index:-1; pointer-events:none;
}
/* light matte charcoal sections */
.ph-site:has(.ph-hero) .ph-statement:before,
.ph-site:has(.ph-hero) #ph-gym:before,
.ph-site:has(.ph-hero) #ph-contact:before {
  background:linear-gradient(180deg, #070707 0, #1f1f1f 160px, #1f1f1f calc(100% - 160px), #070707 100%);
}
/* dark matte black sections */
.ph-site:has(.ph-hero) .ph-features:before,
.ph-site:has(.ph-hero) #ph-packages:before {
  background:linear-gradient(180deg, #1f1f1f 0, #070707 160px, #070707 calc(100% - 160px), #1f1f1f 100%);
}
/* short desktop screens (e.g. 1366x768 and Windows 125% scaling): keep the dumbbell clear of the headline */
@media (min-width:768px) and (max-height:800px) {
  .db-scene { top:17%; right:17%; }
  .db-float { --s:1.15; }
}

/* ---------- v15 2026-11-27: continuous crossfade at every seam (Mo: مفيش تدرج في الوان السكاشن) ---------- */
/* each section's bottom color equals the next section's top color, so no line can appear */
.ph-site:has(.ph-hero) .ph-statement:before {
  background:linear-gradient(180deg, #070707 0, #1f1f1f 180px, #1f1f1f calc(100% - 180px), #070707 100%);
}
.ph-site:has(.ph-hero) .ph-features:before {
  background:linear-gradient(180deg, #070707 0, #070707 calc(100% - 180px), #1f1f1f 100%);
}
.ph-site:has(.ph-hero) #ph-gym:before {
  background:linear-gradient(180deg, #1f1f1f 0, #1f1f1f calc(100% - 180px), #070707 100%);
}
.ph-site:has(.ph-hero) #ph-packages:before {
  background:linear-gradient(180deg, #070707 0, #070707 calc(100% - 180px), #1f1f1f 100%);
}
.ph-site:has(.ph-hero) #ph-contact:before {
  background:linear-gradient(180deg, #1f1f1f 0, #1f1f1f calc(100% - 180px), #000 100%);
}

/* ---------- v16 2026-11-27: drop fallback background from base ::before (it out-specified the class-based seam gradients, leaving statement flat black and a hard features->gym step) ---------- */

/* ---------- v17 2026-11-27: gallery collage - side images float above the middle one like 3D pages, with shadows and a slow up/down drift (Mo) ---------- */
@keyframes ph-side-float {
  0%,100% { translate:0 0; }
  50%     { translate:0 -14px; }
}
/* middle card sits at the back */
.ph-collage img.ph-t2 { z-index:1; box-shadow:0 18px 38px rgba(0,0,0,.42); }
.ph-collage img.ph-t2:hover { z-index:4; }
/* side cards: layered above the middle card, shadowed, drifting slowly up and down (animation-name overridden for the .ph-in case below) */
.ph-collage img.ph-t1, html.ph-anim .ph-collage img.ph-t1 {
  position:relative; z-index:3;
  box-shadow:0 30px 56px rgba(0,0,0,.62), 0 10px 22px rgba(0,0,0,.48);
  animation:ph-rise-3d .85s cubic-bezier(.16,.8,.26,1) 0s both, ph-side-float 7s ease-in-out 1s infinite;
}
.ph-collage img.ph-t3, html.ph-anim .ph-collage img.ph-t3 {
  position:relative; z-index:3;
  box-shadow:0 30px 56px rgba(0,0,0,.62), 0 10px 22px rgba(0,0,0,.48);
  animation:ph-rise-3d .85s cubic-bezier(.16,.8,.26,1) .14s both, ph-side-float 7s ease-in-out 4.5s infinite;
}
@media (min-width:768px) {
  /* sides overlap the middle card like pages leaning over it, lifted off its baseline, tilted inward for depth */
  /* v17b: staggered heights (Mo) - right card low, left card higher */
  .ph-collage img.ph-t1 { justify-self:end; margin-inline-end:-52px; margin-bottom:-38px; rotate:y 4deg; }
  .ph-collage img.ph-t3 { justify-self:start; margin-inline-start:-52px; margin-bottom:62px; rotate:y -4deg; }
}
@media (max-width:767px) {
  /* v23 (Mo, 2026-11-27): mobile mirrors the desktop layered collage - treadmills card in the middle on top,
     side cards tilted and floating like the computer version, scaled down and mirrored evenly so nothing reads crooked */
  .ph-statement .ph-collage { grid-template-columns:.9fr 2fr .9fr; align-items:end; gap:0; margin-inline:-10px; }
  /* v24 (Mo): one photo sits in front of the middle one and is lifted up, mobile only */
  .ph-collage img.ph-t1, html.ph-anim .ph-collage img.ph-t1 { order:1; height:240px; margin-top:0; justify-self:end; width:150px; margin-inline-end:-71px; margin-bottom:70px; rotate:y 4deg; z-index:6; }
  .ph-collage img.ph-t2 { order:2; height:285px; width:175px; justify-self:center; }
  .ph-collage img.ph-t3 { order:3; grid-column:auto; height:240px; justify-self:start; width:150px; margin-inline-start:-59px; margin-bottom:-35px; rotate:y -4deg; }
}
@media (prefers-reduced-motion:reduce) {
  .ph-collage img.ph-t1, html.ph-anim .ph-collage img.ph-t1,
  .ph-collage img.ph-t3, html.ph-anim .ph-collage img.ph-t3 { animation:none; }
}

/* ---------- v18 2026-11-27: the middle photo sits on top of the two side photos and stays put on hover; the treadmills photo moves into the middle slot (Mo) ---------- */
/* middle card in front of both sides, lifted with a deeper shadow so the stack reads as one card on top of the others */
.ph-collage img.ph-t2, html.ph-anim .ph-collage img.ph-t2 {
  z-index:5;
  box-shadow:0 38px 66px rgba(0,0,0,.68), 0 14px 28px rgba(0,0,0,.52), inset 0 2px 0 rgba(255,255,255,.05);
}
/* hovering the middle card changes nothing: it keeps its layer, no zoom, no brightness jump */
.ph-collage img.ph-t2:hover { z-index:5; scale:1; filter:none; }

/* ---------- v19 2026-11-27: the hero scrolls smoothly on a weak machine (Mo: لاج عند الهيدر) - no visual change ---------- */
/* the 3D scene lives in a plain wrapper so the scroll drift moves the wrapper, not the 3D projection */
.db-wrap { position:absolute; inset:0; pointer-events:none; }
/* the far half of every cylinder is hidden behind the near half anyway: don't paint it */
.db-face { -webkit-backface-visibility:hidden; backface-visibility:hidden; }
/* the spinning assembly keeps its own layer */
.db-asm { will-change:transform; }
/* same soft red pool under the dumbbell, without a per-frame blur pass */
.db-glow { filter:none; }
/* the headline sheen has nothing to move on the hero pill (its background is none), so it only costs repaints there */
.ph-hero h1.ph-pill span.ph-pill-in { animation:none; }

/* ---------- v21: banner auto slider (Mo's gym photos, slides right-to-left every 5s) ---------- */
.ph-banner .ph-slides { position:absolute; inset:0; z-index:-2; border-radius:inherit; overflow:hidden; }
.ph-banner .ph-slide {
  position:absolute; inset:0;
  background-size:cover; background-position:center 38%;
  transform:translateX(-100%);          /* parked off-screen on the left */
  transition:transform .9s cubic-bezier(.22,.61,.36,1);
}
.ph-banner .ph-slide.on { transform:translateX(0); will-change:transform; }
.ph-banner .ph-slide.out { transform:translateX(100%); will-change:transform; }  /* leaving to the right */
.ph-banner > img { transition:opacity .6s ease; }
.ph-banner.ph-slides-on > img { opacity:0; }
/* slightly deeper shade so the headline and Open Private button stay readable over every photo */
.ph-banner.ph-slides-on:after { background:linear-gradient(90deg,#00000073,#000000e0); }

/* v20 fallback: the package/plan form still shows when the browser cannot use the top layer */
dialog.ph-modal.ph-modal-fb{position:fixed;inset:0;margin:auto;z-index:2147483000;width:min(1180px,calc(100vw - 40px));height:auto;max-height:88vh;overflow:auto;background:#101010;color:#fff;border:1px solid #555;border-radius:16px;box-shadow:0 0 0 100vmax rgba(0,0,0,.75),0 30px 80px rgba(0,0,0,.5);animation:none!important}

/* ---------- v22 2026-11-27: mobile hero heading - each Arabic phrase on one line (Mo: خلي مش مجرد تمرين جنب بعض الكلمات واللي تحت جنب بعض) ---------- */
/* Arabic only: hide the forced breaks, stack the two phrases, size to the screen so both stay whole */
@media (max-width:767px) {
  html[dir="rtl"] .ph-hero h1 .ph-pill-in br { display:none; }
  html[dir="rtl"] .ph-hero h1 .ph-pill-in em { display:block; font-style:normal; }
  html[dir="rtl"] .ph-hero h1 .ph-pill-in { white-space:nowrap; }
  html[dir="rtl"] .ph-hero h1 { font-size:clamp(24px, 7.8vw, 34px); }
}

/* ---------- v25 2026-11-27: Arabic font of the whole site = 29LT Azahar Display (Mo). Arabic ranges only, so English (Bodoni) is untouched; old Arabic fonts stay as fallback ---------- */
@font-face{font-family:"PH Azahar";src:url(Azahar-Arabic.woff) format("woff");font-weight:400;font-style:normal;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
.ph-site{--file-font-text:"PH English","PH Azahar","PH Taweel","PH Kufi","Noto Sans Arabic",sans-serif;--file-font-display:"PH English","PH Azahar","PH Taweel","PH Kufi","Noto Sans Arabic",sans-serif;--ds-font-text:"PH English","PH Azahar","PH Taweel","PH Kufi";--ds-font-display:"PH English","PH Azahar","PH Taweel","PH Kufi"}
.ph-site,.ph-site .file-card,.ph-site .file-card *:not(svg *),.ph-site button,.ph-site input,.ph-site textarea,.ph-site select,dialog.ph-modal,dialog.ph-modal *{font-family:"PH English","PH Azahar","PH Taweel","PH Kufi","Noto Sans Arabic",sans-serif}

/* ---------- v26 2026-11-27: English font = Alata (SIL OFL 1.1, free for web use) (Mo). Latin letters only; Arabic stays Azahar ---------- */
@font-face{font-family:"PH Alata";src:url(Alata-Regular.woff) format("woff");font-weight:100 900;font-style:normal;font-display:swap;unicode-range:U+0041-005A,U+0061-007A,U+00C0-024F}
.ph-site{--file-font-text:"PH Alata","PH English","PH Azahar","PH Taweel","PH Kufi","Noto Sans Arabic",sans-serif;--file-font-display:"PH Alata","PH English","PH Azahar","PH Taweel","PH Kufi","Noto Sans Arabic",sans-serif;--ds-font-text:"PH Alata","PH English","PH Azahar","PH Taweel","PH Kufi";--ds-font-display:"PH Alata","PH English","PH Azahar","PH Taweel","PH Kufi"}
.ph-site,.ph-site .file-card,.ph-site .file-card *:not(svg *),.ph-site button,.ph-site input,.ph-site textarea,.ph-site select,dialog.ph-modal,dialog.ph-modal *{font-family:"PH Alata","PH English","PH Azahar","PH Taweel","PH Kufi","Noto Sans Arabic",sans-serif}

/* ---------- v27 2026-11-27: Arabic text bold (Mo). Azahar has one weight, so the browser's bold is synthesized for it only; Alata (declared 100-900) is never synthesized, so English stays as is ---------- */
html[dir="rtl"] .ph-site{font-synthesis:weight}
html[dir="rtl"] .ph-site .file-card *:not(svg *), html[dir="rtl"] dialog.ph-modal, html[dir="rtl"] dialog.ph-modal *{font-weight:700}

/* ---------- v28 2026-11-27: private packages show the flyer discount (50% off, old price struck through) (Mo) ---------- */
.ph-package .ph-off{display:inline-block;margin-inline-start:8px;padding:4px 14px;border-radius:999px;background:#dc2626;color:#fff;font-size:12px;font-weight:700;line-height:1.5;vertical-align:middle}
.ph-selected .ph-off{background:#000;color:#fff}
.ph-package .ph-old{display:block;margin:4px 0 0;font-size:18px;font-weight:500;line-height:1.3;color:var(--ds-ink-3,#8a8a8a);text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:#dc2626}
.ph-package .ph-old small{font-size:14px}
.ph-selected .ph-old{color:#ffe0e0;text-decoration-color:#000}

/* ---------- v29 2026-11-27: mobile hero - dumbbell sits closer to the tagline (Mo: the gap was a bit big) ---------- */
@media (max-width:767px) { .db-scene { top:18%; } }

/* ---------- v30 2026-11-27: the hero 3D object is the gym logo now, spinning like a coin/medallion (Mo) ---------- */
/* solid coin body (20 opaque discs through the thickness) + the logo on both faces, so it reads right
   for the whole turn and stays solid edge-on. Vector art, so the logo stays sharp at every size. */
.tf-coin { position:absolute; left:calc(var(--tf-d) / -2); top:calc(var(--tf-d) / -2); width:var(--tf-d); height:var(--tf-d); transform-style:preserve-3d; -webkit-transform-style:preserve-3d; }
.tf-coin-side { position:absolute; inset:0; border-radius:50%; background:#0a0a0a; box-shadow:inset 0 0 0 2px #7f1d1d; }
.tf-coin-rim { position:absolute; left:50%; top:50%; background:linear-gradient(180deg,#b91c1c 0%,#8f1616 34%,#4a0d0d 76%,#1c0505 100%); }
.tf-coin-face {
  position:absolute; inset:0; border-radius:50%; overflow:hidden;
  background:radial-gradient(circle at 32% 24%,#1d1d1d 0%,#0b0b0b 54%,#000 100%);
  box-shadow:inset 0 0 0 2.5px #b91c1c, inset 0 18px 36px rgba(0,0,0,.85), inset 0 -14px 28px rgba(0,0,0,.75), 0 0 26px rgba(220,38,38,.22);
  -webkit-backface-visibility:hidden; backface-visibility:hidden;
}
.tf-coin-face:before { content:""; position:absolute; inset:13%; background:url(tf-logo-mark.svg) center/contain no-repeat; }
.tf-coin-face:after { content:""; position:absolute; inset:0; border-radius:50%; background:radial-gradient(ellipse 58% 44% at 30% 20%,rgba(255,255,255,.15),transparent 64%); }
/* the red pool under it, sized for a round object */
.tf-coin-glow { left:-115px; top:100px; width:230px; height:54px; }
.tf-coin-float { --s:.72; }
/* English (LTR) on a phone: the tagline wraps to two lines and starts higher, so the coin sits up in the corner, a touch smaller, clear of the text */
@media (max-width:767px) { html[dir="ltr"] .tf-coin-scene { top:10%; right:23%; } html[dir="ltr"] .tf-coin-float { --s:.5; } }
@media (min-width:768px) { .tf-coin-float { --s:1; } .tf-coin-scene { top:28%; right:14%; } }
@media (min-width:1100px) { .tf-coin-float { --s:1.12; } .tf-coin-scene { top:26%; right:15%; } }
/* short desktop screens (e.g. 1366x768 and Windows 125% scaling): keep the coin clear of the header and the headline */
@media (min-width:768px) and (max-height:800px) { .tf-coin-float { --s:.9; } .tf-coin-scene { top:28%; right:13%; } }

/* ---------- v31 2026-11-27: only the man is the 3D object, no coin or circle behind him (Mo) ---------- */
/* the mark is a single vector path, used as a mask: every layer is one slice of the extruded body */
.tf-fig { position:absolute; left:calc(var(--tf-w) / -2); top:calc(var(--tf-h) / -2); width:var(--tf-w); height:var(--tf-h); transform-style:preserve-3d; -webkit-transform-style:preserve-3d; }
.tf-fig-body { position:absolute; inset:0; transform-style:preserve-3d; -webkit-transform-style:preserve-3d; animation:tf-flip 16s linear infinite; }
.tf-fig-layer, .tf-fig-face { position:absolute; inset:0; -webkit-mask:url(tf-logo-mark.svg) center/contain no-repeat; mask:url(tf-logo-mark.svg) center/contain no-repeat; }
.tf-fig-layer { background:linear-gradient(180deg,#c02626 0%,#931c1c 38%,#5a1010 76%,#320808 100%);
  /* the red slices are flat cards seen from either side: culling them would make the slab vanish on
     the half of the turn where the body is flipped, so the thickness has to stay visible both ways */
  -webkit-backface-visibility:visible; backface-visibility:visible; }
.tf-fig-face { background:linear-gradient(158deg,#fff 0%,#fff 52%,#ffe2e2 100%); }
.tf-fig-back { background:linear-gradient(158deg,#ffe6e6 0%,#fff 58%,#fff 100%); }
/* one face per side, never two silhouettes at once: the front face and the slab are culled from
   behind, the back face from the front, so each side shows exactly one identical figure */
.tf-fig-front, .tf-fig-back { -webkit-backface-visibility:hidden; backface-visibility:hidden; }
.tf-fig-glow { left:-120px; top:112px; width:240px; height:56px; }
.tf-fig-float { --s:.72; }
@media (max-width:767px) { html[dir="ltr"] .tf-fig-scene { top:11%; right:24%; } html[dir="ltr"] .tf-fig-float { --s:.5; } html[dir="rtl"] .tf-fig-scene { top:11%; left:24%; } html[dir="rtl"] .tf-fig-float { --s:.5; } }
@media (max-width:380px) { .tf-fig-float { --s:.42; } }
@media (min-width:768px) { .tf-fig-float { --s:1; } .tf-fig-scene { top:26%; right:13%; } }
@media (min-width:1100px) { .tf-fig-float { --s:1.1; } .tf-fig-scene { top:24%; right:14%; } }
@media (min-width:768px) and (max-height:800px) { .tf-fig-float { --s:.88; } .tf-fig-scene { top:26%; right:12%; } }

/* ---------- v32 2026-11-27: on phones the 3D logo sits in the middle of the hero, Arabic and English (Mo) ---------- */
/* the scene is a zero-size anchor, so left:50% puts the spin axis at the middle of the hero; the extra
   -8.5px compensates the mark sitting 7% right of centre inside its own square box (17px of a 240px box,
   halved by the phone scale), so the drawn figure - not just its box - lands dead centre */
@media (max-width:767px) { html[dir="ltr"] .tf-fig-scene, html[dir="rtl"] .tf-fig-scene { left:50%; right:auto; margin-left:-8.5px; } }
@media (max-width:380px) { html[dir="ltr"] .tf-fig-scene, html[dir="rtl"] .tf-fig-scene { margin-left:-7.1px; } }

/* the turn: a full 360 on Y, but eased so the figure lingers on each face and sweeps quickly through
   edge-on - a flat silhouette has no side wall, so passing the edge slowly is what looks broken */
@keyframes tf-turn {
  0%   { transform: rotateZ(-14deg) rotateX(16deg) rotateY(0deg); }
  50%  { transform: rotateZ(-14deg) rotateX(16deg) rotateY(-180deg); }
  100% { transform: rotateZ(-14deg) rotateX(16deg) rotateY(-360deg); }
}
/* the body flips about its own Y axis exactly when the turn passes edge-on (90deg = 25% of the
   eased turn, 270deg = 75%), where nothing of the slab's face is visible, so the swap is unseen.
   Result: each side shows the same figure, and the red between them is only thickness. */
@keyframes tf-flip {
  0%, 24.9%  { transform: scaleX(1); }
  25%, 74.9% { transform: scaleX(-1); }
  75%, 100%  { transform: scaleX(1); }
}
.tf-fig-asm { animation: tf-turn 16s ease-in-out infinite; }
