@font-face {
  font-family: "Reem Kufi";
  src: url("../fonts/ReemKufi.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #e3ebe6;
  --ink: #1a2420;
  --canal: #102628;
  --brass: #a56b2a;
  --link: #143f3b;
  --muted: #3d524a;
  --line: #c5d2cb;
  --mist: #e7eeea;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(to left, rgb(26 36 32 / 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(26 36 32 / 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.125rem;
  line-height: 1.75;
}

::selection {
  background: #d5e3db;
}

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

a {
  color: var(--link);
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -5rem;
  z-index: 5;
  padding: 0.45rem 0.75rem;
  background: var(--paper);
  color: var(--ink);
}

.skip:focus {
  top: 0.8rem;
}

.frame {
  position: relative;
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.35rem 0 4.5rem;
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border-color: var(--brass);
  border-style: solid;
}

.frame::before {
  top: 0.15rem;
  inset-inline-start: -0.9rem;
  border-width: 1.5px 1.5px 0 0;
}

.frame::after {
  bottom: 1.2rem;
  inset-inline-end: -0.9rem;
  border-width: 0 0 1.5px 1.5px;
}

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.85rem 0 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  font-family: "Reem Kufi", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  display: block;
}

.sections {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sections a,
.index a,
a.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--canal);
  border-inline-start: 4px solid var(--brass);
  background: var(--canal);
  color: var(--mist);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.sections a:hover,
.index a:hover,
a.button:hover,
button.button:hover,
.sections a[aria-current="page"] {
  border-color: var(--brass);
  background: var(--brass);
  color: var(--ink);
}

h1,
h2,
.dt {
  font-family: "Reem Kufi", sans-serif;
  font-weight: 700;
  line-height: 1.12;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 2.4rem;
  align-items: center;
  margin-top: 2.1rem;
}

.mast-title {
  margin: 0;
  font-size: clamp(4.4rem, 8vw, 7.15rem);
  line-height: 0.86;
}

.mast-title span {
  display: block;
  text-align: start;
}

.mast-lead {
  max-width: 28ch;
  margin: 1.3rem 0 0;
  font-size: 1.24rem;
}

.mast-note {
  max-width: 34ch;
  margin: 0.8rem 0 0;
}

.mast-actions {
  margin-top: 1.5rem;
}

.split > div .button {
  margin-top: auto;
}

.map-wrap {
  position: relative;
  background: var(--canal);
  overflow: hidden;
}

.map-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(16 38 40 / 0.05) 40%, rgb(16 38 40 / 0.35));
  pointer-events: none;
}

.hero-photo {
  aspect-ratio: 640 / 700;
  object-fit: cover;
  object-position: 52% center;
}

.map-wrap .pin,
.map-wrap .map-legend {
  z-index: 1;
}

.map-wrap .pin {
  padding: 0.42rem 0.7rem;
  background: rgb(16 38 40 / 0.92);
  border: 1px solid rgb(196 137 58 / 0.85);
}

.contact-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-photo {
  display: block;
  width: 100%;
  height: auto;
}

.map {
  display: block;
  width: 100%;
  height: auto;
}

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  direction: ltr;
  color: var(--mist);
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.pin::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  flex: none;
  background: #c4893a;
}

.pin:hover {
  color: #f4e2c0;
}

.pin:hover::before {
  background: #f4e2c0;
}

.map-wrap :focus-visible {
  outline-color: #f4e2c0;
}

.map-legend {
  position: static;
  margin: 0;
  padding: 0.7rem 0.9rem;
  background: var(--canal);
  color: var(--mist);
  font-size: 0.95rem;
}

.page-title {
  margin: 1.7rem 0 0;
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  line-height: 0.95;
}

.standfirst {
  max-width: 42ch;
  margin: 0.9rem 0 0;
  font-size: 1.2rem;
}

section {
  margin-top: 3.6rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

p {
  margin: 0 0 0.85rem;
}

.measure {
  max-width: 62ch;
}

.commit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.commit-grid > div {
  padding-inline: 1.15rem;
  border-inline-start: 1px solid var(--line);
}

.commit-grid > div:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.commit-grid dt {
  margin: 0 0 0.4rem;
  font-family: "Reem Kufi", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}

.commit-grid dd {
  margin: 0;
}

.screen {
  margin: 1rem 0 0;
}

.screen-stage {
  position: relative;
  background: #0c1c1e;
}

.screen-stage video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #0c1c1e;
  cursor: pointer;
}

