/* Shared styles from the original site (generated, do not edit by hand). */
html { scroll-behavior: smooth; }
  body { font-family: 'Open Sans', Arial, Helvetica, sans-serif; }
  html[lang="ar"] body, html[lang="ar"] .font-sans { font-family: 'Cairo', Arial, sans-serif; }
  html[lang="ar"] .font-display { font-family: 'Cairo', 'Sora', sans-serif; }

  /* scroll-reveal */
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
  .reveal.in { opacity: 1; transform: none; }
  .rd1 { transition-delay: .08s } .rd2 { transition-delay: .16s } .rd3 { transition-delay: .24s }

  /* image-entry fade: a short transition prevents lazy-loaded assets from popping in */
  .image-fade { opacity: 0 !important; }
  .image-fade.image-ready { opacity: var(--image-fade-target, 1) !important; transition: opacity .18s ease-out; }
  @media (prefers-reduced-motion: reduce) {
    .image-fade { transition: none; }
  }

  /* signature ribbon shape, traced from the logo's banner:
     a hexagon: 45deg bevels on the top-left and bottom-right corners running through
     55.5% of the height, with straight vertical end caps on the remaining 44.5%.
     --b is the bevel run in px and must equal 0.555 * element height. */
  .chip { --b: 12px; clip-path: polygon(var(--b) 0, 100% 0, 100% 44.5%, calc(100% - var(--b)) 100%, 0 100%, 0 55.5%); }
  .btnp { --b: 17px; clip-path: polygon(var(--b) 0, 100% 0, 100% 44.5%, calc(100% - var(--b)) 100%, 0 100%, 0 55.5%); }
  .btnp-lg { --b: 20px; }

  /* skewed nav underline (45deg, matching the ribbon bevel) */
  .nl { position: relative; }
  .nl::after { content: ''; position: absolute; left: 0; bottom: -6px; height: 3px; width: 100%;
    background: #ce1f3c; transform: scaleX(0) skewX(45deg); transform-origin: left; transition: transform .25s ease; }
  .nl:hover::after, .nl.active::after { transform: scaleX(1) skewX(45deg); }

  /* header elevation on scroll */
  #siteHeader { transition: box-shadow .3s ease; }
  #siteHeader.scrolled { box-shadow: 0 6px 24px rgba(11,34,57,.12); }

  /* floating decorations */
  @keyframes floaty { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
  .floaty { animation: floaty 9s ease-in-out infinite; }
  @keyframes drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(10px,-12px); } }
  .drift { animation: drift 12s ease-in-out infinite; }

  /* card hover */
  .card { transition: transform .3s ease, box-shadow .3s ease; border-top: 3px solid transparent; }
  .card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(11,34,57,.14); border-top-color: #ce1f3c; }
  .thumb-img { transition: transform .5s cubic-bezier(.16,1,.3,1); }
  .card:hover .thumb-img { transform: scale(1.06); }
  .activity-article { color: rgba(11,34,57,.7); }
  .activity-article > p { max-width: 68ch; font-size: 1.02rem; line-height: 1.85; margin: 0 0 1.25rem; }
  .activity-article > p:first-of-type { color: rgba(11,34,57,.82); font-size: 1.12rem; line-height: 1.75; }
  .activity-article .article-section { border-left: 3px solid rgba(206,31,60,.18); padding: .15rem 0 .15rem 1.15rem; margin: 2rem 0; }
  .activity-article .article-section h3 { color: #0b2239; font-family: 'Sora',sans-serif; font-size: 1rem; line-height: 1.4; font-weight: 800; margin: 0 0 .65rem; }
  .activity-article .article-section p { margin: 0; line-height: 1.8; }
  .activity-article .article-section:last-child { border-left-color: #f2932f; background: rgba(242,147,47,.07); padding: 1.1rem 1.2rem; }
  .activity-gallery-item { border: 1px solid rgba(11,34,57,.1); box-shadow: 0 12px 28px rgba(11,34,57,.12); }

  /* faint engineering-schematic dot grid, used behind the home hero */
  .dotgrid { background-image: radial-gradient(circle, rgba(255,255,255,.16) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 40%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 40%, transparent 90%); }
  .home-hero-layout { display: grid; grid-template-areas: "heading" "gallery" "copy"; gap: 28px; align-items: center; container-type: inline-size; }
  .home-hero-heading { grid-area: heading; }
  .home-hero-copy { grid-area: copy; }
  .hero-collage { grid-area: gallery; width: 100%; display: grid;
    grid-template-columns: .92fr 1.04fr 1.04fr;
    grid-template-rows: minmax(0,.94fr) minmax(0,1fr) minmax(0,1.18fr);
    grid-template-areas: "sidea feature feature" "sideb feature feature" "lowerwide lowerwide lowerend";
    gap: 12px; aspect-ratio: 1.65 / 1; min-height: 0; }
  .hero-shot { position: relative; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.25);
    background: #0b2239; box-shadow: 0 18px 42px rgba(3,18,34,.34);
    clip-path: polygon(14px 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%,0 14px);
    transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease; }
  .hero-shot::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
  .hero-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.16,1,.3,1); }
  .activity-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .activity-gallery-item { height: auto; align-self: start; border-color: rgba(11,34,57,.14); box-shadow: 0 18px 42px rgba(3,18,34,.18); }
  .activity-gallery-item img { width: 100%; height: auto; object-fit: contain; background: transparent; }
  .activity-gallery-bento { grid-template-areas: "one two three" "four two five"; align-items: start; }
  .activity-gallery-bento .activity-gallery-item { width: 100%; height: auto; }
  .activity-gallery-bento .activity-gallery-item:nth-child(1) { grid-area: one; }
  .activity-gallery-bento .activity-gallery-item:nth-child(2) { grid-area: two; }
  .activity-gallery-bento .activity-gallery-item:nth-child(3) { grid-area: three; }
  .activity-gallery-bento .activity-gallery-item:nth-child(4) { grid-area: four; }
  .activity-gallery-bento .activity-gallery-item:nth-child(n+5) { grid-area: auto; }
  .activity-gallery-bento .activity-gallery-item img { height: auto; object-fit: contain; }
  .activity-gallery-item:hover img { transform: scale(1.015); }
  /* project walkthrough: preserve full UI screenshots at their native proportions */
  .project-walkthrough { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .project-shot { position: relative; background: #f4f1ee; border: 1px solid rgba(20,48,79,.12);
    box-shadow: 0 12px 26px rgba(20,48,79,.1); overflow: hidden; transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease; }
  .project-shot:nth-child(1) { grid-column: span 2; }
  .project-shot img { display: block; width: 100%; height: auto; object-fit: contain; }
  .project-shot:hover { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(20,48,79,.16); }
  .project-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .project-video { background: #071a2b; border: 1px solid rgba(20,48,79,.18); box-shadow: 0 16px 38px rgba(20,48,79,.15); overflow: hidden; }
  .project-video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #071a2b; object-fit: contain; }
  .project-gallery-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .project-gallery-images .project-shot:first-child { grid-column: span 2; grid-row: span 2; display: flex; align-items: center; }
  @media (max-width: 767px) {
    .project-walkthrough { grid-template-columns: 1fr; gap: 18px; }
    .project-shot:nth-child(n) { grid-column: auto; }
    .project-video-grid, .project-gallery-images { grid-template-columns: 1fr; }
    .project-gallery-images .project-shot:first-child { grid-column: auto; grid-row: auto; }
  }
  @media (prefers-reduced-motion: reduce) { .project-shot { transition: none; } }
  @media (max-width: 767px) {
    .activity-gallery { grid-template-columns: 1fr; gap: 24px; }
    .activity-gallery-bento { grid-template-areas: none; }
    .activity-gallery-bento .activity-gallery-item,
    .activity-gallery-bento .activity-gallery-item:nth-child(n) { grid-area: auto; height: auto; }
  }
  .hero-shot:hover { transform: translateY(-5px); box-shadow: 0 24px 52px rgba(3,18,34,.42); }
  .hero-shot:hover img { transform: scale(1.035); }
  .hero-shot-feature { grid-area: feature; }
  .hero-shot-feature img { object-fit: cover; background: #0b2239; }
  .hero-shot-feature:hover img { transform: none; }
  .hero-shot-side-a { grid-area: sidea; }
  .hero-shot-side-b { grid-area: sideb; }
  .hero-shot-lower-wide { grid-area: lowerwide; }
  .hero-shot-lower-end { grid-area: lowerend; }
  .hero-event-label { position: absolute; left: 12px; bottom: 12px; z-index: 3; max-width: calc(100% - 24px);
    padding: 9px 30px 9px 13px; color: #fff; background: #ce1f3c;
    clip-path: polygon(0 0,calc(100% - 12px) 0,100% 50%,calc(100% - 12px) 100%,0 100%);
    font-family: 'Montserrat',sans-serif; font-size: 10px; line-height: 1.2; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(10px); transition: opacity .3s ease,transform .3s cubic-bezier(.16,1,.3,1); }
  .hero-shot:hover .hero-event-label, .hero-shot:focus-visible .hero-event-label { opacity: 1; transform: translateY(0); }
  .hero-shot:focus-visible { outline: 3px solid #f2932f; outline-offset: 3px; }
  @media (min-width: 1024px) {
    .home-hero-layout { grid-template-columns: minmax(300px,.65fr) minmax(0,1.35fr);
      grid-template-rows: auto auto; grid-template-areas: "heading gallery" "copy gallery";
      column-gap: clamp(24px,2.7vw,34px); row-gap: clamp(16px,1.35vw,18px);
      padding-block: clamp(28px,2.7vw,34px) !important; }
    .home-hero-heading { align-self: end; }
    .home-hero-copy { align-self: start; }
    .home-hero-heading h1 { font-size: clamp(36px,3.95cqw,68px); line-height: 1.06; }
    .home-hero-heading .chip { font-size: clamp(8px,.7cqw,12px); padding: clamp(4px,.4cqw,7px) clamp(9px,1cqw,17px); margin-bottom: clamp(14px,1.15cqw,20px); }
    .home-hero-copy p { max-width: 38rem; font-size: clamp(12px,1.05cqw,18px); line-height: 1.65; }
    .home-hero-copy > p:last-of-type { margin-bottom: clamp(20px,1.65cqw,32px); }
    .home-hero-copy .btnp-lg { font-size: clamp(10px,.75cqw,13px); padding: clamp(11px,1.05cqw,18px) clamp(20px,2.1cqw,36px); }
    .hero-actions { gap: clamp(12px,1.25cqw,16px) !important; }
    .hero-collage { gap: clamp(8px,.7cqw,12px); }
  }
  @media (min-width: 640px) and (max-width: 1023px) {
    .hero-collage { max-width: 780px; margin-inline: auto; aspect-ratio: auto;
      grid-template-columns: repeat(4,minmax(0,1fr));
      grid-template-rows: auto 120px;
      grid-template-areas: "feature feature feature feature" "sidea sideb lowerwide lowerend"; }
    .hero-shot-feature { aspect-ratio: 1080 / 662; }
  }
  @media (max-width: 639px) {
    .hero-collage { max-width: 440px; margin-inline: auto; aspect-ratio: auto;
      grid-template-columns: repeat(2,minmax(0,1fr));
      grid-template-rows: auto 108px 108px;
      grid-template-areas: "feature feature" "sidea sideb" "lowerwide lowerend";
      gap: 10px; }
    .hero-shot { clip-path: polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px);
      box-shadow: 0 16px 34px rgba(3,18,34,.34); }
    .hero-shot-feature { aspect-ratio: 1080 / 662; }
    .hero-event-label { left: 7px; bottom: 7px; max-width: calc(100% - 14px); padding: 7px 18px 7px 8px;
      font-size: 7px; letter-spacing: .02em; }
  }
  @media (hover: none) {
    .hero-event-label { opacity: 1; transform: translateY(0); }
  }

  /* back to top */
  #toTop { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
  #toTop.show { opacity: 1; pointer-events: auto; }

  /* testimonial marquee columns: infinite vertical scroll, pause on hover */
  .tcol { animation: tscroll var(--dur, 18s) linear infinite; }
  @keyframes tscroll { to { transform: translateY(-50%); } }
  .tmask { mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 18%, black 82%, transparent); }
  .tmask:hover .tcol { animation-play-state: paused; }

  /* FAQ accordion */
  summary::-webkit-details-marker { display: none; }

  /* project poster frame: rotating border in the logo's colors */
  @property --ga { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
  .pframe { background: conic-gradient(from var(--ga), #2077a8, #ce1f3c, #f2932f, #14304f, #2077a8);
    animation: gspin 7s linear infinite; }
  @keyframes gspin { to { --ga: 360deg; } }
  .pcard { transition: transform .4s ease; }
  .pcard:hover { transform: translateY(-10px) rotate(0deg) scale(1.02); }
  .dynamic-media { position: relative; overflow: hidden; transform-style: preserve-3d; }
  .dynamic-media img { transition: transform .55s cubic-bezier(.16,1,.3,1), filter .4s ease; }
  .dynamic-media:hover img { transform: scale(1.035); filter: saturate(1.06); }
  /* Posters are already framed compositions; keep their complete edges visible during motion. */
  .poster-media { overflow: visible; }
  .poster-media:hover img { transform: none; filter: none; }
  .ambient-float { animation: ambientFloat 6s ease-in-out infinite alternate; }
  .ambient-float:nth-child(2n) { animation-delay: -2.4s; }
  @keyframes ambientFloat { from { transform: translateY(0); } to { transform: translateY(-7px); } }
  .home-project-card { position: relative; isolation: isolate; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
  .home-project-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, rgba(233,242,247,.94), rgba(255,255,255,.92)); }
  .home-project-card:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(20,48,79,.16); border-color: rgba(206,31,60,.26); }
   /* project selector and reading sequence */
   .project-choice { position: relative; isolation: isolate; overflow: hidden; transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease; }
   .project-choice::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .92; background: linear-gradient(135deg, rgba(233,242,247,.94), rgba(255,255,255,.92)); }
   .project-choice:hover { transform: translateY(-6px); box-shadow: 0 22px 46px rgba(11,34,57,.15); }
   .project-choice-poster { box-shadow: 0 16px 34px rgba(11,34,57,.18); }
   .project-planet-mark { position: absolute; right: -3.25rem; bottom: -3.75rem; z-index: 0; width: 12rem; height: 12rem; object-fit: contain; opacity: .1; pointer-events: none; transition: transform .45s cubic-bezier(.16,1,.3,1); }
   .home-project-card .project-planet-mark { right: -2.25rem; bottom: -2.75rem; width: 8.5rem; height: 8.5rem; opacity: .09; }
   .project-choice:hover .project-planet-mark, .home-project-card:hover .project-planet-mark { transform: translate(-14px,-10px); }
   .project-reading { position: relative; }
   .project-reading + .project-reading::before { content: ''; position: absolute; width: 1px; height: 64px; top: -32px; left: 50%; background: linear-gradient(#ce1f3c, transparent); }
   @media (prefers-reduced-motion: reduce) { .project-choice, .project-planet-mark { transition: none; } }

  /* horizontal partner-logo marquee: infinite scroll, pause on hover */
  .hmar { animation: hscroll var(--hdur, 32s) linear infinite; }
  @keyframes hscroll { to { transform: translateX(-50%); } }
  .hmask { mask-image: linear-gradient(to right, rgba(0,0,0,.55), black 12%, black 88%, rgba(0,0,0,.55));
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.55), black 12%, black 88%, rgba(0,0,0,.55)); }
  .hmask:hover .hmar { animation-play-state: paused; }

  /* YouTube switcher: row of featured video/playlist thumbnails under the player */
  #ytPlayerInner { transition: opacity .2s ease; }
  .ytcard { border-left: 3px solid transparent; }
  .ytcard.is-active { border-left-color: #ce1f3c; background: #e9f2f7; }
  .ytcard:focus-visible { outline: 3px solid #f2932f; outline-offset: 2px; }
  .home-section-shell {
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  /* homepage featured activities carousel */
  .activity-carousel-viewport { overflow: hidden; padding: 4px 2px 22px; }
  .activity-carousel-track { display: flex; gap: 18px; transition: transform .6s cubic-bezier(.16,1,.3,1); }
  .activity-carousel-card { flex: 0 0 calc((100% - 54px) / 4); min-width: 0; overflow: hidden;
    border: 1px solid rgba(20,48,79,.09); background: #fff; box-shadow: 0 10px 28px rgba(20,48,79,.08);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
  .activity-carousel-card:hover { transform: translateY(-5px); box-shadow: 0 18px 42px rgba(20,48,79,.16); border-color: rgba(206,31,60,.28); }
  .activity-carousel-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #14304f; }
  .activity-carousel-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
  .activity-carousel-card:hover .activity-carousel-media img { transform: scale(1.025); }
  .activity-carousel-content { min-height: 220px; display: flex; flex-direction: column; }
  .activity-carousel-arrow { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(20,48,79,.16); color: #14304f; background: #fff; transition: all .25s ease; }
  .activity-carousel-arrow:hover { color: #fff; background: #ce1f3c; border-color: #ce1f3c; }
  .activity-carousel-dots button { width: 8px; height: 8px; border-radius: 999px; background: rgba(20,48,79,.18); transition: all .25s ease; }
  .activity-carousel-dots button.is-active { width: 26px; background: #ce1f3c; border-radius: 5px; }
  @media (min-width: 640px) and (max-width: 1023px) {
    .activity-carousel-card { flex-basis: calc((100% - 18px) / 2); }
  }
  @media (max-width: 639px) {
    .activity-carousel-card { flex-basis: 100%; }
    .activity-carousel-track { gap: 14px; }
    .activity-carousel-content { min-height: 205px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .activity-carousel-track, .activity-carousel-card, .activity-carousel-media img { transition: none; }
    .ambient-float { animation: none; }
  }

  /* gradient scroll-progress bar */
  #sprog { position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 60;
    background: linear-gradient(90deg, #2077a8, #ce1f3c); }
  html[dir="rtl"] #sprog { left: auto; right: 0; background: linear-gradient(-90deg, #2077a8, #ce1f3c); }

  /* project poster 3D tilt (driven by JS on hover-capable devices) */
  .tilt { transition: transform .25s ease; will-change: transform; }

  /* smooth FAQ accordion */
  details.group > p { overflow: hidden; transition: max-height .25s ease, opacity .25s ease; }

  /* RTL fix-ups: physical utilities that should mirror in Arabic */
  html[dir="rtl"] [class*="border-l-["] { border-left-width: 0; border-right-width: 3px; }
  html[dir="rtl"] .md\:text-right { text-align: left; }
  html[dir="rtl"] .md\:ml-auto { margin-left: 0; margin-right: auto; }
  html[dir="rtl"] .uppercase, html[dir="rtl"] .tracking-wide, html[dir="rtl"] .tracking-wider,
  html[dir="rtl"] [class*="tracking-["] { letter-spacing: 0; }
