/*
 * Brando Arabic
 * عند تغيير أسماء ملفات الخط، عدّل قيمة src فقط في التعريفات التالية.
 */
@font-face {
  font-family: "Brando Arabic";
  src: url("assets/fonts/brando-arabic-regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Brando Arabic";
  src: url("assets/fonts/brando-arabic-semibold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Brando Arabic";
  src: url("assets/fonts/brando-arabic-bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --color-accent: #54ea62;
  --color-accent-hover: #6ff17a;
  --color-background: #050505;
  --color-surface: #101010;
  --color-surface-raised: #141414;
  --color-text: #ffffff;
  --color-text-muted: #a7a7a7;
  --color-text-soft: #777777;
  --color-border: rgba(255, 255, 255, 0.09);
  --color-border-hover: rgba(84, 234, 98, 0.3);
  --color-completed: #76ef80;
  --color-completed-bg: rgba(84, 234, 98, 0.1);
  --color-progress: #e1bd70;
  --color-progress-bg: rgba(202, 148, 54, 0.11);
  --color-review: #91b7dc;
  --color-review-bg: rgba(94, 143, 191, 0.12);
  --color-planned: #b6b6b6;
  --color-planned-bg: rgba(255, 255, 255, 0.07);
  --radius-large: 20px;
  --radius-medium: 14px;
  --container-width: 1180px;
  --font-family: "Brando Arabic", Arial, sans-serif;
  --motion-easing: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-duration: 560ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 3%, rgba(84, 234, 98, 0.075), transparent 27rem),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--color-background);
  background-size: auto, 72px 72px, 72px 72px, auto;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(calc(100% - 48px), var(--container-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  inset-block-start: 16px;
  inset-inline-start: 16px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--color-accent);
  color: #050505;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  padding-block: 68px 86px;
  border-bottom: 1px solid var(--color-border);
}

.site-header::after {
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  width: min(190px, 30vw);
  height: 1px;
  margin-inline: auto;
  background: linear-gradient(90deg, transparent, rgba(84, 234, 98, 0.7), transparent);
  content: "";
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand {
  display: inline-flex;
  margin-bottom: 54px;
  border-radius: 8px;
  text-decoration: none;
}

.brand img {
  width: clamp(128px, 13vw, 166px);
  height: auto;
}

/* Page load: the logo leads, followed closely by the title and description. */
.motion-enabled .load-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 520ms var(--motion-easing),
    transform 520ms var(--motion-easing);
}

.motion-enabled .load-title {
  transition-delay: 90ms;
}

.motion-enabled .load-description {
  transition-delay: 160ms;
}

.motion-enabled.page-loaded .load-reveal {
  opacity: 1;
  transform: translateY(0);
}

.intro-content {
  max-width: 780px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.intro-description {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.9;
}

.videos-section {
  padding-block: 88px 104px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2,
.website-content h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.videos-count {
  flex: 0 0 auto;
  margin: 0 0 4px;
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.motion-enabled .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--reveal-duration) var(--motion-easing) var(--reveal-delay, 0ms),
    transform var(--reveal-duration) var(--motion-easing) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.motion-enabled .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

.video-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  transition:
    border-color 240ms ease,
    box-shadow 240ms ease,
    transform 240ms var(--motion-easing);
}

.motion-enabled .video-card.reveal {
  transition:
    opacity var(--reveal-duration) var(--motion-easing) var(--reveal-delay, 0ms),
    transform var(--reveal-duration) var(--motion-easing) var(--reveal-delay, 0ms),
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.motion-enabled .video-card.reveal.is-visible.reveal-complete {
  transition:
    border-color 240ms ease,
    box-shadow 240ms ease,
    transform 240ms var(--motion-easing);
}

.video-thumbnail {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(circle at 25% 20%, rgba(84, 234, 98, 0.15), transparent 37%),
    linear-gradient(145deg, #171717, #090909);
}

.preview-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms var(--motion-easing);
}

.video-preview {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.preview-ready .video-preview {
  opacity: 1;
}

.thumbnail-fallback {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 34%, rgba(84, 234, 98, 0.13), transparent 34%),
    linear-gradient(145deg, #151515, #080808);
  text-align: center;
}

.has-fallback .thumbnail-fallback,
.is-video-preview:not(.preview-ready) .thumbnail-fallback {
  display: grid;
}

.preview-ready .thumbnail-fallback {
  display: none;
}

.thumbnail-fallback::before,
.thumbnail-fallback::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  content: "";
}

.thumbnail-fallback::before {
  width: 62%;
  aspect-ratio: 1;
}

.thumbnail-fallback::after {
  width: 86%;
  aspect-ratio: 1;
}

.thumbnail-fallback img {
  position: relative;
  z-index: 1;
  width: 92px;
  height: auto;
  align-self: end;
  opacity: 0.42;
}

.thumbnail-fallback-title {
  position: relative;
  z-index: 1;
  max-width: min(78%, 320px);
  align-self: start;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.6;
}

.thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.28));
  transition: background-color 240ms ease;
}

.thumbnail-play {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: #050505;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  transition:
    background-color 240ms ease,
    transform 240ms var(--motion-easing);
}

.motion-enabled .video-card.is-visible .thumbnail-play {
  animation: play-entry-pulse 420ms var(--motion-easing)
    calc(var(--reveal-delay, 0ms) + 180ms);
}

@keyframes play-entry-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  55% {
    transform: translate(-50%, -50%) scale(1.045);
  }
}

.thumbnail-play svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  transform: translateX(1px);
}

.video-card-body {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  padding: 24px;
}