.screen-big {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  border: 0;
  border-radius: 50%;
  background: rgb(16 38 40 / 0.88);
  color: var(--mist);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.screen-big:hover,
.screen-btn:hover {
  background: var(--brass);
  color: var(--ink);
}

.screen.is-playing .screen-big {
  opacity: 0;
  pointer-events: none;
}

.screen-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  background: var(--canal);
  color: var(--mist);
}

.screen-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.screen-btn .icon-pause,
.screen-btn .icon-off,
.screen.is-playing .screen-btn .icon-play,
.screen.is-muted .screen-btn .icon-on {
  display: none;
}

.screen.is-playing .screen-btn .icon-pause,
.screen.is-muted .screen-btn .icon-off {
  display: block;
}

.screen-time {
  flex: none;
  min-width: 6.4rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.screen-seek-wrap {
  flex: 1;
  min-width: 4rem;
  direction: ltr;
}

.screen-seek {
  width: 100%;
  height: 1.6rem;
  margin: 0;
  accent-color: var(--brass);
  cursor: pointer;
}

.caption-line {
  min-height: 4.8rem;
  margin: 0;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--line);
  border-top: 0;
  border-inline-start: 4px solid var(--brass);
  background: #f7fbf8;
  font-size: 1.2rem;
  line-height: 1.65;
}

.caption-line:empty::before {
  content: "الترجمة تظهر هنا أثناء التشغيل.";
  color: var(--muted);
}

figcaption {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.screen:fullscreen,
.screen:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0;
  background: #0c1c1e;
}

.screen:fullscreen .screen-stage,
.screen:-webkit-full-screen .screen-stage {
  flex: 1;
  min-height: 0;
}

.screen:fullscreen video,
.screen:-webkit-full-screen video {
  width: 100%;
  height: 100%;
}

.screen:fullscreen .caption-line,
.screen:-webkit-full-screen .caption-line {
  border-color: #244240;
  background: #102628;
  color: var(--mist);
}

.screen:fullscreen figcaption,
.screen:-webkit-full-screen figcaption {
  display: none;
}

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

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
}

.split > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.split > div + div {
  padding-inline-start: 1.5rem;
  border-inline-start: 1px solid var(--line);
}

.split a,
.closer a {
  font-weight: 600;
}

.band {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2rem;
  align-items: center;
  padding: 2.15rem 0;
  border-top: 1px solid var(--line);
}

.band-media img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--canal);
}

.scenario {
  margin-top: 1rem;
  padding-inline-start: 0.85rem;
  border-inline-start: 2px solid var(--brass);
}

.scenario h3 {
  margin: 0 0 0.25rem;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
}

.scenario p {
  margin: 0;
}

.index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.35rem;
}


.facts {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.55rem 1rem;
  max-width: 38rem;
  margin: 1.4rem 0 0;
}

.facts dt {
  font-weight: 600;
}

.facts dd {
  margin: 0;
}

.field {
  max-width: 36rem;
  margin-top: 1.15rem;
}

label {
  display: block;
  margin-bottom: 0.2rem;
}

input,
textarea {
  width: 100%;
  padding: 0.7rem 0.15rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

input:focus,
textarea:focus {
  border-bottom-color: var(--brass);
}

textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.form-actions {
  margin-top: 1.25rem;
}

.form-note {
  max-width: 62ch;
  min-height: 1.6em;
  margin-top: 0.9rem;
}

.form-note.is-error {
  color: #7a2e2e;
}

.closer {
  max-width: 62ch;
}

footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer p {
  max-width: 62ch;
  margin: 0.15rem 0;
}

@media (min-width: 861px) {
  .band-flip .band-media {
    order: -1;
  }
}

@media (max-width: 860px) {
  .hero,
  .contact-intro,
  .split,
  .band,
  .commit-grid {
    grid-template-columns: 1fr;
  }

  .mast-lead,
  .mast-note,
  .standfirst {
    max-width: 40ch;
  }

  .commit-grid > div {
    padding: 1rem 0 0;
    border-top: 1px solid var(--line);
    border-inline-start: 0;
  }

  .commit-grid > div:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .split > div + div {
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  .pin {
    font-size: 0.82rem;
  }

  .screen-time {
    min-width: 5.4rem;
    font-size: 0.82rem;
  }

  .caption-line {
    font-size: 1.05rem;
  }
}

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