@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("./ibm-plex-sans-arabic-400-v15.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("./ibm-plex-sans-arabic-600-v15.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #15201e;
  --sky: #8fb4d7;
  --charcoal: #171d1b;
  --paper: #e9ece5;
  --gutter: clamp(24px, 4.5vw, 76px);
  --latin: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { margin: 0; }

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  font-weight: 400;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}

::selection { color: var(--paper); background: var(--ink); }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 1020px;
  min-height: max(1020px, 100svh);
  padding: 0 var(--gutter) 350px;
  background: var(--sky);
}

.scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 65% 0 0;
  background: linear-gradient(transparent, rgb(23 29 27 / 12%) 80%, rgb(23 29 27 / 40%));
}

.scene-image {
  position: absolute;
  inset: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  max-width: none;
  object-fit: cover;
  object-position: 50% 0%;
  transform: translate3d(var(--scene-x, 0px), var(--scene-y, 0px), 0);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px 0;
}

.brand-ar {
  font-size: 35px;
  line-height: 1.5;
  font-weight: 600;
}

.brand-en {
  font-family: var(--latin);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .25em;
  text-transform: uppercase;
}

.hero-copy {
  margin-inline: auto;
  padding-top: clamp(6px, 1.5svh, 20px);
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(112px, 10.5vw, 154px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: normal;
}

.status-en {
  margin: 10px 0 0;
  font-family: var(--latin);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.hero-statement {
  margin: 18px auto 0;
  font-size: clamp(23px, 2.1vw, 32px);
  font-weight: 600;
  line-height: 1.55;
  text-wrap: balance;
}

.positioning {
  max-width: 52em;
  margin: 10px auto 0;
  font-size: 15px;
  line-height: 1.9;
  text-wrap: balance;
}

.scroll-link {
  position: absolute;
  bottom: 33px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  border-radius: 50%;
  background: var(--charcoal);
  color: #fff;
  transition: transform 180ms ease;
}

.scroll-link:hover { transform: translateY(4px); }

.scroll-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.contact {
  min-height: 280px;
  padding: 62px var(--gutter) 42px;
  background: var(--charcoal);
  color: var(--paper);
  display: grid;
  grid-template-rows: 1fr auto;
  justify-content: space-between;
  gap: 52px;
}

.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
}

.footer-identity {
  display: grid;
  gap: 5px;
}

.footer-company,
.footer-company-en,
.footer-meta p {
  margin: 0;
}

.footer-company {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.5;
}

.footer-company-en {
  color: rgb(233 236 229 / 58%);
  font-family: var(--latin);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-domain {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 100%;
  padding-bottom: 5px;
  border-bottom: 1px solid rgb(233 236 229 / 35%);
  color: inherit;
  font-family: var(--latin);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -.01em;
  text-decoration: none;
}

.site-domain span { overflow-wrap: anywhere; }
.domain-arrow { flex: 0 0 auto; transition: transform 200ms ease; }
.site-domain:hover .domain-arrow { transform: translate(4px, -4px); }

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid rgb(233 236 229 / 18%);
  color: rgb(233 236 229 / 58%);
  font-size: 12px;
  line-height: 1.6;
}

.registration[hidden] { display: none; }

.memory {
  position: relative;
  isolation: isolate;
  min-height: min(680px, 84svh);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(400px, 1.05fr);
  align-items: center;
  gap: clamp(44px, 6vw, 100px);
  padding: clamp(78px, 8vw, 118px) var(--gutter);
  background:
    radial-gradient(ellipse at 18% 72%, rgb(255 247 225 / 65%), transparent 36%),
    radial-gradient(ellipse at 78% 18%, rgb(236 230 215 / 58%), transparent 38%),
    linear-gradient(135deg, #d9d3c7, #c7c2b7);
  color: var(--ink);
}

.memory::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .36;
  background: linear-gradient(118deg, transparent 0 36%, rgb(255 255 255 / 28%) 36.1% 36.3%, transparent 36.4% 100%);
}

.memory-copy {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

.memory-copy h2 {
  margin: 0;
  font-size: clamp(52px, 6vw, 92px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
}

.memory-copy p {
  max-width: 34em;
  margin: 24px 0 0;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 2;
  text-wrap: balance;
}

.memory-visual {
  position: relative;
  justify-self: center;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  transform: translateY(18px);
}

.memory-orbit,
.memory-route {
  position: absolute;
  display: block;
  pointer-events: none;
}

.memory-orbit {
  top: 50%;
  left: 50%;
  border: 1px solid rgb(21 32 30 / 26%);
  border-radius: 43% 57% 48% 52% / 54% 42% 58% 46%;
  transform: translate(-50%, -50%) rotate(var(--orbit-turn)) scale(.88);
  opacity: 0;
  transition: transform 1.1s cubic-bezier(.2,.8,.2,1), opacity 900ms ease;
}

.memory-orbit--outer { --orbit-turn: -8deg; width: 100%; height: 78%; transition-delay: 120ms; }
.memory-orbit--middle { --orbit-turn: 11deg; width: 74%; height: 61%; transition-delay: 260ms; }
.memory-orbit--inner { --orbit-turn: -17deg; width: 49%; height: 43%; transition-delay: 400ms; }

.memory-route {
  top: 50%;
  left: 50%;
  width: 49%;
  height: 1px;
  background: rgb(21 32 30 / 28%);
  transform-origin: left center;
  opacity: 0;
  transition: opacity 700ms ease 500ms, transform 900ms cubic-bezier(.2,.8,.2,1) 500ms;
}

.memory-route--one { transform: rotate(31deg) scaleX(.12); }
.memory-route--two { transform: rotate(211deg) scaleX(.12); }

.memory-record {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34%;
  aspect-ratio: .76;
  padding: 18% 13%;
  border: 1px solid rgb(21 32 30 / 34%);
  border-radius: 16px;
  background: rgb(239 235 224 / 72%);
  box-shadow: 0 34px 90px rgb(35 36 31 / 16%);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -46%) scale(.9);
  opacity: 0;
  transition: transform 1s cubic-bezier(.2,.8,.2,1) 560ms, opacity 800ms ease 560ms;
}

.memory-record::before,
.memory-record::after {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: -1;
  border: 1px solid rgb(21 32 30 / 18%);
  border-radius: 13px;
  transform: rotate(6deg);
}

.memory-record::after { transform: rotate(-6deg); }

.record-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 24%;
  border: 1px solid rgb(21 32 30 / 28%);
  border-radius: 50%;
}

.record-line {
  display: block;
  width: 72%;
  height: 1px;
  margin: 11% 0 0 auto;
  background: rgb(21 32 30 / 24%);
}

.record-line--wide { width: 100%; }
.record-line--short { width: 46%; }

.record-point {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgb(21 32 30 / 50%);
  border-radius: 50%;
  background: #eee7d7;
  box-shadow: 0 0 0 6px rgb(255 241 201 / 20%);
}

.record-point--one { top: 14%; right: -49%; }
.record-point--two { bottom: 2%; right: -27%; }
.record-point--three { bottom: 18%; left: -43%; }

.memory.is-visible .memory-orbit {
  transform: translate(-50%, -50%) rotate(var(--orbit-turn)) scale(1);
  opacity: 1;
}

.memory.is-visible .memory-record {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.memory.is-visible .memory-route { opacity: 1; }
.memory.is-visible .memory-route--one { transform: rotate(31deg) scaleX(1); }
.memory.is-visible .memory-route--two { transform: rotate(211deg) scaleX(1); }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 8px;
}

@media (min-width: 1700px) {
  .hero-copy { padding-top: 3svh; }
}

@media (max-width: 700px) {
  .hero {
    height: 100svh;
    min-height: 0;
    padding-bottom: 0;
  }

  .masthead { padding-top: max(68px, calc(env(safe-area-inset-top) + 44px)); }
  .brand-ar { font-size: 26px; }
  .brand-en { font-size: 10px; letter-spacing: .22em; }
  .hero-copy {
    position: absolute;
    top: clamp(148px, 19svh, 172px);
    inset-inline: var(--gutter);
    padding-top: 0;
    text-shadow: 0 1px 14px rgb(189 215 237 / 34%);
  }
  h1 { font-size: clamp(66px, 20vw, 82px); line-height: 1.1; }
  .status-en { margin-top: 6px; font-size: 9px; }
  .hero-statement { margin-top: 13px; font-size: clamp(18px, 5.2vw, 22px); line-height: 1.55; }
  .positioning { max-width: 29em; margin-top: 7px; font-size: 12px; line-height: 1.75; }
  .scene-image { object-position: 53% 0%; }
  .scroll-link { bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px)); left: 50%; margin-left: -24px; }
  .contact { min-height: 0; padding: 38px var(--gutter) 28px; gap: 36px; }
  .footer-main { display: grid; gap: 28px; }
  .footer-company { font-size: 21px; }
  .footer-company-en { font-size: 10px; }
  .site-domain { justify-self: start; width: auto; font-size: 15px; gap: 12px; }
  .domain-arrow { width: 18px; height: 18px; }
  .footer-meta { align-items: flex-start; flex-direction: column; gap: 8px; padding-top: 18px; font-size: 11px; }

  .memory {
    min-height: 620px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    padding: 72px var(--gutter) 64px;
  }

  .memory-copy h2 { font-size: clamp(43px, 13vw, 56px); }
  .memory-copy p { margin-top: 17px; font-size: 15px; line-height: 1.9; }
  .memory-visual { width: min(82vw, 300px); transform: none; }
  .memory-record { border-radius: 13px; }
  .memory-record::before,
  .memory-record::after { border-radius: 11px; }
  .record-mark { width: 46px; height: 46px; }
}

@supports (height: 100dvh) {
  @media (max-width: 700px) {
    .hero { height: 100dvh; }
  }
}

@media (max-width: 700px) and (max-height: 730px) {
  .masthead { padding-top: max(44px, calc(env(safe-area-inset-top) + 26px)); }
  .hero-copy { top: clamp(108px, 16svh, 126px); }
  h1 { font-size: clamp(57px, 18vw, 70px); }
  .hero-statement { margin-top: 8px; font-size: 17px; }
  .positioning { margin-top: 5px; font-size: 10.5px; line-height: 1.6; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scene-image, .scroll-link, .domain-arrow { transform: none !important; }
  .memory-orbit, .memory-record { opacity: 1 !important; }
  .memory-orbit { transform: translate(-50%, -50%) rotate(var(--orbit-turn)) scale(1) !important; }
  .memory-record { transform: translate(-50%, -50%) scale(1) !important; }
}
