:root {
  --navy: #0F233E;
  --gold: #CF9F42;
  --white: #FFFFFF;
  --muted: #5A6577;
  --line: rgba(15, 35, 62, 0.08);
  --content: 960px;
  --gutter: 16px;
  --overlap: 56px;          /* how far the first work rises into the navy area */
  --font: "IBM Plex Sans Arabic", "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- hero: header + intro on navy ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 14px var(--gutter) calc(var(--overlap) + 36px);
}

/* The brand's laurel branches, cropped at both edges as in the guideline cover. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -40px;
  width: 210px;
  height: 340px;
  background: no-repeat center / contain;
  opacity: 0.08;
  pointer-events: none;
}
.hero::before { left: -84px; background-image: url("laurel-left.svg"); }
.hero::after { right: -84px; background-image: url("laurel-right.svg"); }

.hero__bar {
  max-width: var(--content);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero__home { display: block; border-radius: 8px; }

/* 120px is the brand guideline's minimum logo size on screens. */
.hero__logo { width: 120px; height: auto; }

.hero__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.hero__cta:hover { background: var(--gold); color: var(--navy); }

.hero__title {
  max-width: var(--content);
  margin: 20px auto 0;
  text-align: center;
  text-wrap: balance;
}

.hero__line {
  display: block;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
}

.hero__line--accent {
  margin-top: 2px;
  color: var(--gold);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- works ---------- */

.works {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: calc(-1 * var(--overlap)) auto 0;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.work {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(15, 35, 62, 0.04), 0 14px 32px -22px rgba(15, 35, 62, 0.35);
}

.work--vertical {
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
}

.work__title {
  margin: 4px 6px 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
  text-align: start;
  overflow-wrap: anywhere;
}

.work--empty {
  padding: 56px 16px;
  text-align: center;
  color: var(--muted);
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--navy);
}

.work--vertical .player { aspect-ratio: 9 / 16; }

.player__link,
.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player__link { display: block; cursor: pointer; }

.player__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player__link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 35, 62, 0.35), rgba(15, 35, 62, 0) 45%);
}

.player__play {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 64px;
  height: 64px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(15, 35, 62, 0.3);
  transition: transform 0.18s ease;
}

.player__play svg { width: 28px; height: 28px; }

.player__link:hover .player__play,
.player__link:focus-visible .player__play { transform: scale(1.07); }

.player__link:focus-visible { outline-offset: -4px; }

.not-found {
  padding: 96px 16px;
  text-align: center;
}
.not-found h1 { margin: 0 0 8px; font-size: 24px; font-weight: 700; }
.not-found a { color: var(--navy); text-decoration-color: var(--gold); text-underline-offset: 4px; }

/* ---------- footer ---------- */

.footer {
  margin-top: 64px;
  background: var(--navy);
  color: var(--white);
}

.footer__inner {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 40px var(--gutter) 32px;
  display: grid;
  gap: 28px;
}

.footer__logo { width: 120px; height: auto; }

.footer__heading {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gold);
}

.footer__contacts,
.footer__social {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__contacts { display: grid; gap: 12px; }

.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* One icon style for every contact item. */
.badge {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(207, 159, 66, 0.5);
  border-radius: 50%;
  color: var(--gold);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.badge__icon { width: 19px; height: 19px; }

.badge--link:hover,
.contact:hover .badge {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.contact__text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.contact__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.68);
}

.contact__value {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  unicode-bidi: isolate;
}

.footer__bottom {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 0 var(--gutter);
}

.footer__copy {
  margin: 0;
  padding: 16px 0 20px;
  border-top: 1px solid rgba(207, 159, 66, 0.5);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- larger screens ---------- */

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --overlap: 104px;
  }

  .hero { padding-top: 20px; padding-bottom: calc(var(--overlap) + 44px); }
  .hero::before, .hero::after { width: 330px; height: 535px; top: -70px; }
  .hero::before { left: -90px; }
  .hero::after { right: -90px; }
  .hero__title { margin-top: 12px; }
  .hero__line { font-size: 28px; }
  .hero__line--accent { font-size: 44px; }

  .works { gap: 40px; }
  .work { padding: 14px; border-radius: 20px; }
  .work__title { margin: 2px 8px 12px; font-size: 19px; }
  .player { border-radius: 14px; }
  .player__play { width: 76px; height: 76px; }
  .player__play svg { width: 34px; height: 34px; }

  .footer { margin-top: 88px; }
  .footer__inner {
    grid-template-columns: 1fr auto auto;
    align-items: start;
    column-gap: 72px;
    padding-top: 52px;
    padding-bottom: 40px;
  }
  .footer__logo { width: 136px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