.card-topline {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.motion-enabled .video-card.reveal .status-badge {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 300ms ease calc(var(--reveal-delay, 0ms) + 140ms),
    transform 300ms var(--motion-easing) calc(var(--reveal-delay, 0ms) + 140ms);
}

.motion-enabled .video-card.reveal.is-visible .status-badge {
  opacity: 1;
  transform: translateY(0);
}

.status-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-completed {
  border-color: rgba(84, 234, 98, 0.2);
  background: var(--color-completed-bg);
  color: var(--color-completed);
}

.status-in-progress {
  border-color: rgba(225, 189, 112, 0.2);
  background: var(--color-progress-bg);
  color: var(--color-progress);
}

.status-review {
  border-color: rgba(145, 183, 220, 0.2);
  background: var(--color-review-bg);
  color: var(--color-review);
}

.status-planned {
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--color-planned-bg);
  color: var(--color-planned);
}

.video-card h3 {
  margin: 0 0 9px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.5;
}

.video-description {
  margin: 0 0 26px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 17px;
  border-radius: 11px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:focus-visible,
.video-thumbnail:focus-visible,
.website-url:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(84, 234, 98, 0.55);
  outline-offset: 4px;
}

.button-secondary {
  align-self: flex-start;
  margin-top: auto;
  border: 1px solid rgba(84, 234, 98, 0.34);
  background: rgba(84, 234, 98, 0.08);
  color: var(--color-accent);
}

.button-primary {
  background: var(--color-accent);
  color: #050505;
}

.button-play {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
}

.button-play svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.button-arrow {
  font-size: 1rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.website-section {
  padding-block: 0 96px;
}

.website-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background:
    linear-gradient(135deg, rgba(84, 234, 98, 0.035), transparent 48%),
    var(--color-surface);
  transition:
    border-color 240ms ease,
    background-color 240ms ease;
}

.motion-enabled .website-card.reveal {
  transition:
    opacity var(--reveal-duration) var(--motion-easing) var(--reveal-delay, 0ms),
    transform var(--reveal-duration) var(--motion-easing) var(--reveal-delay, 0ms),
    border-color 240ms ease,
    background-color 240ms ease;
}

.motion-enabled .website-card.reveal.is-visible.reveal-complete {
  transition:
    border-color 240ms ease,
    background-color 240ms ease,
    transform 240ms var(--motion-easing);
}

.website-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(84, 234, 98, 0.22);
  border-radius: var(--radius-medium);
  background: rgba(84, 234, 98, 0.09);
  color: var(--color-accent);
}

.website-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.website-content p:not(.section-kicker) {
  margin: 8px 0 5px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.website-url {
  display: inline-block;
  max-width: 100%;
  border-radius: 4px;
  color: var(--color-accent);
  direction: ltr;
  font-size: 0.84rem;
  text-decoration-color: rgba(84, 234, 98, 0.38);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.website-button {
  min-width: 156px;
}

.site-footer {
  border-top: 1px solid var(--color-border);
}

.site-footer .container {
  display: flex;
  min-height: 92px;
  align-items: center;
}

.site-footer p {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 0.85rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 52px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-large);
  color: var(--color-text-muted);
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .motion-enabled .video-card.reveal.is-visible:hover,
  .video-card:not(.reveal):hover {
    border-color: var(--color-border-hover);
    box-shadow: 0 12px 32px rgba(84, 234, 98, 0.045);
    transform: translateY(-4px);
  }

  .video-thumbnail:hover .preview-media {
    transform: scale(1.015);
  }

  .video-thumbnail:hover .thumbnail-overlay {
    background-color: rgba(0, 0, 0, 0.14);
  }

  .video-thumbnail:hover .thumbnail-play {
    background: var(--color-accent-hover);
    transform: translate(-50%, -50%) scale(1.06);
  }

  .button-secondary:hover {
    border-color: var(--color-accent);
    background: rgba(84, 234, 98, 0.14);
  }

  .button-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
  }

  .button:hover .button-arrow {
    transform: translateX(-4px);
  }

  .website-card:hover {
    border-color: rgba(84, 234, 98, 0.2);
  }
}

@media (min-width: 1380px) {
  :root {
    --container-width: 1320px;
  }

  .videos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --reveal-duration: 460ms;
  }

  .container {
    width: min(calc(100% - 32px), var(--container-width));
  }

  .site-header {
    padding-block: 42px 60px;
  }

  .brand {
    margin-bottom: 42px;
  }

  .brand img {
    width: 124px;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.7rem);
  }

  .intro-description {
    margin-top: 17px;
  }

  .videos-section {
    padding-block: 64px 74px;
  }

  .section-heading {
    align-items: start;
    margin-bottom: 22px;
  }

  .videos-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .motion-enabled .reveal {
    transform: translateY(14px);
  }

  .video-card-body {
    min-height: 250px;
    padding: 22px;
  }

  .website-section {
    padding-bottom: 68px;
  }

  .website-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    padding: 25px;
  }

  .website-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 440px) {
  .section-heading {
    display: block;
  }

  .videos-count {
    margin-top: 8px;
  }

  .thumbnail-play {
    width: 48px;
    height: 48px;
  }

  .website-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .website-icon {
    width: 52px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .load-reveal,
  .reveal,
  .reveal.is-visible,
  .video-card.reveal .status-badge {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
  }

  .video-card:hover,
  .button-primary:hover,
  .button:hover .button-arrow,
  .video-thumbnail:hover .preview-media {
    transform: none !important;
  }

  .video-thumbnail:hover .thumbnail-play {
    transform: translate(-50%, -50%) !important;
  }
}
